From a486cd838ef43a0a358f8a8baad58f163e0c4156 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 12 Feb 2019 12:23:47 +0000 Subject: [PATCH] vendor: github.com/terraform-providers/terraform-provider-aws@v1.58.0 --- go.mod | 17 +- go.sum | 85 +- vendor/github.com/armon/go-radix/go.mod | 1 + vendor/github.com/armon/go-radix/radix.go | 60 +- .../aws/aws-sdk-go/aws/client/client.go | 2 +- .../aws/{context.go => context_1_5.go} | 40 +- .../aws/aws-sdk-go/aws/context_1_7.go | 9 - .../aws/aws-sdk-go/aws/context_1_9.go | 11 + ...ntext_1_6.go => context_background_1_5.go} | 15 + .../aws-sdk-go/aws/context_background_1_7.go | 20 + .../aws/aws-sdk-go/aws/context_sleep.go | 24 + .../aws-sdk-go/aws/corehandlers/user_agent.go | 2 +- .../aws-sdk-go/aws/credentials/credentials.go | 35 + .../aws/aws-sdk-go/aws/csm/metric.go | 56 + .../aws-sdk-go/aws/csm/metric_exception.go | 26 + .../aws/aws-sdk-go/aws/csm/reporter.go | 40 +- .../aws/aws-sdk-go/aws/ec2metadata/api.go | 4 + .../aws/aws-sdk-go/aws/ec2metadata/service.go | 2 +- .../aws/aws-sdk-go/aws/endpoints/decode.go | 28 + .../aws/aws-sdk-go/aws/endpoints/defaults.go | 367 +- .../aws/aws-sdk-go/aws/endpoints/endpoints.go | 2 +- .../aws/aws-sdk-go/aws/request/request.go | 63 +- .../aws/aws-sdk-go/aws/session/doc.go | 2 +- .../aws/aws-sdk-go/aws/session/env_config.go | 2 +- .../aws/aws-sdk-go/aws/signer/v4/v4.go | 4 +- .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/internal/ini/ini_parser.go | 2 +- .../aws/aws-sdk-go/internal/ini/statement.go | 2 +- .../internal/shareddefaults/ecs_container.go | 2 +- .../aws/aws-sdk-go/service/acmpca/api.go | 127 +- .../aws/aws-sdk-go/service/acmpca/doc.go | 10 +- .../aws/aws-sdk-go/service/acmpca/errors.go | 3 +- .../aws/aws-sdk-go/service/acmpca/waiters.go | 163 + .../aws-sdk-go/service/apigatewayv2/api.go | 14048 +++++++++ .../aws-sdk-go/service/apigatewayv2/doc.go | 28 + .../aws-sdk-go/service/apigatewayv2/errors.go | 34 + .../service/apigatewayv2/service.go | 99 + .../aws/aws-sdk-go/service/appmesh/api.go | 64 +- .../aws/aws-sdk-go/service/appmesh/doc.go | 2 +- .../aws/aws-sdk-go/service/athena/api.go | 34 +- .../aws/aws-sdk-go/service/backup/api.go | 10729 +++++++ .../aws/aws-sdk-go/service/backup/doc.go | 30 + .../aws/aws-sdk-go/service/backup/errors.go | 58 + .../aws/aws-sdk-go/service/backup/service.go | 96 + .../aws-sdk-go/service/cloudformation/api.go | 239 +- .../aws/aws-sdk-go/service/cloudsearch/api.go | 6406 ++++ .../aws/aws-sdk-go/service/cloudsearch/doc.go | 33 + .../aws-sdk-go/service/cloudsearch/errors.go | 44 + .../aws-sdk-go/service/cloudsearch/service.go | 95 + .../aws-sdk-go/service/cloudwatchlogs/api.go | 10 +- .../aws/aws-sdk-go/service/codebuild/api.go | 162 +- .../aws/aws-sdk-go/service/codecommit/api.go | 12 + .../aws-sdk-go/service/codecommit/errors.go | 18 + .../aws/aws-sdk-go/service/codedeploy/api.go | 595 +- .../aws/aws-sdk-go/service/codedeploy/doc.go | 51 +- .../aws-sdk-go/service/codedeploy/errors.go | 52 +- .../service/cognitoidentityprovider/api.go | 254 +- .../service/costandusagereportservice/api.go | 728 + .../service/costandusagereportservice/doc.go | 28 + .../costandusagereportservice/errors.go | 34 + .../costandusagereportservice/service.go | 100 + .../databasemigrationservice/waiters.go | 14 +- .../aws-sdk-go/service/datapipeline/api.go | 4663 +++ .../aws-sdk-go/service/datapipeline/doc.go | 49 + .../aws-sdk-go/service/datapipeline/errors.go | 39 + .../service/datapipeline/service.go | 97 + .../aws/aws-sdk-go/service/devicefarm/api.go | 566 +- .../aws/aws-sdk-go/service/docdb/api.go | 10980 +++++++ .../aws/aws-sdk-go/service/docdb/doc.go | 28 + .../aws/aws-sdk-go/service/docdb/errors.go | 290 + .../aws/aws-sdk-go/service/docdb/service.go | 98 + .../aws/aws-sdk-go/service/docdb/waiters.go | 152 + .../aws/aws-sdk-go/service/dynamodb/api.go | 128 +- .../aws/aws-sdk-go/service/dynamodb/errors.go | 35 +- .../aws/aws-sdk-go/service/ec2/api.go | 5161 ++- .../aws/aws-sdk-go/service/ecr/api.go | 555 +- .../aws/aws-sdk-go/service/ecr/errors.go | 15 + .../aws/aws-sdk-go/service/ecr/service.go | 9 +- .../aws/aws-sdk-go/service/ecs/api.go | 8 +- .../service/elasticbeanstalk/api.go | 53 +- .../aws/aws-sdk-go/service/elbv2/api.go | 97 +- .../aws/aws-sdk-go/service/elbv2/doc.go | 2 +- .../aws/aws-sdk-go/service/emr/api.go | 75 +- .../aws/aws-sdk-go/service/firehose/api.go | 130 +- .../aws/aws-sdk-go/service/fms/api.go | 35 +- .../aws/aws-sdk-go/service/fsx/api.go | 3646 +++ .../aws/aws-sdk-go/service/fsx/doc.go | 29 + .../aws/aws-sdk-go/service/fsx/errors.go | 106 + .../aws/aws-sdk-go/service/fsx/service.go | 97 + .../service/globalaccelerator/api.go | 3617 +++ .../service/globalaccelerator/doc.go | 94 + .../service/globalaccelerator/errors.go | 84 + .../service/globalaccelerator/service.go | 100 + .../aws/aws-sdk-go/service/glue/api.go | 88 +- .../aws/aws-sdk-go/service/iot/api.go | 29 +- .../aws/aws-sdk-go/service/kafka/api.go | 1736 + .../aws/aws-sdk-go/service/kafka/doc.go | 28 + .../aws/aws-sdk-go/service/kafka/errors.go | 54 + .../aws/aws-sdk-go/service/kafka/service.go | 99 + .../aws/aws-sdk-go/service/lambda/api.go | 990 +- .../aws/aws-sdk-go/service/lambda/errors.go | 6 +- .../aws-sdk-go/service/licensemanager/api.go | 3443 ++ .../aws-sdk-go/service/licensemanager/doc.go | 35 + .../service/licensemanager/errors.go | 70 + .../service/licensemanager/service.go | 97 + .../aws/aws-sdk-go/service/lightsail/api.go | 81 +- .../aws-sdk-go/service/mediaconnect/api.go | 4571 +++ .../aws-sdk-go/service/mediaconnect/doc.go | 28 + .../aws-sdk-go/service/mediaconnect/errors.go | 78 + .../service/mediaconnect/service.go | 99 + .../aws-sdk-go/service/mediaconvert/api.go | 19194 +++++++++++ .../aws-sdk-go/service/mediaconvert/doc.go | 28 + .../aws-sdk-go/service/mediaconvert/errors.go | 30 + .../service/mediaconvert/service.go | 99 + .../aws/aws-sdk-go/service/medialive/api.go | 17266 ++++++++++ .../aws/aws-sdk-go/service/medialive/doc.go | 28 + .../aws-sdk-go/service/medialive/errors.go | 42 + .../aws-sdk-go/service/medialive/service.go | 99 + .../aws-sdk-go/service/mediapackage/api.go | 3954 +++ .../aws-sdk-go/service/mediapackage/doc.go | 28 + .../aws-sdk-go/service/mediapackage/errors.go | 30 + .../service/mediapackage/service.go | 99 + .../aws-sdk-go/service/mediastoredata/api.go | 1112 + .../aws-sdk-go/service/mediastoredata/doc.go | 30 + .../service/mediastoredata/errors.go | 30 + .../service/mediastoredata/service.go | 98 + .../aws-sdk-go/service/organizations/api.go | 8 +- .../aws/aws-sdk-go/service/pinpoint/api.go | 36 + .../aws/aws-sdk-go/service/ram/api.go | 4029 +++ .../aws/aws-sdk-go/service/ram/doc.go | 44 + .../aws/aws-sdk-go/service/ram/errors.go | 128 + .../aws/aws-sdk-go/service/ram/service.go | 96 + .../aws/aws-sdk-go/service/rds/api.go | 441 +- .../aws/aws-sdk-go/service/rds/errors.go | 23 + .../aws/aws-sdk-go/service/redshift/api.go | 78 + .../aws-sdk-go/service/resourcegroups/api.go | 2839 ++ .../aws-sdk-go/service/resourcegroups/doc.go | 60 + .../service/resourcegroups/errors.go | 50 + .../service/resourcegroups/service.go | 98 + .../aws-sdk-go/service/route53resolver/api.go | 5202 +++ .../aws-sdk-go/service/route53resolver/doc.go | 62 + .../service/route53resolver/errors.go | 84 + .../service/route53resolver/service.go | 97 + .../aws/aws-sdk-go/service/s3/api.go | 2 +- .../aws/aws-sdk-go/service/s3control/api.go | 569 + .../service/s3control/customizations.go | 14 + .../aws/aws-sdk-go/service/s3control/doc.go | 28 + .../aws-sdk-go/service/s3control/errors.go | 13 + .../aws-sdk-go/service/s3control/service.go | 100 + .../aws/aws-sdk-go/service/sagemaker/api.go | 26320 ++++++++++++++++ .../aws/aws-sdk-go/service/sagemaker/doc.go | 28 + .../aws-sdk-go/service/sagemaker/errors.go | 25 + .../aws-sdk-go/service/sagemaker/service.go | 100 + .../aws-sdk-go/service/sagemaker/waiters.go | 392 + .../serverlessapplicationrepository/api.go | 3900 +++ .../serverlessapplicationrepository/doc.go | 58 + .../serverlessapplicationrepository/errors.go | 45 + .../service.go | 99 + .../aws-sdk-go/service/servicecatalog/api.go | 84 +- .../aws/aws-sdk-go/service/sfn/api.go | 599 +- .../aws/aws-sdk-go/service/sfn/errors.go | 15 + .../aws/aws-sdk-go/service/ssm/api.go | 58 +- .../aws-sdk-go/service/storagegateway/api.go | 504 +- .../aws/aws-sdk-go/service/waf/api.go | 213 +- .../aws/aws-sdk-go/service/waf/errors.go | 13 + .../aws/aws-sdk-go/service/wafregional/api.go | 95 +- .../aws/aws-sdk-go/service/worklink/api.go | 3904 +++ .../aws/aws-sdk-go/service/worklink/doc.go | 35 + .../aws/aws-sdk-go/service/worklink/errors.go | 42 + .../aws-sdk-go/service/worklink/service.go | 99 + vendor/github.com/beevik/etree/.travis.yml | 1 + vendor/github.com/beevik/etree/CONTRIBUTORS | 1 + .../github.com/beevik/etree/RELEASE_NOTES.md | 27 + vendor/github.com/beevik/etree/etree.go | 99 +- vendor/github.com/beevik/etree/path.go | 93 +- vendor/github.com/bgentry/speakeasy/LICENSE | 24 + .../github.com/gogo/protobuf/gogoproto/doc.go | 2 +- .../gogo/protobuf/gogoproto/gogo.pb.go | 215 +- .../gogo/protobuf/gogoproto/gogo.proto | 8 + .../gogo/protobuf/gogoproto/helper.go | 57 + .../github.com/gogo/protobuf/proto/encode.go | 15 - vendor/github.com/gogo/protobuf/proto/lib.go | 62 +- .../gogo/protobuf/proto/properties.go | 30 +- .../gogo/protobuf/proto/table_marshal.go | 317 +- .../gogo/protobuf/proto/table_unmarshal.go | 259 +- vendor/github.com/gogo/protobuf/proto/text.go | 4 +- .../gogo/protobuf/proto/text_parser.go | 26 +- .../gogo/protobuf/proto/wrappers.go | 1888 ++ .../gogo/protobuf/proto/wrappers_gogo.go | 113 + .../gogo/protobuf/sortkeys/sortkeys.go | 101 + vendor/github.com/golang/snappy/.gitignore | 16 + vendor/github.com/golang/snappy/AUTHORS | 15 + vendor/github.com/golang/snappy/CONTRIBUTORS | 37 + vendor/github.com/golang/snappy/LICENSE | 27 + vendor/github.com/golang/snappy/README | 107 + vendor/github.com/golang/snappy/decode.go | 237 + .../github.com/golang/snappy/decode_amd64.go | 14 + .../github.com/golang/snappy/decode_amd64.s | 490 + .../github.com/golang/snappy/decode_other.go | 101 + vendor/github.com/golang/snappy/encode.go | 285 + .../github.com/golang/snappy/encode_amd64.go | 29 + .../github.com/golang/snappy/encode_amd64.s | 730 + .../github.com/golang/snappy/encode_other.go | 238 + vendor/github.com/golang/snappy/snappy.go | 98 + vendor/github.com/google/gofuzz/.travis.yml | 13 + .../github.com/google/gofuzz/CONTRIBUTING.md | 67 + vendor/github.com/google/gofuzz/LICENSE | 202 + vendor/github.com/google/gofuzz/README.md | 71 + vendor/github.com/google/gofuzz/doc.go | 18 + vendor/github.com/google/gofuzz/fuzz.go | 487 + .../github.com/hashicorp/go-safetemp/go.mod | 1 + .../vault/helper/compressutil/compress.go | 47 +- .../hashicorp/vault/helper/jsonutil/json.go | 5 +- .../vault/helper/pgpkeys/encrypt_decrypt.go | 19 +- .../hashicorp/vault/helper/pgpkeys/flag.go | 85 +- .../hashicorp/vault/helper/pgpkeys/keybase.go | 25 +- .../aws_policy_equivalence.go | 128 +- .../jen20/awspolicyequivalence/go.mod | 3 + .../jen20/awspolicyequivalence/go.sum | 2 + .../aws-iam-authenticator/LICENSE | 201 + .../aws-iam-authenticator/pkg/arn/arn.go | 69 + .../aws-iam-authenticator/pkg/token/token.go | 432 + vendor/github.com/mattn/go-isatty/.travis.yml | 13 + vendor/github.com/mattn/go-isatty/README.md | 17 +- .../mattn/go-isatty/isatty_appengine.go | 6 + .../mattn/go-isatty/isatty_linux.go | 2 +- .../mattn/go-isatty/isatty_linux_ppc64x.go | 19 + .../mattn/go-isatty/isatty_others.go | 10 + .../mattn/go-isatty/isatty_windows.go | 79 +- .../aws/autoscaling_tags.go | 3 +- .../terraform-provider-aws/aws/config.go | 296 +- .../aws/data_source_aws_ami_ids.go | 2 +- .../aws/data_source_aws_autoscaling_group.go | 181 + .../aws/data_source_aws_autoscaling_groups.go | 2 +- .../data_source_aws_cloudformation_export.go | 2 +- ...a_source_aws_cloudtrail_service_account.go | 4 + .../aws/data_source_aws_ebs_snapshot.go | 7 +- .../aws/data_source_aws_ebs_snapshot_ids.go | 2 +- .../aws/data_source_aws_ebs_volume.go | 7 +- .../aws/data_source_aws_ecr_repository.go | 16 +- .../aws/data_source_aws_efs_file_system.go | 13 +- .../aws/data_source_aws_eks_cluster_auth.go | 48 + ...ource_aws_elastic_beanstalk_application.go | 87 + .../data_source_aws_elasticache_cluster.go | 2 +- .../aws/data_source_aws_instance.go | 2 +- .../aws/data_source_aws_instances.go | 6 +- .../aws/data_source_aws_internet_gateway.go | 7 +- .../aws/data_source_aws_lambda_function.go | 8 + .../aws/data_source_aws_mq_broker.go | 1 + .../data_source_aws_route53_delegation_set.go | 6 - .../aws/data_source_aws_route53_zone.go | 2 +- .../aws/data_source_aws_s3_bucket.go | 7 +- .../aws/data_source_aws_s3_bucket_object.go | 2 +- .../aws/data_source_aws_security_groups.go | 6 +- .../aws/ecs_task_definition_equivalency.go | 2 +- .../aws/iam_policy_model.go | 16 +- .../aws/import_aws_db_event_subscription.go | 2 +- .../aws/import_aws_s3_bucket.go | 2 +- .../terraform-provider-aws/aws/provider.go | 37 + .../aws/resource_aws_acm_certificate.go | 117 +- ...source_aws_acmpca_certificate_authority.go | 4 +- ...urce_aws_api_gateway_documentation_part.go | 8 +- ...esource_aws_api_gateway_method_settings.go | 2 +- .../aws/resource_aws_api_gateway_stage.go | 2 +- .../aws/resource_aws_api_gateway_vpc_link.go | 7 +- ...source_aws_app_cookie_stickiness_policy.go | 7 +- .../aws/resource_aws_appautoscaling_policy.go | 12 +- .../aws/resource_aws_appmesh_route.go | 7 +- .../aws/resource_aws_appmesh_virtual_node.go | 7 +- .../resource_aws_appmesh_virtual_router.go | 7 +- .../aws/resource_aws_athena_named_query.go | 6 +- .../aws/resource_aws_autoscaling_group.go | 13 +- .../resource_aws_autoscaling_group_waiting.go | 2 +- .../resource_aws_autoscaling_notification.go | 7 +- .../aws/resource_aws_autoscaling_policy.go | 28 +- .../aws/resource_aws_backup_vault.go | 121 + .../aws/resource_aws_batch_job_queue.go | 12 +- .../resource_aws_cloud9_environment_ec2.go | 3 - .../aws/resource_aws_cloudwatch_event_rule.go | 4 +- .../aws/resource_aws_cloudwatch_log_group.go | 2 +- .../aws/resource_aws_cloudwatch_log_stream.go | 11 +- .../aws/resource_aws_codebuild_project.go | 13 +- .../aws/resource_aws_codecommit_trigger.go | 6 +- ...source_aws_codedeploy_deployment_config.go | 8 +- ...esource_aws_codedeploy_deployment_group.go | 13 +- .../aws/resource_aws_codepipeline.go | 6 +- .../aws/resource_aws_codepipeline_webhook.go | 2 - .../resource_aws_cognito_resource_server.go | 4 +- ...urce_aws_config_aggregate_authorization.go | 4 +- .../aws/resource_aws_customer_gateway.go | 6 +- .../aws/resource_aws_dax_cluster.go | 6 +- .../aws/resource_aws_db_instance.go | 2 +- .../aws/resource_aws_db_option_group.go | 127 +- .../aws/resource_aws_db_snapshot.go | 49 +- .../aws/resource_aws_db_subnet_group.go | 2 +- .../aws/resource_aws_default_network_acl.go | 2 +- ...directory_service_conditional_forwarder.go | 2 +- .../aws/resource_aws_dlm_lifecycle_policy.go | 2 +- .../aws/resource_aws_dms_certificate.go | 6 +- ...source_aws_dms_replication_subnet_group.go | 6 +- .../aws/resource_aws_dms_replication_task.go | 5 +- .../aws/resource_aws_docdb_cluster.go | 799 + ...ource_aws_docdb_cluster_parameter_group.go | 282 + .../resource_aws_docdb_cluster_snapshot.go | 206 + .../aws/resource_aws_docdb_subnet_group.go | 219 + .../aws/resource_aws_dx_connection.go | 7 +- .../aws/resource_aws_dx_gateway.go | 26 +- .../resource_aws_dx_gateway_association.go | 26 +- ...sted_private_virtual_interface_accepter.go | 7 +- ...osted_public_virtual_interface_accepter.go | 7 +- .../aws/resource_aws_dx_lag.go | 7 +- ...source_aws_dx_private_virtual_interface.go | 7 +- ...esource_aws_dx_public_virtual_interface.go | 7 +- .../aws/resource_aws_dynamodb_global_table.go | 14 +- .../aws/resource_aws_dynamodb_table.go | 76 +- .../resource_aws_ec2_client_vpn_endpoint.go | 337 + ..._aws_ec2_client_vpn_network_association.go | 175 + .../aws/resource_aws_ec2_fleet.go | 10 +- .../resource_aws_ec2_transit_gateway_route.go | 2 +- .../aws/resource_aws_ecr_repository.go | 52 +- .../aws/resource_aws_ecs_service.go | 31 +- .../aws/resource_aws_efs_file_system.go | 9 +- .../aws/resource_aws_efs_mount_target.go | 5 +- ...s_elastic_beanstalk_application_version.go | 2 +- ...esource_aws_elastic_transcoder_pipeline.go | 2 +- .../aws/resource_aws_elasticache_cluster.go | 2 +- .../aws/resource_aws_elasticsearch_domain.go | 63 +- ...esource_aws_elasticsearch_domain_policy.go | 10 +- .../aws/resource_aws_elb.go | 10 +- .../aws/resource_aws_emr_cluster.go | 391 +- .../aws/resource_aws_emr_instance_group.go | 9 +- .../aws/resource_aws_gamelift_alias.go | 8 +- .../aws/resource_aws_gamelift_build.go | 6 +- .../aws/resource_aws_gamelift_fleet.go | 6 +- .../aws/resource_aws_glacier_vault.go | 2 +- ...ource_aws_globalaccelerator_accelerator.go | 362 + .../aws/resource_aws_glue_crawler.go | 6 +- .../aws/resource_aws_guardduty_detector.go | 14 +- .../aws/resource_aws_iam_access_key.go | 17 +- .../aws/resource_aws_iam_group_membership.go | 7 +- .../aws/resource_aws_iam_group_policy.go | 8 +- ...esource_aws_iam_group_policy_attachment.go | 10 +- .../aws/resource_aws_iam_instance_profile.go | 13 +- .../aws/resource_aws_iam_policy.go | 22 +- .../aws/resource_aws_iam_policy_attachment.go | 5 +- .../aws/resource_aws_iam_role.go | 175 +- .../aws/resource_aws_iam_role_policy.go | 8 +- ...resource_aws_iam_role_policy_attachment.go | 10 +- .../resource_aws_iam_server_certificate.go | 6 +- .../aws/resource_aws_iam_user.go | 79 +- .../resource_aws_iam_user_group_membership.go | 7 +- .../resource_aws_iam_user_login_profile.go | 11 +- .../aws/resource_aws_iam_user_policy.go | 8 +- ...resource_aws_iam_user_policy_attachment.go | 10 +- ...esource_aws_inspector_assessment_target.go | 103 +- .../aws/resource_aws_instance.go | 16 +- .../aws/resource_aws_internet_gateway.go | 2 +- .../aws/resource_aws_iot_topic_rule.go | 6 +- ...ource_aws_kinesis_analytics_application.go | 17 + ...ce_aws_kinesis_firehose_delivery_stream.go | 57 +- .../aws/resource_aws_kinesis_stream.go | 5 +- .../aws/resource_aws_kms_grant.go | 14 +- .../aws/resource_aws_lambda_function.go | 64 +- .../aws/resource_aws_lambda_layer_version.go | 261 + .../aws/resource_aws_lambda_permission.go | 20 +- .../aws/resource_aws_launch_configuration.go | 2 +- .../aws/resource_aws_launch_template.go | 72 +- .../aws/resource_aws_lb.go | 15 +- .../aws/resource_aws_lb_listener.go | 1 + .../aws/resource_aws_lb_target_group.go | 184 +- ...resource_aws_licensemanager_association.go | 146 + ...ws_licensemanager_license_configuration.go | 187 + .../aws/resource_aws_lightsail_domain.go | 5 +- ...aws_load_balancer_backend_server_policy.go | 4 +- ...ource_aws_load_balancer_listener_policy.go | 4 +- .../aws/resource_aws_media_package_channel.go | 182 + .../aws/resource_aws_media_store_container.go | 19 +- .../aws/resource_aws_mq_broker.go | 17 +- .../aws/resource_aws_mq_configuration.go | 11 +- .../aws/resource_aws_neptune_cluster.go | 14 +- .../resource_aws_neptune_cluster_instance.go | 9 +- .../aws/resource_aws_neptune_subnet_group.go | 7 +- .../aws/resource_aws_network_acl.go | 12 +- .../aws/resource_aws_network_acl_rule.go | 2 +- .../aws/resource_aws_opsworks_application.go | 1 - .../aws/resource_aws_opsworks_instance.go | 13 +- .../aws/resource_aws_opsworks_permission.go | 2 +- .../resource_aws_opsworks_rds_db_instance.go | 10 +- .../aws/resource_aws_pinpoint_app.go | 6 +- .../aws/resource_aws_placement_group.go | 6 +- .../aws/resource_aws_ram_resource_share.go | 241 + .../aws/resource_aws_rds_cluster.go | 80 +- .../aws/resource_aws_rds_cluster_instance.go | 9 +- ...esource_aws_rds_cluster_parameter_group.go | 4 +- .../aws/resource_aws_rds_global_cluster.go | 349 + .../aws/resource_aws_redshift_cluster.go | 16 +- ...source_aws_redshift_snapshot_copy_grant.go | 6 +- .../aws/resource_aws_resourcegroups_group.go | 178 + .../aws/resource_aws_route.go | 15 +- .../aws/resource_aws_route53_health_check.go | 6 +- .../aws/resource_aws_route53_record.go | 8 +- .../aws/resource_aws_route53_zone.go | 4 +- .../resource_aws_route53_zone_association.go | 6 +- ...urce_aws_s3_account_public_access_block.go | 182 + .../aws/resource_aws_s3_bucket.go | 184 +- .../aws/resource_aws_s3_bucket_inventory.go | 2 +- .../aws/resource_aws_s3_bucket_object.go | 114 +- ...ource_aws_s3_bucket_public_access_block.go | 195 + .../aws/resource_aws_sagemaker_model.go | 391 + ...esource_aws_sagemaker_notebook_instance.go | 386 + .../aws/resource_aws_secretsmanager_secret.go | 2 +- .../aws/resource_aws_security_group.go | 2 +- ...ce_aws_securityhub_product_subscription.go | 134 + ..._aws_securityhub_standards_subscription.go | 93 + ...ce_aws_service_discovery_http_namespace.go | 130 + ...service_discovery_private_dns_namespace.go | 6 +- ..._service_discovery_public_dns_namespace.go | 22 +- .../resource_aws_service_discovery_service.go | 6 +- .../aws/resource_aws_ses_configuration_set.go | 6 +- .../aws/resource_aws_ses_event_destination.go | 6 +- .../aws/resource_aws_ses_receipt_rule.go | 6 +- .../aws/resource_aws_ses_receipt_rule_set.go | 6 +- .../aws/resource_aws_sfn_activity.go | 69 + .../aws/resource_aws_sfn_state_machine.go | 59 + .../resource_aws_sns_platform_application.go | 5 +- .../aws/resource_aws_sns_topic.go | 12 +- .../resource_aws_sns_topic_subscription.go | 6 +- .../aws/resource_aws_spot_fleet_request.go | 2 +- .../aws/resource_aws_sqs_queue.go | 7 +- .../aws/resource_aws_ssm_document.go | 5 +- .../resource_aws_ssm_maintenance_window.go | 97 +- ...ource_aws_ssm_maintenance_window_target.go | 4 +- ...esource_aws_ssm_maintenance_window_task.go | 5 +- .../aws/resource_aws_ssm_parameter.go | 2 +- .../aws/resource_aws_ssm_patch_baseline.go | 2 +- .../aws/resource_aws_ssm_patch_group.go | 3 +- .../aws/resource_aws_transfer_server.go | 62 +- .../aws/resource_aws_transfer_ssh_key.go | 150 + .../aws/resource_aws_transfer_user.go | 247 + .../aws/resource_aws_vpc_endpoint.go | 27 +- .../aws/resource_aws_worklink_fleet.go | 426 + .../terraform-provider-aws/aws/s3_tags.go | 54 +- .../terraform-provider-aws/aws/structure.go | 233 +- .../terraform-provider-aws/aws/tags.go | 6 +- .../aws/tagsBeanstalk.go | 3 +- .../aws/tagsCloudtrail.go | 3 +- .../terraform-provider-aws/aws/tagsDAX.go | 5 +- .../terraform-provider-aws/aws/tagsDS.go | 5 +- .../terraform-provider-aws/aws/tagsDX.go | 5 +- .../terraform-provider-aws/aws/tagsDocDB.go | 137 + .../terraform-provider-aws/aws/tagsEC.go | 5 +- .../terraform-provider-aws/aws/tagsECR.go | 135 + .../terraform-provider-aws/aws/tagsECS.go | 3 +- .../terraform-provider-aws/aws/tagsEFS.go | 3 +- .../terraform-provider-aws/aws/tagsELB.go | 3 +- .../terraform-provider-aws/aws/tagsGeneric.go | 3 +- .../terraform-provider-aws/aws/tagsIAM.go | 3 +- .../aws/tagsInspector.go | 3 +- .../terraform-provider-aws/aws/tagsKMS.go | 5 +- .../aws/tagsKinesisFirehose.go | 16 +- .../aws/tagsLicenseManager.go | 115 + .../terraform-provider-aws/aws/tagsMQ.go | 67 + .../terraform-provider-aws/aws/tagsNeptune.go | 5 +- .../terraform-provider-aws/aws/tagsRAM.go | 85 + .../terraform-provider-aws/aws/tagsRDS.go | 5 +- .../aws/tagsRedshift.go | 5 +- .../terraform-provider-aws/aws/tagsSSM.go | 5 +- .../aws/tagsSecretsManager.go | 3 +- .../terraform-provider-aws/aws/tagsSfn.go | 78 + ...{tagsTransferServer.go => tagsTransfer.go} | 22 +- .../aws/tags_elasticsearchservice.go | 3 +- .../aws/tags_kinesis.go | 3 +- .../aws/tags_route53.go | 3 +- .../aws/tags_sagemaker.go | 120 + .../terraform-provider-aws/aws/validators.go | 301 + vendor/gopkg.in/inf.v0/LICENSE | 28 + vendor/gopkg.in/inf.v0/dec.go | 615 + vendor/gopkg.in/inf.v0/rounder.go | 145 + vendor/k8s.io/apimachinery/LICENSE | 202 + .../apimachinery/pkg/api/resource/OWNERS | 16 + .../apimachinery/pkg/api/resource/amount.go | 299 + .../pkg/api/resource/generated.pb.go | 75 + .../pkg/api/resource/generated.proto | 88 + .../apimachinery/pkg/api/resource/math.go | 314 + .../apimachinery/pkg/api/resource/quantity.go | 738 + .../pkg/api/resource/quantity_proto.go | 284 + .../pkg/api/resource/scale_int.go | 95 + .../apimachinery/pkg/api/resource/suffix.go | 198 + .../pkg/api/resource/zz_generated.deepcopy.go | 27 + .../apimachinery/pkg/apis/meta/v1/OWNERS | 31 + .../pkg/apis/meta/v1/controller_ref.go | 54 + .../pkg/apis/meta/v1/conversion.go | 319 + .../apimachinery/pkg/apis/meta/v1/doc.go | 23 + .../apimachinery/pkg/apis/meta/v1/duration.go | 60 + .../pkg/apis/meta/v1/generated.pb.go | 8256 +++++ .../pkg/apis/meta/v1/generated.proto | 879 + .../pkg/apis/meta/v1/group_version.go | 148 + .../apimachinery/pkg/apis/meta/v1/helpers.go | 246 + .../apimachinery/pkg/apis/meta/v1/labels.go | 55 + .../apimachinery/pkg/apis/meta/v1/meta.go | 170 + .../pkg/apis/meta/v1/micro_time.go | 183 + .../pkg/apis/meta/v1/micro_time_proto.go | 72 + .../apimachinery/pkg/apis/meta/v1/register.go | 97 + .../apimachinery/pkg/apis/meta/v1/time.go | 185 + .../pkg/apis/meta/v1/time_proto.go | 92 + .../apimachinery/pkg/apis/meta/v1/types.go | 1011 + .../meta/v1/types_swagger_doc_generated.go | 348 + .../apimachinery/pkg/apis/meta/v1/watch.go | 89 + .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 961 + .../pkg/apis/meta/v1/zz_generated.defaults.go | 32 + .../apimachinery/pkg/conversion/converter.go | 898 + .../apimachinery/pkg/conversion/deep_equal.go | 36 + .../k8s.io/apimachinery/pkg/conversion/doc.go | 24 + .../apimachinery/pkg/conversion/helper.go | 39 + .../pkg/conversion/queryparams/convert.go | 198 + .../pkg/conversion/queryparams/doc.go | 19 + vendor/k8s.io/apimachinery/pkg/fields/doc.go | 19 + .../k8s.io/apimachinery/pkg/fields/fields.go | 62 + .../apimachinery/pkg/fields/requirements.go | 30 + .../apimachinery/pkg/fields/selector.go | 476 + vendor/k8s.io/apimachinery/pkg/labels/doc.go | 19 + .../k8s.io/apimachinery/pkg/labels/labels.go | 181 + .../apimachinery/pkg/labels/selector.go | 891 + .../pkg/labels/zz_generated.deepcopy.go | 42 + .../k8s.io/apimachinery/pkg/runtime/codec.go | 332 + .../apimachinery/pkg/runtime/codec_check.go | 48 + .../apimachinery/pkg/runtime/conversion.go | 113 + .../apimachinery/pkg/runtime/converter.go | 805 + vendor/k8s.io/apimachinery/pkg/runtime/doc.go | 51 + .../apimachinery/pkg/runtime/embedded.go | 142 + .../k8s.io/apimachinery/pkg/runtime/error.go | 122 + .../apimachinery/pkg/runtime/extension.go | 51 + .../apimachinery/pkg/runtime/generated.pb.go | 753 + .../apimachinery/pkg/runtime/generated.proto | 127 + .../k8s.io/apimachinery/pkg/runtime/helper.go | 212 + .../apimachinery/pkg/runtime/interfaces.go | 252 + .../apimachinery/pkg/runtime/register.go | 61 + .../pkg/runtime/schema/generated.pb.go | 63 + .../pkg/runtime/schema/generated.proto | 26 + .../pkg/runtime/schema/group_version.go | 300 + .../pkg/runtime/schema/interfaces.go | 40 + .../k8s.io/apimachinery/pkg/runtime/scheme.go | 754 + .../pkg/runtime/scheme_builder.go | 48 + .../pkg/runtime/swagger_doc_generator.go | 262 + .../k8s.io/apimachinery/pkg/runtime/types.go | 137 + .../apimachinery/pkg/runtime/types_proto.go | 69 + .../pkg/runtime/zz_generated.deepcopy.go | 108 + .../apimachinery/pkg/selection/operator.go | 33 + vendor/k8s.io/apimachinery/pkg/types/doc.go | 18 + .../apimachinery/pkg/types/namespacedname.go | 43 + .../k8s.io/apimachinery/pkg/types/nodename.go | 43 + vendor/k8s.io/apimachinery/pkg/types/patch.go | 28 + vendor/k8s.io/apimachinery/pkg/types/uid.go | 22 + .../apimachinery/pkg/util/errors/doc.go | 18 + .../apimachinery/pkg/util/errors/errors.go | 201 + .../pkg/util/intstr/generated.pb.go | 362 + .../pkg/util/intstr/generated.proto | 43 + .../apimachinery/pkg/util/intstr/intstr.go | 184 + .../k8s.io/apimachinery/pkg/util/json/json.go | 119 + .../pkg/util/naming/from_stack.go | 93 + .../k8s.io/apimachinery/pkg/util/net/http.go | 445 + .../apimachinery/pkg/util/net/interface.go | 416 + .../apimachinery/pkg/util/net/port_range.go | 149 + .../apimachinery/pkg/util/net/port_split.go | 77 + .../k8s.io/apimachinery/pkg/util/net/util.go | 56 + .../apimachinery/pkg/util/runtime/runtime.go | 173 + .../k8s.io/apimachinery/pkg/util/sets/byte.go | 203 + .../k8s.io/apimachinery/pkg/util/sets/doc.go | 20 + .../apimachinery/pkg/util/sets/empty.go | 23 + .../k8s.io/apimachinery/pkg/util/sets/int.go | 203 + .../apimachinery/pkg/util/sets/int64.go | 203 + .../apimachinery/pkg/util/sets/string.go | 203 + .../pkg/util/validation/field/errors.go | 259 + .../pkg/util/validation/field/path.go | 91 + .../pkg/util/validation/validation.go | 416 + vendor/k8s.io/apimachinery/pkg/watch/doc.go | 19 + .../k8s.io/apimachinery/pkg/watch/filter.go | 105 + vendor/k8s.io/apimachinery/pkg/watch/mux.go | 260 + .../apimachinery/pkg/watch/streamwatcher.go | 119 + vendor/k8s.io/apimachinery/pkg/watch/watch.go | 317 + .../pkg/watch/zz_generated.deepcopy.go | 40 + .../forked/golang/reflect/deep_equal.go | 388 + vendor/k8s.io/client-go/LICENSE | 202 + .../pkg/apis/clientauthentication/OWNERS | 7 + .../pkg/apis/clientauthentication/doc.go | 20 + .../pkg/apis/clientauthentication/register.go | 50 + .../pkg/apis/clientauthentication/types.go | 77 + .../apis/clientauthentication/v1alpha1/doc.go | 24 + .../clientauthentication/v1alpha1/register.go | 55 + .../clientauthentication/v1alpha1/types.go | 78 + .../v1alpha1/zz_generated.conversion.go | 176 + .../v1alpha1/zz_generated.deepcopy.go | 128 + .../v1alpha1/zz_generated.defaults.go | 32 + .../zz_generated.deepcopy.go | 128 + vendor/k8s.io/klog/.travis.yml | 14 + vendor/k8s.io/klog/CONTRIBUTING.md | 31 + vendor/k8s.io/klog/LICENSE | 191 + vendor/k8s.io/klog/OWNERS | 11 + vendor/k8s.io/klog/README.md | 51 + vendor/k8s.io/klog/RELEASE.md | 9 + vendor/k8s.io/klog/SECURITY_CONTACTS | 20 + vendor/k8s.io/klog/klog.go | 1239 + vendor/k8s.io/klog/klog_file.go | 126 + vendor/modules.txt | 79 +- 604 files changed, 219136 insertions(+), 3796 deletions(-) create mode 100644 vendor/github.com/armon/go-radix/go.mod rename vendor/github.com/aws/aws-sdk-go/aws/{context.go => context_1_5.go} (58%) delete mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go rename vendor/github.com/aws/aws-sdk-go/aws/{context_1_6.go => context_background_1_5.go} (59%) create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go create mode 100644 vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/backup/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/fsx/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/kafka/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/medialive/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/ram/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/s3control/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/api.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go create mode 100644 vendor/github.com/aws/aws-sdk-go/service/worklink/service.go create mode 100644 vendor/github.com/beevik/etree/RELEASE_NOTES.md create mode 100644 vendor/github.com/bgentry/speakeasy/LICENSE create mode 100644 vendor/github.com/gogo/protobuf/proto/wrappers.go create mode 100644 vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go create mode 100644 vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go create mode 100644 vendor/github.com/golang/snappy/.gitignore create mode 100644 vendor/github.com/golang/snappy/AUTHORS create mode 100644 vendor/github.com/golang/snappy/CONTRIBUTORS create mode 100644 vendor/github.com/golang/snappy/LICENSE create mode 100644 vendor/github.com/golang/snappy/README create mode 100644 vendor/github.com/golang/snappy/decode.go create mode 100644 vendor/github.com/golang/snappy/decode_amd64.go create mode 100644 vendor/github.com/golang/snappy/decode_amd64.s create mode 100644 vendor/github.com/golang/snappy/decode_other.go create mode 100644 vendor/github.com/golang/snappy/encode.go create mode 100644 vendor/github.com/golang/snappy/encode_amd64.go create mode 100644 vendor/github.com/golang/snappy/encode_amd64.s create mode 100644 vendor/github.com/golang/snappy/encode_other.go create mode 100644 vendor/github.com/golang/snappy/snappy.go create mode 100644 vendor/github.com/google/gofuzz/.travis.yml create mode 100644 vendor/github.com/google/gofuzz/CONTRIBUTING.md create mode 100644 vendor/github.com/google/gofuzz/LICENSE create mode 100644 vendor/github.com/google/gofuzz/README.md create mode 100644 vendor/github.com/google/gofuzz/doc.go create mode 100644 vendor/github.com/google/gofuzz/fuzz.go create mode 100644 vendor/github.com/hashicorp/go-safetemp/go.mod create mode 100644 vendor/github.com/jen20/awspolicyequivalence/go.mod create mode 100644 vendor/github.com/jen20/awspolicyequivalence/go.sum create mode 100644 vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE create mode 100644 vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go create mode 100644 vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go create mode 100644 vendor/github.com/mattn/go-isatty/.travis.yml create mode 100644 vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go create mode 100644 vendor/github.com/mattn/go-isatty/isatty_others.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go rename vendor/github.com/terraform-providers/terraform-provider-aws/aws/{tagsTransferServer.go => tagsTransfer.go} (77%) create mode 100644 vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go create mode 100644 vendor/gopkg.in/inf.v0/LICENSE create mode 100644 vendor/gopkg.in/inf.v0/dec.go create mode 100644 vendor/gopkg.in/inf.v0/rounder.go create mode 100644 vendor/k8s.io/apimachinery/LICENSE create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/amount.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/math.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go create mode 100644 vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/converter.go create mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go create mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/helper.go create mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go create mode 100644 vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/fields/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/fields/fields.go create mode 100644 vendor/k8s.io/apimachinery/pkg/fields/requirements.go create mode 100644 vendor/k8s.io/apimachinery/pkg/fields/selector.go create mode 100644 vendor/k8s.io/apimachinery/pkg/labels/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/labels/labels.go create mode 100644 vendor/k8s.io/apimachinery/pkg/labels/selector.go create mode 100644 vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/codec.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/conversion.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/converter.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/embedded.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/error.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/extension.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/generated.proto create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/helper.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/register.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/types.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go create mode 100644 vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/apimachinery/pkg/selection/operator.go create mode 100644 vendor/k8s.io/apimachinery/pkg/types/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/types/namespacedname.go create mode 100644 vendor/k8s.io/apimachinery/pkg/types/nodename.go create mode 100644 vendor/k8s.io/apimachinery/pkg/types/patch.go create mode 100644 vendor/k8s.io/apimachinery/pkg/types/uid.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/errors/errors.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto create mode 100644 vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/json/json.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/naming/from_stack.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/http.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/interface.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_range.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/port_split.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/net/util.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/byte.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/empty.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/int64.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/sets/string.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go create mode 100644 vendor/k8s.io/apimachinery/pkg/util/validation/validation.go create mode 100644 vendor/k8s.io/apimachinery/pkg/watch/doc.go create mode 100644 vendor/k8s.io/apimachinery/pkg/watch/filter.go create mode 100644 vendor/k8s.io/apimachinery/pkg/watch/mux.go create mode 100644 vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go create mode 100644 vendor/k8s.io/apimachinery/pkg/watch/watch.go create mode 100644 vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go create mode 100644 vendor/k8s.io/client-go/LICENSE create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/doc.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/register.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go create mode 100644 vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go create mode 100644 vendor/k8s.io/klog/.travis.yml create mode 100644 vendor/k8s.io/klog/CONTRIBUTING.md create mode 100644 vendor/k8s.io/klog/LICENSE create mode 100644 vendor/k8s.io/klog/OWNERS create mode 100644 vendor/k8s.io/klog/README.md create mode 100644 vendor/k8s.io/klog/RELEASE.md create mode 100644 vendor/k8s.io/klog/SECURITY_CONTACTS create mode 100644 vendor/k8s.io/klog/klog.go create mode 100644 vendor/k8s.io/klog/klog_file.go diff --git a/go.mod b/go.mod index 4cb0772c0..5fadf755e 100644 --- a/go.mod +++ b/go.mod @@ -9,18 +9,13 @@ require ( github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292 // indirect github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af // indirect github.com/agext/levenshtein v1.2.1 - github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6 // indirect github.com/antchfx/xpath v0.0.0-20170728053731-b5c552e1acbd // indirect github.com/antchfx/xquery v0.0.0-20170730121040-eb8c3c172607 // indirect github.com/apparentlymart/go-cidr v1.0.0 github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect - github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 // indirect - github.com/aws/aws-sdk-go v1.16.4 - github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 // indirect - github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect - github.com/bgentry/speakeasy v0.0.0-20161015143505-675b82c74c0e // indirect + github.com/aws/aws-sdk-go v1.16.26 github.com/blang/semver v3.5.1+incompatible github.com/boltdb/bolt v1.3.1 // indirect github.com/boombuler/barcode v1.0.0 // indirect @@ -38,7 +33,6 @@ require ( github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08 github.com/ghodss/yaml v1.0.0 // indirect github.com/go-test/deep v1.0.1 - github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf // indirect github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 // indirect github.com/golang/mock v1.2.0 github.com/golang/protobuf v1.2.0 @@ -65,7 +59,6 @@ require ( github.com/hashicorp/go-plugin v0.0.0-20190129155509-362c99b11937 github.com/hashicorp/go-retryablehttp v0.5.1 github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 - github.com/hashicorp/go-safetemp v0.0.0-20180326211150-b1a1dbde6fdc // indirect github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect github.com/hashicorp/go-tfe v0.3.7 github.com/hashicorp/go-uuid v1.0.0 @@ -78,20 +71,17 @@ require ( github.com/hashicorp/memberlist v0.1.0 // indirect github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb // indirect github.com/hashicorp/terraform-config-inspect v0.0.0-20190208230122-b0707673339c - github.com/hashicorp/vault v0.0.0-20161029210149-9a60bf2a50e4 - github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a // indirect + github.com/hashicorp/vault v0.10.4 github.com/jonboulle/clockwork v0.1.0 // indirect github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 github.com/jtolds/gls v4.2.1+incompatible // indirect github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 - github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba // indirect github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 github.com/marstr/guid v1.1.0 // indirect github.com/masterzen/azure-sdk-for-go v0.0.0-20161014135628-ee4f0065d00c // indirect github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9 // indirect github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939 github.com/mattn/go-colorable v0.0.0-20160220075935-9cbef7c35391 - github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c // indirect github.com/mattn/go-shellwords v1.0.1 github.com/miekg/dns v1.0.8 // indirect github.com/mitchellh/cli v0.0.0-20171129193617-33edc47170b5 @@ -118,13 +108,12 @@ require ( github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect github.com/soheilhy/cmux v0.1.4 // indirect github.com/spf13/afero v1.0.2 - github.com/terraform-providers/terraform-provider-aws v1.52.0 + github.com/terraform-providers/terraform-provider-aws v1.58.0 github.com/terraform-providers/terraform-provider-openstack v1.15.0 github.com/terraform-providers/terraform-provider-template v1.0.0 // indirect github.com/terraform-providers/terraform-provider-tls v1.2.0 // indirect github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 // indirect - github.com/ulikunitz/xz v0.5.4 // indirect github.com/vmihailenco/msgpack v4.0.1+incompatible // indirect github.com/xanzy/ssh-agent v0.2.0 github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect diff --git a/go.sum b/go.sum index ef308f74b..f822a9744 100644 --- a/go.sum +++ b/go.sum @@ -31,22 +31,23 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 h1:MBXhrxjNkjdqJysfNbKMMPFNXlz6EzpOnPcsoYBeD3E= -github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.16.4 h1:HQaquRQLvsZ8fRBbmFw6/+RJolhtjGMkkB0IhTM+hf8= -github.com/aws/aws-sdk-go v1.16.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 h1:6fqkBkx5cRbd8Pq0UEMxyteIAPoE1KiPptnx1yEzJLU= -github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= +github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go v1.16.26 h1:GWkl3rkRO/JGRTWoLLIqwf7AWC4/W/1hMOUZqmX0js4= +github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/beevik/etree v1.0.1 h1:lWzdj5v/Pj1X360EV7bUudox5SRipy4qZLjY0rhb0ck= +github.com/beevik/etree v1.0.1/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bgentry/speakeasy v0.0.0-20161015143505-675b82c74c0e h1:giZ2nnSSH4ntzmoNPwdncPXXA2nWdlO7NiebK0gozNI= -github.com/bgentry/speakeasy v0.0.0-20161015143505-675b82c74c0e/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/boombuler/barcode v0.0.0-20180809052337-34fff276c74e/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.0 h1:s1TvRnXwL2xJRaccrdcBQMZxq6X7DvsMogtmJeHDdrc= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= @@ -84,23 +85,28 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf h1:0nBDY6WfT0ChlHhvNcGw3BTjyDOtCom2yQTVBJv3MHg= -github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 h1:u4bArs140e9+AfE52mFHOXVFnOSBJBRlzTHrOPLOIhE= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e h1:CYRpN206UTHUinz3VJoLaBdy1gEGeJNsqT0mvswDcMw= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968 h1:Pu+HW4kcQozw0QyrTTgLE+3RXNqFhQNNzhbnoLFL83c= @@ -130,6 +136,7 @@ github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6K github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-getter v0.0.0-20180327010114-90bb99a48d86 h1:hLYM35twiyKH44g36g+GFYODcrZQetEAY4+zrJtGea0= github.com/hashicorp/go-getter v0.0.0-20180327010114-90bb99a48d86/go.mod h1:6rdJFnhkXnzGOJbvkrdv4t9nLwKcVA+tmbQeUlkIzrU= +github.com/hashicorp/go-hclog v0.0.0-20171005151751-ca137eb4b438/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f h1:Yv9YzBlAETjy6AOX9eLBZ3nshNVRREgerT/3nvxlGho= github.com/hashicorp/go-hclog v0.0.0-20181001195459-61d530d6c27f/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= @@ -140,14 +147,15 @@ github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c/go.mod h1:ahL github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v0.0.0-20170816151819-a5174f84d7f8/go.mod h1:JSqWYsict+jzcj0+xElxyrBQRPNoiWQuddnxArJ7XHQ= github.com/hashicorp/go-plugin v0.0.0-20190129155509-362c99b11937 h1:F3biNWiyQYD6ch5Y/Kua5DKZKH3R0NtCvnv+KhZei20= github.com/hashicorp/go-plugin v0.0.0-20190129155509-362c99b11937/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.1 h1:Vsx5XKPqPs3M6sM4U4GWyUqFS8aBiL9U5gkgvpkg4SE= github.com/hashicorp/go-retryablehttp v0.5.1/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 h1:VBj0QYQ0u2MCJzBfeYXGexnAl17GsH1yidnoxCqqD9E= github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90/go.mod h1:o4zcYY1e0GEZI6eSEr+43QDYmuGglw1qSO6qdHUHCgg= -github.com/hashicorp/go-safetemp v0.0.0-20180326211150-b1a1dbde6fdc h1:wAa9fGALVHfjYxZuXRnmuJG2CnwRpJYOTvY6YdErAh0= -github.com/hashicorp/go-safetemp v0.0.0-20180326211150-b1a1dbde6fdc/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= +github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= +github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-slug v0.2.0 h1:MVdZAkTmDsUi1AT+3NQDsn8n3ssnVSIHwiM6RcUHvE8= github.com/hashicorp/go-slug v0.2.0/go.mod h1:+zDycQOzGqOqMW7Kn2fp9vz/NtqpMLQlgb9JUF+0km4= github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 h1:7YOlAIO2YWnJZkQp7B5eFykaIY7C9JndqAFQyVV5BhM= @@ -162,9 +170,11 @@ github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCO github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f h1:UdxlrJz4JOnY8W+DbLISwf2B8WXEolNRA8BGCwI9jws= github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= +github.com/hashicorp/hcl2 v0.0.0-20171003232734-44bad6dbf549/go.mod h1:xp1eMAxqhQKBxz+yQUTsig9bBMRRWRWw+rK3FJmHf/A= github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE= github.com/hashicorp/hcl2 v0.0.0-20190130225218-89dbc5eb3d9e h1:wcDATcjAY0ebgNtuyt00GxJll5fCChrevvrIdguzhQQ= github.com/hashicorp/hcl2 v0.0.0-20190130225218-89dbc5eb3d9e/go.mod h1:HtEzazM5AZ9fviNEof8QZB4T1Vz9UhHrGhnMPzl//Ek= +github.com/hashicorp/hil v0.0.0-20170512213305-fac2259da677/go.mod h1:KHvg/R2/dPtaePb16oW4qIyzkMxXOL38xjRN64adsts= github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590 h1:2yzhWGdgQUWZUCNK+AoO35V+HTsgEmcM4J9IkArh7PI= github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590/go.mod h1:n2TSygSNwsLJ76m8qFXTSc7beTb+auJxYdqrnoqwZWE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= @@ -173,15 +183,17 @@ github.com/hashicorp/memberlist v0.1.0 h1:qSsCiC0WYD39lbSitKNt40e30uorm2Ss/d4JGU github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb h1:ZbgmOQt8DOg796figP87/EFCVx2v2h9yRvwHF/zceX4= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= +github.com/hashicorp/terraform v0.11.9-beta1/go.mod h1:uN1KUiT7Wdg61fPwsGXQwK3c8PmpIVZrt5Vcb1VrSoM= github.com/hashicorp/terraform-config-inspect v0.0.0-20190208230122-b0707673339c h1:nCnsfi66NloVlmquh5dLox5yBwQk5CV5s2roWvbstnE= github.com/hashicorp/terraform-config-inspect v0.0.0-20190208230122-b0707673339c/go.mod h1:ItvqtvbC3K23FFET62ZwnkwtpbKZm8t8eMcWjmVVjD8= -github.com/hashicorp/vault v0.0.0-20161029210149-9a60bf2a50e4 h1:SGDekHLK2IRoVS7Fb4olLyWvc2VmwKgyFC05j6X3NII= -github.com/hashicorp/vault v0.0.0-20161029210149-9a60bf2a50e4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= +github.com/hashicorp/vault v0.10.4 h1:4x0lHxui/ZRp/B3E0Auv1QNBJpzETqHR2kQD3mHSBJU= +github.com/hashicorp/vault v0.10.4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= +github.com/hashicorp/yamux v0.0.0-20160720233140-d1caa6c97c9f/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a h1:FyS/ubzBR5xJlnJGRTwe7GUHpJOR4ukYK3y+LFNffuA= -github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a/go.mod h1:uoIMjNxUfXi48Ci40IXkPRbghZ1vbti6v9LCbNqRgHY= +github.com/jen20/awspolicyequivalence v1.0.0 h1:jLRh4GRf0IfIpMm9/m+krLnjAda4NpI9+2o5Kb/Q+G4= +github.com/jen20/awspolicyequivalence v1.0.0/go.mod h1:PV1fS2xyHhCLp83vbgSMFr2drM4GzG61wkz+k4pOG3E= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -189,6 +201,8 @@ github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0 github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926 h1:kie3qOosvRKqwij2HGzXWffwpXvcqfPPXRUw8I4F/mg= github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= +github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 h1:PJPDf8OUfOK1bb/NeTKd4f1QXZItOX389VN3B6qC8ro= @@ -202,6 +216,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kubernetes-sigs/aws-iam-authenticator v0.3.1-0.20181019024009-82544ec86140 h1:AtXWrgewhHlLux0IAfHINCbkxkf47euklyallWlximw= +github.com/kubernetes-sigs/aws-iam-authenticator v0.3.1-0.20181019024009-82544ec86140/go.mod h1:ItxiN33Ho7Di8wiC4S4XqbH1NLF0DNdDWOd/5MI9gJU= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 h1:wnfcqULT+N2seWf6y4yHzmi7GD2kNx4Ute0qArktD48= @@ -216,14 +232,15 @@ github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939 h1:cRFHA33ER97Xy5j github.com/masterzen/winrm v0.0.0-20180224160350-7e40f93ae939/go.mod h1:CfZSN7zwz5gJiFhZJz49Uzk7mEBHIceWmbFmYx7Hf7E= github.com/mattn/go-colorable v0.0.0-20160220075935-9cbef7c35391 h1:x4vT4RoTH2BNkPx0LgrBKeFuPQPviK1aSAIWG6ruc+Y= github.com/mattn/go-colorable v0.0.0-20160220075935-9cbef7c35391/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c h1:YHHK/dEmr2Jo1cWD1VMB2waEeHJhHFp3CEylwWy/VcY= -github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-shellwords v1.0.1 h1:2/mQs/EosKUge1MHnAavnrNwa0wLnWDjG4dTYMGf/kI= github.com/mattn/go-shellwords v1.0.1/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.8 h1:Zi8HNpze3NeRWH1PQV6O71YcvJRQ6j0lORO6DAEmAAI= github.com/miekg/dns v1.0.8/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v0.0.0-20170803042910-8a539dbef410/go.mod h1:oGumspjLm2kTyiT1QMGpFqRlmxnKHfCvhZEVnx+5UeE= github.com/mitchellh/cli v0.0.0-20171129193617-33edc47170b5 h1:OYr3N2fY3e3kP/x/d81CJXlcZrIV2hH8gPnuRLpiME4= github.com/mitchellh/cli v0.0.0-20171129193617-33edc47170b5/go.mod h1:oGumspjLm2kTyiT1QMGpFqRlmxnKHfCvhZEVnx+5UeE= github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286 h1:KHyL+3mQOF9sPfs26lsefckcFNDcIZtiACQiECzIUkw= @@ -241,6 +258,7 @@ github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9 github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/panicwrap v0.0.0-20161208170302-ba9e1a65e0f7 h1:+PBI9A4rLQJlch3eQI/RkTY2HzX+bl2lPUf3goenBxs= @@ -249,6 +267,10 @@ github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784 h1:+DAetXqxv/ github.com/mitchellh/prefixedio v0.0.0-20151214002211-6e6954073784/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= @@ -265,8 +287,10 @@ github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17 h1:chPfVn+gpAM5CTpTyVU9 github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v0.0.0-20170730193024-f4461a52b632/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v0.0.0-20171219111128-6bee943216c8 h1:lcb1zvdlaZyEbl2OXifN3uOYYyIvllofUbmp9bwbL+0= github.com/posener/complete v0.0.0-20171219111128-6bee943216c8/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/otp v0.0.0-20180813144649-be78767b3e39/go.mod h1:Zad1CMQfSQZI5KLpahDiSUX4tMMREnXw98IvL1nhgMk= github.com/pquerna/otp v1.0.0 h1:TBZrpfnzVbgmpYhiYBK+bJ4Ig0+ye+GGNMe2pTrvxCo= github.com/pquerna/otp v1.0.0/go.mod h1:Zad1CMQfSQZI5KLpahDiSUX4tMMREnXw98IvL1nhgMk= github.com/prometheus/client_golang v0.8.0 h1:1921Yw9Gc3iSc4VQh3PIoOqgPCZS7G/4xQNVUp8Mda8= @@ -295,18 +319,22 @@ github.com/spf13/afero v1.0.2 h1:5bRmqmInNmNFkI9NG9O0Xc/Lgl9wOWWUUA/O8XZqTCo= github.com/spf13/afero v1.0.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/pflag v1.0.2 h1:Fy0orTDgHdbnzHcsOgfCN4LtHf0ec3wwtiwJqwvf3Gc= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= -github.com/terraform-providers/terraform-provider-aws v1.52.0 h1:hfFaKOUtL/ud9Y4PFgFT7F8Ss61lMIK1P+ndPEhPA7s= -github.com/terraform-providers/terraform-provider-aws v1.52.0/go.mod h1:uvqaeKnm2ydZ2LuKuW1NDNBu6heC/7IDGXWm36/6oKs= +github.com/terraform-providers/terraform-provider-aws v1.58.0 h1:EiDfGqjIZ+VYL3WXOXzWQjU6dIt7peEc6XS1gpRTEL8= +github.com/terraform-providers/terraform-provider-aws v1.58.0/go.mod h1:18ma8mS6sWjWq3Ca+ARGxNRpohH6QaDhot5WQmFtIao= github.com/terraform-providers/terraform-provider-openstack v1.15.0 h1:adpjqej+F8BAX9dHmuPF47sUIkgifeqBu6p7iCsyj0Y= github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew= +github.com/terraform-providers/terraform-provider-template v0.1.1/go.mod h1:/J+B8me5DCMa0rEBH5ic2aKPjhtpWNeScmxFJWxB1EU= github.com/terraform-providers/terraform-provider-template v1.0.0 h1:g2pyFaAJu369iAb7qGWmVwtQ15/35lRAfW91Je8wLjE= github.com/terraform-providers/terraform-provider-template v1.0.0/go.mod h1:/J+B8me5DCMa0rEBH5ic2aKPjhtpWNeScmxFJWxB1EU= +github.com/terraform-providers/terraform-provider-tls v0.1.0/go.mod h1:Mxe/v5u31LDW4m32O1z6Ursdh95dpc9Puq6otkYg7tU= github.com/terraform-providers/terraform-provider-tls v1.2.0 h1:wcD0InKzNh8fanUYQwim62WCd4toeD9WJnPw/RjBI4o= github.com/terraform-providers/terraform-provider-tls v1.2.0/go.mod h1:Mxe/v5u31LDW4m32O1z6Ursdh95dpc9Puq6otkYg7tU= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 h1:lYIiVDtZnyTWlNwiAxLj0bbpTcx1BWCFhXjfsvmPdNc= @@ -324,6 +352,7 @@ github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 h1:MPPkRncZLN9Kh4M github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5iMfJhKqrZJx3TahFx+7sbZ7zQdxs= github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= +github.com/zclconf/go-cty v0.0.0-20180106055834-709e4033eeb0/go.mod h1:LnDKxj8gN4aatfXUqmUNooaDjvmDcLPbAN3hYBIVoJE= github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9 h1:hHCAGde+QfwbqXSAqOmBd4NlOrJ6nmjWp+Nu408ezD4= github.com/zclconf/go-cty v0.0.0-20190124225737-a385d646c1e9/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= @@ -337,11 +366,13 @@ go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180110145155-b3c9a1d25cfb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180816225734-aabede6cba87/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85 h1:et7+NAX3lLIk5qUCTA9QelBjGE/NkhzYw/mhnr0s7nI= golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20171024115130-4b14673ba32b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -354,10 +385,12 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170803140359-d8f5ea21b929/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc h1:WiYx1rIFmx8c0mXAFtv5D/mHyKe1+jmuP7PViuwqwuQ= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.0.0-20171024115504-6eab0e8f74e8/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= @@ -368,15 +401,19 @@ google.golang.org/api v0.0.0-20181015145326-625cd1887957/go.mod h1:4mhQ8q/RsB7i+ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0 h1:FBSsiFRMz3LBeXIomRnVzrQwSDj4ibvcRexLG0LZGQk= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20171002232614-f676e0f3ac63/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/grpc v0.0.0-20171025225919-b5eab4ccac6d/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/vmihailenco/msgpack.v2 v2.9.1 h1:kb0VV7NuIojvRfzwslQeP3yArBqJHW9tOl4t38VS1jM= gopkg.in/vmihailenco/msgpack.v2 v2.9.1/go.mod h1:/3Dn1Npt9+MYyLpYYXjInO/5jvMLamn+AEGwNEOatn8= @@ -384,7 +421,15 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= +k8s.io/apimachinery v0.0.0-20190204010555-a98ff070d70e h1:7HZ9Pkl78EapVMHYAVjF1128N/w6ke+aPyo64M9I2Ds= +k8s.io/apimachinery v0.0.0-20190204010555-a98ff070d70e/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/client-go v10.0.0+incompatible h1:F1IqCqw7oMBzDkqlcBymRq1450wD0eNqLE9jzUrIi34= +k8s.io/client-go v10.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/klog v0.1.0 h1:I5HMfc/DtuVaGR1KPwUrTc476K8NCqNBldC7H4dYEzk= +k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= labix.org/v2/mgo v0.0.0-20140701140051-000000000287 h1:L0cnkNl4TfAXzvdrqsYEmxOHOCv2p5I3taaReO8BWFs= labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4= launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/vendor/github.com/armon/go-radix/go.mod b/vendor/github.com/armon/go-radix/go.mod new file mode 100644 index 000000000..4336aa29e --- /dev/null +++ b/vendor/github.com/armon/go-radix/go.mod @@ -0,0 +1 @@ +module github.com/armon/go-radix diff --git a/vendor/github.com/armon/go-radix/radix.go b/vendor/github.com/armon/go-radix/radix.go index d2914c13b..e2bb22eb9 100644 --- a/vendor/github.com/armon/go-radix/radix.go +++ b/vendor/github.com/armon/go-radix/radix.go @@ -44,13 +44,13 @@ func (n *node) addEdge(e edge) { n.edges.Sort() } -func (n *node) replaceEdge(e edge) { +func (n *node) updateEdge(label byte, node *node) { num := len(n.edges) idx := sort.Search(num, func(i int) bool { - return n.edges[i].label >= e.label + return n.edges[i].label >= label }) - if idx < num && n.edges[idx].label == e.label { - n.edges[idx].node = e.node + if idx < num && n.edges[idx].label == label { + n.edges[idx].node = node return } panic("replacing missing edge") @@ -198,10 +198,7 @@ func (t *Tree) Insert(s string, v interface{}) (interface{}, bool) { child := &node{ prefix: search[:commonPrefix], } - parent.replaceEdge(edge{ - label: search[0], - node: child, - }) + parent.updateEdge(search[0], child) // Restore the existing node child.addEdge(edge{ @@ -292,6 +289,53 @@ DELETE: return leaf.val, true } +// DeletePrefix is used to delete the subtree under a prefix +// Returns how many nodes were deleted +// Use this to delete large subtrees efficiently +func (t *Tree) DeletePrefix(s string) int { + return t.deletePrefix(nil, t.root, s) +} + +// delete does a recursive deletion +func (t *Tree) deletePrefix(parent, n *node, prefix string) int { + // Check for key exhaustion + if len(prefix) == 0 { + // Remove the leaf node + subTreeSize := 0 + //recursively walk from all edges of the node to be deleted + recursiveWalk(n, func(s string, v interface{}) bool { + subTreeSize++ + return false + }) + if n.isLeaf() { + n.leaf = nil + } + n.edges = nil // deletes the entire subtree + + // Check if we should merge the parent's other child + if parent != nil && parent != t.root && len(parent.edges) == 1 && !parent.isLeaf() { + parent.mergeChild() + } + t.size -= subTreeSize + return subTreeSize + } + + // Look for an edge + label := prefix[0] + child := n.getEdge(label) + if child == nil || (!strings.HasPrefix(child.prefix, prefix) && !strings.HasPrefix(prefix, child.prefix)) { + return 0 + } + + // Consume the search prefix + if len(child.prefix) > len(prefix) { + prefix = prefix[len(prefix):] + } else { + prefix = prefix[len(child.prefix):] + } + return t.deletePrefix(n, child, prefix) +} + func (n *node) mergeChild() { e := n.edges[0] child := e.node diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 212fe25e7..709605384 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -18,7 +18,7 @@ type Config struct { // States that the signing name did not come from a modeled source but // was derived based on other data. Used by service client constructors - // to determine if the signin name can be overriden based on metadata the + // to determine if the signin name can be overridden based on metadata the // service has. SigningNameDerived bool } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go similarity index 58% rename from vendor/github.com/aws/aws-sdk-go/aws/context.go rename to vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go index 79f426853..2866f9a7f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/context.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go @@ -1,8 +1,8 @@ +// +build !go1.9 + package aws -import ( - "time" -) +import "time" // Context is an copy of the Go v1.7 stdlib's context.Context interface. // It is represented as a SDK interface to enable you to use the "WithContext" @@ -35,37 +35,3 @@ type Context interface { // functions. Value(key interface{}) interface{} } - -// BackgroundContext returns a context that will never be canceled, has no -// values, and no deadline. This context is used by the SDK to provide -// backwards compatibility with non-context API operations and functionality. -// -// Go 1.6 and before: -// This context function is equivalent to context.Background in the Go stdlib. -// -// Go 1.7 and later: -// The context returned will be the value returned by context.Background() -// -// See https://golang.org/pkg/context for more information on Contexts. -func BackgroundContext() Context { - return backgroundCtx -} - -// SleepWithContext will wait for the timer duration to expire, or the context -// is canceled. Which ever happens first. If the context is canceled the Context's -// error will be returned. -// -// Expects Context to always return a non-nil error if the Done channel is closed. -func SleepWithContext(ctx Context, dur time.Duration) error { - t := time.NewTimer(dur) - defer t.Stop() - - select { - case <-t.C: - break - case <-ctx.Done(): - return ctx.Err() - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go deleted file mode 100644 index 064f75c92..000000000 --- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build go1.7 - -package aws - -import "context" - -var ( - backgroundCtx = context.Background() -) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go new file mode 100644 index 000000000..3718b26e1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go @@ -0,0 +1,11 @@ +// +build go1.9 + +package aws + +import "context" + +// Context is an alias of the Go stdlib's context.Context interface. +// It can be used within the SDK's API operation "WithContext" methods. +// +// See https://golang.org/pkg/context on how to use contexts. +type Context = context.Context diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go similarity index 59% rename from vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go rename to vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go index 8fdda5303..66c5945db 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go @@ -39,3 +39,18 @@ func (e *emptyCtx) String() string { var ( backgroundCtx = new(emptyCtx) ) + +// BackgroundContext returns a context that will never be canceled, has no +// values, and no deadline. This context is used by the SDK to provide +// backwards compatibility with non-context API operations and functionality. +// +// Go 1.6 and before: +// This context function is equivalent to context.Background in the Go stdlib. +// +// Go 1.7 and later: +// The context returned will be the value returned by context.Background() +// +// See https://golang.org/pkg/context for more information on Contexts. +func BackgroundContext() Context { + return backgroundCtx +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go new file mode 100644 index 000000000..9c29f29af --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go @@ -0,0 +1,20 @@ +// +build go1.7 + +package aws + +import "context" + +// BackgroundContext returns a context that will never be canceled, has no +// values, and no deadline. This context is used by the SDK to provide +// backwards compatibility with non-context API operations and functionality. +// +// Go 1.6 and before: +// This context function is equivalent to context.Background in the Go stdlib. +// +// Go 1.7 and later: +// The context returned will be the value returned by context.Background() +// +// See https://golang.org/pkg/context for more information on Contexts. +func BackgroundContext() Context { + return context.Background() +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go b/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go new file mode 100644 index 000000000..304fd1561 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go @@ -0,0 +1,24 @@ +package aws + +import ( + "time" +) + +// SleepWithContext will wait for the timer duration to expire, or the context +// is canceled. Which ever happens first. If the context is canceled the Context's +// error will be returned. +// +// Expects Context to always return a non-nil error if the Done channel is closed. +func SleepWithContext(ctx Context, dur time.Duration) error { + t := time.NewTimer(dur) + defer t.Stop() + + select { + case <-t.C: + break + case <-ctx.Done(): + return ctx.Err() + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go index a15f496bc..ab69c7a6f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go @@ -17,7 +17,7 @@ var SDKVersionUserAgentHandler = request.NamedHandler{ } const execEnvVar = `AWS_EXECUTION_ENV` -const execEnvUAKey = `exec_env` +const execEnvUAKey = `exec-env` // AddHostExecEnvUserAgentHander is a request handler appending the SDK's // execution environment to the user agent. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index dc82f4c3c..894bbc7f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -49,6 +49,8 @@ package credentials import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awserr" "sync" "time" ) @@ -97,6 +99,14 @@ type Provider interface { IsExpired() bool } +// An Expirer is an interface that Providers can implement to expose the expiration +// time, if known. If the Provider cannot accurately provide this info, +// it should not implement this interface. +type Expirer interface { + // The time at which the credentials are no longer valid + ExpiresAt() time.Time +} + // An ErrorProvider is a stub credentials provider that always returns an error // this is used by the SDK when construction a known provider is not possible // due to an error. @@ -163,6 +173,11 @@ func (e *Expiry) IsExpired() bool { return e.expiration.Before(curTime()) } +// ExpiresAt returns the expiration time of the credential +func (e *Expiry) ExpiresAt() time.Time { + return e.expiration +} + // A Credentials provides concurrency safe retrieval of AWS credentials Value. // Credentials will cache the credentials value until they expire. Once the value // expires the next Get will attempt to retrieve valid credentials. @@ -255,3 +270,23 @@ func (c *Credentials) IsExpired() bool { func (c *Credentials) isExpired() bool { return c.forceRefresh || c.provider.IsExpired() } + +// ExpiresAt provides access to the functionality of the Expirer interface of +// the underlying Provider, if it supports that interface. Otherwise, it returns +// an error. +func (c *Credentials) ExpiresAt() (time.Time, error) { + c.m.RLock() + defer c.m.RUnlock() + + expirer, ok := c.provider.(Expirer) + if !ok { + return time.Time{}, awserr.New("ProviderNotExpirer", + fmt.Sprintf("provider %s does not support ExpiresAt()", c.creds.ProviderName), + nil) + } + if c.forceRefresh { + // set expiration time to the distant past + return time.Time{}, nil + } + return expirer.ExpiresAt(), nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go index 6f57024d7..5bacc791a 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go @@ -3,6 +3,8 @@ package csm import ( "strconv" "time" + + "github.com/aws/aws-sdk-go/aws" ) type metricTime time.Time @@ -39,6 +41,12 @@ type metric struct { SDKException *string `json:"SdkException,omitempty"` SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"` + FinalHTTPStatusCode *int `json:"FinalHttpStatusCode,omitempty"` + FinalAWSException *string `json:"FinalAwsException,omitempty"` + FinalAWSExceptionMessage *string `json:"FinalAwsExceptionMessage,omitempty"` + FinalSDKException *string `json:"FinalSdkException,omitempty"` + FinalSDKExceptionMessage *string `json:"FinalSdkExceptionMessage,omitempty"` + DestinationIP *string `json:"DestinationIp,omitempty"` ConnectionReused *int `json:"ConnectionReused,omitempty"` @@ -51,3 +59,51 @@ type metric struct { MaxRetriesExceeded *int `json:"MaxRetriesExceeded,omitempty"` } + +func (m *metric) TruncateFields() { + m.ClientID = truncateString(m.ClientID, 255) + m.UserAgent = truncateString(m.UserAgent, 256) + + m.AWSException = truncateString(m.AWSException, 128) + m.AWSExceptionMessage = truncateString(m.AWSExceptionMessage, 512) + + m.SDKException = truncateString(m.SDKException, 128) + m.SDKExceptionMessage = truncateString(m.SDKExceptionMessage, 512) + + m.FinalAWSException = truncateString(m.FinalAWSException, 128) + m.FinalAWSExceptionMessage = truncateString(m.FinalAWSExceptionMessage, 512) + + m.FinalSDKException = truncateString(m.FinalSDKException, 128) + m.FinalSDKExceptionMessage = truncateString(m.FinalSDKExceptionMessage, 512) +} + +func truncateString(v *string, l int) *string { + if v != nil && len(*v) > l { + nv := (*v)[:l] + return &nv + } + + return v +} + +func (m *metric) SetException(e metricException) { + switch te := e.(type) { + case awsException: + m.AWSException = aws.String(te.exception) + m.AWSExceptionMessage = aws.String(te.message) + case sdkException: + m.SDKException = aws.String(te.exception) + m.SDKExceptionMessage = aws.String(te.message) + } +} + +func (m *metric) SetFinalException(e metricException) { + switch te := e.(type) { + case awsException: + m.FinalAWSException = aws.String(te.exception) + m.FinalAWSExceptionMessage = aws.String(te.message) + case sdkException: + m.FinalSDKException = aws.String(te.exception) + m.FinalSDKExceptionMessage = aws.String(te.message) + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go new file mode 100644 index 000000000..54a99280c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go @@ -0,0 +1,26 @@ +package csm + +type metricException interface { + Exception() string + Message() string +} + +type requestException struct { + exception string + message string +} + +func (e requestException) Exception() string { + return e.exception +} +func (e requestException) Message() string { + return e.message +} + +type awsException struct { + requestException +} + +type sdkException struct { + requestException +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index 9a5697c25..0b5571acf 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -82,14 +82,15 @@ func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) { if r.Error != nil { if awserr, ok := r.Error.(awserr.Error); ok { - setError(&m, awserr) + m.SetException(getMetricException(awserr)) } } + m.TruncateFields() rep.metricsCh.Push(m) } -func setError(m *metric, err awserr.Error) { +func getMetricException(err awserr.Error) metricException { msg := err.Error() code := err.Code() @@ -97,11 +98,13 @@ func setError(m *metric, err awserr.Error) { case "RequestError", "SerializationError", request.CanceledErrorCode: - m.SDKException = &code - m.SDKExceptionMessage = &msg + return sdkException{ + requestException{exception: code, message: msg}, + } default: - m.AWSException = &code - m.AWSExceptionMessage = &msg + return awsException{ + requestException{exception: code, message: msg}, + } } } @@ -116,6 +119,7 @@ func (rep *Reporter) sendAPICallMetric(r *request.Request) { API: aws.String(r.Operation.Name), Service: aws.String(r.ClientInfo.ServiceID), Timestamp: (*metricTime)(&now), + UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")), Type: aws.String("ApiCall"), AttemptCount: aws.Int(r.RetryCount + 1), Region: r.Config.Region, @@ -124,6 +128,18 @@ func (rep *Reporter) sendAPICallMetric(r *request.Request) { MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())), } + if r.HTTPResponse != nil { + m.FinalHTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode) + } + + if r.Error != nil { + if awserr, ok := r.Error.(awserr.Error); ok { + m.SetFinalException(getMetricException(awserr)) + } + } + + m.TruncateFields() + // TODO: Probably want to figure something out for logging dropped // metrics rep.metricsCh.Push(m) @@ -223,11 +239,15 @@ func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { return } - apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric} - apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} + handlers.Complete.PushFrontNamed(request.NamedHandler{ + Name: APICallMetricHandlerName, + Fn: rep.sendAPICallMetric, + }) - handlers.Complete.PushFrontNamed(apiCallHandler) - handlers.CompleteAttempt.PushFrontNamed(apiCallAttemptHandler) + handlers.CompleteAttempt.PushFrontNamed(request.NamedHandler{ + Name: APICallAttemptMetricHandlerName, + Fn: rep.sendAPICallAttemptMetric, + }) } // boolIntValue return 1 for true and 0 for false. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go index c215cd3f5..88e2fc707 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -118,6 +118,10 @@ func (c *EC2Metadata) Region() (string, error) { return "", err } + if len(resp) == 0 { + return "", awserr.New("EC2MetadataError", "invalid Region response", nil) + } + // returns region without the suffix. Eg: us-west-2a becomes us-west-2 return resp[:len(resp)-1], nil } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index 53457cac3..7d1f66e4e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -4,7 +4,7 @@ // This package's client can be disabled completely by setting the environment // variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to // true instructs the SDK to disable the EC2 Metadata client. The client cannot -// be used while the environemnt variable is set to true, (case insensitive). +// be used while the environment variable is set to true, (case insensitive). package ec2metadata import ( diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go index 1ddeae101..87b9ff3ff 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go @@ -85,6 +85,7 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol custAddS3DualStack(p) custRmIotDataService(p) custFixAppAutoscalingChina(p) + custFixAppAutoscalingUsGov(p) } return ps, nil @@ -149,6 +150,33 @@ func custFixAppAutoscalingChina(p *partition) { p.Services[serviceName] = s } +func custFixAppAutoscalingUsGov(p *partition) { + if p.ID != "aws-us-gov" { + return + } + + const serviceName = "application-autoscaling" + s, ok := p.Services[serviceName] + if !ok { + return + } + + if a := s.Defaults.CredentialScope.Service; a != "" { + fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a) + return + } + + if a := s.Defaults.Hostname; a != "" { + fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a) + return + } + + s.Defaults.CredentialScope.Service = "application-autoscaling" + s.Defaults.Hostname = "autoscaling.{region}.amazonaws.com" + + p.Services[serviceName] = s +} + type decodeModelError struct { awsError } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index c3bbaa0cd..97486c32b 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -185,6 +185,107 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "api.ecr": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Hostname: "api.ecr.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "ap-northeast-2": endpoint{ + Hostname: "api.ecr.ap-northeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "ap-south-1": endpoint{ + Hostname: "api.ecr.ap-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "ap-southeast-1": endpoint{ + Hostname: "api.ecr.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "api.ecr.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "ca-central-1": endpoint{ + Hostname: "api.ecr.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "eu-central-1": endpoint{ + Hostname: "api.ecr.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "eu-north-1": endpoint{ + Hostname: "api.ecr.eu-north-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-north-1", + }, + }, + "eu-west-1": endpoint{ + Hostname: "api.ecr.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "eu-west-2": endpoint{ + Hostname: "api.ecr.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "eu-west-3": endpoint{ + Hostname: "api.ecr.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "sa-east-1": endpoint{ + Hostname: "api.ecr.sa-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "api.ecr.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "api.ecr.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{ + Hostname: "api.ecr.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{ + Hostname: "api.ecr.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "api.mediatailor": service{ Endpoints: endpoints{ @@ -193,6 +294,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "api.pricing": service{ @@ -281,6 +383,9 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, @@ -349,10 +454,18 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -368,6 +481,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -506,6 +620,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -759,6 +874,7 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -802,6 +918,21 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "datasync": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "dax": service{ Endpoints: endpoints{ @@ -870,6 +1001,35 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "docdb": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{ + Hostname: "rds.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "rds.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "rds.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-2": endpoint{ + Hostname: "rds.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "ds": service{ Endpoints: endpoints{ @@ -953,27 +1113,6 @@ var awsPartition = partition{ }, }, }, - "ecr": service{ - - Endpoints: endpoints{ - "ap-northeast-1": endpoint{}, - "ap-northeast-2": endpoint{}, - "ap-south-1": endpoint{}, - "ap-southeast-1": endpoint{}, - "ap-southeast-2": endpoint{}, - "ca-central-1": endpoint{}, - "eu-central-1": endpoint{}, - "eu-north-1": endpoint{}, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -1032,6 +1171,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1205,9 +1345,22 @@ var awsPartition = partition{ Defaults: endpoint{ Protocols: []string{"https"}, }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "fsx": service{ + Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1265,8 +1418,10 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1414,6 +1569,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1598,6 +1754,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1655,6 +1812,21 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "mq": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "mturk-requester": service{ IsRegionalized: boxedFalse, @@ -1668,6 +1840,18 @@ var awsPartition = partition{ "neptune": service{ Endpoints: endpoints{ + "ap-southeast-1": endpoint{ + Hostname: "rds.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "rds.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, "eu-central-1": endpoint{ Hostname: "rds.eu-central-1.amazonaws.com", CredentialScope: credentialScope{ @@ -1760,9 +1944,10 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "polly": service{ @@ -1850,6 +2035,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1887,6 +2073,20 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "route53resolver": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "runtime.lex": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -2190,6 +2390,26 @@ var awsPartition = partition{ }, }, }, + "securityhub": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "serverlessrepo": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -2306,7 +2526,7 @@ var awsPartition = partition{ "shield": service{ IsRegionalized: boxedFalse, Defaults: endpoint{ - SSLCommonName: "Shield.us-east-1.amazonaws.com", + SSLCommonName: "shield.us-east-1.amazonaws.com", Protocols: []string{"https"}, }, Endpoints: endpoints{ @@ -2459,6 +2679,8 @@ var awsPartition = partition{ "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2787,6 +3009,23 @@ var awscnPartition = partition{ }, }, Services: services{ + "api.ecr": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{ + Hostname: "api.ecr.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + "cn-northwest-1": endpoint{ + Hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, "apigateway": service{ Endpoints: endpoints{ @@ -2907,13 +3146,6 @@ var awscnPartition = partition{ }, }, }, - "ecr": service{ - - Endpoints: endpoints{ - "cn-north-1": endpoint{}, - "cn-northwest-1": endpoint{}, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -2967,6 +3199,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "firehose": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "glacier": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -3120,6 +3359,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "states": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "storagegateway": service{ Endpoints: endpoints{ @@ -3198,6 +3444,23 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "api.ecr": service{ + + Endpoints: endpoints{ + "us-gov-east-1": endpoint{ + Hostname: "api.ecr.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "api.ecr.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "api.sagemaker": service{ Endpoints: endpoints{ @@ -3212,7 +3475,12 @@ var awsusgovPartition = partition{ }, }, "application-autoscaling": service{ - + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + CredentialScope: credentialScope{ + Service: "application-autoscaling", + }, + }, Endpoints: endpoints{ "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, @@ -3253,6 +3521,7 @@ var awsusgovPartition = partition{ }, }, Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3303,6 +3572,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "ds": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "dynamodb": service{ Endpoints: endpoints{ @@ -3334,13 +3609,6 @@ var awsusgovPartition = partition{ }, }, }, - "ecr": service{ - - Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -3368,6 +3636,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "elasticfilesystem": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "elasticloadbalancing": service{ Endpoints: endpoints{ @@ -3400,6 +3674,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "firehose": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "glacier": service{ Endpoints: endpoints{ @@ -3476,6 +3756,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "mediaconvert": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "metering.marketplace": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -3592,6 +3878,7 @@ var awsusgovPartition = partition{ "snowball": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index e29c09512..f82babf6f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -35,7 +35,7 @@ type Options struct { // // If resolving an endpoint on the partition list the provided region will // be used to determine which partition's domain name pattern to the service - // endpoint ID with. If both the service and region are unkonwn and resolving + // endpoint ID with. If both the service and region are unknown and resolving // the endpoint on partition list an UnknownEndpointError error will be returned. // // If resolving and endpoint on a partition specific resolver that partition's diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index 7d87df65c..8f2eb3e43 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "io" - "net" "net/http" "net/url" "reflect" @@ -266,7 +265,7 @@ func (r *Request) SetReaderBody(reader io.ReadSeeker) { // Presign returns the request's signed URL. Error will be returned // if the signing fails. The expire parameter is only used for presigned Amazon -// S3 API requests. All other AWS services will use a fixed expriation +// S3 API requests. All other AWS services will use a fixed expiration // time of 15 minutes. // // It is invalid to create a presigned URL with a expire duration 0 or less. An @@ -286,7 +285,7 @@ func (r *Request) Presign(expire time.Duration) (string, error) { // PresignRequest behaves just like presign, with the addition of returning a // set of headers that were signed. The expire parameter is only used for // presigned Amazon S3 API requests. All other AWS services will use a fixed -// expriation time of 15 minutes. +// expiration time of 15 minutes. // // It is invalid to create a presigned URL with a expire duration 0 or less. An // error is returned if expire duration is 0 or less. @@ -480,7 +479,7 @@ func (r *Request) Send() error { if err := r.sendRequest(); err == nil { return nil - } else if !shouldRetryCancel(r) { + } else if !shouldRetryCancel(r.Error) { return err } else { r.Handlers.Retry.Run(r) @@ -562,30 +561,46 @@ func AddToUserAgent(r *Request, s string) { r.HTTPRequest.Header.Set("User-Agent", s) } -func shouldRetryCancel(r *Request) bool { - awsErr, ok := r.Error.(awserr.Error) - timeoutErr := false - errStr := r.Error.Error() - if ok { - if awsErr.Code() == CanceledErrorCode { +type temporary interface { + Temporary() bool +} + +func shouldRetryCancel(err error) bool { + switch err := err.(type) { + case awserr.Error: + if err.Code() == CanceledErrorCode { return false } - err := awsErr.OrigErr() - netErr, netOK := err.(net.Error) - timeoutErr = netOK && netErr.Temporary() - if urlErr, ok := err.(*url.Error); !timeoutErr && ok { - errStr = urlErr.Err.Error() + return shouldRetryCancel(err.OrigErr()) + case *url.Error: + if strings.Contains(err.Error(), "connection refused") { + // Refused connections should be retried as the service may not yet + // be running on the port. Go TCP dial considers refused + // connections as not temporary. + return true } + // *url.Error only implements Temporary after golang 1.6 but since + // url.Error only wraps the error: + return shouldRetryCancel(err.Err) + case temporary: + // If the error is temporary, we want to allow continuation of the + // retry process + return err.Temporary() + case nil: + // `awserr.Error.OrigErr()` can be nil, meaning there was an error but + // because we don't know the cause, it is marked as retriable. See + // TestRequest4xxUnretryable for an example. + return true + default: + switch err.Error() { + case "net/http: request canceled", + "net/http: request canceled while waiting for connection": + // known 1.5 error case when an http request is cancelled + return false + } + // here we don't know the error; so we allow a retry. + return true } - - // There can be two types of canceled errors here. - // The first being a net.Error and the other being an error. - // If the request was timed out, we want to continue the retry - // process. Otherwise, return the canceled error. - return timeoutErr || - (errStr != "net/http: request canceled" && - errStr != "net/http: request canceled while waiting for connection") - } // SanitizeHostForHeader removes default port from host and updates request.Host diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index 2a0e882d0..38a7b05a6 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -183,7 +183,7 @@ be returned when creating the session. // from assumed role. svc := s3.New(sess) -To setup assume role outside of a session see the stscrds.AssumeRoleProvider +To setup assume role outside of a session see the stscreds.AssumeRoleProvider documentation. Environment Variables diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index c94d0fb9a..e3959b959 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -80,7 +80,7 @@ type envConfig struct { // AWS_CONFIG_FILE=$HOME/my_shared_config SharedConfigFile string - // Sets the path to a custom Credentials Authroity (CA) Bundle PEM file + // Sets the path to a custom Credentials Authority (CA) Bundle PEM file // that the SDK will use instead of the system's root CA bundle. // Only use this if you want to configure the SDK to use a custom set // of CAs. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index 594db5b17..523db79f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -182,7 +182,7 @@ type Signer struct { // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html DisableURIPathEscaping bool - // Disales the automatical setting of the HTTP request's Body field with the + // Disables the automatical setting of the HTTP request's Body field with the // io.ReadSeeker passed in to the signer. This is useful if you're using a // custom wrapper around the body for the io.ReadSeeker and want to preserve // the Body value on the Request.Body. @@ -754,7 +754,7 @@ func makeSha256Reader(reader io.ReadSeeker) []byte { const doubleSpace = " " // stripExcessSpaces will rewrite the passed in slice's string values to not -// contain muliple side-by-side spaces. +// contain multiple side-by-side spaces. func stripExcessSpaces(vals []string) { var j, k, l, m, spaces int for i, str := range vals { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 2c5130e26..000c839b7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.16.4" +const SDKVersion = "1.16.26" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go index 8be520ae6..f99703372 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go @@ -317,7 +317,7 @@ loop: return nil, NewParseError(fmt.Sprintf("incomplete expression: %v", stack.container)) } - // returns a sublist which exludes the start symbol + // returns a sublist which excludes the start symbol return stack.List(), nil } diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go index ba0af01b5..18f3fe893 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go @@ -15,7 +15,7 @@ func newExprStatement(ast AST) AST { return newAST(ASTKindExprStatement, ast) } -// CommentStatement represents a comment in the ini defintion. +// CommentStatement represents a comment in the ini definition. // // grammar: // comment -> #comment' | ;comment' diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go index b63e4c263..7da8a49ce 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go @@ -7,6 +7,6 @@ const ( ) // ECSContainerCredentialsURI is the endpoint to retrieve container -// credentials. This can be overriden to test to ensure the credential process +// credentials. This can be overridden to test to ensure the credential process // is behaving correctly. var ECSContainerCredentialsURI = "http://169.254.170.2" diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go index 22d62f133..64b00304b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -83,6 +83,10 @@ func (c *ACMPCA) CreateCertificateAuthorityRequest(input *CreateCertificateAutho // The S3 bucket policy is not valid. The policy must give ACM PCA rights to // read from and write to the bucket and find the bucket location. // +// * ErrCodeInvalidTagException "InvalidTagException" +// The tag associated with the CA is not valid. The invalid argument is contained +// in the message field. +// // * ErrCodeLimitExceededException "LimitExceededException" // An ACM PCA limit has been exceeded. See the exception message returned to // determine the limit that was exceeded. @@ -183,7 +187,8 @@ func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCerti // One or more of the specified arguments was not valid. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport func (c *ACMPCA) CreateCertificateAuthorityAuditReport(input *CreateCertificateAuthorityAuditReportInput) (*CreateCertificateAuthorityAuditReportOutput, error) { @@ -291,7 +296,8 @@ func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAutho // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority func (c *ACMPCA) DeleteCertificateAuthority(input *DeleteCertificateAuthorityInput) (*DeleteCertificateAuthorityOutput, error) { @@ -380,8 +386,8 @@ func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateA // CA can never return to the pending state. You must create a new CA. // // * DELETED - Your private CA is within the restoration period, after which -// it will be permanently deleted. The length of time remaining in the CA's -// restoration period will also be included in this operation's output. +// it is permanently deleted. The length of time remaining in the CA's restoration +// period is also included in this operation's output. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -583,7 +589,8 @@ func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate func (c *ACMPCA) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) { @@ -669,7 +676,8 @@ func (c *ACMPCA) GetCertificateAuthorityCertificateRequest(input *GetCertificate // cannot be found. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -769,7 +777,8 @@ func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorit // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) { @@ -881,7 +890,8 @@ func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCerti // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeMalformedCertificateException "MalformedCertificateException" // One or more fields in the certificate are invalid. @@ -981,7 +991,8 @@ func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *req // cannot be found. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -1045,6 +1056,12 @@ func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthori Name: opListCertificateAuthorities, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1095,6 +1112,56 @@ func (c *ACMPCA) ListCertificateAuthoritiesWithContext(ctx aws.Context, input *L return out, req.Send() } +// ListCertificateAuthoritiesPages iterates over the pages of a ListCertificateAuthorities operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListCertificateAuthorities method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListCertificateAuthorities operation. +// pageNum := 0 +// err := client.ListCertificateAuthoritiesPages(params, +// func(page *ListCertificateAuthoritiesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ACMPCA) ListCertificateAuthoritiesPages(input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool) error { + return c.ListCertificateAuthoritiesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListCertificateAuthoritiesPagesWithContext same as ListCertificateAuthoritiesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) ListCertificateAuthoritiesPagesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListCertificateAuthoritiesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListCertificateAuthoritiesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListCertificateAuthoritiesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the @@ -1255,7 +1322,8 @@ func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAut // cannot be found. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -1350,7 +1418,12 @@ func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *r // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// An ACM PCA limit has been exceeded. See the exception message returned to +// determine the limit that was exceeded. // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // A resource such as a private CA, S3 bucket, certificate, or audit report @@ -1458,7 +1531,8 @@ func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityIn // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidTagException "InvalidTagException" // The tag associated with the CA is not valid. The invalid argument is contained @@ -1558,7 +1632,8 @@ func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthori // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidTagException "InvalidTagException" // The tag associated with the CA is not valid. The invalid argument is contained @@ -1658,7 +1733,8 @@ func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAutho // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidPolicyException "InvalidPolicyException" // The S3 bucket policy is not valid. The policy must give ACM PCA rights to @@ -2185,6 +2261,10 @@ type CreateCertificateAuthorityInput struct { // your bucket in the CRL Distribution Points extension of your CA certificate. // For more information, see the CrlConfiguration structure. RevocationConfiguration *RevocationConfiguration `type:"structure"` + + // Key-value pairs that will be attached to the new private CA. You can associate + // up to 50 tags with a private CA. + Tags []*Tag `min:"1" type:"list"` } // String returns the string representation @@ -2209,6 +2289,9 @@ func (s *CreateCertificateAuthorityInput) Validate() error { if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } if s.CertificateAuthorityConfiguration != nil { if err := s.CertificateAuthorityConfiguration.Validate(); err != nil { invalidParams.AddNested("CertificateAuthorityConfiguration", err.(request.ErrInvalidParams)) @@ -2219,6 +2302,16 @@ func (s *CreateCertificateAuthorityInput) Validate() error { invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams)) } } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2250,6 +2343,12 @@ func (s *CreateCertificateAuthorityInput) SetRevocationConfiguration(v *Revocati return s } +// SetTags sets the Tags field's value. +func (s *CreateCertificateAuthorityInput) SetTags(v []*Tag) *CreateCertificateAuthorityInput { + s.Tags = v + return s +} + type CreateCertificateAuthorityOutput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go index 3ca437764..2ad5d0668 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/doc.go @@ -28,9 +28,13 @@ // specify a bucket policy that grants ACM PCA write permission. // // You can also call the CreateCertificateAuthorityAuditReport to create an -// optional audit report that lists every time the CA private key is used. The -// private key is used for signing when the IssueCertificate or RevokeCertificate -// operation is called. +// optional audit report, which enumerates all of the issued, valid, expired, +// and revoked certificates from the CA. +// +// Each ACM PCA API operation has a throttling limit which determines the number +// of times the operation can be called per second. For more information, see +// API Rate Limits in ACM PCA (acm-pca/latest/userguide/PcaLimits.html#PcaLimits-api) +// in the ACM PCA user guide. // // See https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go index 2614b5a42..5ce2781c2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go @@ -46,7 +46,8 @@ const ( // ErrCodeInvalidStateException for service response error code // "InvalidStateException". // - // The private CA is in a state during which a report cannot be generated. + // The private CA is in a state during which a report or certificate cannot + // be generated. ErrCodeInvalidStateException = "InvalidStateException" // ErrCodeInvalidTagException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go new file mode 100644 index 000000000..3c4a76336 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go @@ -0,0 +1,163 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilAuditReportCreated uses the ACM-PCA API operation +// DescribeCertificateAuthorityAuditReport to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACMPCA) WaitUntilAuditReportCreated(input *DescribeCertificateAuthorityAuditReportInput) error { + return c.WaitUntilAuditReportCreatedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilAuditReportCreatedWithContext is an extended version of WaitUntilAuditReportCreated. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) WaitUntilAuditReportCreatedWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilAuditReportCreated", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(3 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "AuditReportStatus", + Expected: "SUCCESS", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "AuditReportStatus", + Expected: "FAILED", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeCertificateAuthorityAuditReportInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCertificateAuthorityAuditReportRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilCertificateAuthorityCSRCreated uses the ACM-PCA API operation +// GetCertificateAuthorityCsr to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACMPCA) WaitUntilCertificateAuthorityCSRCreated(input *GetCertificateAuthorityCsrInput) error { + return c.WaitUntilCertificateAuthorityCSRCreatedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCertificateAuthorityCSRCreatedWithContext is an extended version of WaitUntilCertificateAuthorityCSRCreated. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) WaitUntilCertificateAuthorityCSRCreatedWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCertificateAuthorityCSRCreated", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(3 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 200, + }, + { + State: request.RetryWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "RequestInProgressException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *GetCertificateAuthorityCsrInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetCertificateAuthorityCsrRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilCertificateIssued uses the ACM-PCA API operation +// GetCertificate to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACMPCA) WaitUntilCertificateIssued(input *GetCertificateInput) error { + return c.WaitUntilCertificateIssuedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCertificateIssuedWithContext is an extended version of WaitUntilCertificateIssued. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ACMPCA) WaitUntilCertificateIssuedWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCertificateIssued", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(3 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 200, + }, + { + State: request.RetryWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "RequestInProgressException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *GetCertificateInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetCertificateRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go new file mode 100644 index 000000000..801a7ee1f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/api.go @@ -0,0 +1,14048 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package apigatewayv2 + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opCreateApi = "CreateApi" + +// CreateApiRequest generates a "aws/request.Request" representing the +// client's request for the CreateApi operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateApi for more information on using the CreateApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateApiRequest method. +// req, resp := client.CreateApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApi +func (c *ApiGatewayV2) CreateApiRequest(input *CreateApiInput) (req *request.Request, output *CreateApiOutput) { + op := &request.Operation{ + Name: opCreateApi, + HTTPMethod: "POST", + HTTPPath: "/v2/apis", + } + + if input == nil { + input = &CreateApiInput{} + } + + output = &CreateApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApi API operation for AmazonApiGatewayV2. +// +// Creates an Api resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApi +func (c *ApiGatewayV2) CreateApi(input *CreateApiInput) (*CreateApiOutput, error) { + req, out := c.CreateApiRequest(input) + return out, req.Send() +} + +// CreateApiWithContext is the same as CreateApi with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateApiWithContext(ctx aws.Context, input *CreateApiInput, opts ...request.Option) (*CreateApiOutput, error) { + req, out := c.CreateApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateApiMapping = "CreateApiMapping" + +// CreateApiMappingRequest generates a "aws/request.Request" representing the +// client's request for the CreateApiMapping operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateApiMapping for more information on using the CreateApiMapping +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateApiMappingRequest method. +// req, resp := client.CreateApiMappingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApiMapping +func (c *ApiGatewayV2) CreateApiMappingRequest(input *CreateApiMappingInput) (req *request.Request, output *CreateApiMappingOutput) { + op := &request.Operation{ + Name: opCreateApiMapping, + HTTPMethod: "POST", + HTTPPath: "/v2/domainnames/{domainName}/apimappings", + } + + if input == nil { + input = &CreateApiMappingInput{} + } + + output = &CreateApiMappingOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApiMapping API operation for AmazonApiGatewayV2. +// +// Creates an API mapping. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateApiMapping for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateApiMapping +func (c *ApiGatewayV2) CreateApiMapping(input *CreateApiMappingInput) (*CreateApiMappingOutput, error) { + req, out := c.CreateApiMappingRequest(input) + return out, req.Send() +} + +// CreateApiMappingWithContext is the same as CreateApiMapping with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApiMapping for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateApiMappingWithContext(ctx aws.Context, input *CreateApiMappingInput, opts ...request.Option) (*CreateApiMappingOutput, error) { + req, out := c.CreateApiMappingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateAuthorizer = "CreateAuthorizer" + +// CreateAuthorizerRequest generates a "aws/request.Request" representing the +// client's request for the CreateAuthorizer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateAuthorizer for more information on using the CreateAuthorizer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateAuthorizerRequest method. +// req, resp := client.CreateAuthorizerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateAuthorizer +func (c *ApiGatewayV2) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req *request.Request, output *CreateAuthorizerOutput) { + op := &request.Operation{ + Name: opCreateAuthorizer, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/authorizers", + } + + if input == nil { + input = &CreateAuthorizerInput{} + } + + output = &CreateAuthorizerOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateAuthorizer API operation for AmazonApiGatewayV2. +// +// Creates an Authorizer for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateAuthorizer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateAuthorizer +func (c *ApiGatewayV2) CreateAuthorizer(input *CreateAuthorizerInput) (*CreateAuthorizerOutput, error) { + req, out := c.CreateAuthorizerRequest(input) + return out, req.Send() +} + +// CreateAuthorizerWithContext is the same as CreateAuthorizer with the addition of +// the ability to pass a context and additional request options. +// +// See CreateAuthorizer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateAuthorizerWithContext(ctx aws.Context, input *CreateAuthorizerInput, opts ...request.Option) (*CreateAuthorizerOutput, error) { + req, out := c.CreateAuthorizerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDeployment = "CreateDeployment" + +// CreateDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the CreateDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDeployment for more information on using the CreateDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDeploymentRequest method. +// req, resp := client.CreateDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDeployment +func (c *ApiGatewayV2) CreateDeploymentRequest(input *CreateDeploymentInput) (req *request.Request, output *CreateDeploymentOutput) { + op := &request.Operation{ + Name: opCreateDeployment, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/deployments", + } + + if input == nil { + input = &CreateDeploymentInput{} + } + + output = &CreateDeploymentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDeployment API operation for AmazonApiGatewayV2. +// +// Creates a Deployment for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDeployment +func (c *ApiGatewayV2) CreateDeployment(input *CreateDeploymentInput) (*CreateDeploymentOutput, error) { + req, out := c.CreateDeploymentRequest(input) + return out, req.Send() +} + +// CreateDeploymentWithContext is the same as CreateDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateDeploymentWithContext(ctx aws.Context, input *CreateDeploymentInput, opts ...request.Option) (*CreateDeploymentOutput, error) { + req, out := c.CreateDeploymentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDomainName = "CreateDomainName" + +// CreateDomainNameRequest generates a "aws/request.Request" representing the +// client's request for the CreateDomainName operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDomainName for more information on using the CreateDomainName +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDomainNameRequest method. +// req, resp := client.CreateDomainNameRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDomainName +func (c *ApiGatewayV2) CreateDomainNameRequest(input *CreateDomainNameInput) (req *request.Request, output *CreateDomainNameOutput) { + op := &request.Operation{ + Name: opCreateDomainName, + HTTPMethod: "POST", + HTTPPath: "/v2/domainnames", + } + + if input == nil { + input = &CreateDomainNameInput{} + } + + output = &CreateDomainNameOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDomainName API operation for AmazonApiGatewayV2. +// +// Creates a domain name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateDomainName for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateDomainName +func (c *ApiGatewayV2) CreateDomainName(input *CreateDomainNameInput) (*CreateDomainNameOutput, error) { + req, out := c.CreateDomainNameRequest(input) + return out, req.Send() +} + +// CreateDomainNameWithContext is the same as CreateDomainName with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDomainName for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateDomainNameWithContext(ctx aws.Context, input *CreateDomainNameInput, opts ...request.Option) (*CreateDomainNameOutput, error) { + req, out := c.CreateDomainNameRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateIntegration = "CreateIntegration" + +// CreateIntegrationRequest generates a "aws/request.Request" representing the +// client's request for the CreateIntegration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateIntegration for more information on using the CreateIntegration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateIntegrationRequest method. +// req, resp := client.CreateIntegrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegration +func (c *ApiGatewayV2) CreateIntegrationRequest(input *CreateIntegrationInput) (req *request.Request, output *CreateIntegrationOutput) { + op := &request.Operation{ + Name: opCreateIntegration, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/integrations", + } + + if input == nil { + input = &CreateIntegrationInput{} + } + + output = &CreateIntegrationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateIntegration API operation for AmazonApiGatewayV2. +// +// Creates an Integration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateIntegration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegration +func (c *ApiGatewayV2) CreateIntegration(input *CreateIntegrationInput) (*CreateIntegrationOutput, error) { + req, out := c.CreateIntegrationRequest(input) + return out, req.Send() +} + +// CreateIntegrationWithContext is the same as CreateIntegration with the addition of +// the ability to pass a context and additional request options. +// +// See CreateIntegration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateIntegrationWithContext(ctx aws.Context, input *CreateIntegrationInput, opts ...request.Option) (*CreateIntegrationOutput, error) { + req, out := c.CreateIntegrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateIntegrationResponse = "CreateIntegrationResponse" + +// CreateIntegrationResponseRequest generates a "aws/request.Request" representing the +// client's request for the CreateIntegrationResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateIntegrationResponse for more information on using the CreateIntegrationResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateIntegrationResponseRequest method. +// req, resp := client.CreateIntegrationResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegrationResponse +func (c *ApiGatewayV2) CreateIntegrationResponseRequest(input *CreateIntegrationResponseInput) (req *request.Request, output *CreateIntegrationResponseOutput) { + op := &request.Operation{ + Name: opCreateIntegrationResponse, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses", + } + + if input == nil { + input = &CreateIntegrationResponseInput{} + } + + output = &CreateIntegrationResponseOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateIntegrationResponse API operation for AmazonApiGatewayV2. +// +// Creates an IntegrationResponses. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateIntegrationResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateIntegrationResponse +func (c *ApiGatewayV2) CreateIntegrationResponse(input *CreateIntegrationResponseInput) (*CreateIntegrationResponseOutput, error) { + req, out := c.CreateIntegrationResponseRequest(input) + return out, req.Send() +} + +// CreateIntegrationResponseWithContext is the same as CreateIntegrationResponse with the addition of +// the ability to pass a context and additional request options. +// +// See CreateIntegrationResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateIntegrationResponseWithContext(ctx aws.Context, input *CreateIntegrationResponseInput, opts ...request.Option) (*CreateIntegrationResponseOutput, error) { + req, out := c.CreateIntegrationResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateModel = "CreateModel" + +// CreateModelRequest generates a "aws/request.Request" representing the +// client's request for the CreateModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateModel for more information on using the CreateModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateModelRequest method. +// req, resp := client.CreateModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateModel +func (c *ApiGatewayV2) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *CreateModelOutput) { + op := &request.Operation{ + Name: opCreateModel, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/models", + } + + if input == nil { + input = &CreateModelInput{} + } + + output = &CreateModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateModel API operation for AmazonApiGatewayV2. +// +// Creates a Model for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateModel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateModel +func (c *ApiGatewayV2) CreateModel(input *CreateModelInput) (*CreateModelOutput, error) { + req, out := c.CreateModelRequest(input) + return out, req.Send() +} + +// CreateModelWithContext is the same as CreateModel with the addition of +// the ability to pass a context and additional request options. +// +// See CreateModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateModelWithContext(ctx aws.Context, input *CreateModelInput, opts ...request.Option) (*CreateModelOutput, error) { + req, out := c.CreateModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateRoute = "CreateRoute" + +// CreateRouteRequest generates a "aws/request.Request" representing the +// client's request for the CreateRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRoute for more information on using the CreateRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRouteRequest method. +// req, resp := client.CreateRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRoute +func (c *ApiGatewayV2) CreateRouteRequest(input *CreateRouteInput) (req *request.Request, output *CreateRouteOutput) { + op := &request.Operation{ + Name: opCreateRoute, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/routes", + } + + if input == nil { + input = &CreateRouteInput{} + } + + output = &CreateRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRoute API operation for AmazonApiGatewayV2. +// +// Creates a Route for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRoute +func (c *ApiGatewayV2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) { + req, out := c.CreateRouteRequest(input) + return out, req.Send() +} + +// CreateRouteWithContext is the same as CreateRoute with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateRouteWithContext(ctx aws.Context, input *CreateRouteInput, opts ...request.Option) (*CreateRouteOutput, error) { + req, out := c.CreateRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateRouteResponse = "CreateRouteResponse" + +// CreateRouteResponseRequest generates a "aws/request.Request" representing the +// client's request for the CreateRouteResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateRouteResponse for more information on using the CreateRouteResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateRouteResponseRequest method. +// req, resp := client.CreateRouteResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRouteResponse +func (c *ApiGatewayV2) CreateRouteResponseRequest(input *CreateRouteResponseInput) (req *request.Request, output *CreateRouteResponseOutput) { + op := &request.Operation{ + Name: opCreateRouteResponse, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses", + } + + if input == nil { + input = &CreateRouteResponseInput{} + } + + output = &CreateRouteResponseOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRouteResponse API operation for AmazonApiGatewayV2. +// +// Creates a RouteResponse for a Route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateRouteResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateRouteResponse +func (c *ApiGatewayV2) CreateRouteResponse(input *CreateRouteResponseInput) (*CreateRouteResponseOutput, error) { + req, out := c.CreateRouteResponseRequest(input) + return out, req.Send() +} + +// CreateRouteResponseWithContext is the same as CreateRouteResponse with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRouteResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateRouteResponseWithContext(ctx aws.Context, input *CreateRouteResponseInput, opts ...request.Option) (*CreateRouteResponseOutput, error) { + req, out := c.CreateRouteResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateStage = "CreateStage" + +// CreateStageRequest generates a "aws/request.Request" representing the +// client's request for the CreateStage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateStage for more information on using the CreateStage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateStageRequest method. +// req, resp := client.CreateStageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateStage +func (c *ApiGatewayV2) CreateStageRequest(input *CreateStageInput) (req *request.Request, output *CreateStageOutput) { + op := &request.Operation{ + Name: opCreateStage, + HTTPMethod: "POST", + HTTPPath: "/v2/apis/{apiId}/stages", + } + + if input == nil { + input = &CreateStageInput{} + } + + output = &CreateStageOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateStage API operation for AmazonApiGatewayV2. +// +// Creates a Stage for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation CreateStage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/CreateStage +func (c *ApiGatewayV2) CreateStage(input *CreateStageInput) (*CreateStageOutput, error) { + req, out := c.CreateStageRequest(input) + return out, req.Send() +} + +// CreateStageWithContext is the same as CreateStage with the addition of +// the ability to pass a context and additional request options. +// +// See CreateStage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) CreateStageWithContext(ctx aws.Context, input *CreateStageInput, opts ...request.Option) (*CreateStageOutput, error) { + req, out := c.CreateStageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApi = "DeleteApi" + +// DeleteApiRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApi operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApi for more information on using the DeleteApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApiRequest method. +// req, resp := client.DeleteApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApi +func (c *ApiGatewayV2) DeleteApiRequest(input *DeleteApiInput) (req *request.Request, output *DeleteApiOutput) { + op := &request.Operation{ + Name: opDeleteApi, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}", + } + + if input == nil { + input = &DeleteApiInput{} + } + + output = &DeleteApiOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApi API operation for AmazonApiGatewayV2. +// +// Deletes an Api resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApi +func (c *ApiGatewayV2) DeleteApi(input *DeleteApiInput) (*DeleteApiOutput, error) { + req, out := c.DeleteApiRequest(input) + return out, req.Send() +} + +// DeleteApiWithContext is the same as DeleteApi with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteApiWithContext(ctx aws.Context, input *DeleteApiInput, opts ...request.Option) (*DeleteApiOutput, error) { + req, out := c.DeleteApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApiMapping = "DeleteApiMapping" + +// DeleteApiMappingRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApiMapping operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApiMapping for more information on using the DeleteApiMapping +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApiMappingRequest method. +// req, resp := client.DeleteApiMappingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApiMapping +func (c *ApiGatewayV2) DeleteApiMappingRequest(input *DeleteApiMappingInput) (req *request.Request, output *DeleteApiMappingOutput) { + op := &request.Operation{ + Name: opDeleteApiMapping, + HTTPMethod: "DELETE", + HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", + } + + if input == nil { + input = &DeleteApiMappingInput{} + } + + output = &DeleteApiMappingOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApiMapping API operation for AmazonApiGatewayV2. +// +// Deletes an API mapping. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteApiMapping for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteApiMapping +func (c *ApiGatewayV2) DeleteApiMapping(input *DeleteApiMappingInput) (*DeleteApiMappingOutput, error) { + req, out := c.DeleteApiMappingRequest(input) + return out, req.Send() +} + +// DeleteApiMappingWithContext is the same as DeleteApiMapping with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApiMapping for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteApiMappingWithContext(ctx aws.Context, input *DeleteApiMappingInput, opts ...request.Option) (*DeleteApiMappingOutput, error) { + req, out := c.DeleteApiMappingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAuthorizer = "DeleteAuthorizer" + +// DeleteAuthorizerRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAuthorizer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAuthorizer for more information on using the DeleteAuthorizer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAuthorizerRequest method. +// req, resp := client.DeleteAuthorizerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteAuthorizer +func (c *ApiGatewayV2) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *request.Request, output *DeleteAuthorizerOutput) { + op := &request.Operation{ + Name: opDeleteAuthorizer, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/authorizers/{authorizerId}", + } + + if input == nil { + input = &DeleteAuthorizerInput{} + } + + output = &DeleteAuthorizerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteAuthorizer API operation for AmazonApiGatewayV2. +// +// Deletes an Authorizer. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteAuthorizer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteAuthorizer +func (c *ApiGatewayV2) DeleteAuthorizer(input *DeleteAuthorizerInput) (*DeleteAuthorizerOutput, error) { + req, out := c.DeleteAuthorizerRequest(input) + return out, req.Send() +} + +// DeleteAuthorizerWithContext is the same as DeleteAuthorizer with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAuthorizer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteAuthorizerWithContext(ctx aws.Context, input *DeleteAuthorizerInput, opts ...request.Option) (*DeleteAuthorizerOutput, error) { + req, out := c.DeleteAuthorizerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDeployment = "DeleteDeployment" + +// DeleteDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDeployment for more information on using the DeleteDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDeploymentRequest method. +// req, resp := client.DeleteDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDeployment +func (c *ApiGatewayV2) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req *request.Request, output *DeleteDeploymentOutput) { + op := &request.Operation{ + Name: opDeleteDeployment, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/deployments/{deploymentId}", + } + + if input == nil { + input = &DeleteDeploymentInput{} + } + + output = &DeleteDeploymentOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDeployment API operation for AmazonApiGatewayV2. +// +// Deletes a Deployment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDeployment +func (c *ApiGatewayV2) DeleteDeployment(input *DeleteDeploymentInput) (*DeleteDeploymentOutput, error) { + req, out := c.DeleteDeploymentRequest(input) + return out, req.Send() +} + +// DeleteDeploymentWithContext is the same as DeleteDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteDeploymentWithContext(ctx aws.Context, input *DeleteDeploymentInput, opts ...request.Option) (*DeleteDeploymentOutput, error) { + req, out := c.DeleteDeploymentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDomainName = "DeleteDomainName" + +// DeleteDomainNameRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDomainName operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDomainName for more information on using the DeleteDomainName +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDomainNameRequest method. +// req, resp := client.DeleteDomainNameRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDomainName +func (c *ApiGatewayV2) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req *request.Request, output *DeleteDomainNameOutput) { + op := &request.Operation{ + Name: opDeleteDomainName, + HTTPMethod: "DELETE", + HTTPPath: "/v2/domainnames/{domainName}", + } + + if input == nil { + input = &DeleteDomainNameInput{} + } + + output = &DeleteDomainNameOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDomainName API operation for AmazonApiGatewayV2. +// +// Deletes a domain name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteDomainName for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteDomainName +func (c *ApiGatewayV2) DeleteDomainName(input *DeleteDomainNameInput) (*DeleteDomainNameOutput, error) { + req, out := c.DeleteDomainNameRequest(input) + return out, req.Send() +} + +// DeleteDomainNameWithContext is the same as DeleteDomainName with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDomainName for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteDomainNameWithContext(ctx aws.Context, input *DeleteDomainNameInput, opts ...request.Option) (*DeleteDomainNameOutput, error) { + req, out := c.DeleteDomainNameRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteIntegration = "DeleteIntegration" + +// DeleteIntegrationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteIntegration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteIntegration for more information on using the DeleteIntegration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteIntegrationRequest method. +// req, resp := client.DeleteIntegrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegration +func (c *ApiGatewayV2) DeleteIntegrationRequest(input *DeleteIntegrationInput) (req *request.Request, output *DeleteIntegrationOutput) { + op := &request.Operation{ + Name: opDeleteIntegration, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}", + } + + if input == nil { + input = &DeleteIntegrationInput{} + } + + output = &DeleteIntegrationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteIntegration API operation for AmazonApiGatewayV2. +// +// Deletes an Integration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteIntegration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegration +func (c *ApiGatewayV2) DeleteIntegration(input *DeleteIntegrationInput) (*DeleteIntegrationOutput, error) { + req, out := c.DeleteIntegrationRequest(input) + return out, req.Send() +} + +// DeleteIntegrationWithContext is the same as DeleteIntegration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteIntegration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteIntegrationWithContext(ctx aws.Context, input *DeleteIntegrationInput, opts ...request.Option) (*DeleteIntegrationOutput, error) { + req, out := c.DeleteIntegrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteIntegrationResponse = "DeleteIntegrationResponse" + +// DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the +// client's request for the DeleteIntegrationResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteIntegrationResponse for more information on using the DeleteIntegrationResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteIntegrationResponseRequest method. +// req, resp := client.DeleteIntegrationResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegrationResponse +func (c *ApiGatewayV2) DeleteIntegrationResponseRequest(input *DeleteIntegrationResponseInput) (req *request.Request, output *DeleteIntegrationResponseOutput) { + op := &request.Operation{ + Name: opDeleteIntegrationResponse, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", + } + + if input == nil { + input = &DeleteIntegrationResponseInput{} + } + + output = &DeleteIntegrationResponseOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteIntegrationResponse API operation for AmazonApiGatewayV2. +// +// Deletes an IntegrationResponses. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteIntegrationResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteIntegrationResponse +func (c *ApiGatewayV2) DeleteIntegrationResponse(input *DeleteIntegrationResponseInput) (*DeleteIntegrationResponseOutput, error) { + req, out := c.DeleteIntegrationResponseRequest(input) + return out, req.Send() +} + +// DeleteIntegrationResponseWithContext is the same as DeleteIntegrationResponse with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteIntegrationResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteIntegrationResponseWithContext(ctx aws.Context, input *DeleteIntegrationResponseInput, opts ...request.Option) (*DeleteIntegrationResponseOutput, error) { + req, out := c.DeleteIntegrationResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteModel = "DeleteModel" + +// DeleteModelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteModel for more information on using the DeleteModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteModelRequest method. +// req, resp := client.DeleteModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteModel +func (c *ApiGatewayV2) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) { + op := &request.Operation{ + Name: opDeleteModel, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/models/{modelId}", + } + + if input == nil { + input = &DeleteModelInput{} + } + + output = &DeleteModelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteModel API operation for AmazonApiGatewayV2. +// +// Deletes a Model. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteModel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteModel +func (c *ApiGatewayV2) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { + req, out := c.DeleteModelRequest(input) + return out, req.Send() +} + +// DeleteModelWithContext is the same as DeleteModel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteModelWithContext(ctx aws.Context, input *DeleteModelInput, opts ...request.Option) (*DeleteModelOutput, error) { + req, out := c.DeleteModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRoute = "DeleteRoute" + +// DeleteRouteRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRoute for more information on using the DeleteRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRouteRequest method. +// req, resp := client.DeleteRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRoute +func (c *ApiGatewayV2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output *DeleteRouteOutput) { + op := &request.Operation{ + Name: opDeleteRoute, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}", + } + + if input == nil { + input = &DeleteRouteInput{} + } + + output = &DeleteRouteOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRoute API operation for AmazonApiGatewayV2. +// +// Deletes a Route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRoute +func (c *ApiGatewayV2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) { + req, out := c.DeleteRouteRequest(input) + return out, req.Send() +} + +// DeleteRouteWithContext is the same as DeleteRoute with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteRouteWithContext(ctx aws.Context, input *DeleteRouteInput, opts ...request.Option) (*DeleteRouteOutput, error) { + req, out := c.DeleteRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRouteResponse = "DeleteRouteResponse" + +// DeleteRouteResponseRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRouteResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRouteResponse for more information on using the DeleteRouteResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRouteResponseRequest method. +// req, resp := client.DeleteRouteResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRouteResponse +func (c *ApiGatewayV2) DeleteRouteResponseRequest(input *DeleteRouteResponseInput) (req *request.Request, output *DeleteRouteResponseOutput) { + op := &request.Operation{ + Name: opDeleteRouteResponse, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", + } + + if input == nil { + input = &DeleteRouteResponseInput{} + } + + output = &DeleteRouteResponseOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRouteResponse API operation for AmazonApiGatewayV2. +// +// Deletes a RouteResponse. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteRouteResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteRouteResponse +func (c *ApiGatewayV2) DeleteRouteResponse(input *DeleteRouteResponseInput) (*DeleteRouteResponseOutput, error) { + req, out := c.DeleteRouteResponseRequest(input) + return out, req.Send() +} + +// DeleteRouteResponseWithContext is the same as DeleteRouteResponse with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRouteResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteRouteResponseWithContext(ctx aws.Context, input *DeleteRouteResponseInput, opts ...request.Option) (*DeleteRouteResponseOutput, error) { + req, out := c.DeleteRouteResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteStage = "DeleteStage" + +// DeleteStageRequest generates a "aws/request.Request" representing the +// client's request for the DeleteStage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteStage for more information on using the DeleteStage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteStageRequest method. +// req, resp := client.DeleteStageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteStage +func (c *ApiGatewayV2) DeleteStageRequest(input *DeleteStageInput) (req *request.Request, output *DeleteStageOutput) { + op := &request.Operation{ + Name: opDeleteStage, + HTTPMethod: "DELETE", + HTTPPath: "/v2/apis/{apiId}/stages/{stageName}", + } + + if input == nil { + input = &DeleteStageInput{} + } + + output = &DeleteStageOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteStage API operation for AmazonApiGatewayV2. +// +// Deletes a Stage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation DeleteStage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/DeleteStage +func (c *ApiGatewayV2) DeleteStage(input *DeleteStageInput) (*DeleteStageOutput, error) { + req, out := c.DeleteStageRequest(input) + return out, req.Send() +} + +// DeleteStageWithContext is the same as DeleteStage with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteStage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) DeleteStageWithContext(ctx aws.Context, input *DeleteStageInput, opts ...request.Option) (*DeleteStageOutput, error) { + req, out := c.DeleteStageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApi = "GetApi" + +// GetApiRequest generates a "aws/request.Request" representing the +// client's request for the GetApi operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApi for more information on using the GetApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApiRequest method. +// req, resp := client.GetApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi +func (c *ApiGatewayV2) GetApiRequest(input *GetApiInput) (req *request.Request, output *GetApiOutput) { + op := &request.Operation{ + Name: opGetApi, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}", + } + + if input == nil { + input = &GetApiInput{} + } + + output = &GetApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApi API operation for AmazonApiGatewayV2. +// +// Gets an Api resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApi +func (c *ApiGatewayV2) GetApi(input *GetApiInput) (*GetApiOutput, error) { + req, out := c.GetApiRequest(input) + return out, req.Send() +} + +// GetApiWithContext is the same as GetApi with the addition of +// the ability to pass a context and additional request options. +// +// See GetApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetApiWithContext(ctx aws.Context, input *GetApiInput, opts ...request.Option) (*GetApiOutput, error) { + req, out := c.GetApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApiMapping = "GetApiMapping" + +// GetApiMappingRequest generates a "aws/request.Request" representing the +// client's request for the GetApiMapping operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApiMapping for more information on using the GetApiMapping +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApiMappingRequest method. +// req, resp := client.GetApiMappingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping +func (c *ApiGatewayV2) GetApiMappingRequest(input *GetApiMappingInput) (req *request.Request, output *GetApiMappingOutput) { + op := &request.Operation{ + Name: opGetApiMapping, + HTTPMethod: "GET", + HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", + } + + if input == nil { + input = &GetApiMappingInput{} + } + + output = &GetApiMappingOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApiMapping API operation for AmazonApiGatewayV2. +// +// The API mapping. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetApiMapping for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMapping +func (c *ApiGatewayV2) GetApiMapping(input *GetApiMappingInput) (*GetApiMappingOutput, error) { + req, out := c.GetApiMappingRequest(input) + return out, req.Send() +} + +// GetApiMappingWithContext is the same as GetApiMapping with the addition of +// the ability to pass a context and additional request options. +// +// See GetApiMapping for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetApiMappingWithContext(ctx aws.Context, input *GetApiMappingInput, opts ...request.Option) (*GetApiMappingOutput, error) { + req, out := c.GetApiMappingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApiMappings = "GetApiMappings" + +// GetApiMappingsRequest generates a "aws/request.Request" representing the +// client's request for the GetApiMappings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApiMappings for more information on using the GetApiMappings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApiMappingsRequest method. +// req, resp := client.GetApiMappingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMappings +func (c *ApiGatewayV2) GetApiMappingsRequest(input *GetApiMappingsInput) (req *request.Request, output *GetApiMappingsOutput) { + op := &request.Operation{ + Name: opGetApiMappings, + HTTPMethod: "GET", + HTTPPath: "/v2/domainnames/{domainName}/apimappings", + } + + if input == nil { + input = &GetApiMappingsInput{} + } + + output = &GetApiMappingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApiMappings API operation for AmazonApiGatewayV2. +// +// The API mappings. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetApiMappings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApiMappings +func (c *ApiGatewayV2) GetApiMappings(input *GetApiMappingsInput) (*GetApiMappingsOutput, error) { + req, out := c.GetApiMappingsRequest(input) + return out, req.Send() +} + +// GetApiMappingsWithContext is the same as GetApiMappings with the addition of +// the ability to pass a context and additional request options. +// +// See GetApiMappings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetApiMappingsWithContext(ctx aws.Context, input *GetApiMappingsInput, opts ...request.Option) (*GetApiMappingsOutput, error) { + req, out := c.GetApiMappingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApis = "GetApis" + +// GetApisRequest generates a "aws/request.Request" representing the +// client's request for the GetApis operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApis for more information on using the GetApis +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApisRequest method. +// req, resp := client.GetApisRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApis +func (c *ApiGatewayV2) GetApisRequest(input *GetApisInput) (req *request.Request, output *GetApisOutput) { + op := &request.Operation{ + Name: opGetApis, + HTTPMethod: "GET", + HTTPPath: "/v2/apis", + } + + if input == nil { + input = &GetApisInput{} + } + + output = &GetApisOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApis API operation for AmazonApiGatewayV2. +// +// Gets a collection of Api resources. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetApis for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetApis +func (c *ApiGatewayV2) GetApis(input *GetApisInput) (*GetApisOutput, error) { + req, out := c.GetApisRequest(input) + return out, req.Send() +} + +// GetApisWithContext is the same as GetApis with the addition of +// the ability to pass a context and additional request options. +// +// See GetApis for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetApisWithContext(ctx aws.Context, input *GetApisInput, opts ...request.Option) (*GetApisOutput, error) { + req, out := c.GetApisRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAuthorizer = "GetAuthorizer" + +// GetAuthorizerRequest generates a "aws/request.Request" representing the +// client's request for the GetAuthorizer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAuthorizer for more information on using the GetAuthorizer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAuthorizerRequest method. +// req, resp := client.GetAuthorizerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizer +func (c *ApiGatewayV2) GetAuthorizerRequest(input *GetAuthorizerInput) (req *request.Request, output *GetAuthorizerOutput) { + op := &request.Operation{ + Name: opGetAuthorizer, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/authorizers/{authorizerId}", + } + + if input == nil { + input = &GetAuthorizerInput{} + } + + output = &GetAuthorizerOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAuthorizer API operation for AmazonApiGatewayV2. +// +// Gets an Authorizer. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetAuthorizer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizer +func (c *ApiGatewayV2) GetAuthorizer(input *GetAuthorizerInput) (*GetAuthorizerOutput, error) { + req, out := c.GetAuthorizerRequest(input) + return out, req.Send() +} + +// GetAuthorizerWithContext is the same as GetAuthorizer with the addition of +// the ability to pass a context and additional request options. +// +// See GetAuthorizer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetAuthorizerWithContext(ctx aws.Context, input *GetAuthorizerInput, opts ...request.Option) (*GetAuthorizerOutput, error) { + req, out := c.GetAuthorizerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAuthorizers = "GetAuthorizers" + +// GetAuthorizersRequest generates a "aws/request.Request" representing the +// client's request for the GetAuthorizers operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAuthorizers for more information on using the GetAuthorizers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAuthorizersRequest method. +// req, resp := client.GetAuthorizersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizers +func (c *ApiGatewayV2) GetAuthorizersRequest(input *GetAuthorizersInput) (req *request.Request, output *GetAuthorizersOutput) { + op := &request.Operation{ + Name: opGetAuthorizers, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/authorizers", + } + + if input == nil { + input = &GetAuthorizersInput{} + } + + output = &GetAuthorizersOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAuthorizers API operation for AmazonApiGatewayV2. +// +// Gets the Authorizers for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetAuthorizers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetAuthorizers +func (c *ApiGatewayV2) GetAuthorizers(input *GetAuthorizersInput) (*GetAuthorizersOutput, error) { + req, out := c.GetAuthorizersRequest(input) + return out, req.Send() +} + +// GetAuthorizersWithContext is the same as GetAuthorizers with the addition of +// the ability to pass a context and additional request options. +// +// See GetAuthorizers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetAuthorizersWithContext(ctx aws.Context, input *GetAuthorizersInput, opts ...request.Option) (*GetAuthorizersOutput, error) { + req, out := c.GetAuthorizersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDeployment = "GetDeployment" + +// GetDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the GetDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDeployment for more information on using the GetDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDeploymentRequest method. +// req, resp := client.GetDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployment +func (c *ApiGatewayV2) GetDeploymentRequest(input *GetDeploymentInput) (req *request.Request, output *GetDeploymentOutput) { + op := &request.Operation{ + Name: opGetDeployment, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/deployments/{deploymentId}", + } + + if input == nil { + input = &GetDeploymentInput{} + } + + output = &GetDeploymentOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeployment API operation for AmazonApiGatewayV2. +// +// Gets a Deployment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployment +func (c *ApiGatewayV2) GetDeployment(input *GetDeploymentInput) (*GetDeploymentOutput, error) { + req, out := c.GetDeploymentRequest(input) + return out, req.Send() +} + +// GetDeploymentWithContext is the same as GetDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetDeploymentWithContext(ctx aws.Context, input *GetDeploymentInput, opts ...request.Option) (*GetDeploymentOutput, error) { + req, out := c.GetDeploymentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDeployments = "GetDeployments" + +// GetDeploymentsRequest generates a "aws/request.Request" representing the +// client's request for the GetDeployments operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDeployments for more information on using the GetDeployments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDeploymentsRequest method. +// req, resp := client.GetDeploymentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployments +func (c *ApiGatewayV2) GetDeploymentsRequest(input *GetDeploymentsInput) (req *request.Request, output *GetDeploymentsOutput) { + op := &request.Operation{ + Name: opGetDeployments, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/deployments", + } + + if input == nil { + input = &GetDeploymentsInput{} + } + + output = &GetDeploymentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeployments API operation for AmazonApiGatewayV2. +// +// Gets the Deployments for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetDeployments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDeployments +func (c *ApiGatewayV2) GetDeployments(input *GetDeploymentsInput) (*GetDeploymentsOutput, error) { + req, out := c.GetDeploymentsRequest(input) + return out, req.Send() +} + +// GetDeploymentsWithContext is the same as GetDeployments with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeployments for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetDeploymentsWithContext(ctx aws.Context, input *GetDeploymentsInput, opts ...request.Option) (*GetDeploymentsOutput, error) { + req, out := c.GetDeploymentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDomainName = "GetDomainName" + +// GetDomainNameRequest generates a "aws/request.Request" representing the +// client's request for the GetDomainName operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDomainName for more information on using the GetDomainName +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDomainNameRequest method. +// req, resp := client.GetDomainNameRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainName +func (c *ApiGatewayV2) GetDomainNameRequest(input *GetDomainNameInput) (req *request.Request, output *GetDomainNameOutput) { + op := &request.Operation{ + Name: opGetDomainName, + HTTPMethod: "GET", + HTTPPath: "/v2/domainnames/{domainName}", + } + + if input == nil { + input = &GetDomainNameInput{} + } + + output = &GetDomainNameOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDomainName API operation for AmazonApiGatewayV2. +// +// Gets a domain name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetDomainName for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainName +func (c *ApiGatewayV2) GetDomainName(input *GetDomainNameInput) (*GetDomainNameOutput, error) { + req, out := c.GetDomainNameRequest(input) + return out, req.Send() +} + +// GetDomainNameWithContext is the same as GetDomainName with the addition of +// the ability to pass a context and additional request options. +// +// See GetDomainName for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetDomainNameWithContext(ctx aws.Context, input *GetDomainNameInput, opts ...request.Option) (*GetDomainNameOutput, error) { + req, out := c.GetDomainNameRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetDomainNames = "GetDomainNames" + +// GetDomainNamesRequest generates a "aws/request.Request" representing the +// client's request for the GetDomainNames operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetDomainNames for more information on using the GetDomainNames +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetDomainNamesRequest method. +// req, resp := client.GetDomainNamesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainNames +func (c *ApiGatewayV2) GetDomainNamesRequest(input *GetDomainNamesInput) (req *request.Request, output *GetDomainNamesOutput) { + op := &request.Operation{ + Name: opGetDomainNames, + HTTPMethod: "GET", + HTTPPath: "/v2/domainnames", + } + + if input == nil { + input = &GetDomainNamesInput{} + } + + output = &GetDomainNamesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDomainNames API operation for AmazonApiGatewayV2. +// +// Gets the domain names for an AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetDomainNames for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetDomainNames +func (c *ApiGatewayV2) GetDomainNames(input *GetDomainNamesInput) (*GetDomainNamesOutput, error) { + req, out := c.GetDomainNamesRequest(input) + return out, req.Send() +} + +// GetDomainNamesWithContext is the same as GetDomainNames with the addition of +// the ability to pass a context and additional request options. +// +// See GetDomainNames for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetDomainNamesWithContext(ctx aws.Context, input *GetDomainNamesInput, opts ...request.Option) (*GetDomainNamesOutput, error) { + req, out := c.GetDomainNamesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetIntegration = "GetIntegration" + +// GetIntegrationRequest generates a "aws/request.Request" representing the +// client's request for the GetIntegration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetIntegration for more information on using the GetIntegration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetIntegrationRequest method. +// req, resp := client.GetIntegrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegration +func (c *ApiGatewayV2) GetIntegrationRequest(input *GetIntegrationInput) (req *request.Request, output *GetIntegrationOutput) { + op := &request.Operation{ + Name: opGetIntegration, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}", + } + + if input == nil { + input = &GetIntegrationInput{} + } + + output = &GetIntegrationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetIntegration API operation for AmazonApiGatewayV2. +// +// Gets an Integration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetIntegration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegration +func (c *ApiGatewayV2) GetIntegration(input *GetIntegrationInput) (*GetIntegrationOutput, error) { + req, out := c.GetIntegrationRequest(input) + return out, req.Send() +} + +// GetIntegrationWithContext is the same as GetIntegration with the addition of +// the ability to pass a context and additional request options. +// +// See GetIntegration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetIntegrationWithContext(ctx aws.Context, input *GetIntegrationInput, opts ...request.Option) (*GetIntegrationOutput, error) { + req, out := c.GetIntegrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetIntegrationResponse = "GetIntegrationResponse" + +// GetIntegrationResponseRequest generates a "aws/request.Request" representing the +// client's request for the GetIntegrationResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetIntegrationResponse for more information on using the GetIntegrationResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetIntegrationResponseRequest method. +// req, resp := client.GetIntegrationResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponse +func (c *ApiGatewayV2) GetIntegrationResponseRequest(input *GetIntegrationResponseInput) (req *request.Request, output *GetIntegrationResponseOutput) { + op := &request.Operation{ + Name: opGetIntegrationResponse, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", + } + + if input == nil { + input = &GetIntegrationResponseInput{} + } + + output = &GetIntegrationResponseOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetIntegrationResponse API operation for AmazonApiGatewayV2. +// +// Gets an IntegrationResponses. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetIntegrationResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponse +func (c *ApiGatewayV2) GetIntegrationResponse(input *GetIntegrationResponseInput) (*GetIntegrationResponseOutput, error) { + req, out := c.GetIntegrationResponseRequest(input) + return out, req.Send() +} + +// GetIntegrationResponseWithContext is the same as GetIntegrationResponse with the addition of +// the ability to pass a context and additional request options. +// +// See GetIntegrationResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetIntegrationResponseWithContext(ctx aws.Context, input *GetIntegrationResponseInput, opts ...request.Option) (*GetIntegrationResponseOutput, error) { + req, out := c.GetIntegrationResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetIntegrationResponses = "GetIntegrationResponses" + +// GetIntegrationResponsesRequest generates a "aws/request.Request" representing the +// client's request for the GetIntegrationResponses operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetIntegrationResponses for more information on using the GetIntegrationResponses +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetIntegrationResponsesRequest method. +// req, resp := client.GetIntegrationResponsesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponses +func (c *ApiGatewayV2) GetIntegrationResponsesRequest(input *GetIntegrationResponsesInput) (req *request.Request, output *GetIntegrationResponsesOutput) { + op := &request.Operation{ + Name: opGetIntegrationResponses, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses", + } + + if input == nil { + input = &GetIntegrationResponsesInput{} + } + + output = &GetIntegrationResponsesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetIntegrationResponses API operation for AmazonApiGatewayV2. +// +// Gets the IntegrationResponses for an Integration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetIntegrationResponses for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrationResponses +func (c *ApiGatewayV2) GetIntegrationResponses(input *GetIntegrationResponsesInput) (*GetIntegrationResponsesOutput, error) { + req, out := c.GetIntegrationResponsesRequest(input) + return out, req.Send() +} + +// GetIntegrationResponsesWithContext is the same as GetIntegrationResponses with the addition of +// the ability to pass a context and additional request options. +// +// See GetIntegrationResponses for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetIntegrationResponsesWithContext(ctx aws.Context, input *GetIntegrationResponsesInput, opts ...request.Option) (*GetIntegrationResponsesOutput, error) { + req, out := c.GetIntegrationResponsesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetIntegrations = "GetIntegrations" + +// GetIntegrationsRequest generates a "aws/request.Request" representing the +// client's request for the GetIntegrations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetIntegrations for more information on using the GetIntegrations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetIntegrationsRequest method. +// req, resp := client.GetIntegrationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrations +func (c *ApiGatewayV2) GetIntegrationsRequest(input *GetIntegrationsInput) (req *request.Request, output *GetIntegrationsOutput) { + op := &request.Operation{ + Name: opGetIntegrations, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/integrations", + } + + if input == nil { + input = &GetIntegrationsInput{} + } + + output = &GetIntegrationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetIntegrations API operation for AmazonApiGatewayV2. +// +// Gets the Integrations for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetIntegrations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetIntegrations +func (c *ApiGatewayV2) GetIntegrations(input *GetIntegrationsInput) (*GetIntegrationsOutput, error) { + req, out := c.GetIntegrationsRequest(input) + return out, req.Send() +} + +// GetIntegrationsWithContext is the same as GetIntegrations with the addition of +// the ability to pass a context and additional request options. +// +// See GetIntegrations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetIntegrationsWithContext(ctx aws.Context, input *GetIntegrationsInput, opts ...request.Option) (*GetIntegrationsOutput, error) { + req, out := c.GetIntegrationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetModel = "GetModel" + +// GetModelRequest generates a "aws/request.Request" representing the +// client's request for the GetModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetModel for more information on using the GetModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetModelRequest method. +// req, resp := client.GetModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModel +func (c *ApiGatewayV2) GetModelRequest(input *GetModelInput) (req *request.Request, output *GetModelOutput) { + op := &request.Operation{ + Name: opGetModel, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/models/{modelId}", + } + + if input == nil { + input = &GetModelInput{} + } + + output = &GetModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetModel API operation for AmazonApiGatewayV2. +// +// Gets a Model. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetModel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModel +func (c *ApiGatewayV2) GetModel(input *GetModelInput) (*GetModelOutput, error) { + req, out := c.GetModelRequest(input) + return out, req.Send() +} + +// GetModelWithContext is the same as GetModel with the addition of +// the ability to pass a context and additional request options. +// +// See GetModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetModelWithContext(ctx aws.Context, input *GetModelInput, opts ...request.Option) (*GetModelOutput, error) { + req, out := c.GetModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetModelTemplate = "GetModelTemplate" + +// GetModelTemplateRequest generates a "aws/request.Request" representing the +// client's request for the GetModelTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetModelTemplate for more information on using the GetModelTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetModelTemplateRequest method. +// req, resp := client.GetModelTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModelTemplate +func (c *ApiGatewayV2) GetModelTemplateRequest(input *GetModelTemplateInput) (req *request.Request, output *GetModelTemplateOutput) { + op := &request.Operation{ + Name: opGetModelTemplate, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/models/{modelId}/template", + } + + if input == nil { + input = &GetModelTemplateInput{} + } + + output = &GetModelTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetModelTemplate API operation for AmazonApiGatewayV2. +// +// Gets a model template. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetModelTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModelTemplate +func (c *ApiGatewayV2) GetModelTemplate(input *GetModelTemplateInput) (*GetModelTemplateOutput, error) { + req, out := c.GetModelTemplateRequest(input) + return out, req.Send() +} + +// GetModelTemplateWithContext is the same as GetModelTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See GetModelTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetModelTemplateWithContext(ctx aws.Context, input *GetModelTemplateInput, opts ...request.Option) (*GetModelTemplateOutput, error) { + req, out := c.GetModelTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetModels = "GetModels" + +// GetModelsRequest generates a "aws/request.Request" representing the +// client's request for the GetModels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetModels for more information on using the GetModels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetModelsRequest method. +// req, resp := client.GetModelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModels +func (c *ApiGatewayV2) GetModelsRequest(input *GetModelsInput) (req *request.Request, output *GetModelsOutput) { + op := &request.Operation{ + Name: opGetModels, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/models", + } + + if input == nil { + input = &GetModelsInput{} + } + + output = &GetModelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetModels API operation for AmazonApiGatewayV2. +// +// Gets the Models for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetModels for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetModels +func (c *ApiGatewayV2) GetModels(input *GetModelsInput) (*GetModelsOutput, error) { + req, out := c.GetModelsRequest(input) + return out, req.Send() +} + +// GetModelsWithContext is the same as GetModels with the addition of +// the ability to pass a context and additional request options. +// +// See GetModels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetModelsWithContext(ctx aws.Context, input *GetModelsInput, opts ...request.Option) (*GetModelsOutput, error) { + req, out := c.GetModelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRoute = "GetRoute" + +// GetRouteRequest generates a "aws/request.Request" representing the +// client's request for the GetRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRoute for more information on using the GetRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRouteRequest method. +// req, resp := client.GetRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoute +func (c *ApiGatewayV2) GetRouteRequest(input *GetRouteInput) (req *request.Request, output *GetRouteOutput) { + op := &request.Operation{ + Name: opGetRoute, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}", + } + + if input == nil { + input = &GetRouteInput{} + } + + output = &GetRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRoute API operation for AmazonApiGatewayV2. +// +// Gets a Route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoute +func (c *ApiGatewayV2) GetRoute(input *GetRouteInput) (*GetRouteOutput, error) { + req, out := c.GetRouteRequest(input) + return out, req.Send() +} + +// GetRouteWithContext is the same as GetRoute with the addition of +// the ability to pass a context and additional request options. +// +// See GetRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetRouteWithContext(ctx aws.Context, input *GetRouteInput, opts ...request.Option) (*GetRouteOutput, error) { + req, out := c.GetRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRouteResponse = "GetRouteResponse" + +// GetRouteResponseRequest generates a "aws/request.Request" representing the +// client's request for the GetRouteResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRouteResponse for more information on using the GetRouteResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRouteResponseRequest method. +// req, resp := client.GetRouteResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponse +func (c *ApiGatewayV2) GetRouteResponseRequest(input *GetRouteResponseInput) (req *request.Request, output *GetRouteResponseOutput) { + op := &request.Operation{ + Name: opGetRouteResponse, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", + } + + if input == nil { + input = &GetRouteResponseInput{} + } + + output = &GetRouteResponseOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRouteResponse API operation for AmazonApiGatewayV2. +// +// Gets a RouteResponse. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetRouteResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponse +func (c *ApiGatewayV2) GetRouteResponse(input *GetRouteResponseInput) (*GetRouteResponseOutput, error) { + req, out := c.GetRouteResponseRequest(input) + return out, req.Send() +} + +// GetRouteResponseWithContext is the same as GetRouteResponse with the addition of +// the ability to pass a context and additional request options. +// +// See GetRouteResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetRouteResponseWithContext(ctx aws.Context, input *GetRouteResponseInput, opts ...request.Option) (*GetRouteResponseOutput, error) { + req, out := c.GetRouteResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRouteResponses = "GetRouteResponses" + +// GetRouteResponsesRequest generates a "aws/request.Request" representing the +// client's request for the GetRouteResponses operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRouteResponses for more information on using the GetRouteResponses +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRouteResponsesRequest method. +// req, resp := client.GetRouteResponsesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponses +func (c *ApiGatewayV2) GetRouteResponsesRequest(input *GetRouteResponsesInput) (req *request.Request, output *GetRouteResponsesOutput) { + op := &request.Operation{ + Name: opGetRouteResponses, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses", + } + + if input == nil { + input = &GetRouteResponsesInput{} + } + + output = &GetRouteResponsesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRouteResponses API operation for AmazonApiGatewayV2. +// +// Gets the RouteResponses for a Route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetRouteResponses for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRouteResponses +func (c *ApiGatewayV2) GetRouteResponses(input *GetRouteResponsesInput) (*GetRouteResponsesOutput, error) { + req, out := c.GetRouteResponsesRequest(input) + return out, req.Send() +} + +// GetRouteResponsesWithContext is the same as GetRouteResponses with the addition of +// the ability to pass a context and additional request options. +// +// See GetRouteResponses for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetRouteResponsesWithContext(ctx aws.Context, input *GetRouteResponsesInput, opts ...request.Option) (*GetRouteResponsesOutput, error) { + req, out := c.GetRouteResponsesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRoutes = "GetRoutes" + +// GetRoutesRequest generates a "aws/request.Request" representing the +// client's request for the GetRoutes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRoutes for more information on using the GetRoutes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRoutesRequest method. +// req, resp := client.GetRoutesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoutes +func (c *ApiGatewayV2) GetRoutesRequest(input *GetRoutesInput) (req *request.Request, output *GetRoutesOutput) { + op := &request.Operation{ + Name: opGetRoutes, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/routes", + } + + if input == nil { + input = &GetRoutesInput{} + } + + output = &GetRoutesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRoutes API operation for AmazonApiGatewayV2. +// +// Gets the Routes for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetRoutes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetRoutes +func (c *ApiGatewayV2) GetRoutes(input *GetRoutesInput) (*GetRoutesOutput, error) { + req, out := c.GetRoutesRequest(input) + return out, req.Send() +} + +// GetRoutesWithContext is the same as GetRoutes with the addition of +// the ability to pass a context and additional request options. +// +// See GetRoutes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetRoutesWithContext(ctx aws.Context, input *GetRoutesInput, opts ...request.Option) (*GetRoutesOutput, error) { + req, out := c.GetRoutesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetStage = "GetStage" + +// GetStageRequest generates a "aws/request.Request" representing the +// client's request for the GetStage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetStage for more information on using the GetStage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetStageRequest method. +// req, resp := client.GetStageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStage +func (c *ApiGatewayV2) GetStageRequest(input *GetStageInput) (req *request.Request, output *GetStageOutput) { + op := &request.Operation{ + Name: opGetStage, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/stages/{stageName}", + } + + if input == nil { + input = &GetStageInput{} + } + + output = &GetStageOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetStage API operation for AmazonApiGatewayV2. +// +// Gets a Stage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetStage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStage +func (c *ApiGatewayV2) GetStage(input *GetStageInput) (*GetStageOutput, error) { + req, out := c.GetStageRequest(input) + return out, req.Send() +} + +// GetStageWithContext is the same as GetStage with the addition of +// the ability to pass a context and additional request options. +// +// See GetStage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetStageWithContext(ctx aws.Context, input *GetStageInput, opts ...request.Option) (*GetStageOutput, error) { + req, out := c.GetStageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetStages = "GetStages" + +// GetStagesRequest generates a "aws/request.Request" representing the +// client's request for the GetStages operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetStages for more information on using the GetStages +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetStagesRequest method. +// req, resp := client.GetStagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStages +func (c *ApiGatewayV2) GetStagesRequest(input *GetStagesInput) (req *request.Request, output *GetStagesOutput) { + op := &request.Operation{ + Name: opGetStages, + HTTPMethod: "GET", + HTTPPath: "/v2/apis/{apiId}/stages", + } + + if input == nil { + input = &GetStagesInput{} + } + + output = &GetStagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetStages API operation for AmazonApiGatewayV2. +// +// Gets the Stages for an API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation GetStages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/GetStages +func (c *ApiGatewayV2) GetStages(input *GetStagesInput) (*GetStagesOutput, error) { + req, out := c.GetStagesRequest(input) + return out, req.Send() +} + +// GetStagesWithContext is the same as GetStages with the addition of +// the ability to pass a context and additional request options. +// +// See GetStages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) GetStagesWithContext(ctx aws.Context, input *GetStagesInput, opts ...request.Option) (*GetStagesOutput, error) { + req, out := c.GetStagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApi = "UpdateApi" + +// UpdateApiRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApi operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApi for more information on using the UpdateApi +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApiRequest method. +// req, resp := client.UpdateApiRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApi +func (c *ApiGatewayV2) UpdateApiRequest(input *UpdateApiInput) (req *request.Request, output *UpdateApiOutput) { + op := &request.Operation{ + Name: opUpdateApi, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}", + } + + if input == nil { + input = &UpdateApiInput{} + } + + output = &UpdateApiOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApi API operation for AmazonApiGatewayV2. +// +// Updates an Api resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateApi for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApi +func (c *ApiGatewayV2) UpdateApi(input *UpdateApiInput) (*UpdateApiOutput, error) { + req, out := c.UpdateApiRequest(input) + return out, req.Send() +} + +// UpdateApiWithContext is the same as UpdateApi with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApi for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateApiWithContext(ctx aws.Context, input *UpdateApiInput, opts ...request.Option) (*UpdateApiOutput, error) { + req, out := c.UpdateApiRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApiMapping = "UpdateApiMapping" + +// UpdateApiMappingRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApiMapping operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApiMapping for more information on using the UpdateApiMapping +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApiMappingRequest method. +// req, resp := client.UpdateApiMappingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApiMapping +func (c *ApiGatewayV2) UpdateApiMappingRequest(input *UpdateApiMappingInput) (req *request.Request, output *UpdateApiMappingOutput) { + op := &request.Operation{ + Name: opUpdateApiMapping, + HTTPMethod: "PATCH", + HTTPPath: "/v2/domainnames/{domainName}/apimappings/{apiMappingId}", + } + + if input == nil { + input = &UpdateApiMappingInput{} + } + + output = &UpdateApiMappingOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApiMapping API operation for AmazonApiGatewayV2. +// +// The API mapping. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateApiMapping for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateApiMapping +func (c *ApiGatewayV2) UpdateApiMapping(input *UpdateApiMappingInput) (*UpdateApiMappingOutput, error) { + req, out := c.UpdateApiMappingRequest(input) + return out, req.Send() +} + +// UpdateApiMappingWithContext is the same as UpdateApiMapping with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApiMapping for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateApiMappingWithContext(ctx aws.Context, input *UpdateApiMappingInput, opts ...request.Option) (*UpdateApiMappingOutput, error) { + req, out := c.UpdateApiMappingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAuthorizer = "UpdateAuthorizer" + +// UpdateAuthorizerRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAuthorizer operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAuthorizer for more information on using the UpdateAuthorizer +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAuthorizerRequest method. +// req, resp := client.UpdateAuthorizerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateAuthorizer +func (c *ApiGatewayV2) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req *request.Request, output *UpdateAuthorizerOutput) { + op := &request.Operation{ + Name: opUpdateAuthorizer, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/authorizers/{authorizerId}", + } + + if input == nil { + input = &UpdateAuthorizerInput{} + } + + output = &UpdateAuthorizerOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAuthorizer API operation for AmazonApiGatewayV2. +// +// Updates an Authorizer. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateAuthorizer for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateAuthorizer +func (c *ApiGatewayV2) UpdateAuthorizer(input *UpdateAuthorizerInput) (*UpdateAuthorizerOutput, error) { + req, out := c.UpdateAuthorizerRequest(input) + return out, req.Send() +} + +// UpdateAuthorizerWithContext is the same as UpdateAuthorizer with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAuthorizer for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateAuthorizerWithContext(ctx aws.Context, input *UpdateAuthorizerInput, opts ...request.Option) (*UpdateAuthorizerOutput, error) { + req, out := c.UpdateAuthorizerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDeployment = "UpdateDeployment" + +// UpdateDeploymentRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDeployment operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDeployment for more information on using the UpdateDeployment +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDeploymentRequest method. +// req, resp := client.UpdateDeploymentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDeployment +func (c *ApiGatewayV2) UpdateDeploymentRequest(input *UpdateDeploymentInput) (req *request.Request, output *UpdateDeploymentOutput) { + op := &request.Operation{ + Name: opUpdateDeployment, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/deployments/{deploymentId}", + } + + if input == nil { + input = &UpdateDeploymentInput{} + } + + output = &UpdateDeploymentOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDeployment API operation for AmazonApiGatewayV2. +// +// Updates a Deployment. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateDeployment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDeployment +func (c *ApiGatewayV2) UpdateDeployment(input *UpdateDeploymentInput) (*UpdateDeploymentOutput, error) { + req, out := c.UpdateDeploymentRequest(input) + return out, req.Send() +} + +// UpdateDeploymentWithContext is the same as UpdateDeployment with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDeployment for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateDeploymentWithContext(ctx aws.Context, input *UpdateDeploymentInput, opts ...request.Option) (*UpdateDeploymentOutput, error) { + req, out := c.UpdateDeploymentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDomainName = "UpdateDomainName" + +// UpdateDomainNameRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDomainName operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDomainName for more information on using the UpdateDomainName +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDomainNameRequest method. +// req, resp := client.UpdateDomainNameRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDomainName +func (c *ApiGatewayV2) UpdateDomainNameRequest(input *UpdateDomainNameInput) (req *request.Request, output *UpdateDomainNameOutput) { + op := &request.Operation{ + Name: opUpdateDomainName, + HTTPMethod: "PATCH", + HTTPPath: "/v2/domainnames/{domainName}", + } + + if input == nil { + input = &UpdateDomainNameInput{} + } + + output = &UpdateDomainNameOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDomainName API operation for AmazonApiGatewayV2. +// +// Updates a domain name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateDomainName for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateDomainName +func (c *ApiGatewayV2) UpdateDomainName(input *UpdateDomainNameInput) (*UpdateDomainNameOutput, error) { + req, out := c.UpdateDomainNameRequest(input) + return out, req.Send() +} + +// UpdateDomainNameWithContext is the same as UpdateDomainName with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDomainName for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateDomainNameWithContext(ctx aws.Context, input *UpdateDomainNameInput, opts ...request.Option) (*UpdateDomainNameOutput, error) { + req, out := c.UpdateDomainNameRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateIntegration = "UpdateIntegration" + +// UpdateIntegrationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateIntegration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateIntegration for more information on using the UpdateIntegration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateIntegrationRequest method. +// req, resp := client.UpdateIntegrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegration +func (c *ApiGatewayV2) UpdateIntegrationRequest(input *UpdateIntegrationInput) (req *request.Request, output *UpdateIntegrationOutput) { + op := &request.Operation{ + Name: opUpdateIntegration, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}", + } + + if input == nil { + input = &UpdateIntegrationInput{} + } + + output = &UpdateIntegrationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateIntegration API operation for AmazonApiGatewayV2. +// +// Updates an Integration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateIntegration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegration +func (c *ApiGatewayV2) UpdateIntegration(input *UpdateIntegrationInput) (*UpdateIntegrationOutput, error) { + req, out := c.UpdateIntegrationRequest(input) + return out, req.Send() +} + +// UpdateIntegrationWithContext is the same as UpdateIntegration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateIntegration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateIntegrationWithContext(ctx aws.Context, input *UpdateIntegrationInput, opts ...request.Option) (*UpdateIntegrationOutput, error) { + req, out := c.UpdateIntegrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateIntegrationResponse = "UpdateIntegrationResponse" + +// UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the +// client's request for the UpdateIntegrationResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateIntegrationResponse for more information on using the UpdateIntegrationResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateIntegrationResponseRequest method. +// req, resp := client.UpdateIntegrationResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegrationResponse +func (c *ApiGatewayV2) UpdateIntegrationResponseRequest(input *UpdateIntegrationResponseInput) (req *request.Request, output *UpdateIntegrationResponseOutput) { + op := &request.Operation{ + Name: opUpdateIntegrationResponse, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/integrations/{integrationId}/integrationresponses/{integrationResponseId}", + } + + if input == nil { + input = &UpdateIntegrationResponseInput{} + } + + output = &UpdateIntegrationResponseOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateIntegrationResponse API operation for AmazonApiGatewayV2. +// +// Updates an IntegrationResponses. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateIntegrationResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateIntegrationResponse +func (c *ApiGatewayV2) UpdateIntegrationResponse(input *UpdateIntegrationResponseInput) (*UpdateIntegrationResponseOutput, error) { + req, out := c.UpdateIntegrationResponseRequest(input) + return out, req.Send() +} + +// UpdateIntegrationResponseWithContext is the same as UpdateIntegrationResponse with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateIntegrationResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateIntegrationResponseWithContext(ctx aws.Context, input *UpdateIntegrationResponseInput, opts ...request.Option) (*UpdateIntegrationResponseOutput, error) { + req, out := c.UpdateIntegrationResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateModel = "UpdateModel" + +// UpdateModelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateModel for more information on using the UpdateModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateModelRequest method. +// req, resp := client.UpdateModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateModel +func (c *ApiGatewayV2) UpdateModelRequest(input *UpdateModelInput) (req *request.Request, output *UpdateModelOutput) { + op := &request.Operation{ + Name: opUpdateModel, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/models/{modelId}", + } + + if input == nil { + input = &UpdateModelInput{} + } + + output = &UpdateModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateModel API operation for AmazonApiGatewayV2. +// +// Updates a Model. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateModel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateModel +func (c *ApiGatewayV2) UpdateModel(input *UpdateModelInput) (*UpdateModelOutput, error) { + req, out := c.UpdateModelRequest(input) + return out, req.Send() +} + +// UpdateModelWithContext is the same as UpdateModel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateModelWithContext(ctx aws.Context, input *UpdateModelInput, opts ...request.Option) (*UpdateModelOutput, error) { + req, out := c.UpdateModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRoute = "UpdateRoute" + +// UpdateRouteRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRoute for more information on using the UpdateRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRouteRequest method. +// req, resp := client.UpdateRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRoute +func (c *ApiGatewayV2) UpdateRouteRequest(input *UpdateRouteInput) (req *request.Request, output *UpdateRouteOutput) { + op := &request.Operation{ + Name: opUpdateRoute, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}", + } + + if input == nil { + input = &UpdateRouteInput{} + } + + output = &UpdateRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRoute API operation for AmazonApiGatewayV2. +// +// Updates a Route. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateRoute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRoute +func (c *ApiGatewayV2) UpdateRoute(input *UpdateRouteInput) (*UpdateRouteOutput, error) { + req, out := c.UpdateRouteRequest(input) + return out, req.Send() +} + +// UpdateRouteWithContext is the same as UpdateRoute with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateRouteWithContext(ctx aws.Context, input *UpdateRouteInput, opts ...request.Option) (*UpdateRouteOutput, error) { + req, out := c.UpdateRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRouteResponse = "UpdateRouteResponse" + +// UpdateRouteResponseRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRouteResponse operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRouteResponse for more information on using the UpdateRouteResponse +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRouteResponseRequest method. +// req, resp := client.UpdateRouteResponseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRouteResponse +func (c *ApiGatewayV2) UpdateRouteResponseRequest(input *UpdateRouteResponseInput) (req *request.Request, output *UpdateRouteResponseOutput) { + op := &request.Operation{ + Name: opUpdateRouteResponse, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/routes/{routeId}/routeresponses/{routeResponseId}", + } + + if input == nil { + input = &UpdateRouteResponseInput{} + } + + output = &UpdateRouteResponseOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRouteResponse API operation for AmazonApiGatewayV2. +// +// Updates a RouteResponse. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateRouteResponse for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateRouteResponse +func (c *ApiGatewayV2) UpdateRouteResponse(input *UpdateRouteResponseInput) (*UpdateRouteResponseOutput, error) { + req, out := c.UpdateRouteResponseRequest(input) + return out, req.Send() +} + +// UpdateRouteResponseWithContext is the same as UpdateRouteResponse with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRouteResponse for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateRouteResponseWithContext(ctx aws.Context, input *UpdateRouteResponseInput, opts ...request.Option) (*UpdateRouteResponseOutput, error) { + req, out := c.UpdateRouteResponseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateStage = "UpdateStage" + +// UpdateStageRequest generates a "aws/request.Request" representing the +// client's request for the UpdateStage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateStage for more information on using the UpdateStage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateStageRequest method. +// req, resp := client.UpdateStageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateStage +func (c *ApiGatewayV2) UpdateStageRequest(input *UpdateStageInput) (req *request.Request, output *UpdateStageOutput) { + op := &request.Operation{ + Name: opUpdateStage, + HTTPMethod: "PATCH", + HTTPPath: "/v2/apis/{apiId}/stages/{stageName}", + } + + if input == nil { + input = &UpdateStageInput{} + } + + output = &UpdateStageOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateStage API operation for AmazonApiGatewayV2. +// +// Updates a Stage. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AmazonApiGatewayV2's +// API operation UpdateStage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. See the message field +// for more information. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// A limit has been exceeded. See the accompanying error message for details. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request is not valid, for example, the input is incomplete or incorrect. +// See the accompanying error message for details. +// +// * ErrCodeConflictException "ConflictException" +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. See the accompanying error message for details. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29/UpdateStage +func (c *ApiGatewayV2) UpdateStage(input *UpdateStageInput) (*UpdateStageOutput, error) { + req, out := c.UpdateStageRequest(input) + return out, req.Send() +} + +// UpdateStageWithContext is the same as UpdateStage with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateStage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ApiGatewayV2) UpdateStageWithContext(ctx aws.Context, input *UpdateStageInput, opts ...request.Option) (*UpdateStageOutput, error) { + req, out := c.UpdateStageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Settings for logging access in a stage. +type AccessLogSettings struct { + _ struct{} `type:"structure"` + + // The ARN of the CloudWatch Logs log group to receive access logs. + DestinationArn *string `locationName:"destinationArn" type:"string"` + + // A single line format of the access logs of data, as specified by selected + // $context variables. The format must include at least $context.requestId. + Format *string `locationName:"format" type:"string"` +} + +// String returns the string representation +func (s AccessLogSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessLogSettings) GoString() string { + return s.String() +} + +// SetDestinationArn sets the DestinationArn field's value. +func (s *AccessLogSettings) SetDestinationArn(v string) *AccessLogSettings { + s.DestinationArn = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { + s.Format = &v + return s +} + +// Represents an API. +type Api struct { + _ struct{} `type:"structure"` + + // The URI of the API, of the form {api-id}.execute-api.{region}.amazonaws.com. + // The stage name is typically appended to this URI to form a complete path + // to a deployed API stage. + ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` + + // The API ID. + ApiId *string `locationName:"apiId" type:"string"` + + // An API key selection expression. See API Key Selection Expressions (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions). + ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` + + // The timestamp when the API was created. + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // The description of the API. + Description *string `locationName:"description" type:"string"` + + // Avoid validating models when creating a deployment. + DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` + + // The name of the API. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The API protocol: HTTP or WEBSOCKET. + // + // ProtocolType is a required field + ProtocolType *string `locationName:"protocolType" type:"string" required:"true" enum:"ProtocolType"` + + // The route selection expression for the API. + // + // RouteSelectionExpression is a required field + RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string" required:"true"` + + // A version identifier for the API. + Version *string `locationName:"version" type:"string"` + + // The warning messages reported when failonwarnings is turned on during API + // import. + Warnings []*string `locationName:"warnings" type:"list"` +} + +// String returns the string representation +func (s Api) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Api) GoString() string { + return s.String() +} + +// SetApiEndpoint sets the ApiEndpoint field's value. +func (s *Api) SetApiEndpoint(v string) *Api { + s.ApiEndpoint = &v + return s +} + +// SetApiId sets the ApiId field's value. +func (s *Api) SetApiId(v string) *Api { + s.ApiId = &v + return s +} + +// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. +func (s *Api) SetApiKeySelectionExpression(v string) *Api { + s.ApiKeySelectionExpression = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *Api) SetCreatedDate(v time.Time) *Api { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Api) SetDescription(v string) *Api { + s.Description = &v + return s +} + +// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. +func (s *Api) SetDisableSchemaValidation(v bool) *Api { + s.DisableSchemaValidation = &v + return s +} + +// SetName sets the Name field's value. +func (s *Api) SetName(v string) *Api { + s.Name = &v + return s +} + +// SetProtocolType sets the ProtocolType field's value. +func (s *Api) SetProtocolType(v string) *Api { + s.ProtocolType = &v + return s +} + +// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. +func (s *Api) SetRouteSelectionExpression(v string) *Api { + s.RouteSelectionExpression = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *Api) SetVersion(v string) *Api { + s.Version = &v + return s +} + +// SetWarnings sets the Warnings field's value. +func (s *Api) SetWarnings(v []*string) *Api { + s.Warnings = v + return s +} + +// Represents an authorizer. +type Authorizer struct { + _ struct{} `type:"structure"` + + // Specifies the required credentials as an IAM role for API Gateway to invoke + // the authorizer. To specify an IAM role for API Gateway to assume, use the + // role's Amazon Resource Name (ARN). To use resource-based permissions on the + // Lambda function, specify null. + AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` + + // The authorizer identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // The time to live (TTL), in seconds, of cached authorizer results. If it equals + // 0, authorization caching is disabled. If it is greater than 0, API Gateway + // will cache authorizer responses. If this field is not set, the default value + // is 300. The maximum value is 3600, or 1 hour. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // The authorizer type. Currently the only valid value is REQUEST, for a Lambda + // function using incoming request parameters. + AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` + + // The authorizer's Uniform Resource Identifier (URI). ForREQUEST authorizers, + // this must be a well-formed Lambda function URI, for example, arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations. + // In general, the URI has this form: arn:aws:apigateway:{region}:lambda:path/{service_api} + // , where {region} is the same as the region hosting the Lambda function, path + // indicates that the remaining substring in the URI should be treated as the + // path to the resource, including the initial /. For Lambda functions, this + // is usually of the form /2015-03-31/functions/[FunctionARN]/invocations. + AuthorizerUri *string `locationName:"authorizerUri" type:"string"` + + // The identity source for which authorization is requested. + // + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header and a + // Name query string parameters are defined as identity sources, this value + // is method.request.header.Auth, method.request.querystring.Name. These parameters + // will be used to derive the authorization caching key and to perform runtime + // validation of the REQUEST authorizer by verifying all of the identity-related + // request parameters are present, not null, and non-empty. Only when this is + // true does the authorizer invoke the authorizer Lambda function, otherwise, + // it returns a 401 Unauthorized response without calling the Lambda function. + // The valid value is a string of comma-separated mapping expressions of the + // specified request parameters. When the authorization caching is not enabled, + // this property is optional. + IdentitySource []*string `locationName:"identitySource" type:"list"` + + // The validation expression does not apply to the REQUEST authorizer. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // The name of the authorizer. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // For REQUEST authorizer, this is not defined. + ProviderArns []*string `locationName:"providerArns" type:"list"` +} + +// String returns the string representation +func (s Authorizer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Authorizer) GoString() string { + return s.String() +} + +// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. +func (s *Authorizer) SetAuthorizerCredentialsArn(v string) *Authorizer { + s.AuthorizerCredentialsArn = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *Authorizer) SetAuthorizerId(v string) *Authorizer { + s.AuthorizerId = &v + return s +} + +// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. +func (s *Authorizer) SetAuthorizerResultTtlInSeconds(v int64) *Authorizer { + s.AuthorizerResultTtlInSeconds = &v + return s +} + +// SetAuthorizerType sets the AuthorizerType field's value. +func (s *Authorizer) SetAuthorizerType(v string) *Authorizer { + s.AuthorizerType = &v + return s +} + +// SetAuthorizerUri sets the AuthorizerUri field's value. +func (s *Authorizer) SetAuthorizerUri(v string) *Authorizer { + s.AuthorizerUri = &v + return s +} + +// SetIdentitySource sets the IdentitySource field's value. +func (s *Authorizer) SetIdentitySource(v []*string) *Authorizer { + s.IdentitySource = v + return s +} + +// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. +func (s *Authorizer) SetIdentityValidationExpression(v string) *Authorizer { + s.IdentityValidationExpression = &v + return s +} + +// SetName sets the Name field's value. +func (s *Authorizer) SetName(v string) *Authorizer { + s.Name = &v + return s +} + +// SetProviderArns sets the ProviderArns field's value. +func (s *Authorizer) SetProviderArns(v []*string) *Authorizer { + s.ProviderArns = v + return s +} + +type CreateApiInput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` + + // A string with a length between [1-128]. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // ProtocolType is a required field + ProtocolType *string `locationName:"protocolType" type:"string" required:"true" enum:"ProtocolType"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + // + // RouteSelectionExpression is a required field + RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string" required:"true"` + + // A string with a length between [1-64]. + Version *string `locationName:"version" type:"string"` +} + +// String returns the string representation +func (s CreateApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApiInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.ProtocolType == nil { + invalidParams.Add(request.NewErrParamRequired("ProtocolType")) + } + if s.RouteSelectionExpression == nil { + invalidParams.Add(request.NewErrParamRequired("RouteSelectionExpression")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. +func (s *CreateApiInput) SetApiKeySelectionExpression(v string) *CreateApiInput { + s.ApiKeySelectionExpression = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateApiInput) SetDescription(v string) *CreateApiInput { + s.Description = &v + return s +} + +// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. +func (s *CreateApiInput) SetDisableSchemaValidation(v bool) *CreateApiInput { + s.DisableSchemaValidation = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateApiInput) SetName(v string) *CreateApiInput { + s.Name = &v + return s +} + +// SetProtocolType sets the ProtocolType field's value. +func (s *CreateApiInput) SetProtocolType(v string) *CreateApiInput { + s.ProtocolType = &v + return s +} + +// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. +func (s *CreateApiInput) SetRouteSelectionExpression(v string) *CreateApiInput { + s.RouteSelectionExpression = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateApiInput) SetVersion(v string) *CreateApiInput { + s.Version = &v + return s +} + +type CreateApiMappingInput struct { + _ struct{} `type:"structure"` + + // An API Gateway-generated, unique identifier. + // + // ApiId is a required field + ApiId *string `locationName:"apiId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` + + // A string with a length between [1-128]. + // + // Stage is a required field + Stage *string `locationName:"stage" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateApiMappingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApiMappingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApiMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApiMappingInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + if s.Stage == nil { + invalidParams.Add(request.NewErrParamRequired("Stage")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateApiMappingInput) SetApiId(v string) *CreateApiMappingInput { + s.ApiId = &v + return s +} + +// SetApiMappingKey sets the ApiMappingKey field's value. +func (s *CreateApiMappingInput) SetApiMappingKey(v string) *CreateApiMappingInput { + s.ApiMappingKey = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateApiMappingInput) SetDomainName(v string) *CreateApiMappingInput { + s.DomainName = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *CreateApiMappingInput) SetStage(v string) *CreateApiMappingInput { + s.Stage = &v + return s +} + +type CreateApiMappingOutput struct { + _ struct{} `type:"structure"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiMappingId *string `locationName:"apiMappingId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` + + // A string with a length between [1-128]. + Stage *string `locationName:"stage" type:"string"` +} + +// String returns the string representation +func (s CreateApiMappingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApiMappingOutput) GoString() string { + return s.String() +} + +// SetApiId sets the ApiId field's value. +func (s *CreateApiMappingOutput) SetApiId(v string) *CreateApiMappingOutput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *CreateApiMappingOutput) SetApiMappingId(v string) *CreateApiMappingOutput { + s.ApiMappingId = &v + return s +} + +// SetApiMappingKey sets the ApiMappingKey field's value. +func (s *CreateApiMappingOutput) SetApiMappingKey(v string) *CreateApiMappingOutput { + s.ApiMappingKey = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *CreateApiMappingOutput) SetStage(v string) *CreateApiMappingOutput { + s.Stage = &v + return s +} + +type CreateApiOutput struct { + _ struct{} `type:"structure"` + + ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + ProtocolType *string `locationName:"protocolType" type:"string" enum:"ProtocolType"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + Version *string `locationName:"version" type:"string"` + + Warnings []*string `locationName:"warnings" type:"list"` +} + +// String returns the string representation +func (s CreateApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApiOutput) GoString() string { + return s.String() +} + +// SetApiEndpoint sets the ApiEndpoint field's value. +func (s *CreateApiOutput) SetApiEndpoint(v string) *CreateApiOutput { + s.ApiEndpoint = &v + return s +} + +// SetApiId sets the ApiId field's value. +func (s *CreateApiOutput) SetApiId(v string) *CreateApiOutput { + s.ApiId = &v + return s +} + +// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. +func (s *CreateApiOutput) SetApiKeySelectionExpression(v string) *CreateApiOutput { + s.ApiKeySelectionExpression = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *CreateApiOutput) SetCreatedDate(v time.Time) *CreateApiOutput { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateApiOutput) SetDescription(v string) *CreateApiOutput { + s.Description = &v + return s +} + +// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. +func (s *CreateApiOutput) SetDisableSchemaValidation(v bool) *CreateApiOutput { + s.DisableSchemaValidation = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateApiOutput) SetName(v string) *CreateApiOutput { + s.Name = &v + return s +} + +// SetProtocolType sets the ProtocolType field's value. +func (s *CreateApiOutput) SetProtocolType(v string) *CreateApiOutput { + s.ProtocolType = &v + return s +} + +// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. +func (s *CreateApiOutput) SetRouteSelectionExpression(v string) *CreateApiOutput { + s.RouteSelectionExpression = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateApiOutput) SetVersion(v string) *CreateApiOutput { + s.Version = &v + return s +} + +// SetWarnings sets the Warnings field's value. +func (s *CreateApiOutput) SetWarnings(v []*string) *CreateApiOutput { + s.Warnings = v + return s +} + +type CreateAuthorizerInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // Represents an Amazon Resource Name (ARN). + AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` + + // An integer with a value between [0-3600]. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // The authorizer type. Currently the only valid value is REQUEST, for a Lambda + // function using incoming request parameters. + // + // AuthorizerType is a required field + AuthorizerType *string `locationName:"authorizerType" type:"string" required:"true" enum:"AuthorizerType"` + + // A string representation of a URI with a length between [1-2048]. + // + // AuthorizerUri is a required field + AuthorizerUri *string `locationName:"authorizerUri" type:"string" required:"true"` + + // The identity source for which authorization is requested. + // + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is $method.request.header.Auth, + // $method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. + // + // IdentitySource is a required field + IdentitySource []*string `locationName:"identitySource" type:"list" required:"true"` + + // A string with a length between [0-1024]. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // A string with a length between [1-128]. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // For REQUEST authorizer, this is not defined. + ProviderArns []*string `locationName:"providerArns" type:"list"` +} + +// String returns the string representation +func (s CreateAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAuthorizerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAuthorizerInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.AuthorizerType == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerType")) + } + if s.AuthorizerUri == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerUri")) + } + if s.IdentitySource == nil { + invalidParams.Add(request.NewErrParamRequired("IdentitySource")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateAuthorizerInput) SetApiId(v string) *CreateAuthorizerInput { + s.ApiId = &v + return s +} + +// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. +func (s *CreateAuthorizerInput) SetAuthorizerCredentialsArn(v string) *CreateAuthorizerInput { + s.AuthorizerCredentialsArn = &v + return s +} + +// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. +func (s *CreateAuthorizerInput) SetAuthorizerResultTtlInSeconds(v int64) *CreateAuthorizerInput { + s.AuthorizerResultTtlInSeconds = &v + return s +} + +// SetAuthorizerType sets the AuthorizerType field's value. +func (s *CreateAuthorizerInput) SetAuthorizerType(v string) *CreateAuthorizerInput { + s.AuthorizerType = &v + return s +} + +// SetAuthorizerUri sets the AuthorizerUri field's value. +func (s *CreateAuthorizerInput) SetAuthorizerUri(v string) *CreateAuthorizerInput { + s.AuthorizerUri = &v + return s +} + +// SetIdentitySource sets the IdentitySource field's value. +func (s *CreateAuthorizerInput) SetIdentitySource(v []*string) *CreateAuthorizerInput { + s.IdentitySource = v + return s +} + +// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. +func (s *CreateAuthorizerInput) SetIdentityValidationExpression(v string) *CreateAuthorizerInput { + s.IdentityValidationExpression = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateAuthorizerInput) SetName(v string) *CreateAuthorizerInput { + s.Name = &v + return s +} + +// SetProviderArns sets the ProviderArns field's value. +func (s *CreateAuthorizerInput) SetProviderArns(v []*string) *CreateAuthorizerInput { + s.ProviderArns = v + return s +} + +type CreateAuthorizerOutput struct { + _ struct{} `type:"structure"` + + // Represents an Amazon Resource Name (ARN). + AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An integer with a value between [0-3600]. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // The authorizer type. Currently the only valid value is REQUEST, for a Lambda + // function using incoming request parameters. + AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` + + // A string representation of a URI with a length between [1-2048]. + AuthorizerUri *string `locationName:"authorizerUri" type:"string"` + + // The identity source for which authorization is requested. + // + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is $method.request.header.Auth, + // $method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. + IdentitySource []*string `locationName:"identitySource" type:"list"` + + // A string with a length between [0-1024]. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // For REQUEST authorizer, this is not defined. + ProviderArns []*string `locationName:"providerArns" type:"list"` +} + +// String returns the string representation +func (s CreateAuthorizerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAuthorizerOutput) GoString() string { + return s.String() +} + +// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. +func (s *CreateAuthorizerOutput) SetAuthorizerCredentialsArn(v string) *CreateAuthorizerOutput { + s.AuthorizerCredentialsArn = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *CreateAuthorizerOutput) SetAuthorizerId(v string) *CreateAuthorizerOutput { + s.AuthorizerId = &v + return s +} + +// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. +func (s *CreateAuthorizerOutput) SetAuthorizerResultTtlInSeconds(v int64) *CreateAuthorizerOutput { + s.AuthorizerResultTtlInSeconds = &v + return s +} + +// SetAuthorizerType sets the AuthorizerType field's value. +func (s *CreateAuthorizerOutput) SetAuthorizerType(v string) *CreateAuthorizerOutput { + s.AuthorizerType = &v + return s +} + +// SetAuthorizerUri sets the AuthorizerUri field's value. +func (s *CreateAuthorizerOutput) SetAuthorizerUri(v string) *CreateAuthorizerOutput { + s.AuthorizerUri = &v + return s +} + +// SetIdentitySource sets the IdentitySource field's value. +func (s *CreateAuthorizerOutput) SetIdentitySource(v []*string) *CreateAuthorizerOutput { + s.IdentitySource = v + return s +} + +// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. +func (s *CreateAuthorizerOutput) SetIdentityValidationExpression(v string) *CreateAuthorizerOutput { + s.IdentityValidationExpression = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateAuthorizerOutput) SetName(v string) *CreateAuthorizerOutput { + s.Name = &v + return s +} + +// SetProviderArns sets the ProviderArns field's value. +func (s *CreateAuthorizerOutput) SetProviderArns(v []*string) *CreateAuthorizerOutput { + s.ProviderArns = v + return s +} + +type CreateDeploymentInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // A string with a length between [1-128]. + StageName *string `locationName:"stageName" type:"string"` +} + +// String returns the string representation +func (s CreateDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDeploymentInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateDeploymentInput) SetApiId(v string) *CreateDeploymentInput { + s.ApiId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateDeploymentInput) SetDescription(v string) *CreateDeploymentInput { + s.Description = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *CreateDeploymentInput) SetStageName(v string) *CreateDeploymentInput { + s.StageName = &v + return s +} + +type CreateDeploymentOutput struct { + _ struct{} `type:"structure"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // Represents a deployment status. + DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` + + DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` +} + +// String returns the string representation +func (s CreateDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDeploymentOutput) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *CreateDeploymentOutput) SetCreatedDate(v time.Time) *CreateDeploymentOutput { + s.CreatedDate = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutput { + s.DeploymentId = &v + return s +} + +// SetDeploymentStatus sets the DeploymentStatus field's value. +func (s *CreateDeploymentOutput) SetDeploymentStatus(v string) *CreateDeploymentOutput { + s.DeploymentStatus = &v + return s +} + +// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. +func (s *CreateDeploymentOutput) SetDeploymentStatusMessage(v string) *CreateDeploymentOutput { + s.DeploymentStatusMessage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateDeploymentOutput) SetDescription(v string) *CreateDeploymentOutput { + s.Description = &v + return s +} + +type CreateDomainNameInput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-512]. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` + + // The domain name configurations. + DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` +} + +// String returns the string representation +func (s CreateDomainNameInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainNameInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainNameInput) SetDomainName(v string) *CreateDomainNameInput { + s.DomainName = &v + return s +} + +// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. +func (s *CreateDomainNameInput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *CreateDomainNameInput { + s.DomainNameConfigurations = v + return s +} + +type CreateDomainNameOutput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` + + // A string with a length between [1-512]. + DomainName *string `locationName:"domainName" type:"string"` + + // The domain name configurations. + DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` +} + +// String returns the string representation +func (s CreateDomainNameOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainNameOutput) GoString() string { + return s.String() +} + +// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. +func (s *CreateDomainNameOutput) SetApiMappingSelectionExpression(v string) *CreateDomainNameOutput { + s.ApiMappingSelectionExpression = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainNameOutput) SetDomainName(v string) *CreateDomainNameOutput { + s.DomainName = &v + return s +} + +// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. +func (s *CreateDomainNameOutput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *CreateDomainNameOutput { + s.DomainNameConfigurations = v + return s +} + +type CreateIntegrationInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A string with a length between [1-1024]. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // Represents a connection type. + ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // Represents an Amazon Resource Name (ARN). + CredentialsArn *string `locationName:"credentialsArn" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // A string with a length between [1-64]. + IntegrationMethod *string `locationName:"integrationMethod" type:"string"` + + // Represents an API method integration type. + IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` + + // A string representation of a URI with a length between [1-2048]. + IntegrationUri *string `locationName:"integrationUri" type:"string"` + + // Represents passthrough behavior for an integration response. + PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` + + // An integer with a value between [50-29000]. + TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` +} + +// String returns the string representation +func (s CreateIntegrationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIntegrationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateIntegrationInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.TimeoutInMillis != nil && *s.TimeoutInMillis < 50 { + invalidParams.Add(request.NewErrParamMinValue("TimeoutInMillis", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateIntegrationInput) SetApiId(v string) *CreateIntegrationInput { + s.ApiId = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *CreateIntegrationInput) SetConnectionId(v string) *CreateIntegrationInput { + s.ConnectionId = &v + return s +} + +// SetConnectionType sets the ConnectionType field's value. +func (s *CreateIntegrationInput) SetConnectionType(v string) *CreateIntegrationInput { + s.ConnectionType = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *CreateIntegrationInput) SetContentHandlingStrategy(v string) *CreateIntegrationInput { + s.ContentHandlingStrategy = &v + return s +} + +// SetCredentialsArn sets the CredentialsArn field's value. +func (s *CreateIntegrationInput) SetCredentialsArn(v string) *CreateIntegrationInput { + s.CredentialsArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateIntegrationInput) SetDescription(v string) *CreateIntegrationInput { + s.Description = &v + return s +} + +// SetIntegrationMethod sets the IntegrationMethod field's value. +func (s *CreateIntegrationInput) SetIntegrationMethod(v string) *CreateIntegrationInput { + s.IntegrationMethod = &v + return s +} + +// SetIntegrationType sets the IntegrationType field's value. +func (s *CreateIntegrationInput) SetIntegrationType(v string) *CreateIntegrationInput { + s.IntegrationType = &v + return s +} + +// SetIntegrationUri sets the IntegrationUri field's value. +func (s *CreateIntegrationInput) SetIntegrationUri(v string) *CreateIntegrationInput { + s.IntegrationUri = &v + return s +} + +// SetPassthroughBehavior sets the PassthroughBehavior field's value. +func (s *CreateIntegrationInput) SetPassthroughBehavior(v string) *CreateIntegrationInput { + s.PassthroughBehavior = &v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *CreateIntegrationInput) SetRequestParameters(v map[string]*string) *CreateIntegrationInput { + s.RequestParameters = v + return s +} + +// SetRequestTemplates sets the RequestTemplates field's value. +func (s *CreateIntegrationInput) SetRequestTemplates(v map[string]*string) *CreateIntegrationInput { + s.RequestTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *CreateIntegrationInput) SetTemplateSelectionExpression(v string) *CreateIntegrationInput { + s.TemplateSelectionExpression = &v + return s +} + +// SetTimeoutInMillis sets the TimeoutInMillis field's value. +func (s *CreateIntegrationInput) SetTimeoutInMillis(v int64) *CreateIntegrationInput { + s.TimeoutInMillis = &v + return s +} + +type CreateIntegrationOutput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-1024]. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // Represents a connection type. + ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // Represents an Amazon Resource Name (ARN). + CredentialsArn *string `locationName:"credentialsArn" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // An API Gateway-generated, unique identifier. + IntegrationId *string `locationName:"integrationId" type:"string"` + + // A string with a length between [1-64]. + IntegrationMethod *string `locationName:"integrationMethod" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` + + // Represents an API method integration type. + IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` + + // A string representation of a URI with a length between [1-2048]. + IntegrationUri *string `locationName:"integrationUri" type:"string"` + + // Represents passthrough behavior for an integration response. + PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` + + // An integer with a value between [50-29000]. + TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` +} + +// String returns the string representation +func (s CreateIntegrationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIntegrationOutput) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *CreateIntegrationOutput) SetConnectionId(v string) *CreateIntegrationOutput { + s.ConnectionId = &v + return s +} + +// SetConnectionType sets the ConnectionType field's value. +func (s *CreateIntegrationOutput) SetConnectionType(v string) *CreateIntegrationOutput { + s.ConnectionType = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *CreateIntegrationOutput) SetContentHandlingStrategy(v string) *CreateIntegrationOutput { + s.ContentHandlingStrategy = &v + return s +} + +// SetCredentialsArn sets the CredentialsArn field's value. +func (s *CreateIntegrationOutput) SetCredentialsArn(v string) *CreateIntegrationOutput { + s.CredentialsArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateIntegrationOutput) SetDescription(v string) *CreateIntegrationOutput { + s.Description = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *CreateIntegrationOutput) SetIntegrationId(v string) *CreateIntegrationOutput { + s.IntegrationId = &v + return s +} + +// SetIntegrationMethod sets the IntegrationMethod field's value. +func (s *CreateIntegrationOutput) SetIntegrationMethod(v string) *CreateIntegrationOutput { + s.IntegrationMethod = &v + return s +} + +// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. +func (s *CreateIntegrationOutput) SetIntegrationResponseSelectionExpression(v string) *CreateIntegrationOutput { + s.IntegrationResponseSelectionExpression = &v + return s +} + +// SetIntegrationType sets the IntegrationType field's value. +func (s *CreateIntegrationOutput) SetIntegrationType(v string) *CreateIntegrationOutput { + s.IntegrationType = &v + return s +} + +// SetIntegrationUri sets the IntegrationUri field's value. +func (s *CreateIntegrationOutput) SetIntegrationUri(v string) *CreateIntegrationOutput { + s.IntegrationUri = &v + return s +} + +// SetPassthroughBehavior sets the PassthroughBehavior field's value. +func (s *CreateIntegrationOutput) SetPassthroughBehavior(v string) *CreateIntegrationOutput { + s.PassthroughBehavior = &v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *CreateIntegrationOutput) SetRequestParameters(v map[string]*string) *CreateIntegrationOutput { + s.RequestParameters = v + return s +} + +// SetRequestTemplates sets the RequestTemplates field's value. +func (s *CreateIntegrationOutput) SetRequestTemplates(v map[string]*string) *CreateIntegrationOutput { + s.RequestTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *CreateIntegrationOutput) SetTemplateSelectionExpression(v string) *CreateIntegrationOutput { + s.TemplateSelectionExpression = &v + return s +} + +// SetTimeoutInMillis sets the TimeoutInMillis field's value. +func (s *CreateIntegrationOutput) SetTimeoutInMillis(v int64) *CreateIntegrationOutput { + s.TimeoutInMillis = &v + return s +} + +type CreateIntegrationResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + // + // IntegrationResponseKey is a required field + IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string" required:"true"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` +} + +// String returns the string representation +func (s CreateIntegrationResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIntegrationResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateIntegrationResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + if s.IntegrationResponseKey == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationResponseKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateIntegrationResponseInput) SetApiId(v string) *CreateIntegrationResponseInput { + s.ApiId = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *CreateIntegrationResponseInput) SetContentHandlingStrategy(v string) *CreateIntegrationResponseInput { + s.ContentHandlingStrategy = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *CreateIntegrationResponseInput) SetIntegrationId(v string) *CreateIntegrationResponseInput { + s.IntegrationId = &v + return s +} + +// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. +func (s *CreateIntegrationResponseInput) SetIntegrationResponseKey(v string) *CreateIntegrationResponseInput { + s.IntegrationResponseKey = &v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *CreateIntegrationResponseInput) SetResponseParameters(v map[string]*string) *CreateIntegrationResponseInput { + s.ResponseParameters = v + return s +} + +// SetResponseTemplates sets the ResponseTemplates field's value. +func (s *CreateIntegrationResponseInput) SetResponseTemplates(v map[string]*string) *CreateIntegrationResponseInput { + s.ResponseTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *CreateIntegrationResponseInput) SetTemplateSelectionExpression(v string) *CreateIntegrationResponseInput { + s.TemplateSelectionExpression = &v + return s +} + +type CreateIntegrationResponseOutput struct { + _ struct{} `type:"structure"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // An API Gateway-generated, unique identifier. + IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` +} + +// String returns the string representation +func (s CreateIntegrationResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIntegrationResponseOutput) GoString() string { + return s.String() +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *CreateIntegrationResponseOutput) SetContentHandlingStrategy(v string) *CreateIntegrationResponseOutput { + s.ContentHandlingStrategy = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *CreateIntegrationResponseOutput) SetIntegrationResponseId(v string) *CreateIntegrationResponseOutput { + s.IntegrationResponseId = &v + return s +} + +// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. +func (s *CreateIntegrationResponseOutput) SetIntegrationResponseKey(v string) *CreateIntegrationResponseOutput { + s.IntegrationResponseKey = &v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *CreateIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *CreateIntegrationResponseOutput { + s.ResponseParameters = v + return s +} + +// SetResponseTemplates sets the ResponseTemplates field's value. +func (s *CreateIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *CreateIntegrationResponseOutput { + s.ResponseTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *CreateIntegrationResponseOutput) SetTemplateSelectionExpression(v string) *CreateIntegrationResponseOutput { + s.TemplateSelectionExpression = &v + return s +} + +type CreateModelInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A string with a length between [1-256]. + ContentType *string `locationName:"contentType" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // A string with a length between [1-128]. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // A string with a length between [0-32768]. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s CreateModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateModelInput) SetApiId(v string) *CreateModelInput { + s.ApiId = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *CreateModelInput) SetContentType(v string) *CreateModelInput { + s.ContentType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateModelInput) SetDescription(v string) *CreateModelInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateModelInput) SetName(v string) *CreateModelInput { + s.Name = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *CreateModelInput) SetSchema(v string) *CreateModelInput { + s.Schema = &v + return s +} + +type CreateModelOutput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-256]. + ContentType *string `locationName:"contentType" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // An API Gateway-generated, unique identifier. + ModelId *string `locationName:"modelId" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A string with a length between [0-32768]. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s CreateModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateModelOutput) GoString() string { + return s.String() +} + +// SetContentType sets the ContentType field's value. +func (s *CreateModelOutput) SetContentType(v string) *CreateModelOutput { + s.ContentType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateModelOutput) SetDescription(v string) *CreateModelOutput { + s.Description = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *CreateModelOutput) SetModelId(v string) *CreateModelOutput { + s.ModelId = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateModelOutput) SetName(v string) *CreateModelOutput { + s.Name = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *CreateModelOutput) SetSchema(v string) *CreateModelOutput { + s.Schema = &v + return s +} + +type CreateRouteInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` + + // A list of authorization scopes configured on a route. The scopes are used + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the route scopes against the scopes parsed + // from the access token in the incoming request. The method invocation is authorized + // if any route scope matches a claimed scope in the access token. Otherwise, + // the invocation is not authorized. When the route scope is configured, the + // client must provide an access token instead of an identity token for authorization + // purposes. + AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` + + // The authorization type. Valid values are NONE for open access, AWS_IAM for + // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. + AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + OperationName *string `locationName:"operationName" type:"string"` + + // The route models. + RequestModels map[string]*string `locationName:"requestModels" type:"map"` + + // The route parameters. + RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + // + // RouteKey is a required field + RouteKey *string `locationName:"routeKey" type:"string" required:"true"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` + + // A string with a length between [1-128]. + Target *string `locationName:"target" type:"string"` +} + +// String returns the string representation +func (s CreateRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteKey == nil { + invalidParams.Add(request.NewErrParamRequired("RouteKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateRouteInput) SetApiId(v string) *CreateRouteInput { + s.ApiId = &v + return s +} + +// SetApiKeyRequired sets the ApiKeyRequired field's value. +func (s *CreateRouteInput) SetApiKeyRequired(v bool) *CreateRouteInput { + s.ApiKeyRequired = &v + return s +} + +// SetAuthorizationScopes sets the AuthorizationScopes field's value. +func (s *CreateRouteInput) SetAuthorizationScopes(v []*string) *CreateRouteInput { + s.AuthorizationScopes = v + return s +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *CreateRouteInput) SetAuthorizationType(v string) *CreateRouteInput { + s.AuthorizationType = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *CreateRouteInput) SetAuthorizerId(v string) *CreateRouteInput { + s.AuthorizerId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *CreateRouteInput) SetModelSelectionExpression(v string) *CreateRouteInput { + s.ModelSelectionExpression = &v + return s +} + +// SetOperationName sets the OperationName field's value. +func (s *CreateRouteInput) SetOperationName(v string) *CreateRouteInput { + s.OperationName = &v + return s +} + +// SetRequestModels sets the RequestModels field's value. +func (s *CreateRouteInput) SetRequestModels(v map[string]*string) *CreateRouteInput { + s.RequestModels = v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *CreateRouteInput) SetRequestParameters(v map[string]*ParameterConstraints) *CreateRouteInput { + s.RequestParameters = v + return s +} + +// SetRouteKey sets the RouteKey field's value. +func (s *CreateRouteInput) SetRouteKey(v string) *CreateRouteInput { + s.RouteKey = &v + return s +} + +// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. +func (s *CreateRouteInput) SetRouteResponseSelectionExpression(v string) *CreateRouteInput { + s.RouteResponseSelectionExpression = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *CreateRouteInput) SetTarget(v string) *CreateRouteInput { + s.Target = &v + return s +} + +type CreateRouteOutput struct { + _ struct{} `type:"structure"` + + ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` + + // A list of authorization scopes configured on a route. The scopes are used + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the route scopes against the scopes parsed + // from the access token in the incoming request. The method invocation is authorized + // if any route scope matches a claimed scope in the access token. Otherwise, + // the invocation is not authorized. When the route scope is configured, the + // client must provide an access token instead of an identity token for authorization + // purposes. + AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` + + // The authorization type. Valid values are NONE for open access, AWS_IAM for + // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. + AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + OperationName *string `locationName:"operationName" type:"string"` + + // The route models. + RequestModels map[string]*string `locationName:"requestModels" type:"map"` + + // The route parameters. + RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` + + // An API Gateway-generated, unique identifier. + RouteId *string `locationName:"routeId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteKey *string `locationName:"routeKey" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` + + // A string with a length between [1-128]. + Target *string `locationName:"target" type:"string"` +} + +// String returns the string representation +func (s CreateRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteOutput) GoString() string { + return s.String() +} + +// SetApiKeyRequired sets the ApiKeyRequired field's value. +func (s *CreateRouteOutput) SetApiKeyRequired(v bool) *CreateRouteOutput { + s.ApiKeyRequired = &v + return s +} + +// SetAuthorizationScopes sets the AuthorizationScopes field's value. +func (s *CreateRouteOutput) SetAuthorizationScopes(v []*string) *CreateRouteOutput { + s.AuthorizationScopes = v + return s +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *CreateRouteOutput) SetAuthorizationType(v string) *CreateRouteOutput { + s.AuthorizationType = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *CreateRouteOutput) SetAuthorizerId(v string) *CreateRouteOutput { + s.AuthorizerId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *CreateRouteOutput) SetModelSelectionExpression(v string) *CreateRouteOutput { + s.ModelSelectionExpression = &v + return s +} + +// SetOperationName sets the OperationName field's value. +func (s *CreateRouteOutput) SetOperationName(v string) *CreateRouteOutput { + s.OperationName = &v + return s +} + +// SetRequestModels sets the RequestModels field's value. +func (s *CreateRouteOutput) SetRequestModels(v map[string]*string) *CreateRouteOutput { + s.RequestModels = v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *CreateRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *CreateRouteOutput { + s.RequestParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *CreateRouteOutput) SetRouteId(v string) *CreateRouteOutput { + s.RouteId = &v + return s +} + +// SetRouteKey sets the RouteKey field's value. +func (s *CreateRouteOutput) SetRouteKey(v string) *CreateRouteOutput { + s.RouteKey = &v + return s +} + +// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. +func (s *CreateRouteOutput) SetRouteResponseSelectionExpression(v string) *CreateRouteOutput { + s.RouteResponseSelectionExpression = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *CreateRouteOutput) SetTarget(v string) *CreateRouteOutput { + s.Target = &v + return s +} + +type CreateRouteResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // The route models. + ResponseModels map[string]*string `locationName:"responseModels" type:"map"` + + // The route parameters. + ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + // + // RouteResponseKey is a required field + RouteResponseKey *string `locationName:"routeResponseKey" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateRouteResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRouteResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRouteResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + if s.RouteResponseKey == nil { + invalidParams.Add(request.NewErrParamRequired("RouteResponseKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *CreateRouteResponseInput) SetApiId(v string) *CreateRouteResponseInput { + s.ApiId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *CreateRouteResponseInput) SetModelSelectionExpression(v string) *CreateRouteResponseInput { + s.ModelSelectionExpression = &v + return s +} + +// SetResponseModels sets the ResponseModels field's value. +func (s *CreateRouteResponseInput) SetResponseModels(v map[string]*string) *CreateRouteResponseInput { + s.ResponseModels = v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *CreateRouteResponseInput) SetResponseParameters(v map[string]*ParameterConstraints) *CreateRouteResponseInput { + s.ResponseParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *CreateRouteResponseInput) SetRouteId(v string) *CreateRouteResponseInput { + s.RouteId = &v + return s +} + +// SetRouteResponseKey sets the RouteResponseKey field's value. +func (s *CreateRouteResponseInput) SetRouteResponseKey(v string) *CreateRouteResponseInput { + s.RouteResponseKey = &v + return s +} + +type CreateRouteResponseOutput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // The route models. + ResponseModels map[string]*string `locationName:"responseModels" type:"map"` + + // The route parameters. + ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` + + // An API Gateway-generated, unique identifier. + RouteResponseId *string `locationName:"routeResponseId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` +} + +// String returns the string representation +func (s CreateRouteResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRouteResponseOutput) GoString() string { + return s.String() +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *CreateRouteResponseOutput) SetModelSelectionExpression(v string) *CreateRouteResponseOutput { + s.ModelSelectionExpression = &v + return s +} + +// SetResponseModels sets the ResponseModels field's value. +func (s *CreateRouteResponseOutput) SetResponseModels(v map[string]*string) *CreateRouteResponseOutput { + s.ResponseModels = v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *CreateRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *CreateRouteResponseOutput { + s.ResponseParameters = v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *CreateRouteResponseOutput) SetRouteResponseId(v string) *CreateRouteResponseOutput { + s.RouteResponseId = &v + return s +} + +// SetRouteResponseKey sets the RouteResponseKey field's value. +func (s *CreateRouteResponseOutput) SetRouteResponseKey(v string) *CreateRouteResponseOutput { + s.RouteResponseKey = &v + return s +} + +type CreateStageInput struct { + _ struct{} `type:"structure"` + + // Settings for logging access in a stage. + AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // An API Gateway-generated, unique identifier. + ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + + // Represents a collection of route settings. + DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // The route settings map. + RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` + + // A string with a length between [1-128]. + // + // StageName is a required field + StageName *string `locationName:"stageName" type:"string" required:"true"` + + // The stage variable map. + StageVariables map[string]*string `locationName:"stageVariables" type:"map"` +} + +// String returns the string representation +func (s CreateStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStageInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessLogSettings sets the AccessLogSettings field's value. +func (s *CreateStageInput) SetAccessLogSettings(v *AccessLogSettings) *CreateStageInput { + s.AccessLogSettings = v + return s +} + +// SetApiId sets the ApiId field's value. +func (s *CreateStageInput) SetApiId(v string) *CreateStageInput { + s.ApiId = &v + return s +} + +// SetClientCertificateId sets the ClientCertificateId field's value. +func (s *CreateStageInput) SetClientCertificateId(v string) *CreateStageInput { + s.ClientCertificateId = &v + return s +} + +// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. +func (s *CreateStageInput) SetDefaultRouteSettings(v *RouteSettings) *CreateStageInput { + s.DefaultRouteSettings = v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *CreateStageInput) SetDeploymentId(v string) *CreateStageInput { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateStageInput) SetDescription(v string) *CreateStageInput { + s.Description = &v + return s +} + +// SetRouteSettings sets the RouteSettings field's value. +func (s *CreateStageInput) SetRouteSettings(v map[string]*RouteSettings) *CreateStageInput { + s.RouteSettings = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *CreateStageInput) SetStageName(v string) *CreateStageInput { + s.StageName = &v + return s +} + +// SetStageVariables sets the StageVariables field's value. +func (s *CreateStageInput) SetStageVariables(v map[string]*string) *CreateStageInput { + s.StageVariables = v + return s +} + +type CreateStageOutput struct { + _ struct{} `type:"structure"` + + // Settings for logging access in a stage. + AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // Represents a collection of route settings. + DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` + + // The route settings map. + RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` + + // A string with a length between [1-128]. + StageName *string `locationName:"stageName" type:"string"` + + // The stage variable map. + StageVariables map[string]*string `locationName:"stageVariables" type:"map"` +} + +// String returns the string representation +func (s CreateStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStageOutput) GoString() string { + return s.String() +} + +// SetAccessLogSettings sets the AccessLogSettings field's value. +func (s *CreateStageOutput) SetAccessLogSettings(v *AccessLogSettings) *CreateStageOutput { + s.AccessLogSettings = v + return s +} + +// SetClientCertificateId sets the ClientCertificateId field's value. +func (s *CreateStageOutput) SetClientCertificateId(v string) *CreateStageOutput { + s.ClientCertificateId = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *CreateStageOutput) SetCreatedDate(v time.Time) *CreateStageOutput { + s.CreatedDate = &v + return s +} + +// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. +func (s *CreateStageOutput) SetDefaultRouteSettings(v *RouteSettings) *CreateStageOutput { + s.DefaultRouteSettings = v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *CreateStageOutput) SetDeploymentId(v string) *CreateStageOutput { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateStageOutput) SetDescription(v string) *CreateStageOutput { + s.Description = &v + return s +} + +// SetLastUpdatedDate sets the LastUpdatedDate field's value. +func (s *CreateStageOutput) SetLastUpdatedDate(v time.Time) *CreateStageOutput { + s.LastUpdatedDate = &v + return s +} + +// SetRouteSettings sets the RouteSettings field's value. +func (s *CreateStageOutput) SetRouteSettings(v map[string]*RouteSettings) *CreateStageOutput { + s.RouteSettings = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *CreateStageOutput) SetStageName(v string) *CreateStageOutput { + s.StageName = &v + return s +} + +// SetStageVariables sets the StageVariables field's value. +func (s *CreateStageOutput) SetStageVariables(v map[string]*string) *CreateStageOutput { + s.StageVariables = v + return s +} + +type DeleteApiInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteApiInput) SetApiId(v string) *DeleteApiInput { + s.ApiId = &v + return s +} + +type DeleteApiMappingInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"querystring" locationName:"apiId" type:"string" required:"true"` + + // ApiMappingId is a required field + ApiMappingId *string `location:"uri" locationName:"apiMappingId" type:"string" required:"true"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApiMappingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApiMappingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApiMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApiMappingInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiMappingId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiMappingId")) + } + if s.ApiMappingId != nil && len(*s.ApiMappingId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiMappingId", 1)) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteApiMappingInput) SetApiId(v string) *DeleteApiMappingInput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *DeleteApiMappingInput) SetApiMappingId(v string) *DeleteApiMappingInput { + s.ApiMappingId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteApiMappingInput) SetDomainName(v string) *DeleteApiMappingInput { + s.DomainName = &v + return s +} + +type DeleteApiMappingOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApiMappingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApiMappingOutput) GoString() string { + return s.String() +} + +type DeleteApiOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApiOutput) GoString() string { + return s.String() +} + +type DeleteAuthorizerInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // AuthorizerId is a required field + AuthorizerId *string `location:"uri" locationName:"authorizerId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAuthorizerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAuthorizerInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteAuthorizerInput) SetApiId(v string) *DeleteAuthorizerInput { + s.ApiId = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *DeleteAuthorizerInput) SetAuthorizerId(v string) *DeleteAuthorizerInput { + s.AuthorizerId = &v + return s +} + +type DeleteAuthorizerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAuthorizerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAuthorizerOutput) GoString() string { + return s.String() +} + +type DeleteDeploymentInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // DeploymentId is a required field + DeploymentId *string `location:"uri" locationName:"deploymentId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDeploymentInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteDeploymentInput) SetApiId(v string) *DeleteDeploymentInput { + s.ApiId = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *DeleteDeploymentInput) SetDeploymentId(v string) *DeleteDeploymentInput { + s.DeploymentId = &v + return s +} + +type DeleteDeploymentOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDeploymentOutput) GoString() string { + return s.String() +} + +type DeleteDomainNameInput struct { + _ struct{} `type:"structure"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDomainNameInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainNameInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteDomainNameInput) SetDomainName(v string) *DeleteDomainNameInput { + s.DomainName = &v + return s +} + +type DeleteDomainNameOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDomainNameOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainNameOutput) GoString() string { + return s.String() +} + +type DeleteIntegrationInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteIntegrationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIntegrationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteIntegrationInput) SetApiId(v string) *DeleteIntegrationInput { + s.ApiId = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *DeleteIntegrationInput) SetIntegrationId(v string) *DeleteIntegrationInput { + s.IntegrationId = &v + return s +} + +type DeleteIntegrationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteIntegrationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIntegrationOutput) GoString() string { + return s.String() +} + +type DeleteIntegrationResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` + + // IntegrationResponseId is a required field + IntegrationResponseId *string `location:"uri" locationName:"integrationResponseId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteIntegrationResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIntegrationResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIntegrationResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + if s.IntegrationResponseId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationResponseId")) + } + if s.IntegrationResponseId != nil && len(*s.IntegrationResponseId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationResponseId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteIntegrationResponseInput) SetApiId(v string) *DeleteIntegrationResponseInput { + s.ApiId = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *DeleteIntegrationResponseInput) SetIntegrationId(v string) *DeleteIntegrationResponseInput { + s.IntegrationId = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *DeleteIntegrationResponseInput) SetIntegrationResponseId(v string) *DeleteIntegrationResponseInput { + s.IntegrationResponseId = &v + return s +} + +type DeleteIntegrationResponseOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteIntegrationResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIntegrationResponseOutput) GoString() string { + return s.String() +} + +type DeleteModelInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // ModelId is a required field + ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.ModelId == nil { + invalidParams.Add(request.NewErrParamRequired("ModelId")) + } + if s.ModelId != nil && len(*s.ModelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteModelInput) SetApiId(v string) *DeleteModelInput { + s.ApiId = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *DeleteModelInput) SetModelId(v string) *DeleteModelInput { + s.ModelId = &v + return s +} + +type DeleteModelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteModelOutput) GoString() string { + return s.String() +} + +type DeleteRouteInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteRouteInput) SetApiId(v string) *DeleteRouteInput { + s.ApiId = &v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *DeleteRouteInput) SetRouteId(v string) *DeleteRouteInput { + s.RouteId = &v + return s +} + +type DeleteRouteOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteOutput) GoString() string { + return s.String() +} + +type DeleteRouteResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` + + // RouteResponseId is a required field + RouteResponseId *string `location:"uri" locationName:"routeResponseId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRouteResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + if s.RouteResponseId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteResponseId")) + } + if s.RouteResponseId != nil && len(*s.RouteResponseId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteResponseId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteRouteResponseInput) SetApiId(v string) *DeleteRouteResponseInput { + s.ApiId = &v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *DeleteRouteResponseInput) SetRouteId(v string) *DeleteRouteResponseInput { + s.RouteId = &v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *DeleteRouteResponseInput) SetRouteResponseId(v string) *DeleteRouteResponseInput { + s.RouteResponseId = &v + return s +} + +type DeleteRouteResponseOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRouteResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRouteResponseOutput) GoString() string { + return s.String() +} + +type DeleteStageInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // StageName is a required field + StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteStageInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteStageInput) SetApiId(v string) *DeleteStageInput { + s.ApiId = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *DeleteStageInput) SetStageName(v string) *DeleteStageInput { + s.StageName = &v + return s +} + +type DeleteStageOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteStageOutput) GoString() string { + return s.String() +} + +// An immutable representation of an API that can be called by users. A Deployment +// must be associated with a Stage for it to be callable over the internet. +type Deployment struct { + _ struct{} `type:"structure"` + + // The date and time when the Deployment resource was created. + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // The identifier for the deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The status of the deployment: PENDING, FAILED, or SUCCEEDED. + DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` + + // May contain additional feedback on the status of an API deployment. + DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` + + // The description for the deployment. + Description *string `locationName:"description" type:"string"` +} + +// String returns the string representation +func (s Deployment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Deployment) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *Deployment) SetCreatedDate(v time.Time) *Deployment { + s.CreatedDate = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *Deployment) SetDeploymentId(v string) *Deployment { + s.DeploymentId = &v + return s +} + +// SetDeploymentStatus sets the DeploymentStatus field's value. +func (s *Deployment) SetDeploymentStatus(v string) *Deployment { + s.DeploymentStatus = &v + return s +} + +// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. +func (s *Deployment) SetDeploymentStatusMessage(v string) *Deployment { + s.DeploymentStatusMessage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Deployment) SetDescription(v string) *Deployment { + s.Description = &v + return s +} + +// Represents a domain name. +type DomainName struct { + _ struct{} `type:"structure"` + + // The API mapping selection expression. + ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` + + // The name of the DomainName resource. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` + + // The domain name configurations. + DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` +} + +// String returns the string representation +func (s DomainName) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainName) GoString() string { + return s.String() +} + +// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. +func (s *DomainName) SetApiMappingSelectionExpression(v string) *DomainName { + s.ApiMappingSelectionExpression = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DomainName) SetDomainName(v string) *DomainName { + s.DomainName = &v + return s +} + +// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. +func (s *DomainName) SetDomainNameConfigurations(v []*DomainNameConfiguration) *DomainName { + s.DomainNameConfigurations = v + return s +} + +// The domain name configuration. +type DomainNameConfiguration struct { + _ struct{} `type:"structure"` + + // A domain name for the WebSocket API. + ApiGatewayDomainName *string `locationName:"apiGatewayDomainName" type:"string"` + + // An AWS-managed certificate that will be used by the edge-optimized endpoint + // for this domain name. AWS Certificate Manager is the only supported source. + CertificateArn *string `locationName:"certificateArn" type:"string"` + + // The user-friendly name of the certificate that will be used by the edge-optimized + // endpoint for this domain name. + CertificateName *string `locationName:"certificateName" type:"string"` + + // The timestamp when the certificate that was used by edge-optimized endpoint + // for this domain name was uploaded. + CertificateUploadDate *time.Time `locationName:"certificateUploadDate" type:"timestamp" timestampFormat:"iso8601"` + + // The endpoint type. + EndpointType *string `locationName:"endpointType" type:"string" enum:"EndpointType"` + + // The Amazon Route 53 Hosted Zone ID of the endpoint. See AWS Regions and Endpoints + // for API Gateway (docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). + HostedZoneId *string `locationName:"hostedZoneId" type:"string"` +} + +// String returns the string representation +func (s DomainNameConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainNameConfiguration) GoString() string { + return s.String() +} + +// SetApiGatewayDomainName sets the ApiGatewayDomainName field's value. +func (s *DomainNameConfiguration) SetApiGatewayDomainName(v string) *DomainNameConfiguration { + s.ApiGatewayDomainName = &v + return s +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *DomainNameConfiguration) SetCertificateArn(v string) *DomainNameConfiguration { + s.CertificateArn = &v + return s +} + +// SetCertificateName sets the CertificateName field's value. +func (s *DomainNameConfiguration) SetCertificateName(v string) *DomainNameConfiguration { + s.CertificateName = &v + return s +} + +// SetCertificateUploadDate sets the CertificateUploadDate field's value. +func (s *DomainNameConfiguration) SetCertificateUploadDate(v time.Time) *DomainNameConfiguration { + s.CertificateUploadDate = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *DomainNameConfiguration) SetEndpointType(v string) *DomainNameConfiguration { + s.EndpointType = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *DomainNameConfiguration) SetHostedZoneId(v string) *DomainNameConfiguration { + s.HostedZoneId = &v + return s +} + +type GetApiInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetApiInput) SetApiId(v string) *GetApiInput { + s.ApiId = &v + return s +} + +type GetApiMappingInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"querystring" locationName:"apiId" type:"string" required:"true"` + + // ApiMappingId is a required field + ApiMappingId *string `location:"uri" locationName:"apiMappingId" type:"string" required:"true"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApiMappingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApiMappingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApiMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApiMappingInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiMappingId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiMappingId")) + } + if s.ApiMappingId != nil && len(*s.ApiMappingId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiMappingId", 1)) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetApiMappingInput) SetApiId(v string) *GetApiMappingInput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *GetApiMappingInput) SetApiMappingId(v string) *GetApiMappingInput { + s.ApiMappingId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *GetApiMappingInput) SetDomainName(v string) *GetApiMappingInput { + s.DomainName = &v + return s +} + +type GetApiMappingOutput struct { + _ struct{} `type:"structure"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiMappingId *string `locationName:"apiMappingId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` + + // A string with a length between [1-128]. + Stage *string `locationName:"stage" type:"string"` +} + +// String returns the string representation +func (s GetApiMappingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApiMappingOutput) GoString() string { + return s.String() +} + +// SetApiId sets the ApiId field's value. +func (s *GetApiMappingOutput) SetApiId(v string) *GetApiMappingOutput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *GetApiMappingOutput) SetApiMappingId(v string) *GetApiMappingOutput { + s.ApiMappingId = &v + return s +} + +// SetApiMappingKey sets the ApiMappingKey field's value. +func (s *GetApiMappingOutput) SetApiMappingKey(v string) *GetApiMappingOutput { + s.ApiMappingKey = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *GetApiMappingOutput) SetStage(v string) *GetApiMappingOutput { + s.Stage = &v + return s +} + +type GetApiMappingsInput struct { + _ struct{} `type:"structure"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetApiMappingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApiMappingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApiMappingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApiMappingsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetApiMappingsInput) SetDomainName(v string) *GetApiMappingsInput { + s.DomainName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetApiMappingsInput) SetMaxResults(v string) *GetApiMappingsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetApiMappingsInput) SetNextToken(v string) *GetApiMappingsInput { + s.NextToken = &v + return s +} + +type GetApiMappingsOutput struct { + _ struct{} `type:"structure"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiMappingId *string `locationName:"apiMappingId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` + + // A string with a length between [1-128]. + Stage *string `locationName:"stage" type:"string"` +} + +// String returns the string representation +func (s GetApiMappingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApiMappingsOutput) GoString() string { + return s.String() +} + +// SetApiId sets the ApiId field's value. +func (s *GetApiMappingsOutput) SetApiId(v string) *GetApiMappingsOutput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *GetApiMappingsOutput) SetApiMappingId(v string) *GetApiMappingsOutput { + s.ApiMappingId = &v + return s +} + +// SetApiMappingKey sets the ApiMappingKey field's value. +func (s *GetApiMappingsOutput) SetApiMappingKey(v string) *GetApiMappingsOutput { + s.ApiMappingKey = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *GetApiMappingsOutput) SetStage(v string) *GetApiMappingsOutput { + s.Stage = &v + return s +} + +type GetApiOutput struct { + _ struct{} `type:"structure"` + + ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + ProtocolType *string `locationName:"protocolType" type:"string" enum:"ProtocolType"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + Version *string `locationName:"version" type:"string"` + + Warnings []*string `locationName:"warnings" type:"list"` +} + +// String returns the string representation +func (s GetApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApiOutput) GoString() string { + return s.String() +} + +// SetApiEndpoint sets the ApiEndpoint field's value. +func (s *GetApiOutput) SetApiEndpoint(v string) *GetApiOutput { + s.ApiEndpoint = &v + return s +} + +// SetApiId sets the ApiId field's value. +func (s *GetApiOutput) SetApiId(v string) *GetApiOutput { + s.ApiId = &v + return s +} + +// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. +func (s *GetApiOutput) SetApiKeySelectionExpression(v string) *GetApiOutput { + s.ApiKeySelectionExpression = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetApiOutput) SetCreatedDate(v time.Time) *GetApiOutput { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetApiOutput) SetDescription(v string) *GetApiOutput { + s.Description = &v + return s +} + +// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. +func (s *GetApiOutput) SetDisableSchemaValidation(v bool) *GetApiOutput { + s.DisableSchemaValidation = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetApiOutput) SetName(v string) *GetApiOutput { + s.Name = &v + return s +} + +// SetProtocolType sets the ProtocolType field's value. +func (s *GetApiOutput) SetProtocolType(v string) *GetApiOutput { + s.ProtocolType = &v + return s +} + +// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. +func (s *GetApiOutput) SetRouteSelectionExpression(v string) *GetApiOutput { + s.RouteSelectionExpression = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetApiOutput) SetVersion(v string) *GetApiOutput { + s.Version = &v + return s +} + +// SetWarnings sets the Warnings field's value. +func (s *GetApiOutput) SetWarnings(v []*string) *GetApiOutput { + s.Warnings = v + return s +} + +type GetApisInput struct { + _ struct{} `type:"structure"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetApisInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApisInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetApisInput) SetMaxResults(v string) *GetApisInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetApisInput) SetNextToken(v string) *GetApisInput { + s.NextToken = &v + return s +} + +type GetApisOutput struct { + _ struct{} `type:"structure"` + + Items []*Api `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetApisOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApisOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetApisOutput) SetItems(v []*Api) *GetApisOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetApisOutput) SetNextToken(v string) *GetApisOutput { + s.NextToken = &v + return s +} + +type GetAuthorizerInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // AuthorizerId is a required field + AuthorizerId *string `location:"uri" locationName:"authorizerId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAuthorizerInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetAuthorizerInput) SetApiId(v string) *GetAuthorizerInput { + s.ApiId = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *GetAuthorizerInput) SetAuthorizerId(v string) *GetAuthorizerInput { + s.AuthorizerId = &v + return s +} + +type GetAuthorizerOutput struct { + _ struct{} `type:"structure"` + + // Represents an Amazon Resource Name (ARN). + AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An integer with a value between [0-3600]. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // The authorizer type. Currently the only valid value is REQUEST, for a Lambda + // function using incoming request parameters. + AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` + + // A string representation of a URI with a length between [1-2048]. + AuthorizerUri *string `locationName:"authorizerUri" type:"string"` + + // The identity source for which authorization is requested. + // + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is $method.request.header.Auth, + // $method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. + IdentitySource []*string `locationName:"identitySource" type:"list"` + + // A string with a length between [0-1024]. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // For REQUEST authorizer, this is not defined. + ProviderArns []*string `locationName:"providerArns" type:"list"` +} + +// String returns the string representation +func (s GetAuthorizerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizerOutput) GoString() string { + return s.String() +} + +// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. +func (s *GetAuthorizerOutput) SetAuthorizerCredentialsArn(v string) *GetAuthorizerOutput { + s.AuthorizerCredentialsArn = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *GetAuthorizerOutput) SetAuthorizerId(v string) *GetAuthorizerOutput { + s.AuthorizerId = &v + return s +} + +// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. +func (s *GetAuthorizerOutput) SetAuthorizerResultTtlInSeconds(v int64) *GetAuthorizerOutput { + s.AuthorizerResultTtlInSeconds = &v + return s +} + +// SetAuthorizerType sets the AuthorizerType field's value. +func (s *GetAuthorizerOutput) SetAuthorizerType(v string) *GetAuthorizerOutput { + s.AuthorizerType = &v + return s +} + +// SetAuthorizerUri sets the AuthorizerUri field's value. +func (s *GetAuthorizerOutput) SetAuthorizerUri(v string) *GetAuthorizerOutput { + s.AuthorizerUri = &v + return s +} + +// SetIdentitySource sets the IdentitySource field's value. +func (s *GetAuthorizerOutput) SetIdentitySource(v []*string) *GetAuthorizerOutput { + s.IdentitySource = v + return s +} + +// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. +func (s *GetAuthorizerOutput) SetIdentityValidationExpression(v string) *GetAuthorizerOutput { + s.IdentityValidationExpression = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetAuthorizerOutput) SetName(v string) *GetAuthorizerOutput { + s.Name = &v + return s +} + +// SetProviderArns sets the ProviderArns field's value. +func (s *GetAuthorizerOutput) SetProviderArns(v []*string) *GetAuthorizerOutput { + s.ProviderArns = v + return s +} + +type GetAuthorizersInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetAuthorizersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAuthorizersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAuthorizersInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetAuthorizersInput) SetApiId(v string) *GetAuthorizersInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetAuthorizersInput) SetMaxResults(v string) *GetAuthorizersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAuthorizersInput) SetNextToken(v string) *GetAuthorizersInput { + s.NextToken = &v + return s +} + +type GetAuthorizersOutput struct { + _ struct{} `type:"structure"` + + Items []*Authorizer `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetAuthorizersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAuthorizersOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetAuthorizersOutput) SetItems(v []*Authorizer) *GetAuthorizersOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAuthorizersOutput) SetNextToken(v string) *GetAuthorizersOutput { + s.NextToken = &v + return s +} + +type GetDeploymentInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // DeploymentId is a required field + DeploymentId *string `location:"uri" locationName:"deploymentId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetDeploymentInput) SetApiId(v string) *GetDeploymentInput { + s.ApiId = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *GetDeploymentInput) SetDeploymentId(v string) *GetDeploymentInput { + s.DeploymentId = &v + return s +} + +type GetDeploymentOutput struct { + _ struct{} `type:"structure"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // Represents a deployment status. + DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` + + DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` +} + +// String returns the string representation +func (s GetDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentOutput) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetDeploymentOutput) SetCreatedDate(v time.Time) *GetDeploymentOutput { + s.CreatedDate = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *GetDeploymentOutput) SetDeploymentId(v string) *GetDeploymentOutput { + s.DeploymentId = &v + return s +} + +// SetDeploymentStatus sets the DeploymentStatus field's value. +func (s *GetDeploymentOutput) SetDeploymentStatus(v string) *GetDeploymentOutput { + s.DeploymentStatus = &v + return s +} + +// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. +func (s *GetDeploymentOutput) SetDeploymentStatusMessage(v string) *GetDeploymentOutput { + s.DeploymentStatusMessage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetDeploymentOutput) SetDescription(v string) *GetDeploymentOutput { + s.Description = &v + return s +} + +type GetDeploymentsInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetDeploymentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDeploymentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDeploymentsInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetDeploymentsInput) SetApiId(v string) *GetDeploymentsInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetDeploymentsInput) SetMaxResults(v string) *GetDeploymentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDeploymentsInput) SetNextToken(v string) *GetDeploymentsInput { + s.NextToken = &v + return s +} + +type GetDeploymentsOutput struct { + _ struct{} `type:"structure"` + + Items []*Deployment `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetDeploymentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentsOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetDeploymentsOutput) SetItems(v []*Deployment) *GetDeploymentsOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDeploymentsOutput) SetNextToken(v string) *GetDeploymentsOutput { + s.NextToken = &v + return s +} + +type GetDomainNameInput struct { + _ struct{} `type:"structure"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDomainNameInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainNameInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *GetDomainNameInput) SetDomainName(v string) *GetDomainNameInput { + s.DomainName = &v + return s +} + +type GetDomainNameOutput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` + + // A string with a length between [1-512]. + DomainName *string `locationName:"domainName" type:"string"` + + // The domain name configurations. + DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` +} + +// String returns the string representation +func (s GetDomainNameOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainNameOutput) GoString() string { + return s.String() +} + +// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. +func (s *GetDomainNameOutput) SetApiMappingSelectionExpression(v string) *GetDomainNameOutput { + s.ApiMappingSelectionExpression = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *GetDomainNameOutput) SetDomainName(v string) *GetDomainNameOutput { + s.DomainName = &v + return s +} + +// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. +func (s *GetDomainNameOutput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *GetDomainNameOutput { + s.DomainNameConfigurations = v + return s +} + +type GetDomainNamesInput struct { + _ struct{} `type:"structure"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetDomainNamesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainNamesInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetDomainNamesInput) SetMaxResults(v string) *GetDomainNamesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDomainNamesInput) SetNextToken(v string) *GetDomainNamesInput { + s.NextToken = &v + return s +} + +type GetDomainNamesOutput struct { + _ struct{} `type:"structure"` + + Items []*DomainName `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetDomainNamesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDomainNamesOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetDomainNamesOutput) SetItems(v []*DomainName) *GetDomainNamesOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDomainNamesOutput) SetNextToken(v string) *GetDomainNamesOutput { + s.NextToken = &v + return s +} + +type GetIntegrationInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetIntegrationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntegrationInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetIntegrationInput) SetApiId(v string) *GetIntegrationInput { + s.ApiId = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *GetIntegrationInput) SetIntegrationId(v string) *GetIntegrationInput { + s.IntegrationId = &v + return s +} + +type GetIntegrationOutput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-1024]. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // Represents a connection type. + ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // Represents an Amazon Resource Name (ARN). + CredentialsArn *string `locationName:"credentialsArn" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // An API Gateway-generated, unique identifier. + IntegrationId *string `locationName:"integrationId" type:"string"` + + // A string with a length between [1-64]. + IntegrationMethod *string `locationName:"integrationMethod" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` + + // Represents an API method integration type. + IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` + + // A string representation of a URI with a length between [1-2048]. + IntegrationUri *string `locationName:"integrationUri" type:"string"` + + // Represents passthrough behavior for an integration response. + PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` + + // An integer with a value between [50-29000]. + TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` +} + +// String returns the string representation +func (s GetIntegrationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationOutput) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *GetIntegrationOutput) SetConnectionId(v string) *GetIntegrationOutput { + s.ConnectionId = &v + return s +} + +// SetConnectionType sets the ConnectionType field's value. +func (s *GetIntegrationOutput) SetConnectionType(v string) *GetIntegrationOutput { + s.ConnectionType = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *GetIntegrationOutput) SetContentHandlingStrategy(v string) *GetIntegrationOutput { + s.ContentHandlingStrategy = &v + return s +} + +// SetCredentialsArn sets the CredentialsArn field's value. +func (s *GetIntegrationOutput) SetCredentialsArn(v string) *GetIntegrationOutput { + s.CredentialsArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetIntegrationOutput) SetDescription(v string) *GetIntegrationOutput { + s.Description = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *GetIntegrationOutput) SetIntegrationId(v string) *GetIntegrationOutput { + s.IntegrationId = &v + return s +} + +// SetIntegrationMethod sets the IntegrationMethod field's value. +func (s *GetIntegrationOutput) SetIntegrationMethod(v string) *GetIntegrationOutput { + s.IntegrationMethod = &v + return s +} + +// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. +func (s *GetIntegrationOutput) SetIntegrationResponseSelectionExpression(v string) *GetIntegrationOutput { + s.IntegrationResponseSelectionExpression = &v + return s +} + +// SetIntegrationType sets the IntegrationType field's value. +func (s *GetIntegrationOutput) SetIntegrationType(v string) *GetIntegrationOutput { + s.IntegrationType = &v + return s +} + +// SetIntegrationUri sets the IntegrationUri field's value. +func (s *GetIntegrationOutput) SetIntegrationUri(v string) *GetIntegrationOutput { + s.IntegrationUri = &v + return s +} + +// SetPassthroughBehavior sets the PassthroughBehavior field's value. +func (s *GetIntegrationOutput) SetPassthroughBehavior(v string) *GetIntegrationOutput { + s.PassthroughBehavior = &v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *GetIntegrationOutput) SetRequestParameters(v map[string]*string) *GetIntegrationOutput { + s.RequestParameters = v + return s +} + +// SetRequestTemplates sets the RequestTemplates field's value. +func (s *GetIntegrationOutput) SetRequestTemplates(v map[string]*string) *GetIntegrationOutput { + s.RequestTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *GetIntegrationOutput) SetTemplateSelectionExpression(v string) *GetIntegrationOutput { + s.TemplateSelectionExpression = &v + return s +} + +// SetTimeoutInMillis sets the TimeoutInMillis field's value. +func (s *GetIntegrationOutput) SetTimeoutInMillis(v int64) *GetIntegrationOutput { + s.TimeoutInMillis = &v + return s +} + +type GetIntegrationResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` + + // IntegrationResponseId is a required field + IntegrationResponseId *string `location:"uri" locationName:"integrationResponseId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetIntegrationResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + if s.IntegrationResponseId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationResponseId")) + } + if s.IntegrationResponseId != nil && len(*s.IntegrationResponseId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationResponseId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetIntegrationResponseInput) SetApiId(v string) *GetIntegrationResponseInput { + s.ApiId = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *GetIntegrationResponseInput) SetIntegrationId(v string) *GetIntegrationResponseInput { + s.IntegrationId = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *GetIntegrationResponseInput) SetIntegrationResponseId(v string) *GetIntegrationResponseInput { + s.IntegrationResponseId = &v + return s +} + +type GetIntegrationResponseOutput struct { + _ struct{} `type:"structure"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // An API Gateway-generated, unique identifier. + IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` +} + +// String returns the string representation +func (s GetIntegrationResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationResponseOutput) GoString() string { + return s.String() +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *GetIntegrationResponseOutput) SetContentHandlingStrategy(v string) *GetIntegrationResponseOutput { + s.ContentHandlingStrategy = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *GetIntegrationResponseOutput) SetIntegrationResponseId(v string) *GetIntegrationResponseOutput { + s.IntegrationResponseId = &v + return s +} + +// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. +func (s *GetIntegrationResponseOutput) SetIntegrationResponseKey(v string) *GetIntegrationResponseOutput { + s.IntegrationResponseKey = &v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *GetIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *GetIntegrationResponseOutput { + s.ResponseParameters = v + return s +} + +// SetResponseTemplates sets the ResponseTemplates field's value. +func (s *GetIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *GetIntegrationResponseOutput { + s.ResponseTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *GetIntegrationResponseOutput) SetTemplateSelectionExpression(v string) *GetIntegrationResponseOutput { + s.TemplateSelectionExpression = &v + return s +} + +type GetIntegrationResponsesInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetIntegrationResponsesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationResponsesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntegrationResponsesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntegrationResponsesInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetIntegrationResponsesInput) SetApiId(v string) *GetIntegrationResponsesInput { + s.ApiId = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *GetIntegrationResponsesInput) SetIntegrationId(v string) *GetIntegrationResponsesInput { + s.IntegrationId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetIntegrationResponsesInput) SetMaxResults(v string) *GetIntegrationResponsesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetIntegrationResponsesInput) SetNextToken(v string) *GetIntegrationResponsesInput { + s.NextToken = &v + return s +} + +type GetIntegrationResponsesOutput struct { + _ struct{} `type:"structure"` + + Items []*IntegrationResponse `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetIntegrationResponsesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationResponsesOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetIntegrationResponsesOutput) SetItems(v []*IntegrationResponse) *GetIntegrationResponsesOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetIntegrationResponsesOutput) SetNextToken(v string) *GetIntegrationResponsesOutput { + s.NextToken = &v + return s +} + +type GetIntegrationsInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetIntegrationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetIntegrationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetIntegrationsInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetIntegrationsInput) SetApiId(v string) *GetIntegrationsInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetIntegrationsInput) SetMaxResults(v string) *GetIntegrationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetIntegrationsInput) SetNextToken(v string) *GetIntegrationsInput { + s.NextToken = &v + return s +} + +type GetIntegrationsOutput struct { + _ struct{} `type:"structure"` + + Items []*Integration `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetIntegrationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetIntegrationsOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetIntegrationsOutput) SetItems(v []*Integration) *GetIntegrationsOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetIntegrationsOutput) SetNextToken(v string) *GetIntegrationsOutput { + s.NextToken = &v + return s +} + +type GetModelInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // ModelId is a required field + ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.ModelId == nil { + invalidParams.Add(request.NewErrParamRequired("ModelId")) + } + if s.ModelId != nil && len(*s.ModelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetModelInput) SetApiId(v string) *GetModelInput { + s.ApiId = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *GetModelInput) SetModelId(v string) *GetModelInput { + s.ModelId = &v + return s +} + +type GetModelOutput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-256]. + ContentType *string `locationName:"contentType" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // An API Gateway-generated, unique identifier. + ModelId *string `locationName:"modelId" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A string with a length between [0-32768]. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s GetModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetModelOutput) GoString() string { + return s.String() +} + +// SetContentType sets the ContentType field's value. +func (s *GetModelOutput) SetContentType(v string) *GetModelOutput { + s.ContentType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetModelOutput) SetDescription(v string) *GetModelOutput { + s.Description = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *GetModelOutput) SetModelId(v string) *GetModelOutput { + s.ModelId = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetModelOutput) SetName(v string) *GetModelOutput { + s.Name = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *GetModelOutput) SetSchema(v string) *GetModelOutput { + s.Schema = &v + return s +} + +type GetModelTemplateInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // ModelId is a required field + ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetModelTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetModelTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelTemplateInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.ModelId == nil { + invalidParams.Add(request.NewErrParamRequired("ModelId")) + } + if s.ModelId != nil && len(*s.ModelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetModelTemplateInput) SetApiId(v string) *GetModelTemplateInput { + s.ApiId = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *GetModelTemplateInput) SetModelId(v string) *GetModelTemplateInput { + s.ModelId = &v + return s +} + +type GetModelTemplateOutput struct { + _ struct{} `type:"structure"` + + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s GetModelTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetModelTemplateOutput) GoString() string { + return s.String() +} + +// SetValue sets the Value field's value. +func (s *GetModelTemplateOutput) SetValue(v string) *GetModelTemplateOutput { + s.Value = &v + return s +} + +type GetModelsInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetModelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetModelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelsInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetModelsInput) SetApiId(v string) *GetModelsInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetModelsInput) SetMaxResults(v string) *GetModelsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetModelsInput) SetNextToken(v string) *GetModelsInput { + s.NextToken = &v + return s +} + +type GetModelsOutput struct { + _ struct{} `type:"structure"` + + Items []*Model `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetModelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetModelsOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetModelsOutput) SetItems(v []*Model) *GetModelsOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetModelsOutput) SetNextToken(v string) *GetModelsOutput { + s.NextToken = &v + return s +} + +type GetRouteInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRouteInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetRouteInput) SetApiId(v string) *GetRouteInput { + s.ApiId = &v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *GetRouteInput) SetRouteId(v string) *GetRouteInput { + s.RouteId = &v + return s +} + +type GetRouteOutput struct { + _ struct{} `type:"structure"` + + ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` + + // A list of authorization scopes configured on a route. The scopes are used + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the route scopes against the scopes parsed + // from the access token in the incoming request. The method invocation is authorized + // if any route scope matches a claimed scope in the access token. Otherwise, + // the invocation is not authorized. When the route scope is configured, the + // client must provide an access token instead of an identity token for authorization + // purposes. + AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` + + // The authorization type. Valid values are NONE for open access, AWS_IAM for + // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. + AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + OperationName *string `locationName:"operationName" type:"string"` + + // The route models. + RequestModels map[string]*string `locationName:"requestModels" type:"map"` + + // The route parameters. + RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` + + // An API Gateway-generated, unique identifier. + RouteId *string `locationName:"routeId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteKey *string `locationName:"routeKey" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` + + // A string with a length between [1-128]. + Target *string `locationName:"target" type:"string"` +} + +// String returns the string representation +func (s GetRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRouteOutput) GoString() string { + return s.String() +} + +// SetApiKeyRequired sets the ApiKeyRequired field's value. +func (s *GetRouteOutput) SetApiKeyRequired(v bool) *GetRouteOutput { + s.ApiKeyRequired = &v + return s +} + +// SetAuthorizationScopes sets the AuthorizationScopes field's value. +func (s *GetRouteOutput) SetAuthorizationScopes(v []*string) *GetRouteOutput { + s.AuthorizationScopes = v + return s +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *GetRouteOutput) SetAuthorizationType(v string) *GetRouteOutput { + s.AuthorizationType = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *GetRouteOutput) SetAuthorizerId(v string) *GetRouteOutput { + s.AuthorizerId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *GetRouteOutput) SetModelSelectionExpression(v string) *GetRouteOutput { + s.ModelSelectionExpression = &v + return s +} + +// SetOperationName sets the OperationName field's value. +func (s *GetRouteOutput) SetOperationName(v string) *GetRouteOutput { + s.OperationName = &v + return s +} + +// SetRequestModels sets the RequestModels field's value. +func (s *GetRouteOutput) SetRequestModels(v map[string]*string) *GetRouteOutput { + s.RequestModels = v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *GetRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *GetRouteOutput { + s.RequestParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *GetRouteOutput) SetRouteId(v string) *GetRouteOutput { + s.RouteId = &v + return s +} + +// SetRouteKey sets the RouteKey field's value. +func (s *GetRouteOutput) SetRouteKey(v string) *GetRouteOutput { + s.RouteKey = &v + return s +} + +// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. +func (s *GetRouteOutput) SetRouteResponseSelectionExpression(v string) *GetRouteOutput { + s.RouteResponseSelectionExpression = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *GetRouteOutput) SetTarget(v string) *GetRouteOutput { + s.Target = &v + return s +} + +type GetRouteResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` + + // RouteResponseId is a required field + RouteResponseId *string `location:"uri" locationName:"routeResponseId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRouteResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRouteResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRouteResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRouteResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + if s.RouteResponseId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteResponseId")) + } + if s.RouteResponseId != nil && len(*s.RouteResponseId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteResponseId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetRouteResponseInput) SetApiId(v string) *GetRouteResponseInput { + s.ApiId = &v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *GetRouteResponseInput) SetRouteId(v string) *GetRouteResponseInput { + s.RouteId = &v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *GetRouteResponseInput) SetRouteResponseId(v string) *GetRouteResponseInput { + s.RouteResponseId = &v + return s +} + +type GetRouteResponseOutput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // The route models. + ResponseModels map[string]*string `locationName:"responseModels" type:"map"` + + // The route parameters. + ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` + + // An API Gateway-generated, unique identifier. + RouteResponseId *string `locationName:"routeResponseId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` +} + +// String returns the string representation +func (s GetRouteResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRouteResponseOutput) GoString() string { + return s.String() +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *GetRouteResponseOutput) SetModelSelectionExpression(v string) *GetRouteResponseOutput { + s.ModelSelectionExpression = &v + return s +} + +// SetResponseModels sets the ResponseModels field's value. +func (s *GetRouteResponseOutput) SetResponseModels(v map[string]*string) *GetRouteResponseOutput { + s.ResponseModels = v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *GetRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *GetRouteResponseOutput { + s.ResponseParameters = v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *GetRouteResponseOutput) SetRouteResponseId(v string) *GetRouteResponseOutput { + s.RouteResponseId = &v + return s +} + +// SetRouteResponseKey sets the RouteResponseKey field's value. +func (s *GetRouteResponseOutput) SetRouteResponseKey(v string) *GetRouteResponseOutput { + s.RouteResponseKey = &v + return s +} + +type GetRouteResponsesInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRouteResponsesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRouteResponsesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRouteResponsesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRouteResponsesInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetRouteResponsesInput) SetApiId(v string) *GetRouteResponsesInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetRouteResponsesInput) SetMaxResults(v string) *GetRouteResponsesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetRouteResponsesInput) SetNextToken(v string) *GetRouteResponsesInput { + s.NextToken = &v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *GetRouteResponsesInput) SetRouteId(v string) *GetRouteResponsesInput { + s.RouteId = &v + return s +} + +type GetRouteResponsesOutput struct { + _ struct{} `type:"structure"` + + Items []*RouteResponse `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetRouteResponsesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRouteResponsesOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetRouteResponsesOutput) SetItems(v []*RouteResponse) *GetRouteResponsesOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetRouteResponsesOutput) SetNextToken(v string) *GetRouteResponsesOutput { + s.NextToken = &v + return s +} + +type GetRoutesInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetRoutesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRoutesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRoutesInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetRoutesInput) SetApiId(v string) *GetRoutesInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetRoutesInput) SetMaxResults(v string) *GetRoutesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetRoutesInput) SetNextToken(v string) *GetRoutesInput { + s.NextToken = &v + return s +} + +type GetRoutesOutput struct { + _ struct{} `type:"structure"` + + Items []*Route `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetRoutesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRoutesOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetRoutesOutput) SetItems(v []*Route) *GetRoutesOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetRoutesOutput) SetNextToken(v string) *GetRoutesOutput { + s.NextToken = &v + return s +} + +type GetStageInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // StageName is a required field + StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStageInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetStageInput) SetApiId(v string) *GetStageInput { + s.ApiId = &v + return s +} + +// SetStageName sets the StageName field's value. +func (s *GetStageInput) SetStageName(v string) *GetStageInput { + s.StageName = &v + return s +} + +type GetStageOutput struct { + _ struct{} `type:"structure"` + + // Settings for logging access in a stage. + AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // Represents a collection of route settings. + DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` + + // The route settings map. + RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` + + // A string with a length between [1-128]. + StageName *string `locationName:"stageName" type:"string"` + + // The stage variable map. + StageVariables map[string]*string `locationName:"stageVariables" type:"map"` +} + +// String returns the string representation +func (s GetStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetStageOutput) GoString() string { + return s.String() +} + +// SetAccessLogSettings sets the AccessLogSettings field's value. +func (s *GetStageOutput) SetAccessLogSettings(v *AccessLogSettings) *GetStageOutput { + s.AccessLogSettings = v + return s +} + +// SetClientCertificateId sets the ClientCertificateId field's value. +func (s *GetStageOutput) SetClientCertificateId(v string) *GetStageOutput { + s.ClientCertificateId = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetStageOutput) SetCreatedDate(v time.Time) *GetStageOutput { + s.CreatedDate = &v + return s +} + +// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. +func (s *GetStageOutput) SetDefaultRouteSettings(v *RouteSettings) *GetStageOutput { + s.DefaultRouteSettings = v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *GetStageOutput) SetDeploymentId(v string) *GetStageOutput { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetStageOutput) SetDescription(v string) *GetStageOutput { + s.Description = &v + return s +} + +// SetLastUpdatedDate sets the LastUpdatedDate field's value. +func (s *GetStageOutput) SetLastUpdatedDate(v time.Time) *GetStageOutput { + s.LastUpdatedDate = &v + return s +} + +// SetRouteSettings sets the RouteSettings field's value. +func (s *GetStageOutput) SetRouteSettings(v map[string]*RouteSettings) *GetStageOutput { + s.RouteSettings = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *GetStageOutput) SetStageName(v string) *GetStageOutput { + s.StageName = &v + return s +} + +// SetStageVariables sets the StageVariables field's value. +func (s *GetStageOutput) SetStageVariables(v map[string]*string) *GetStageOutput { + s.StageVariables = v + return s +} + +type GetStagesInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + MaxResults *string `location:"querystring" locationName:"maxResults" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetStagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetStagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetStagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStagesInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetStagesInput) SetApiId(v string) *GetStagesInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetStagesInput) SetMaxResults(v string) *GetStagesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetStagesInput) SetNextToken(v string) *GetStagesInput { + s.NextToken = &v + return s +} + +type GetStagesOutput struct { + _ struct{} `type:"structure"` + + Items []*Stage `locationName:"items" type:"list"` + + // The next page of elements from this collection. Not valid for the last element + // of the collection. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s GetStagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetStagesOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *GetStagesOutput) SetItems(v []*Stage) *GetStagesOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetStagesOutput) SetNextToken(v string) *GetStagesOutput { + s.NextToken = &v + return s +} + +// Represents an integration. +type Integration struct { + _ struct{} `type:"structure"` + + // The identifier of the VpcLink used for the integration when the connectionType + // is VPC_LINK; otherwise undefined. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The type of the network connection to the integration endpoint. The valid + // value is INTERNET for connections through the public routable internet or + // VPC_LINK for private connections between API Gateway and a network load balancer + // in a VPC. The default value is INTERNET. + ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` + + // Specifies how to handle response payload content type conversions. Supported + // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: + // + // CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string + // to the corresponding binary blob. + // + // CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded + // string. + // + // If this property is not defined, the response payload will be passed through + // from the integration response to the route response or method response without + // modification. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // Specifies the credentials required for the integration, if any. For AWS integrations, + // three options are available. To specify an IAM Role for API Gateway to assume, + // use the role's Amazon Resource Name (ARN). To require that the caller's identity + // be passed through from the request, specify the string arn:aws:iam::*:user/*. + // To use resource-based permissions on supported AWS services, specify null. + CredentialsArn *string `locationName:"credentialsArn" type:"string"` + + // Represents the description of an integration. + Description *string `locationName:"description" type:"string"` + + // Represents the identifier of an integration. + IntegrationId *string `locationName:"integrationId" type:"string"` + + // Specifies the integration's HTTP method type. + IntegrationMethod *string `locationName:"integrationMethod" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` + + // The integration type of an integration. One of the following: + // + // AWS: for integrating the route or method request with an AWS service action, + // including the Lambda function-invoking action. With the Lambda function-invoking + // action, this is referred to as the Lambda custom integration. With any other + // AWS service action, this is known as AWS integration. + // + // AWS_PROXY: for integrating the route or method request with the Lambda function-invoking + // action with the client request passed through as-is. This integration is + // also referred to as Lambda proxy integration. + // + // HTTP: for integrating the route or method request with an HTTP endpoint, + // including a private HTTP endpoint within a VPC. This integration is also + // referred to as the HTTP custom integration. + // + // HTTP_PROXY: for integrating route or method request with an HTTP endpoint, + // including a private HTTP endpoint within a VPC, with the client request passed + // through as-is. This is also referred to as HTTP proxy integration. + // + // MOCK: for integrating the route or method request with API Gateway as a "loopback" + // endpoint without invoking any backend. + IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` + + // Specifies the Uniform Resource Identifier (URI) of the integration endpoint. + // + // For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded + // HTTP(S) URL according to the RFC-3986 specification (https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), + // for either standard integration, where connectionType is not VPC_LINK, or + // private integration, where connectionType is VPC_LINK. For a private HTTP + // integration, the URI is not used for routing. + // + // For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. + // Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is + // the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated + // subdomain supported by certain AWS service for fast host-name lookup. action + // can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... + // query string. The ensuing {service_api} refers to a supported action {name} + // plus any required input parameters. Alternatively, path can be used for an + // AWS service path-based API. The ensuing service_api refers to the path to + // an AWS service resource, including the region of the integrated AWS service, + // if applicable. For example, for integration with the S3 API of GetObject, + // the URI can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} + // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} + IntegrationUri *string `locationName:"integrationUri" type:"string"` + + // Specifies the pass-through behavior for incoming requests based on the Content-Type + // header in the request, and the available mapping templates specified as the + // requestTemplates property on the Integration resource. There are three valid + // values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. + // + // WHEN_NO_MATCH passes the request body for unmapped content types through + // to the integration backend without transformation. + // + // NEVER rejects unmapped content types with an HTTP 415 Unsupported Media Type + // response. + // + // WHEN_NO_TEMPLATES allows pass-through when the integration has no content + // types mapped to templates. However, if there is at least one content type + // defined, unmapped content types will be rejected with the same HTTP 415 Unsupported + // Media Type response. + PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` + + // A key-value map specifying request parameters that are passed from the method + // request to the backend. The key is an integration request parameter name + // and the associated value is a method request parameter value or static value + // that must be enclosed within single quotes and pre-encoded as required by + // the backend. The method request parameter value must match the pattern of + // method.request.{location}.{name} , where {location} is querystring, path, + // or header; and {name} must be a valid and unique method request parameter + // name. + RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` + + // Represents a map of Velocity templates that are applied on the request payload + // based on the value of the Content-Type header sent by the client. The content + // type value is the key in this map, and the template (as a String) is the + // value. + RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` + + // The template selection expression for the integration. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` + + // Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 + // milliseconds or 29 seconds. + TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` +} + +// String returns the string representation +func (s Integration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Integration) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *Integration) SetConnectionId(v string) *Integration { + s.ConnectionId = &v + return s +} + +// SetConnectionType sets the ConnectionType field's value. +func (s *Integration) SetConnectionType(v string) *Integration { + s.ConnectionType = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *Integration) SetContentHandlingStrategy(v string) *Integration { + s.ContentHandlingStrategy = &v + return s +} + +// SetCredentialsArn sets the CredentialsArn field's value. +func (s *Integration) SetCredentialsArn(v string) *Integration { + s.CredentialsArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Integration) SetDescription(v string) *Integration { + s.Description = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *Integration) SetIntegrationId(v string) *Integration { + s.IntegrationId = &v + return s +} + +// SetIntegrationMethod sets the IntegrationMethod field's value. +func (s *Integration) SetIntegrationMethod(v string) *Integration { + s.IntegrationMethod = &v + return s +} + +// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. +func (s *Integration) SetIntegrationResponseSelectionExpression(v string) *Integration { + s.IntegrationResponseSelectionExpression = &v + return s +} + +// SetIntegrationType sets the IntegrationType field's value. +func (s *Integration) SetIntegrationType(v string) *Integration { + s.IntegrationType = &v + return s +} + +// SetIntegrationUri sets the IntegrationUri field's value. +func (s *Integration) SetIntegrationUri(v string) *Integration { + s.IntegrationUri = &v + return s +} + +// SetPassthroughBehavior sets the PassthroughBehavior field's value. +func (s *Integration) SetPassthroughBehavior(v string) *Integration { + s.PassthroughBehavior = &v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *Integration) SetRequestParameters(v map[string]*string) *Integration { + s.RequestParameters = v + return s +} + +// SetRequestTemplates sets the RequestTemplates field's value. +func (s *Integration) SetRequestTemplates(v map[string]*string) *Integration { + s.RequestTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *Integration) SetTemplateSelectionExpression(v string) *Integration { + s.TemplateSelectionExpression = &v + return s +} + +// SetTimeoutInMillis sets the TimeoutInMillis field's value. +func (s *Integration) SetTimeoutInMillis(v int64) *Integration { + s.TimeoutInMillis = &v + return s +} + +// Represents an integration response. +type IntegrationResponse struct { + _ struct{} `type:"structure"` + + // Specifies how to handle response payload content type conversions. Supported + // values are CONVERT_TO_BINARY and CONVERT_TO_TEXT, with the following behaviors: + // + // CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded string + // to the corresponding binary blob. + // + // CONVERT_TO_TEXT: Converts a response payload from a binary blob to a Base64-encoded + // string. + // + // If this property is not defined, the response payload will be passed through + // from the integration response to the route response or method response without + // modification. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // The integration response ID. + IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` + + // The integration response key. + // + // IntegrationResponseKey is a required field + IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string" required:"true"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // The collection of response templates for the integration response as a string-to-string + // map of key-value pairs. Response templates are represented as a key/value + // map, with a content-type as the key and a template as the value. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // The template selection expressions for the integration response. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` +} + +// String returns the string representation +func (s IntegrationResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IntegrationResponse) GoString() string { + return s.String() +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *IntegrationResponse) SetContentHandlingStrategy(v string) *IntegrationResponse { + s.ContentHandlingStrategy = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *IntegrationResponse) SetIntegrationResponseId(v string) *IntegrationResponse { + s.IntegrationResponseId = &v + return s +} + +// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. +func (s *IntegrationResponse) SetIntegrationResponseKey(v string) *IntegrationResponse { + s.IntegrationResponseKey = &v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *IntegrationResponse) SetResponseParameters(v map[string]*string) *IntegrationResponse { + s.ResponseParameters = v + return s +} + +// SetResponseTemplates sets the ResponseTemplates field's value. +func (s *IntegrationResponse) SetResponseTemplates(v map[string]*string) *IntegrationResponse { + s.ResponseTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *IntegrationResponse) SetTemplateSelectionExpression(v string) *IntegrationResponse { + s.TemplateSelectionExpression = &v + return s +} + +// Represents a data model for an API. See Create Models and Mapping Templates +// for Request and Response Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html). +type Model struct { + _ struct{} `type:"structure"` + + // The content-type for the model, for example, "application/json". + ContentType *string `locationName:"contentType" type:"string"` + + // The description of the model. + Description *string `locationName:"description" type:"string"` + + // The model identifier. + ModelId *string `locationName:"modelId" type:"string"` + + // The name of the model. Must be alphanumeric. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The schema for the model. For application/json models, this should be JSON + // schema draft 4 model. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s Model) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Model) GoString() string { + return s.String() +} + +// SetContentType sets the ContentType field's value. +func (s *Model) SetContentType(v string) *Model { + s.ContentType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Model) SetDescription(v string) *Model { + s.Description = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *Model) SetModelId(v string) *Model { + s.ModelId = &v + return s +} + +// SetName sets the Name field's value. +func (s *Model) SetName(v string) *Model { + s.Name = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *Model) SetSchema(v string) *Model { + s.Schema = &v + return s +} + +// Validation constraints imposed on parameters of a request (path, query string, +// headers). +type ParameterConstraints struct { + _ struct{} `type:"structure"` + + // Whether or not the parameter is required. + Required *bool `locationName:"required" type:"boolean"` +} + +// String returns the string representation +func (s ParameterConstraints) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterConstraints) GoString() string { + return s.String() +} + +// SetRequired sets the Required field's value. +func (s *ParameterConstraints) SetRequired(v bool) *ParameterConstraints { + s.Required = &v + return s +} + +// Represents a route. +type Route struct { + _ struct{} `type:"structure"` + + // Specifies whether an API key is required for this route. + ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` + + // The authorization scopes supported by this route. + AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` + + // The authorization type for the route. Valid values are NONE for open access, + // AWS_IAM for using AWS IAM permissions. + AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` + + // The identifier of the Authorizer resource to be associated with this route. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // The model selection expression for the route. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // The operation name for the route. + OperationName *string `locationName:"operationName" type:"string"` + + // The request models for the route. + RequestModels map[string]*string `locationName:"requestModels" type:"map"` + + // The request parameters for the route. + RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` + + // The route ID. + RouteId *string `locationName:"routeId" type:"string"` + + // The route key for the route. + // + // RouteKey is a required field + RouteKey *string `locationName:"routeKey" type:"string" required:"true"` + + // The route response selection expression for the route. + RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` + + // The target for the route. + Target *string `locationName:"target" type:"string"` +} + +// String returns the string representation +func (s Route) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Route) GoString() string { + return s.String() +} + +// SetApiKeyRequired sets the ApiKeyRequired field's value. +func (s *Route) SetApiKeyRequired(v bool) *Route { + s.ApiKeyRequired = &v + return s +} + +// SetAuthorizationScopes sets the AuthorizationScopes field's value. +func (s *Route) SetAuthorizationScopes(v []*string) *Route { + s.AuthorizationScopes = v + return s +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *Route) SetAuthorizationType(v string) *Route { + s.AuthorizationType = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *Route) SetAuthorizerId(v string) *Route { + s.AuthorizerId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *Route) SetModelSelectionExpression(v string) *Route { + s.ModelSelectionExpression = &v + return s +} + +// SetOperationName sets the OperationName field's value. +func (s *Route) SetOperationName(v string) *Route { + s.OperationName = &v + return s +} + +// SetRequestModels sets the RequestModels field's value. +func (s *Route) SetRequestModels(v map[string]*string) *Route { + s.RequestModels = v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *Route) SetRequestParameters(v map[string]*ParameterConstraints) *Route { + s.RequestParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *Route) SetRouteId(v string) *Route { + s.RouteId = &v + return s +} + +// SetRouteKey sets the RouteKey field's value. +func (s *Route) SetRouteKey(v string) *Route { + s.RouteKey = &v + return s +} + +// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. +func (s *Route) SetRouteResponseSelectionExpression(v string) *Route { + s.RouteResponseSelectionExpression = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *Route) SetTarget(v string) *Route { + s.Target = &v + return s +} + +// Represents a route response. +type RouteResponse struct { + _ struct{} `type:"structure"` + + // Represents the model selection expression of a route response. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // Represents the response models of a route response. + ResponseModels map[string]*string `locationName:"responseModels" type:"map"` + + // Represents the response parameters of a route response. + ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` + + // Represents the identifier of a route response. + RouteResponseId *string `locationName:"routeResponseId" type:"string"` + + // Represents the route response key of a route response. + // + // RouteResponseKey is a required field + RouteResponseKey *string `locationName:"routeResponseKey" type:"string" required:"true"` +} + +// String returns the string representation +func (s RouteResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteResponse) GoString() string { + return s.String() +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *RouteResponse) SetModelSelectionExpression(v string) *RouteResponse { + s.ModelSelectionExpression = &v + return s +} + +// SetResponseModels sets the ResponseModels field's value. +func (s *RouteResponse) SetResponseModels(v map[string]*string) *RouteResponse { + s.ResponseModels = v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *RouteResponse) SetResponseParameters(v map[string]*ParameterConstraints) *RouteResponse { + s.ResponseParameters = v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *RouteResponse) SetRouteResponseId(v string) *RouteResponse { + s.RouteResponseId = &v + return s +} + +// SetRouteResponseKey sets the RouteResponseKey field's value. +func (s *RouteResponse) SetRouteResponseKey(v string) *RouteResponse { + s.RouteResponseKey = &v + return s +} + +// Represents a collection of route settings. +type RouteSettings struct { + _ struct{} `type:"structure"` + + // Specifies whether (true) or not (false) data trace logging is enabled for + // this route. This property affects the log entries pushed to Amazon CloudWatch + // Logs. + DataTraceEnabled *bool `locationName:"dataTraceEnabled" type:"boolean"` + + // Specifies whether detailed metrics are enabled. + DetailedMetricsEnabled *bool `locationName:"detailedMetricsEnabled" type:"boolean"` + + // Specifies the logging level for this route: DEBUG, INFO, or WARN. This property + // affects the log entries pushed to Amazon CloudWatch Logs. + LoggingLevel *string `locationName:"loggingLevel" type:"string" enum:"LoggingLevel"` + + // Specifies the throttling burst limit. + ThrottlingBurstLimit *int64 `locationName:"throttlingBurstLimit" type:"integer"` + + // Specifies the throttling rate limit. + ThrottlingRateLimit *float64 `locationName:"throttlingRateLimit" type:"double"` +} + +// String returns the string representation +func (s RouteSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RouteSettings) GoString() string { + return s.String() +} + +// SetDataTraceEnabled sets the DataTraceEnabled field's value. +func (s *RouteSettings) SetDataTraceEnabled(v bool) *RouteSettings { + s.DataTraceEnabled = &v + return s +} + +// SetDetailedMetricsEnabled sets the DetailedMetricsEnabled field's value. +func (s *RouteSettings) SetDetailedMetricsEnabled(v bool) *RouteSettings { + s.DetailedMetricsEnabled = &v + return s +} + +// SetLoggingLevel sets the LoggingLevel field's value. +func (s *RouteSettings) SetLoggingLevel(v string) *RouteSettings { + s.LoggingLevel = &v + return s +} + +// SetThrottlingBurstLimit sets the ThrottlingBurstLimit field's value. +func (s *RouteSettings) SetThrottlingBurstLimit(v int64) *RouteSettings { + s.ThrottlingBurstLimit = &v + return s +} + +// SetThrottlingRateLimit sets the ThrottlingRateLimit field's value. +func (s *RouteSettings) SetThrottlingRateLimit(v float64) *RouteSettings { + s.ThrottlingRateLimit = &v + return s +} + +// Represents an API stage. +type Stage struct { + _ struct{} `type:"structure"` + + // Settings for logging access in this stage. + AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` + + // The identifier of a client certificate for a Stage. + ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + + // The timestamp when the stage was created. + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // Default route settings for the stage. + DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` + + // The identifier of the Deployment that the Stage is associated with. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The description of the stage. + Description *string `locationName:"description" type:"string"` + + // The timestamp when the stage was last updated. + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` + + // Route settings for the stage. + RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` + + // The name of the stage. + // + // StageName is a required field + StageName *string `locationName:"stageName" type:"string" required:"true"` + + // A map that defines the stage variables for a stage resource. Variable names + // can have alphanumeric and underscore characters, and the values must match + // [A-Za-z0-9-._~:/?#&=,]+. + StageVariables map[string]*string `locationName:"stageVariables" type:"map"` +} + +// String returns the string representation +func (s Stage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Stage) GoString() string { + return s.String() +} + +// SetAccessLogSettings sets the AccessLogSettings field's value. +func (s *Stage) SetAccessLogSettings(v *AccessLogSettings) *Stage { + s.AccessLogSettings = v + return s +} + +// SetClientCertificateId sets the ClientCertificateId field's value. +func (s *Stage) SetClientCertificateId(v string) *Stage { + s.ClientCertificateId = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *Stage) SetCreatedDate(v time.Time) *Stage { + s.CreatedDate = &v + return s +} + +// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. +func (s *Stage) SetDefaultRouteSettings(v *RouteSettings) *Stage { + s.DefaultRouteSettings = v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *Stage) SetDeploymentId(v string) *Stage { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Stage) SetDescription(v string) *Stage { + s.Description = &v + return s +} + +// SetLastUpdatedDate sets the LastUpdatedDate field's value. +func (s *Stage) SetLastUpdatedDate(v time.Time) *Stage { + s.LastUpdatedDate = &v + return s +} + +// SetRouteSettings sets the RouteSettings field's value. +func (s *Stage) SetRouteSettings(v map[string]*RouteSettings) *Stage { + s.RouteSettings = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *Stage) SetStageName(v string) *Stage { + s.StageName = &v + return s +} + +// SetStageVariables sets the StageVariables field's value. +func (s *Stage) SetStageVariables(v map[string]*string) *Stage { + s.StageVariables = v + return s +} + +type UpdateApiInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + Version *string `locationName:"version" type:"string"` +} + +// String returns the string representation +func (s UpdateApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApiInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateApiInput) SetApiId(v string) *UpdateApiInput { + s.ApiId = &v + return s +} + +// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. +func (s *UpdateApiInput) SetApiKeySelectionExpression(v string) *UpdateApiInput { + s.ApiKeySelectionExpression = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateApiInput) SetDescription(v string) *UpdateApiInput { + s.Description = &v + return s +} + +// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. +func (s *UpdateApiInput) SetDisableSchemaValidation(v bool) *UpdateApiInput { + s.DisableSchemaValidation = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateApiInput) SetName(v string) *UpdateApiInput { + s.Name = &v + return s +} + +// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. +func (s *UpdateApiInput) SetRouteSelectionExpression(v string) *UpdateApiInput { + s.RouteSelectionExpression = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *UpdateApiInput) SetVersion(v string) *UpdateApiInput { + s.Version = &v + return s +} + +type UpdateApiMappingInput struct { + _ struct{} `type:"structure"` + + // An API Gateway-generated, unique identifier. + // + // ApiId is a required field + ApiId *string `locationName:"apiId" type:"string" required:"true"` + + // ApiMappingId is a required field + ApiMappingId *string `location:"uri" locationName:"apiMappingId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` + + // A string with a length between [1-128]. + Stage *string `locationName:"stage" type:"string"` +} + +// String returns the string representation +func (s UpdateApiMappingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApiMappingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApiMappingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApiMappingInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiMappingId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiMappingId")) + } + if s.ApiMappingId != nil && len(*s.ApiMappingId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiMappingId", 1)) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateApiMappingInput) SetApiId(v string) *UpdateApiMappingInput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *UpdateApiMappingInput) SetApiMappingId(v string) *UpdateApiMappingInput { + s.ApiMappingId = &v + return s +} + +// SetApiMappingKey sets the ApiMappingKey field's value. +func (s *UpdateApiMappingInput) SetApiMappingKey(v string) *UpdateApiMappingInput { + s.ApiMappingKey = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateApiMappingInput) SetDomainName(v string) *UpdateApiMappingInput { + s.DomainName = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *UpdateApiMappingInput) SetStage(v string) *UpdateApiMappingInput { + s.Stage = &v + return s +} + +type UpdateApiMappingOutput struct { + _ struct{} `type:"structure"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiMappingId *string `locationName:"apiMappingId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + ApiMappingKey *string `locationName:"apiMappingKey" type:"string"` + + // A string with a length between [1-128]. + Stage *string `locationName:"stage" type:"string"` +} + +// String returns the string representation +func (s UpdateApiMappingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApiMappingOutput) GoString() string { + return s.String() +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateApiMappingOutput) SetApiId(v string) *UpdateApiMappingOutput { + s.ApiId = &v + return s +} + +// SetApiMappingId sets the ApiMappingId field's value. +func (s *UpdateApiMappingOutput) SetApiMappingId(v string) *UpdateApiMappingOutput { + s.ApiMappingId = &v + return s +} + +// SetApiMappingKey sets the ApiMappingKey field's value. +func (s *UpdateApiMappingOutput) SetApiMappingKey(v string) *UpdateApiMappingOutput { + s.ApiMappingKey = &v + return s +} + +// SetStage sets the Stage field's value. +func (s *UpdateApiMappingOutput) SetStage(v string) *UpdateApiMappingOutput { + s.Stage = &v + return s +} + +type UpdateApiOutput struct { + _ struct{} `type:"structure"` + + ApiEndpoint *string `locationName:"apiEndpoint" type:"string"` + + // An API Gateway-generated, unique identifier. + ApiId *string `locationName:"apiId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiKeySelectionExpression *string `locationName:"apiKeySelectionExpression" type:"string"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + DisableSchemaValidation *bool `locationName:"disableSchemaValidation" type:"boolean"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + ProtocolType *string `locationName:"protocolType" type:"string" enum:"ProtocolType"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteSelectionExpression *string `locationName:"routeSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + Version *string `locationName:"version" type:"string"` + + Warnings []*string `locationName:"warnings" type:"list"` +} + +// String returns the string representation +func (s UpdateApiOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApiOutput) GoString() string { + return s.String() +} + +// SetApiEndpoint sets the ApiEndpoint field's value. +func (s *UpdateApiOutput) SetApiEndpoint(v string) *UpdateApiOutput { + s.ApiEndpoint = &v + return s +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateApiOutput) SetApiId(v string) *UpdateApiOutput { + s.ApiId = &v + return s +} + +// SetApiKeySelectionExpression sets the ApiKeySelectionExpression field's value. +func (s *UpdateApiOutput) SetApiKeySelectionExpression(v string) *UpdateApiOutput { + s.ApiKeySelectionExpression = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *UpdateApiOutput) SetCreatedDate(v time.Time) *UpdateApiOutput { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateApiOutput) SetDescription(v string) *UpdateApiOutput { + s.Description = &v + return s +} + +// SetDisableSchemaValidation sets the DisableSchemaValidation field's value. +func (s *UpdateApiOutput) SetDisableSchemaValidation(v bool) *UpdateApiOutput { + s.DisableSchemaValidation = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateApiOutput) SetName(v string) *UpdateApiOutput { + s.Name = &v + return s +} + +// SetProtocolType sets the ProtocolType field's value. +func (s *UpdateApiOutput) SetProtocolType(v string) *UpdateApiOutput { + s.ProtocolType = &v + return s +} + +// SetRouteSelectionExpression sets the RouteSelectionExpression field's value. +func (s *UpdateApiOutput) SetRouteSelectionExpression(v string) *UpdateApiOutput { + s.RouteSelectionExpression = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *UpdateApiOutput) SetVersion(v string) *UpdateApiOutput { + s.Version = &v + return s +} + +// SetWarnings sets the Warnings field's value. +func (s *UpdateApiOutput) SetWarnings(v []*string) *UpdateApiOutput { + s.Warnings = v + return s +} + +type UpdateAuthorizerInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // Represents an Amazon Resource Name (ARN). + AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` + + // AuthorizerId is a required field + AuthorizerId *string `location:"uri" locationName:"authorizerId" type:"string" required:"true"` + + // An integer with a value between [0-3600]. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // The authorizer type. Currently the only valid value is REQUEST, for a Lambda + // function using incoming request parameters. + AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` + + // A string representation of a URI with a length between [1-2048]. + AuthorizerUri *string `locationName:"authorizerUri" type:"string"` + + // The identity source for which authorization is requested. + // + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is $method.request.header.Auth, + // $method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. + IdentitySource []*string `locationName:"identitySource" type:"list"` + + // A string with a length between [0-1024]. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // For REQUEST authorizer, this is not defined. + ProviderArns []*string `locationName:"providerArns" type:"list"` +} + +// String returns the string representation +func (s UpdateAuthorizerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAuthorizerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAuthorizerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAuthorizerInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.AuthorizerId == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) + } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateAuthorizerInput) SetApiId(v string) *UpdateAuthorizerInput { + s.ApiId = &v + return s +} + +// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. +func (s *UpdateAuthorizerInput) SetAuthorizerCredentialsArn(v string) *UpdateAuthorizerInput { + s.AuthorizerCredentialsArn = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *UpdateAuthorizerInput) SetAuthorizerId(v string) *UpdateAuthorizerInput { + s.AuthorizerId = &v + return s +} + +// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. +func (s *UpdateAuthorizerInput) SetAuthorizerResultTtlInSeconds(v int64) *UpdateAuthorizerInput { + s.AuthorizerResultTtlInSeconds = &v + return s +} + +// SetAuthorizerType sets the AuthorizerType field's value. +func (s *UpdateAuthorizerInput) SetAuthorizerType(v string) *UpdateAuthorizerInput { + s.AuthorizerType = &v + return s +} + +// SetAuthorizerUri sets the AuthorizerUri field's value. +func (s *UpdateAuthorizerInput) SetAuthorizerUri(v string) *UpdateAuthorizerInput { + s.AuthorizerUri = &v + return s +} + +// SetIdentitySource sets the IdentitySource field's value. +func (s *UpdateAuthorizerInput) SetIdentitySource(v []*string) *UpdateAuthorizerInput { + s.IdentitySource = v + return s +} + +// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. +func (s *UpdateAuthorizerInput) SetIdentityValidationExpression(v string) *UpdateAuthorizerInput { + s.IdentityValidationExpression = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateAuthorizerInput) SetName(v string) *UpdateAuthorizerInput { + s.Name = &v + return s +} + +// SetProviderArns sets the ProviderArns field's value. +func (s *UpdateAuthorizerInput) SetProviderArns(v []*string) *UpdateAuthorizerInput { + s.ProviderArns = v + return s +} + +type UpdateAuthorizerOutput struct { + _ struct{} `type:"structure"` + + // Represents an Amazon Resource Name (ARN). + AuthorizerCredentialsArn *string `locationName:"authorizerCredentialsArn" type:"string"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An integer with a value between [0-3600]. + AuthorizerResultTtlInSeconds *int64 `locationName:"authorizerResultTtlInSeconds" type:"integer"` + + // The authorizer type. Currently the only valid value is REQUEST, for a Lambda + // function using incoming request parameters. + AuthorizerType *string `locationName:"authorizerType" type:"string" enum:"AuthorizerType"` + + // A string representation of a URI with a length between [1-2048]. + AuthorizerUri *string `locationName:"authorizerUri" type:"string"` + + // The identity source for which authorization is requested. + // + // For the REQUEST authorizer, this is required when authorization caching is + // enabled. The value is a comma-separated string of one or more mapping expressions + // of the specified request parameters. For example, if an Auth header, a Name + // query string parameter are defined as identity sources, this value is $method.request.header.Auth, + // $method.request.querystring.Name. These parameters will be used to derive + // the authorization caching key and to perform runtime validation of the REQUEST + // authorizer by verifying all of the identity-related request parameters are + // present, not null and non-empty. Only when this is true does the authorizer + // invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized + // response without calling the Lambda function. The valid value is a string + // of comma-separated mapping expressions of the specified request parameters. + // When the authorization caching is not enabled, this property is optional. + IdentitySource []*string `locationName:"identitySource" type:"list"` + + // A string with a length between [0-1024]. + IdentityValidationExpression *string `locationName:"identityValidationExpression" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // For REQUEST authorizer, this is not defined. + ProviderArns []*string `locationName:"providerArns" type:"list"` +} + +// String returns the string representation +func (s UpdateAuthorizerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAuthorizerOutput) GoString() string { + return s.String() +} + +// SetAuthorizerCredentialsArn sets the AuthorizerCredentialsArn field's value. +func (s *UpdateAuthorizerOutput) SetAuthorizerCredentialsArn(v string) *UpdateAuthorizerOutput { + s.AuthorizerCredentialsArn = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *UpdateAuthorizerOutput) SetAuthorizerId(v string) *UpdateAuthorizerOutput { + s.AuthorizerId = &v + return s +} + +// SetAuthorizerResultTtlInSeconds sets the AuthorizerResultTtlInSeconds field's value. +func (s *UpdateAuthorizerOutput) SetAuthorizerResultTtlInSeconds(v int64) *UpdateAuthorizerOutput { + s.AuthorizerResultTtlInSeconds = &v + return s +} + +// SetAuthorizerType sets the AuthorizerType field's value. +func (s *UpdateAuthorizerOutput) SetAuthorizerType(v string) *UpdateAuthorizerOutput { + s.AuthorizerType = &v + return s +} + +// SetAuthorizerUri sets the AuthorizerUri field's value. +func (s *UpdateAuthorizerOutput) SetAuthorizerUri(v string) *UpdateAuthorizerOutput { + s.AuthorizerUri = &v + return s +} + +// SetIdentitySource sets the IdentitySource field's value. +func (s *UpdateAuthorizerOutput) SetIdentitySource(v []*string) *UpdateAuthorizerOutput { + s.IdentitySource = v + return s +} + +// SetIdentityValidationExpression sets the IdentityValidationExpression field's value. +func (s *UpdateAuthorizerOutput) SetIdentityValidationExpression(v string) *UpdateAuthorizerOutput { + s.IdentityValidationExpression = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateAuthorizerOutput) SetName(v string) *UpdateAuthorizerOutput { + s.Name = &v + return s +} + +// SetProviderArns sets the ProviderArns field's value. +func (s *UpdateAuthorizerOutput) SetProviderArns(v []*string) *UpdateAuthorizerOutput { + s.ProviderArns = v + return s +} + +type UpdateDeploymentInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // DeploymentId is a required field + DeploymentId *string `location:"uri" locationName:"deploymentId" type:"string" required:"true"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` +} + +// String returns the string representation +func (s UpdateDeploymentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeploymentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDeploymentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDeploymentInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.DeploymentId == nil { + invalidParams.Add(request.NewErrParamRequired("DeploymentId")) + } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateDeploymentInput) SetApiId(v string) *UpdateDeploymentInput { + s.ApiId = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *UpdateDeploymentInput) SetDeploymentId(v string) *UpdateDeploymentInput { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateDeploymentInput) SetDescription(v string) *UpdateDeploymentInput { + s.Description = &v + return s +} + +type UpdateDeploymentOutput struct { + _ struct{} `type:"structure"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // Represents a deployment status. + DeploymentStatus *string `locationName:"deploymentStatus" type:"string" enum:"DeploymentStatus"` + + DeploymentStatusMessage *string `locationName:"deploymentStatusMessage" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` +} + +// String returns the string representation +func (s UpdateDeploymentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDeploymentOutput) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *UpdateDeploymentOutput) SetCreatedDate(v time.Time) *UpdateDeploymentOutput { + s.CreatedDate = &v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *UpdateDeploymentOutput) SetDeploymentId(v string) *UpdateDeploymentOutput { + s.DeploymentId = &v + return s +} + +// SetDeploymentStatus sets the DeploymentStatus field's value. +func (s *UpdateDeploymentOutput) SetDeploymentStatus(v string) *UpdateDeploymentOutput { + s.DeploymentStatus = &v + return s +} + +// SetDeploymentStatusMessage sets the DeploymentStatusMessage field's value. +func (s *UpdateDeploymentOutput) SetDeploymentStatusMessage(v string) *UpdateDeploymentOutput { + s.DeploymentStatusMessage = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateDeploymentOutput) SetDescription(v string) *UpdateDeploymentOutput { + s.Description = &v + return s +} + +type UpdateDomainNameInput struct { + _ struct{} `type:"structure"` + + // DomainName is a required field + DomainName *string `location:"uri" locationName:"domainName" type:"string" required:"true"` + + // The domain name configurations. + DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` +} + +// String returns the string representation +func (s UpdateDomainNameInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainNameInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDomainNameInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDomainNameInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateDomainNameInput) SetDomainName(v string) *UpdateDomainNameInput { + s.DomainName = &v + return s +} + +// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. +func (s *UpdateDomainNameInput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *UpdateDomainNameInput { + s.DomainNameConfigurations = v + return s +} + +type UpdateDomainNameOutput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ApiMappingSelectionExpression *string `locationName:"apiMappingSelectionExpression" type:"string"` + + // A string with a length between [1-512]. + DomainName *string `locationName:"domainName" type:"string"` + + // The domain name configurations. + DomainNameConfigurations []*DomainNameConfiguration `locationName:"domainNameConfigurations" type:"list"` +} + +// String returns the string representation +func (s UpdateDomainNameOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDomainNameOutput) GoString() string { + return s.String() +} + +// SetApiMappingSelectionExpression sets the ApiMappingSelectionExpression field's value. +func (s *UpdateDomainNameOutput) SetApiMappingSelectionExpression(v string) *UpdateDomainNameOutput { + s.ApiMappingSelectionExpression = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateDomainNameOutput) SetDomainName(v string) *UpdateDomainNameOutput { + s.DomainName = &v + return s +} + +// SetDomainNameConfigurations sets the DomainNameConfigurations field's value. +func (s *UpdateDomainNameOutput) SetDomainNameConfigurations(v []*DomainNameConfiguration) *UpdateDomainNameOutput { + s.DomainNameConfigurations = v + return s +} + +type UpdateIntegrationInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A string with a length between [1-1024]. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // Represents a connection type. + ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // Represents an Amazon Resource Name (ARN). + CredentialsArn *string `locationName:"credentialsArn" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` + + // A string with a length between [1-64]. + IntegrationMethod *string `locationName:"integrationMethod" type:"string"` + + // Represents an API method integration type. + IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` + + // A string representation of a URI with a length between [1-2048]. + IntegrationUri *string `locationName:"integrationUri" type:"string"` + + // Represents passthrough behavior for an integration response. + PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` + + // An integer with a value between [50-29000]. + TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` +} + +// String returns the string representation +func (s UpdateIntegrationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateIntegrationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateIntegrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + if s.TimeoutInMillis != nil && *s.TimeoutInMillis < 50 { + invalidParams.Add(request.NewErrParamMinValue("TimeoutInMillis", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateIntegrationInput) SetApiId(v string) *UpdateIntegrationInput { + s.ApiId = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *UpdateIntegrationInput) SetConnectionId(v string) *UpdateIntegrationInput { + s.ConnectionId = &v + return s +} + +// SetConnectionType sets the ConnectionType field's value. +func (s *UpdateIntegrationInput) SetConnectionType(v string) *UpdateIntegrationInput { + s.ConnectionType = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *UpdateIntegrationInput) SetContentHandlingStrategy(v string) *UpdateIntegrationInput { + s.ContentHandlingStrategy = &v + return s +} + +// SetCredentialsArn sets the CredentialsArn field's value. +func (s *UpdateIntegrationInput) SetCredentialsArn(v string) *UpdateIntegrationInput { + s.CredentialsArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateIntegrationInput) SetDescription(v string) *UpdateIntegrationInput { + s.Description = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *UpdateIntegrationInput) SetIntegrationId(v string) *UpdateIntegrationInput { + s.IntegrationId = &v + return s +} + +// SetIntegrationMethod sets the IntegrationMethod field's value. +func (s *UpdateIntegrationInput) SetIntegrationMethod(v string) *UpdateIntegrationInput { + s.IntegrationMethod = &v + return s +} + +// SetIntegrationType sets the IntegrationType field's value. +func (s *UpdateIntegrationInput) SetIntegrationType(v string) *UpdateIntegrationInput { + s.IntegrationType = &v + return s +} + +// SetIntegrationUri sets the IntegrationUri field's value. +func (s *UpdateIntegrationInput) SetIntegrationUri(v string) *UpdateIntegrationInput { + s.IntegrationUri = &v + return s +} + +// SetPassthroughBehavior sets the PassthroughBehavior field's value. +func (s *UpdateIntegrationInput) SetPassthroughBehavior(v string) *UpdateIntegrationInput { + s.PassthroughBehavior = &v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *UpdateIntegrationInput) SetRequestParameters(v map[string]*string) *UpdateIntegrationInput { + s.RequestParameters = v + return s +} + +// SetRequestTemplates sets the RequestTemplates field's value. +func (s *UpdateIntegrationInput) SetRequestTemplates(v map[string]*string) *UpdateIntegrationInput { + s.RequestTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *UpdateIntegrationInput) SetTemplateSelectionExpression(v string) *UpdateIntegrationInput { + s.TemplateSelectionExpression = &v + return s +} + +// SetTimeoutInMillis sets the TimeoutInMillis field's value. +func (s *UpdateIntegrationInput) SetTimeoutInMillis(v int64) *UpdateIntegrationInput { + s.TimeoutInMillis = &v + return s +} + +type UpdateIntegrationOutput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-1024]. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // Represents a connection type. + ConnectionType *string `locationName:"connectionType" type:"string" enum:"ConnectionType"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // Represents an Amazon Resource Name (ARN). + CredentialsArn *string `locationName:"credentialsArn" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // An API Gateway-generated, unique identifier. + IntegrationId *string `locationName:"integrationId" type:"string"` + + // A string with a length between [1-64]. + IntegrationMethod *string `locationName:"integrationMethod" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + IntegrationResponseSelectionExpression *string `locationName:"integrationResponseSelectionExpression" type:"string"` + + // Represents an API method integration type. + IntegrationType *string `locationName:"integrationType" type:"string" enum:"IntegrationType"` + + // A string representation of a URI with a length between [1-2048]. + IntegrationUri *string `locationName:"integrationUri" type:"string"` + + // Represents passthrough behavior for an integration response. + PassthroughBehavior *string `locationName:"passthroughBehavior" type:"string" enum:"PassthroughBehavior"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + RequestParameters map[string]*string `locationName:"requestParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + RequestTemplates map[string]*string `locationName:"requestTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` + + // An integer with a value between [50-29000]. + TimeoutInMillis *int64 `locationName:"timeoutInMillis" min:"50" type:"integer"` +} + +// String returns the string representation +func (s UpdateIntegrationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateIntegrationOutput) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *UpdateIntegrationOutput) SetConnectionId(v string) *UpdateIntegrationOutput { + s.ConnectionId = &v + return s +} + +// SetConnectionType sets the ConnectionType field's value. +func (s *UpdateIntegrationOutput) SetConnectionType(v string) *UpdateIntegrationOutput { + s.ConnectionType = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *UpdateIntegrationOutput) SetContentHandlingStrategy(v string) *UpdateIntegrationOutput { + s.ContentHandlingStrategy = &v + return s +} + +// SetCredentialsArn sets the CredentialsArn field's value. +func (s *UpdateIntegrationOutput) SetCredentialsArn(v string) *UpdateIntegrationOutput { + s.CredentialsArn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateIntegrationOutput) SetDescription(v string) *UpdateIntegrationOutput { + s.Description = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *UpdateIntegrationOutput) SetIntegrationId(v string) *UpdateIntegrationOutput { + s.IntegrationId = &v + return s +} + +// SetIntegrationMethod sets the IntegrationMethod field's value. +func (s *UpdateIntegrationOutput) SetIntegrationMethod(v string) *UpdateIntegrationOutput { + s.IntegrationMethod = &v + return s +} + +// SetIntegrationResponseSelectionExpression sets the IntegrationResponseSelectionExpression field's value. +func (s *UpdateIntegrationOutput) SetIntegrationResponseSelectionExpression(v string) *UpdateIntegrationOutput { + s.IntegrationResponseSelectionExpression = &v + return s +} + +// SetIntegrationType sets the IntegrationType field's value. +func (s *UpdateIntegrationOutput) SetIntegrationType(v string) *UpdateIntegrationOutput { + s.IntegrationType = &v + return s +} + +// SetIntegrationUri sets the IntegrationUri field's value. +func (s *UpdateIntegrationOutput) SetIntegrationUri(v string) *UpdateIntegrationOutput { + s.IntegrationUri = &v + return s +} + +// SetPassthroughBehavior sets the PassthroughBehavior field's value. +func (s *UpdateIntegrationOutput) SetPassthroughBehavior(v string) *UpdateIntegrationOutput { + s.PassthroughBehavior = &v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *UpdateIntegrationOutput) SetRequestParameters(v map[string]*string) *UpdateIntegrationOutput { + s.RequestParameters = v + return s +} + +// SetRequestTemplates sets the RequestTemplates field's value. +func (s *UpdateIntegrationOutput) SetRequestTemplates(v map[string]*string) *UpdateIntegrationOutput { + s.RequestTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *UpdateIntegrationOutput) SetTemplateSelectionExpression(v string) *UpdateIntegrationOutput { + s.TemplateSelectionExpression = &v + return s +} + +// SetTimeoutInMillis sets the TimeoutInMillis field's value. +func (s *UpdateIntegrationOutput) SetTimeoutInMillis(v int64) *UpdateIntegrationOutput { + s.TimeoutInMillis = &v + return s +} + +type UpdateIntegrationResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // IntegrationId is a required field + IntegrationId *string `location:"uri" locationName:"integrationId" type:"string" required:"true"` + + // IntegrationResponseId is a required field + IntegrationResponseId *string `location:"uri" locationName:"integrationResponseId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` +} + +// String returns the string representation +func (s UpdateIntegrationResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateIntegrationResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateIntegrationResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateIntegrationResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.IntegrationId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationId")) + } + if s.IntegrationId != nil && len(*s.IntegrationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationId", 1)) + } + if s.IntegrationResponseId == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationResponseId")) + } + if s.IntegrationResponseId != nil && len(*s.IntegrationResponseId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IntegrationResponseId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateIntegrationResponseInput) SetApiId(v string) *UpdateIntegrationResponseInput { + s.ApiId = &v + return s +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *UpdateIntegrationResponseInput) SetContentHandlingStrategy(v string) *UpdateIntegrationResponseInput { + s.ContentHandlingStrategy = &v + return s +} + +// SetIntegrationId sets the IntegrationId field's value. +func (s *UpdateIntegrationResponseInput) SetIntegrationId(v string) *UpdateIntegrationResponseInput { + s.IntegrationId = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *UpdateIntegrationResponseInput) SetIntegrationResponseId(v string) *UpdateIntegrationResponseInput { + s.IntegrationResponseId = &v + return s +} + +// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. +func (s *UpdateIntegrationResponseInput) SetIntegrationResponseKey(v string) *UpdateIntegrationResponseInput { + s.IntegrationResponseKey = &v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *UpdateIntegrationResponseInput) SetResponseParameters(v map[string]*string) *UpdateIntegrationResponseInput { + s.ResponseParameters = v + return s +} + +// SetResponseTemplates sets the ResponseTemplates field's value. +func (s *UpdateIntegrationResponseInput) SetResponseTemplates(v map[string]*string) *UpdateIntegrationResponseInput { + s.ResponseTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *UpdateIntegrationResponseInput) SetTemplateSelectionExpression(v string) *UpdateIntegrationResponseInput { + s.TemplateSelectionExpression = &v + return s +} + +type UpdateIntegrationResponseOutput struct { + _ struct{} `type:"structure"` + + // Specifies how to handle response payload content type conversions. + ContentHandlingStrategy *string `locationName:"contentHandlingStrategy" type:"string" enum:"ContentHandlingStrategy"` + + // An API Gateway-generated, unique identifier. + IntegrationResponseId *string `locationName:"integrationResponseId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + IntegrationResponseKey *string `locationName:"integrationResponseKey" type:"string"` + + // A key-value map specifying response parameters that are passed to the method + // response from the backend. The key is a method response header parameter + // name and the mapped value is an integration response header value, a static + // value enclosed within a pair of single quotes, or a JSON expression from + // the integration response body. The mapping key must match the pattern of + // method.response.header.{name}, where name is a valid and unique header name. + // The mapped non-static value must match the pattern of integration.response.header.{name} + // or integration.response.body.{JSON-expression}, where name is a valid and + // unique response header name and JSON-expression is a valid JSON expression + // without the $ prefix. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // A mapping of identifier keys to templates. The value is an actual template + // script. The key is typically a SelectionKey which is chosen based on evaluating + // a selection expression. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + TemplateSelectionExpression *string `locationName:"templateSelectionExpression" type:"string"` +} + +// String returns the string representation +func (s UpdateIntegrationResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateIntegrationResponseOutput) GoString() string { + return s.String() +} + +// SetContentHandlingStrategy sets the ContentHandlingStrategy field's value. +func (s *UpdateIntegrationResponseOutput) SetContentHandlingStrategy(v string) *UpdateIntegrationResponseOutput { + s.ContentHandlingStrategy = &v + return s +} + +// SetIntegrationResponseId sets the IntegrationResponseId field's value. +func (s *UpdateIntegrationResponseOutput) SetIntegrationResponseId(v string) *UpdateIntegrationResponseOutput { + s.IntegrationResponseId = &v + return s +} + +// SetIntegrationResponseKey sets the IntegrationResponseKey field's value. +func (s *UpdateIntegrationResponseOutput) SetIntegrationResponseKey(v string) *UpdateIntegrationResponseOutput { + s.IntegrationResponseKey = &v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *UpdateIntegrationResponseOutput) SetResponseParameters(v map[string]*string) *UpdateIntegrationResponseOutput { + s.ResponseParameters = v + return s +} + +// SetResponseTemplates sets the ResponseTemplates field's value. +func (s *UpdateIntegrationResponseOutput) SetResponseTemplates(v map[string]*string) *UpdateIntegrationResponseOutput { + s.ResponseTemplates = v + return s +} + +// SetTemplateSelectionExpression sets the TemplateSelectionExpression field's value. +func (s *UpdateIntegrationResponseOutput) SetTemplateSelectionExpression(v string) *UpdateIntegrationResponseOutput { + s.TemplateSelectionExpression = &v + return s +} + +type UpdateModelInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // A string with a length between [1-256]. + ContentType *string `locationName:"contentType" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // ModelId is a required field + ModelId *string `location:"uri" locationName:"modelId" type:"string" required:"true"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A string with a length between [0-32768]. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s UpdateModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateModelInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.ModelId == nil { + invalidParams.Add(request.NewErrParamRequired("ModelId")) + } + if s.ModelId != nil && len(*s.ModelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateModelInput) SetApiId(v string) *UpdateModelInput { + s.ApiId = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *UpdateModelInput) SetContentType(v string) *UpdateModelInput { + s.ContentType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateModelInput) SetDescription(v string) *UpdateModelInput { + s.Description = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *UpdateModelInput) SetModelId(v string) *UpdateModelInput { + s.ModelId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateModelInput) SetName(v string) *UpdateModelInput { + s.Name = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *UpdateModelInput) SetSchema(v string) *UpdateModelInput { + s.Schema = &v + return s +} + +type UpdateModelOutput struct { + _ struct{} `type:"structure"` + + // A string with a length between [1-256]. + ContentType *string `locationName:"contentType" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // An API Gateway-generated, unique identifier. + ModelId *string `locationName:"modelId" type:"string"` + + // A string with a length between [1-128]. + Name *string `locationName:"name" type:"string"` + + // A string with a length between [0-32768]. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s UpdateModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateModelOutput) GoString() string { + return s.String() +} + +// SetContentType sets the ContentType field's value. +func (s *UpdateModelOutput) SetContentType(v string) *UpdateModelOutput { + s.ContentType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateModelOutput) SetDescription(v string) *UpdateModelOutput { + s.Description = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *UpdateModelOutput) SetModelId(v string) *UpdateModelOutput { + s.ModelId = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateModelOutput) SetName(v string) *UpdateModelOutput { + s.Name = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *UpdateModelOutput) SetSchema(v string) *UpdateModelOutput { + s.Schema = &v + return s +} + +type UpdateRouteInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` + + // A list of authorization scopes configured on a route. The scopes are used + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the route scopes against the scopes parsed + // from the access token in the incoming request. The method invocation is authorized + // if any route scope matches a claimed scope in the access token. Otherwise, + // the invocation is not authorized. When the route scope is configured, the + // client must provide an access token instead of an identity token for authorization + // purposes. + AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` + + // The authorization type. Valid values are NONE for open access, AWS_IAM for + // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. + AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + OperationName *string `locationName:"operationName" type:"string"` + + // The route models. + RequestModels map[string]*string `locationName:"requestModels" type:"map"` + + // The route parameters. + RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteKey *string `locationName:"routeKey" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` + + // A string with a length between [1-128]. + Target *string `locationName:"target" type:"string"` +} + +// String returns the string representation +func (s UpdateRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRouteInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateRouteInput) SetApiId(v string) *UpdateRouteInput { + s.ApiId = &v + return s +} + +// SetApiKeyRequired sets the ApiKeyRequired field's value. +func (s *UpdateRouteInput) SetApiKeyRequired(v bool) *UpdateRouteInput { + s.ApiKeyRequired = &v + return s +} + +// SetAuthorizationScopes sets the AuthorizationScopes field's value. +func (s *UpdateRouteInput) SetAuthorizationScopes(v []*string) *UpdateRouteInput { + s.AuthorizationScopes = v + return s +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *UpdateRouteInput) SetAuthorizationType(v string) *UpdateRouteInput { + s.AuthorizationType = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *UpdateRouteInput) SetAuthorizerId(v string) *UpdateRouteInput { + s.AuthorizerId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *UpdateRouteInput) SetModelSelectionExpression(v string) *UpdateRouteInput { + s.ModelSelectionExpression = &v + return s +} + +// SetOperationName sets the OperationName field's value. +func (s *UpdateRouteInput) SetOperationName(v string) *UpdateRouteInput { + s.OperationName = &v + return s +} + +// SetRequestModels sets the RequestModels field's value. +func (s *UpdateRouteInput) SetRequestModels(v map[string]*string) *UpdateRouteInput { + s.RequestModels = v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *UpdateRouteInput) SetRequestParameters(v map[string]*ParameterConstraints) *UpdateRouteInput { + s.RequestParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *UpdateRouteInput) SetRouteId(v string) *UpdateRouteInput { + s.RouteId = &v + return s +} + +// SetRouteKey sets the RouteKey field's value. +func (s *UpdateRouteInput) SetRouteKey(v string) *UpdateRouteInput { + s.RouteKey = &v + return s +} + +// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. +func (s *UpdateRouteInput) SetRouteResponseSelectionExpression(v string) *UpdateRouteInput { + s.RouteResponseSelectionExpression = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *UpdateRouteInput) SetTarget(v string) *UpdateRouteInput { + s.Target = &v + return s +} + +type UpdateRouteOutput struct { + _ struct{} `type:"structure"` + + ApiKeyRequired *bool `locationName:"apiKeyRequired" type:"boolean"` + + // A list of authorization scopes configured on a route. The scopes are used + // with a COGNITO_USER_POOLS authorizer to authorize the method invocation. + // The authorization works by matching the route scopes against the scopes parsed + // from the access token in the incoming request. The method invocation is authorized + // if any route scope matches a claimed scope in the access token. Otherwise, + // the invocation is not authorized. When the route scope is configured, the + // client must provide an access token instead of an identity token for authorization + // purposes. + AuthorizationScopes []*string `locationName:"authorizationScopes" type:"list"` + + // The authorization type. Valid values are NONE for open access, AWS_IAM for + // using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. + AuthorizationType *string `locationName:"authorizationType" type:"string" enum:"AuthorizationType"` + + // An API Gateway-generated, unique identifier. + AuthorizerId *string `locationName:"authorizerId" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // A string with a length between [1-64]. + OperationName *string `locationName:"operationName" type:"string"` + + // The route models. + RequestModels map[string]*string `locationName:"requestModels" type:"map"` + + // The route parameters. + RequestParameters map[string]*ParameterConstraints `locationName:"requestParameters" type:"map"` + + // An API Gateway-generated, unique identifier. + RouteId *string `locationName:"routeId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteKey *string `locationName:"routeKey" type:"string"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + RouteResponseSelectionExpression *string `locationName:"routeResponseSelectionExpression" type:"string"` + + // A string with a length between [1-128]. + Target *string `locationName:"target" type:"string"` +} + +// String returns the string representation +func (s UpdateRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRouteOutput) GoString() string { + return s.String() +} + +// SetApiKeyRequired sets the ApiKeyRequired field's value. +func (s *UpdateRouteOutput) SetApiKeyRequired(v bool) *UpdateRouteOutput { + s.ApiKeyRequired = &v + return s +} + +// SetAuthorizationScopes sets the AuthorizationScopes field's value. +func (s *UpdateRouteOutput) SetAuthorizationScopes(v []*string) *UpdateRouteOutput { + s.AuthorizationScopes = v + return s +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *UpdateRouteOutput) SetAuthorizationType(v string) *UpdateRouteOutput { + s.AuthorizationType = &v + return s +} + +// SetAuthorizerId sets the AuthorizerId field's value. +func (s *UpdateRouteOutput) SetAuthorizerId(v string) *UpdateRouteOutput { + s.AuthorizerId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *UpdateRouteOutput) SetModelSelectionExpression(v string) *UpdateRouteOutput { + s.ModelSelectionExpression = &v + return s +} + +// SetOperationName sets the OperationName field's value. +func (s *UpdateRouteOutput) SetOperationName(v string) *UpdateRouteOutput { + s.OperationName = &v + return s +} + +// SetRequestModels sets the RequestModels field's value. +func (s *UpdateRouteOutput) SetRequestModels(v map[string]*string) *UpdateRouteOutput { + s.RequestModels = v + return s +} + +// SetRequestParameters sets the RequestParameters field's value. +func (s *UpdateRouteOutput) SetRequestParameters(v map[string]*ParameterConstraints) *UpdateRouteOutput { + s.RequestParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *UpdateRouteOutput) SetRouteId(v string) *UpdateRouteOutput { + s.RouteId = &v + return s +} + +// SetRouteKey sets the RouteKey field's value. +func (s *UpdateRouteOutput) SetRouteKey(v string) *UpdateRouteOutput { + s.RouteKey = &v + return s +} + +// SetRouteResponseSelectionExpression sets the RouteResponseSelectionExpression field's value. +func (s *UpdateRouteOutput) SetRouteResponseSelectionExpression(v string) *UpdateRouteOutput { + s.RouteResponseSelectionExpression = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *UpdateRouteOutput) SetTarget(v string) *UpdateRouteOutput { + s.Target = &v + return s +} + +type UpdateRouteResponseInput struct { + _ struct{} `type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // The route models. + ResponseModels map[string]*string `locationName:"responseModels" type:"map"` + + // The route parameters. + ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` + + // RouteId is a required field + RouteId *string `location:"uri" locationName:"routeId" type:"string" required:"true"` + + // RouteResponseId is a required field + RouteResponseId *string `location:"uri" locationName:"routeResponseId" type:"string" required:"true"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` +} + +// String returns the string representation +func (s UpdateRouteResponseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRouteResponseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRouteResponseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRouteResponseInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.RouteId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteId")) + } + if s.RouteId != nil && len(*s.RouteId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteId", 1)) + } + if s.RouteResponseId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteResponseId")) + } + if s.RouteResponseId != nil && len(*s.RouteResponseId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RouteResponseId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateRouteResponseInput) SetApiId(v string) *UpdateRouteResponseInput { + s.ApiId = &v + return s +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *UpdateRouteResponseInput) SetModelSelectionExpression(v string) *UpdateRouteResponseInput { + s.ModelSelectionExpression = &v + return s +} + +// SetResponseModels sets the ResponseModels field's value. +func (s *UpdateRouteResponseInput) SetResponseModels(v map[string]*string) *UpdateRouteResponseInput { + s.ResponseModels = v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *UpdateRouteResponseInput) SetResponseParameters(v map[string]*ParameterConstraints) *UpdateRouteResponseInput { + s.ResponseParameters = v + return s +} + +// SetRouteId sets the RouteId field's value. +func (s *UpdateRouteResponseInput) SetRouteId(v string) *UpdateRouteResponseInput { + s.RouteId = &v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *UpdateRouteResponseInput) SetRouteResponseId(v string) *UpdateRouteResponseInput { + s.RouteResponseId = &v + return s +} + +// SetRouteResponseKey sets the RouteResponseKey field's value. +func (s *UpdateRouteResponseInput) SetRouteResponseKey(v string) *UpdateRouteResponseInput { + s.RouteResponseKey = &v + return s +} + +type UpdateRouteResponseOutput struct { + _ struct{} `type:"structure"` + + // An expression used to extract information at runtime. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for more information. + ModelSelectionExpression *string `locationName:"modelSelectionExpression" type:"string"` + + // The route models. + ResponseModels map[string]*string `locationName:"responseModels" type:"map"` + + // The route parameters. + ResponseParameters map[string]*ParameterConstraints `locationName:"responseParameters" type:"map"` + + // An API Gateway-generated, unique identifier. + RouteResponseId *string `locationName:"routeResponseId" type:"string"` + + // After evaulating a selection expression, the result is compared against one + // or more selection keys to find a matching key. See Selection Expressions + // (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html) + // for a list of expressions and each expression's associated selection key + // type. + RouteResponseKey *string `locationName:"routeResponseKey" type:"string"` +} + +// String returns the string representation +func (s UpdateRouteResponseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRouteResponseOutput) GoString() string { + return s.String() +} + +// SetModelSelectionExpression sets the ModelSelectionExpression field's value. +func (s *UpdateRouteResponseOutput) SetModelSelectionExpression(v string) *UpdateRouteResponseOutput { + s.ModelSelectionExpression = &v + return s +} + +// SetResponseModels sets the ResponseModels field's value. +func (s *UpdateRouteResponseOutput) SetResponseModels(v map[string]*string) *UpdateRouteResponseOutput { + s.ResponseModels = v + return s +} + +// SetResponseParameters sets the ResponseParameters field's value. +func (s *UpdateRouteResponseOutput) SetResponseParameters(v map[string]*ParameterConstraints) *UpdateRouteResponseOutput { + s.ResponseParameters = v + return s +} + +// SetRouteResponseId sets the RouteResponseId field's value. +func (s *UpdateRouteResponseOutput) SetRouteResponseId(v string) *UpdateRouteResponseOutput { + s.RouteResponseId = &v + return s +} + +// SetRouteResponseKey sets the RouteResponseKey field's value. +func (s *UpdateRouteResponseOutput) SetRouteResponseKey(v string) *UpdateRouteResponseOutput { + s.RouteResponseKey = &v + return s +} + +type UpdateStageInput struct { + _ struct{} `type:"structure"` + + // Settings for logging access in a stage. + AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` + + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // An API Gateway-generated, unique identifier. + ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + + // Represents a collection of route settings. + DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + // The route settings map. + RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` + + // StageName is a required field + StageName *string `location:"uri" locationName:"stageName" type:"string" required:"true"` + + // The stage variable map. + StageVariables map[string]*string `locationName:"stageVariables" type:"map"` +} + +// String returns the string representation +func (s UpdateStageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateStageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateStageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateStageInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.StageName == nil { + invalidParams.Add(request.NewErrParamRequired("StageName")) + } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessLogSettings sets the AccessLogSettings field's value. +func (s *UpdateStageInput) SetAccessLogSettings(v *AccessLogSettings) *UpdateStageInput { + s.AccessLogSettings = v + return s +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateStageInput) SetApiId(v string) *UpdateStageInput { + s.ApiId = &v + return s +} + +// SetClientCertificateId sets the ClientCertificateId field's value. +func (s *UpdateStageInput) SetClientCertificateId(v string) *UpdateStageInput { + s.ClientCertificateId = &v + return s +} + +// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. +func (s *UpdateStageInput) SetDefaultRouteSettings(v *RouteSettings) *UpdateStageInput { + s.DefaultRouteSettings = v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *UpdateStageInput) SetDeploymentId(v string) *UpdateStageInput { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateStageInput) SetDescription(v string) *UpdateStageInput { + s.Description = &v + return s +} + +// SetRouteSettings sets the RouteSettings field's value. +func (s *UpdateStageInput) SetRouteSettings(v map[string]*RouteSettings) *UpdateStageInput { + s.RouteSettings = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *UpdateStageInput) SetStageName(v string) *UpdateStageInput { + s.StageName = &v + return s +} + +// SetStageVariables sets the StageVariables field's value. +func (s *UpdateStageInput) SetStageVariables(v map[string]*string) *UpdateStageInput { + s.StageVariables = v + return s +} + +type UpdateStageOutput struct { + _ struct{} `type:"structure"` + + // Settings for logging access in a stage. + AccessLogSettings *AccessLogSettings `locationName:"accessLogSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + ClientCertificateId *string `locationName:"clientCertificateId" type:"string"` + + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp" timestampFormat:"iso8601"` + + // Represents a collection of route settings. + DefaultRouteSettings *RouteSettings `locationName:"defaultRouteSettings" type:"structure"` + + // An API Gateway-generated, unique identifier. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A string with a length between [0-1024]. + Description *string `locationName:"description" type:"string"` + + LastUpdatedDate *time.Time `locationName:"lastUpdatedDate" type:"timestamp" timestampFormat:"iso8601"` + + // The route settings map. + RouteSettings map[string]*RouteSettings `locationName:"routeSettings" type:"map"` + + // A string with a length between [1-128]. + StageName *string `locationName:"stageName" type:"string"` + + // The stage variable map. + StageVariables map[string]*string `locationName:"stageVariables" type:"map"` +} + +// String returns the string representation +func (s UpdateStageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateStageOutput) GoString() string { + return s.String() +} + +// SetAccessLogSettings sets the AccessLogSettings field's value. +func (s *UpdateStageOutput) SetAccessLogSettings(v *AccessLogSettings) *UpdateStageOutput { + s.AccessLogSettings = v + return s +} + +// SetClientCertificateId sets the ClientCertificateId field's value. +func (s *UpdateStageOutput) SetClientCertificateId(v string) *UpdateStageOutput { + s.ClientCertificateId = &v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *UpdateStageOutput) SetCreatedDate(v time.Time) *UpdateStageOutput { + s.CreatedDate = &v + return s +} + +// SetDefaultRouteSettings sets the DefaultRouteSettings field's value. +func (s *UpdateStageOutput) SetDefaultRouteSettings(v *RouteSettings) *UpdateStageOutput { + s.DefaultRouteSettings = v + return s +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *UpdateStageOutput) SetDeploymentId(v string) *UpdateStageOutput { + s.DeploymentId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateStageOutput) SetDescription(v string) *UpdateStageOutput { + s.Description = &v + return s +} + +// SetLastUpdatedDate sets the LastUpdatedDate field's value. +func (s *UpdateStageOutput) SetLastUpdatedDate(v time.Time) *UpdateStageOutput { + s.LastUpdatedDate = &v + return s +} + +// SetRouteSettings sets the RouteSettings field's value. +func (s *UpdateStageOutput) SetRouteSettings(v map[string]*RouteSettings) *UpdateStageOutput { + s.RouteSettings = v + return s +} + +// SetStageName sets the StageName field's value. +func (s *UpdateStageOutput) SetStageName(v string) *UpdateStageOutput { + s.StageName = &v + return s +} + +// SetStageVariables sets the StageVariables field's value. +func (s *UpdateStageOutput) SetStageVariables(v map[string]*string) *UpdateStageOutput { + s.StageVariables = v + return s +} + +// The authorization type. Valid values are NONE for open access, AWS_IAM for +// using AWS IAM permissions, and CUSTOM for using a Lambda authorizer. +const ( + // AuthorizationTypeNone is a AuthorizationType enum value + AuthorizationTypeNone = "NONE" + + // AuthorizationTypeAwsIam is a AuthorizationType enum value + AuthorizationTypeAwsIam = "AWS_IAM" + + // AuthorizationTypeCustom is a AuthorizationType enum value + AuthorizationTypeCustom = "CUSTOM" +) + +// The authorizer type. Currently the only valid value is REQUEST, for a Lambda +// function using incoming request parameters. +const ( + // AuthorizerTypeRequest is a AuthorizerType enum value + AuthorizerTypeRequest = "REQUEST" +) + +// Represents a connection type. +const ( + // ConnectionTypeInternet is a ConnectionType enum value + ConnectionTypeInternet = "INTERNET" + + // ConnectionTypeVpcLink is a ConnectionType enum value + ConnectionTypeVpcLink = "VPC_LINK" +) + +// Specifies how to handle response payload content type conversions. +const ( + // ContentHandlingStrategyConvertToBinary is a ContentHandlingStrategy enum value + ContentHandlingStrategyConvertToBinary = "CONVERT_TO_BINARY" + + // ContentHandlingStrategyConvertToText is a ContentHandlingStrategy enum value + ContentHandlingStrategyConvertToText = "CONVERT_TO_TEXT" +) + +// Represents a deployment status. +const ( + // DeploymentStatusPending is a DeploymentStatus enum value + DeploymentStatusPending = "PENDING" + + // DeploymentStatusFailed is a DeploymentStatus enum value + DeploymentStatusFailed = "FAILED" + + // DeploymentStatusDeployed is a DeploymentStatus enum value + DeploymentStatusDeployed = "DEPLOYED" +) + +// Represents an endpoint type. +const ( + // EndpointTypeRegional is a EndpointType enum value + EndpointTypeRegional = "REGIONAL" + + // EndpointTypeEdge is a EndpointType enum value + EndpointTypeEdge = "EDGE" +) + +// Represents an API method integration type. +const ( + // IntegrationTypeAws is a IntegrationType enum value + IntegrationTypeAws = "AWS" + + // IntegrationTypeHttp is a IntegrationType enum value + IntegrationTypeHttp = "HTTP" + + // IntegrationTypeMock is a IntegrationType enum value + IntegrationTypeMock = "MOCK" + + // IntegrationTypeHttpProxy is a IntegrationType enum value + IntegrationTypeHttpProxy = "HTTP_PROXY" + + // IntegrationTypeAwsProxy is a IntegrationType enum value + IntegrationTypeAwsProxy = "AWS_PROXY" +) + +// The logging level. +const ( + // LoggingLevelError is a LoggingLevel enum value + LoggingLevelError = "ERROR" + + // LoggingLevelInfo is a LoggingLevel enum value + LoggingLevelInfo = "INFO" + + // LoggingLevelFalse is a LoggingLevel enum value + LoggingLevelFalse = "false" +) + +// Represents passthrough behavior for an integration response. +const ( + // PassthroughBehaviorWhenNoMatch is a PassthroughBehavior enum value + PassthroughBehaviorWhenNoMatch = "WHEN_NO_MATCH" + + // PassthroughBehaviorNever is a PassthroughBehavior enum value + PassthroughBehaviorNever = "NEVER" + + // PassthroughBehaviorWhenNoTemplates is a PassthroughBehavior enum value + PassthroughBehaviorWhenNoTemplates = "WHEN_NO_TEMPLATES" +) + +const ( + // ProtocolTypeWebsocket is a ProtocolType enum value + ProtocolTypeWebsocket = "WEBSOCKET" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go new file mode 100644 index 000000000..009cd801c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package apigatewayv2 provides the client and types for making API +// requests to AmazonApiGatewayV2. +// +// Amazon API Gateway V2 +// +// See https://docs.aws.amazon.com/goto/WebAPI/apigatewayv2-2018-11-29 for more information on this service. +// +// See apigatewayv2 package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/apigatewayv2/ +// +// Using the Client +// +// To contact AmazonApiGatewayV2 with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AmazonApiGatewayV2 client ApiGatewayV2 for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/apigatewayv2/#New +package apigatewayv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go new file mode 100644 index 000000000..141b1bab7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/errors.go @@ -0,0 +1,34 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package apigatewayv2 + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // The request is not valid, for example, the input is incomplete or incorrect. + // See the accompanying error message for details. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // The requested operation would cause a conflict with the current state of + // a service resource associated with the request. Resolve the conflict before + // retrying this request. See the accompanying error message for details. + ErrCodeConflictException = "ConflictException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The resource specified in the request was not found. See the message field + // for more information. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // A limit has been exceeded. See the accompanying error message for details. + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go new file mode 100644 index 000000000..4a722afe9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/apigatewayv2/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package apigatewayv2 + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// ApiGatewayV2 provides the API operation methods for making requests to +// AmazonApiGatewayV2. See this package's package overview docs +// for details on the service. +// +// ApiGatewayV2 methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type ApiGatewayV2 struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "ApiGatewayV2" // Name of service. + EndpointsID = "apigateway" // ID to lookup a service endpoint with. + ServiceID = "ApiGatewayV2" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the ApiGatewayV2 client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a ApiGatewayV2 client from just a session. +// svc := apigatewayv2.New(mySession) +// +// // Create a ApiGatewayV2 client with additional configuration +// svc := apigatewayv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApiGatewayV2 { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "apigateway" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ApiGatewayV2 { + svc := &ApiGatewayV2{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-11-29", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a ApiGatewayV2 operation and runs any +// custom request initialization. +func (c *ApiGatewayV2) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go index 8f57f4444..79b45590c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/api.go @@ -937,7 +937,7 @@ func (c *AppMesh) DescribeMeshRequest(input *DescribeMeshInput) (req *request.Re // DescribeMesh API operation for AWS App Mesh. // -// Describes an existing cluster. +// Describes an existing service mesh. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3314,34 +3314,45 @@ func (s *DnsServiceDiscovery) SetServiceName(v string) *DnsServiceDiscovery { } // An object representing the health check policy for a virtual node's listener. -// -// Listener health checks are not available during the App Mesh preview. type HealthCheckPolicy struct { _ struct{} `type:"structure"` // The number of consecutive successful health checks that must occur before // declaring listener healthy. - HealthyThreshold *int64 `locationName:"healthyThreshold" type:"integer"` + // + // HealthyThreshold is a required field + HealthyThreshold *int64 `locationName:"healthyThreshold" min:"2" type:"integer" required:"true"` // The time period in milliseconds between each health check execution. - IntervalMillis *int64 `locationName:"intervalMillis" type:"long"` + // + // IntervalMillis is a required field + IntervalMillis *int64 `locationName:"intervalMillis" min:"5000" type:"long" required:"true"` - // The destination path for the health check request. + // The destination path for the health check request. This is only required + // if the specified protocol is HTTP; if the protocol is TCP, then this parameter + // is ignored. Path *string `locationName:"path" type:"string"` - // The destination port for the health check request. + // The destination port for the health check request. This port must match the + // port defined in the PortMapping for the listener. Port *int64 `locationName:"port" min:"1" type:"integer"` // The protocol for the health check request. - Protocol *string `locationName:"protocol" type:"string" enum:"PortProtocol"` + // + // Protocol is a required field + Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"PortProtocol"` // The amount of time to wait when receiving a response from the health check, // in milliseconds. - TimeoutMillis *int64 `locationName:"timeoutMillis" type:"long"` + // + // TimeoutMillis is a required field + TimeoutMillis *int64 `locationName:"timeoutMillis" min:"2000" type:"long" required:"true"` // The number of consecutive failed health checks that must occur before declaring // a virtual node unhealthy. - UnhealthyThreshold *int64 `locationName:"unhealthyThreshold" type:"integer"` + // + // UnhealthyThreshold is a required field + UnhealthyThreshold *int64 `locationName:"unhealthyThreshold" min:"2" type:"integer" required:"true"` } // String returns the string representation @@ -3357,9 +3368,36 @@ func (s HealthCheckPolicy) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *HealthCheckPolicy) Validate() error { invalidParams := request.ErrInvalidParams{Context: "HealthCheckPolicy"} + if s.HealthyThreshold == nil { + invalidParams.Add(request.NewErrParamRequired("HealthyThreshold")) + } + if s.HealthyThreshold != nil && *s.HealthyThreshold < 2 { + invalidParams.Add(request.NewErrParamMinValue("HealthyThreshold", 2)) + } + if s.IntervalMillis == nil { + invalidParams.Add(request.NewErrParamRequired("IntervalMillis")) + } + if s.IntervalMillis != nil && *s.IntervalMillis < 5000 { + invalidParams.Add(request.NewErrParamMinValue("IntervalMillis", 5000)) + } if s.Port != nil && *s.Port < 1 { invalidParams.Add(request.NewErrParamMinValue("Port", 1)) } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.TimeoutMillis == nil { + invalidParams.Add(request.NewErrParamRequired("TimeoutMillis")) + } + if s.TimeoutMillis != nil && *s.TimeoutMillis < 2000 { + invalidParams.Add(request.NewErrParamMinValue("TimeoutMillis", 2000)) + } + if s.UnhealthyThreshold == nil { + invalidParams.Add(request.NewErrParamRequired("UnhealthyThreshold")) + } + if s.UnhealthyThreshold != nil && *s.UnhealthyThreshold < 2 { + invalidParams.Add(request.NewErrParamMinValue("UnhealthyThreshold", 2)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3974,8 +4012,6 @@ type Listener struct { _ struct{} `type:"structure"` // The health check information for the listener. - // - // Listener health checks are not available during the App Mesh preview. HealthCheck *HealthCheckPolicy `locationName:"healthCheck" type:"structure"` // The port mapping information for the listener. @@ -4190,10 +4226,10 @@ type ResourceMetadata struct { // with the APPMESH_VIRTUAL_NODE_CLUSTER environment variable. Arn *string `locationName:"arn" type:"string"` - // The Unix epoch timestamp in seconds for when the cluster was created. + // The Unix epoch timestamp in seconds for when the resource was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The Unix epoch timestamp in seconds for when the cluster was last updated. + // The Unix epoch timestamp in seconds for when the resource was last updated. LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // The unique identifier for the resource. diff --git a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go index c0c1ce50a..c8217e7b2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appmesh/doc.go @@ -16,7 +16,7 @@ // discovery naming for their components. To use App Mesh, you must have a containerized // application running on Amazon EC2 instances, hosted in either Amazon ECS, // Amazon EKS, or Kubernetes on AWS. For more information about service discovery -// on Amazon ECS, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguideservice-discovery.html) +// on Amazon ECS, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html) // in the Amazon Elastic Container Service Developer Guide. Kubernetes kube-dns // is supported. For more information, see DNS for Services and Pods (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) // in the Kubernetes documentation. diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go index 6f8bdcf32..77ba49c81 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -1561,9 +1561,7 @@ type DeleteNamedQueryInput struct { _ struct{} `type:"structure"` // The unique ID of the query to delete. - // - // NamedQueryId is a required field - NamedQueryId *string `type:"string" required:"true" idempotencyToken:"true"` + NamedQueryId *string `type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -1576,19 +1574,6 @@ func (s DeleteNamedQueryInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNamedQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNamedQueryInput"} - if s.NamedQueryId == nil { - invalidParams.Add(request.NewErrParamRequired("NamedQueryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetNamedQueryId sets the NamedQueryId field's value. func (s *DeleteNamedQueryInput) SetNamedQueryId(v string) *DeleteNamedQueryInput { s.NamedQueryId = &v @@ -2550,9 +2535,7 @@ type StopQueryExecutionInput struct { _ struct{} `type:"structure"` // The unique ID of the query execution to stop. - // - // QueryExecutionId is a required field - QueryExecutionId *string `type:"string" required:"true" idempotencyToken:"true"` + QueryExecutionId *string `type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -2565,19 +2548,6 @@ func (s StopQueryExecutionInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopQueryExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopQueryExecutionInput"} - if s.QueryExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetQueryExecutionId sets the QueryExecutionId field's value. func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput { s.QueryExecutionId = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/api.go b/vendor/github.com/aws/aws-sdk-go/service/backup/api.go new file mode 100644 index 000000000..2380f4b02 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/backup/api.go @@ -0,0 +1,10729 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package backup + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opCreateBackupPlan = "CreateBackupPlan" + +// CreateBackupPlanRequest generates a "aws/request.Request" representing the +// client's request for the CreateBackupPlan operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateBackupPlan for more information on using the CreateBackupPlan +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateBackupPlanRequest method. +// req, resp := client.CreateBackupPlanRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan +func (c *Backup) CreateBackupPlanRequest(input *CreateBackupPlanInput) (req *request.Request, output *CreateBackupPlanOutput) { + op := &request.Operation{ + Name: opCreateBackupPlan, + HTTPMethod: "PUT", + HTTPPath: "/backup/plans/", + } + + if input == nil { + input = &CreateBackupPlanInput{} + } + + output = &CreateBackupPlanOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBackupPlan API operation for AWS Backup. +// +// Backup plans are documents that contain information that AWS Backup uses +// to schedule tasks that create recovery points of resources. +// +// If you call CreateBackupPlan with a plan that already exists, the existing +// backupPlanId is returned. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation CreateBackupPlan for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit in the request has been exceeded; for example, a maximum number of +// items allowed in a request. +// +// * ErrCodeAlreadyExistsException "AlreadyExistsException" +// The required resource already exists. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupPlan +func (c *Backup) CreateBackupPlan(input *CreateBackupPlanInput) (*CreateBackupPlanOutput, error) { + req, out := c.CreateBackupPlanRequest(input) + return out, req.Send() +} + +// CreateBackupPlanWithContext is the same as CreateBackupPlan with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBackupPlan for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) CreateBackupPlanWithContext(ctx aws.Context, input *CreateBackupPlanInput, opts ...request.Option) (*CreateBackupPlanOutput, error) { + req, out := c.CreateBackupPlanRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateBackupSelection = "CreateBackupSelection" + +// CreateBackupSelectionRequest generates a "aws/request.Request" representing the +// client's request for the CreateBackupSelection operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateBackupSelection for more information on using the CreateBackupSelection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateBackupSelectionRequest method. +// req, resp := client.CreateBackupSelectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection +func (c *Backup) CreateBackupSelectionRequest(input *CreateBackupSelectionInput) (req *request.Request, output *CreateBackupSelectionOutput) { + op := &request.Operation{ + Name: opCreateBackupSelection, + HTTPMethod: "PUT", + HTTPPath: "/backup/plans/{backupPlanId}/selections/", + } + + if input == nil { + input = &CreateBackupSelectionInput{} + } + + output = &CreateBackupSelectionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBackupSelection API operation for AWS Backup. +// +// Creates a JSON document that specifies a set of resources to assign to a +// backup plan. Resources can be included by specifying patterns for a ListOfTags +// and selected Resources. +// +// For example, consider the following patterns: +// +// * Resources: "arn:aws:ec2:region:account-id:volume/volume-id" +// +// * ConditionKey:"department" +// +// ConditionValue:"finance" +// +// ConditionType:"StringEquals" +// +// * ConditionKey:"importance" +// +// ConditionValue:"critical" +// +// ConditionType:"StringEquals" +// +// Using these patterns would back up all Amazon Elastic Block Store (Amazon +// EBS) volumes that are tagged as "department=finance", "importance=critical", +// in addition to an EBS volume with the specified volume Id. +// +// Resources and conditions are additive in that all resources that match the +// pattern are selected. This shouldn't be confused with a logical AND, where +// all conditions must match. The matching patterns are logically 'put together +// using the OR operator. In other words, all patterns that match are selected +// for backup. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation CreateBackupSelection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit in the request has been exceeded; for example, a maximum number of +// items allowed in a request. +// +// * ErrCodeAlreadyExistsException "AlreadyExistsException" +// The required resource already exists. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupSelection +func (c *Backup) CreateBackupSelection(input *CreateBackupSelectionInput) (*CreateBackupSelectionOutput, error) { + req, out := c.CreateBackupSelectionRequest(input) + return out, req.Send() +} + +// CreateBackupSelectionWithContext is the same as CreateBackupSelection with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBackupSelection for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) CreateBackupSelectionWithContext(ctx aws.Context, input *CreateBackupSelectionInput, opts ...request.Option) (*CreateBackupSelectionOutput, error) { + req, out := c.CreateBackupSelectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateBackupVault = "CreateBackupVault" + +// CreateBackupVaultRequest generates a "aws/request.Request" representing the +// client's request for the CreateBackupVault operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateBackupVault for more information on using the CreateBackupVault +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateBackupVaultRequest method. +// req, resp := client.CreateBackupVaultRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault +func (c *Backup) CreateBackupVaultRequest(input *CreateBackupVaultInput) (req *request.Request, output *CreateBackupVaultOutput) { + op := &request.Operation{ + Name: opCreateBackupVault, + HTTPMethod: "PUT", + HTTPPath: "/backup-vaults/{backupVaultName}", + } + + if input == nil { + input = &CreateBackupVaultInput{} + } + + output = &CreateBackupVaultOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBackupVault API operation for AWS Backup. +// +// Creates a logical container where backups are stored. A CreateBackupVault +// request includes a name, optionally one or more resource tags, an encryption +// key, and a request ID. +// +// Sensitive data, such as passport numbers, should not be included the name +// of a backup vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation CreateBackupVault for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit in the request has been exceeded; for example, a maximum number of +// items allowed in a request. +// +// * ErrCodeAlreadyExistsException "AlreadyExistsException" +// The required resource already exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/CreateBackupVault +func (c *Backup) CreateBackupVault(input *CreateBackupVaultInput) (*CreateBackupVaultOutput, error) { + req, out := c.CreateBackupVaultRequest(input) + return out, req.Send() +} + +// CreateBackupVaultWithContext is the same as CreateBackupVault with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBackupVault for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) CreateBackupVaultWithContext(ctx aws.Context, input *CreateBackupVaultInput, opts ...request.Option) (*CreateBackupVaultOutput, error) { + req, out := c.CreateBackupVaultRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackupPlan = "DeleteBackupPlan" + +// DeleteBackupPlanRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackupPlan operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBackupPlan for more information on using the DeleteBackupPlan +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBackupPlanRequest method. +// req, resp := client.DeleteBackupPlanRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan +func (c *Backup) DeleteBackupPlanRequest(input *DeleteBackupPlanInput) (req *request.Request, output *DeleteBackupPlanOutput) { + op := &request.Operation{ + Name: opDeleteBackupPlan, + HTTPMethod: "DELETE", + HTTPPath: "/backup/plans/{backupPlanId}", + } + + if input == nil { + input = &DeleteBackupPlanInput{} + } + + output = &DeleteBackupPlanOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBackupPlan API operation for AWS Backup. +// +// Deletes a backup plan. A backup plan can only be deleted after all associated +// selections of resources have been deleted. Deleting a backup plan deletes +// the current version of a backup plan. Previous versions, if any, will still +// exist. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DeleteBackupPlan for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a parameter is of the wrong type. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupPlan +func (c *Backup) DeleteBackupPlan(input *DeleteBackupPlanInput) (*DeleteBackupPlanOutput, error) { + req, out := c.DeleteBackupPlanRequest(input) + return out, req.Send() +} + +// DeleteBackupPlanWithContext is the same as DeleteBackupPlan with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackupPlan for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DeleteBackupPlanWithContext(ctx aws.Context, input *DeleteBackupPlanInput, opts ...request.Option) (*DeleteBackupPlanOutput, error) { + req, out := c.DeleteBackupPlanRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackupSelection = "DeleteBackupSelection" + +// DeleteBackupSelectionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackupSelection operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBackupSelection for more information on using the DeleteBackupSelection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBackupSelectionRequest method. +// req, resp := client.DeleteBackupSelectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection +func (c *Backup) DeleteBackupSelectionRequest(input *DeleteBackupSelectionInput) (req *request.Request, output *DeleteBackupSelectionOutput) { + op := &request.Operation{ + Name: opDeleteBackupSelection, + HTTPMethod: "DELETE", + HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}", + } + + if input == nil { + input = &DeleteBackupSelectionInput{} + } + + output = &DeleteBackupSelectionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteBackupSelection API operation for AWS Backup. +// +// Deletes the resource selection associated with a backup plan that is specified +// by the SelectionId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DeleteBackupSelection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupSelection +func (c *Backup) DeleteBackupSelection(input *DeleteBackupSelectionInput) (*DeleteBackupSelectionOutput, error) { + req, out := c.DeleteBackupSelectionRequest(input) + return out, req.Send() +} + +// DeleteBackupSelectionWithContext is the same as DeleteBackupSelection with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackupSelection for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DeleteBackupSelectionWithContext(ctx aws.Context, input *DeleteBackupSelectionInput, opts ...request.Option) (*DeleteBackupSelectionOutput, error) { + req, out := c.DeleteBackupSelectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackupVault = "DeleteBackupVault" + +// DeleteBackupVaultRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackupVault operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBackupVault for more information on using the DeleteBackupVault +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBackupVaultRequest method. +// req, resp := client.DeleteBackupVaultRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault +func (c *Backup) DeleteBackupVaultRequest(input *DeleteBackupVaultInput) (req *request.Request, output *DeleteBackupVaultOutput) { + op := &request.Operation{ + Name: opDeleteBackupVault, + HTTPMethod: "DELETE", + HTTPPath: "/backup-vaults/{backupVaultName}", + } + + if input == nil { + input = &DeleteBackupVaultInput{} + } + + output = &DeleteBackupVaultOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteBackupVault API operation for AWS Backup. +// +// Deletes the backup vault identified by its name. A vault can be deleted only +// if it is empty. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DeleteBackupVault for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a parameter is of the wrong type. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVault +func (c *Backup) DeleteBackupVault(input *DeleteBackupVaultInput) (*DeleteBackupVaultOutput, error) { + req, out := c.DeleteBackupVaultRequest(input) + return out, req.Send() +} + +// DeleteBackupVaultWithContext is the same as DeleteBackupVault with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackupVault for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DeleteBackupVaultWithContext(ctx aws.Context, input *DeleteBackupVaultInput, opts ...request.Option) (*DeleteBackupVaultOutput, error) { + req, out := c.DeleteBackupVaultRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackupVaultAccessPolicy = "DeleteBackupVaultAccessPolicy" + +// DeleteBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackupVaultAccessPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBackupVaultAccessPolicy for more information on using the DeleteBackupVaultAccessPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBackupVaultAccessPolicyRequest method. +// req, resp := client.DeleteBackupVaultAccessPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy +func (c *Backup) DeleteBackupVaultAccessPolicyRequest(input *DeleteBackupVaultAccessPolicyInput) (req *request.Request, output *DeleteBackupVaultAccessPolicyOutput) { + op := &request.Operation{ + Name: opDeleteBackupVaultAccessPolicy, + HTTPMethod: "DELETE", + HTTPPath: "/backup-vaults/{backupVaultName}/access-policy", + } + + if input == nil { + input = &DeleteBackupVaultAccessPolicyInput{} + } + + output = &DeleteBackupVaultAccessPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteBackupVaultAccessPolicy API operation for AWS Backup. +// +// Deletes the policy document that manages permissions on a backup vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DeleteBackupVaultAccessPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultAccessPolicy +func (c *Backup) DeleteBackupVaultAccessPolicy(input *DeleteBackupVaultAccessPolicyInput) (*DeleteBackupVaultAccessPolicyOutput, error) { + req, out := c.DeleteBackupVaultAccessPolicyRequest(input) + return out, req.Send() +} + +// DeleteBackupVaultAccessPolicyWithContext is the same as DeleteBackupVaultAccessPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackupVaultAccessPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DeleteBackupVaultAccessPolicyWithContext(ctx aws.Context, input *DeleteBackupVaultAccessPolicyInput, opts ...request.Option) (*DeleteBackupVaultAccessPolicyOutput, error) { + req, out := c.DeleteBackupVaultAccessPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackupVaultNotifications = "DeleteBackupVaultNotifications" + +// DeleteBackupVaultNotificationsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackupVaultNotifications operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBackupVaultNotifications for more information on using the DeleteBackupVaultNotifications +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBackupVaultNotificationsRequest method. +// req, resp := client.DeleteBackupVaultNotificationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications +func (c *Backup) DeleteBackupVaultNotificationsRequest(input *DeleteBackupVaultNotificationsInput) (req *request.Request, output *DeleteBackupVaultNotificationsOutput) { + op := &request.Operation{ + Name: opDeleteBackupVaultNotifications, + HTTPMethod: "DELETE", + HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration", + } + + if input == nil { + input = &DeleteBackupVaultNotificationsInput{} + } + + output = &DeleteBackupVaultNotificationsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteBackupVaultNotifications API operation for AWS Backup. +// +// Deletes event notifications for the specified backup vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DeleteBackupVaultNotifications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteBackupVaultNotifications +func (c *Backup) DeleteBackupVaultNotifications(input *DeleteBackupVaultNotificationsInput) (*DeleteBackupVaultNotificationsOutput, error) { + req, out := c.DeleteBackupVaultNotificationsRequest(input) + return out, req.Send() +} + +// DeleteBackupVaultNotificationsWithContext is the same as DeleteBackupVaultNotifications with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackupVaultNotifications for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DeleteBackupVaultNotificationsWithContext(ctx aws.Context, input *DeleteBackupVaultNotificationsInput, opts ...request.Option) (*DeleteBackupVaultNotificationsOutput, error) { + req, out := c.DeleteBackupVaultNotificationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteRecoveryPoint = "DeleteRecoveryPoint" + +// DeleteRecoveryPointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRecoveryPoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteRecoveryPoint for more information on using the DeleteRecoveryPoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteRecoveryPointRequest method. +// req, resp := client.DeleteRecoveryPointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint +func (c *Backup) DeleteRecoveryPointRequest(input *DeleteRecoveryPointInput) (req *request.Request, output *DeleteRecoveryPointOutput) { + op := &request.Operation{ + Name: opDeleteRecoveryPoint, + HTTPMethod: "DELETE", + HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}", + } + + if input == nil { + input = &DeleteRecoveryPointInput{} + } + + output = &DeleteRecoveryPointOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteRecoveryPoint API operation for AWS Backup. +// +// Deletes the recovery point specified by a recovery point ID. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DeleteRecoveryPoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a parameter is of the wrong type. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DeleteRecoveryPoint +func (c *Backup) DeleteRecoveryPoint(input *DeleteRecoveryPointInput) (*DeleteRecoveryPointOutput, error) { + req, out := c.DeleteRecoveryPointRequest(input) + return out, req.Send() +} + +// DeleteRecoveryPointWithContext is the same as DeleteRecoveryPoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteRecoveryPoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DeleteRecoveryPointWithContext(ctx aws.Context, input *DeleteRecoveryPointInput, opts ...request.Option) (*DeleteRecoveryPointOutput, error) { + req, out := c.DeleteRecoveryPointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBackupJob = "DescribeBackupJob" + +// DescribeBackupJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBackupJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeBackupJob for more information on using the DescribeBackupJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeBackupJobRequest method. +// req, resp := client.DescribeBackupJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob +func (c *Backup) DescribeBackupJobRequest(input *DescribeBackupJobInput) (req *request.Request, output *DescribeBackupJobOutput) { + op := &request.Operation{ + Name: opDescribeBackupJob, + HTTPMethod: "GET", + HTTPPath: "/backup-jobs/{backupJobId}", + } + + if input == nil { + input = &DescribeBackupJobInput{} + } + + output = &DescribeBackupJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBackupJob API operation for AWS Backup. +// +// Returns metadata associated with creating a backup of a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DescribeBackupJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeDependencyFailureException "DependencyFailureException" +// A dependent AWS service or resource returned an error to the AWS Backup service, +// and the action cannot be completed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupJob +func (c *Backup) DescribeBackupJob(input *DescribeBackupJobInput) (*DescribeBackupJobOutput, error) { + req, out := c.DescribeBackupJobRequest(input) + return out, req.Send() +} + +// DescribeBackupJobWithContext is the same as DescribeBackupJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBackupJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DescribeBackupJobWithContext(ctx aws.Context, input *DescribeBackupJobInput, opts ...request.Option) (*DescribeBackupJobOutput, error) { + req, out := c.DescribeBackupJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBackupVault = "DescribeBackupVault" + +// DescribeBackupVaultRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBackupVault operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeBackupVault for more information on using the DescribeBackupVault +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeBackupVaultRequest method. +// req, resp := client.DescribeBackupVaultRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault +func (c *Backup) DescribeBackupVaultRequest(input *DescribeBackupVaultInput) (req *request.Request, output *DescribeBackupVaultOutput) { + op := &request.Operation{ + Name: opDescribeBackupVault, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/{backupVaultName}", + } + + if input == nil { + input = &DescribeBackupVaultInput{} + } + + output = &DescribeBackupVaultOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBackupVault API operation for AWS Backup. +// +// Returns metadata about a backup vault specified by its name. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DescribeBackupVault for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeBackupVault +func (c *Backup) DescribeBackupVault(input *DescribeBackupVaultInput) (*DescribeBackupVaultOutput, error) { + req, out := c.DescribeBackupVaultRequest(input) + return out, req.Send() +} + +// DescribeBackupVaultWithContext is the same as DescribeBackupVault with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBackupVault for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DescribeBackupVaultWithContext(ctx aws.Context, input *DescribeBackupVaultInput, opts ...request.Option) (*DescribeBackupVaultOutput, error) { + req, out := c.DescribeBackupVaultRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeProtectedResource = "DescribeProtectedResource" + +// DescribeProtectedResourceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeProtectedResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeProtectedResource for more information on using the DescribeProtectedResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeProtectedResourceRequest method. +// req, resp := client.DescribeProtectedResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource +func (c *Backup) DescribeProtectedResourceRequest(input *DescribeProtectedResourceInput) (req *request.Request, output *DescribeProtectedResourceOutput) { + op := &request.Operation{ + Name: opDescribeProtectedResource, + HTTPMethod: "GET", + HTTPPath: "/resources/{resourceArn}", + } + + if input == nil { + input = &DescribeProtectedResourceInput{} + } + + output = &DescribeProtectedResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeProtectedResource API operation for AWS Backup. +// +// Returns information about a saved resource, including the last time it was +// backed-up, its Amazon Resource Name (ARN), and the AWS service type of the +// saved resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DescribeProtectedResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeProtectedResource +func (c *Backup) DescribeProtectedResource(input *DescribeProtectedResourceInput) (*DescribeProtectedResourceOutput, error) { + req, out := c.DescribeProtectedResourceRequest(input) + return out, req.Send() +} + +// DescribeProtectedResourceWithContext is the same as DescribeProtectedResource with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeProtectedResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DescribeProtectedResourceWithContext(ctx aws.Context, input *DescribeProtectedResourceInput, opts ...request.Option) (*DescribeProtectedResourceOutput, error) { + req, out := c.DescribeProtectedResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeRecoveryPoint = "DescribeRecoveryPoint" + +// DescribeRecoveryPointRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRecoveryPoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRecoveryPoint for more information on using the DescribeRecoveryPoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRecoveryPointRequest method. +// req, resp := client.DescribeRecoveryPointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint +func (c *Backup) DescribeRecoveryPointRequest(input *DescribeRecoveryPointInput) (req *request.Request, output *DescribeRecoveryPointOutput) { + op := &request.Operation{ + Name: opDescribeRecoveryPoint, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}", + } + + if input == nil { + input = &DescribeRecoveryPointInput{} + } + + output = &DescribeRecoveryPointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRecoveryPoint API operation for AWS Backup. +// +// Returns metadata associated with a recovery point, including ID, status, +// encryption, and lifecycle. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DescribeRecoveryPoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRecoveryPoint +func (c *Backup) DescribeRecoveryPoint(input *DescribeRecoveryPointInput) (*DescribeRecoveryPointOutput, error) { + req, out := c.DescribeRecoveryPointRequest(input) + return out, req.Send() +} + +// DescribeRecoveryPointWithContext is the same as DescribeRecoveryPoint with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRecoveryPoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DescribeRecoveryPointWithContext(ctx aws.Context, input *DescribeRecoveryPointInput, opts ...request.Option) (*DescribeRecoveryPointOutput, error) { + req, out := c.DescribeRecoveryPointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeRestoreJob = "DescribeRestoreJob" + +// DescribeRestoreJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeRestoreJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeRestoreJob for more information on using the DescribeRestoreJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeRestoreJobRequest method. +// req, resp := client.DescribeRestoreJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob +func (c *Backup) DescribeRestoreJobRequest(input *DescribeRestoreJobInput) (req *request.Request, output *DescribeRestoreJobOutput) { + op := &request.Operation{ + Name: opDescribeRestoreJob, + HTTPMethod: "GET", + HTTPPath: "/restore-jobs/{restoreJobId}", + } + + if input == nil { + input = &DescribeRestoreJobInput{} + } + + output = &DescribeRestoreJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeRestoreJob API operation for AWS Backup. +// +// Returns metadata associated with a restore job that is specified by a job +// ID. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation DescribeRestoreJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeDependencyFailureException "DependencyFailureException" +// A dependent AWS service or resource returned an error to the AWS Backup service, +// and the action cannot be completed. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/DescribeRestoreJob +func (c *Backup) DescribeRestoreJob(input *DescribeRestoreJobInput) (*DescribeRestoreJobOutput, error) { + req, out := c.DescribeRestoreJobRequest(input) + return out, req.Send() +} + +// DescribeRestoreJobWithContext is the same as DescribeRestoreJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeRestoreJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) DescribeRestoreJobWithContext(ctx aws.Context, input *DescribeRestoreJobInput, opts ...request.Option) (*DescribeRestoreJobOutput, error) { + req, out := c.DescribeRestoreJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opExportBackupPlanTemplate = "ExportBackupPlanTemplate" + +// ExportBackupPlanTemplateRequest generates a "aws/request.Request" representing the +// client's request for the ExportBackupPlanTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ExportBackupPlanTemplate for more information on using the ExportBackupPlanTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ExportBackupPlanTemplateRequest method. +// req, resp := client.ExportBackupPlanTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate +func (c *Backup) ExportBackupPlanTemplateRequest(input *ExportBackupPlanTemplateInput) (req *request.Request, output *ExportBackupPlanTemplateOutput) { + op := &request.Operation{ + Name: opExportBackupPlanTemplate, + HTTPMethod: "GET", + HTTPPath: "/backup/plans/{backupPlanId}/toTemplate/", + } + + if input == nil { + input = &ExportBackupPlanTemplateInput{} + } + + output = &ExportBackupPlanTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportBackupPlanTemplate API operation for AWS Backup. +// +// Returns the backup plan that is specified by the plan ID as a backup template. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ExportBackupPlanTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ExportBackupPlanTemplate +func (c *Backup) ExportBackupPlanTemplate(input *ExportBackupPlanTemplateInput) (*ExportBackupPlanTemplateOutput, error) { + req, out := c.ExportBackupPlanTemplateRequest(input) + return out, req.Send() +} + +// ExportBackupPlanTemplateWithContext is the same as ExportBackupPlanTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See ExportBackupPlanTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ExportBackupPlanTemplateWithContext(ctx aws.Context, input *ExportBackupPlanTemplateInput, opts ...request.Option) (*ExportBackupPlanTemplateOutput, error) { + req, out := c.ExportBackupPlanTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBackupPlan = "GetBackupPlan" + +// GetBackupPlanRequest generates a "aws/request.Request" representing the +// client's request for the GetBackupPlan operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBackupPlan for more information on using the GetBackupPlan +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBackupPlanRequest method. +// req, resp := client.GetBackupPlanRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan +func (c *Backup) GetBackupPlanRequest(input *GetBackupPlanInput) (req *request.Request, output *GetBackupPlanOutput) { + op := &request.Operation{ + Name: opGetBackupPlan, + HTTPMethod: "GET", + HTTPPath: "/backup/plans/{backupPlanId}/", + } + + if input == nil { + input = &GetBackupPlanInput{} + } + + output = &GetBackupPlanOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBackupPlan API operation for AWS Backup. +// +// Returns the body of a backup plan in JSON format, in addition to plan metadata. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetBackupPlan for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlan +func (c *Backup) GetBackupPlan(input *GetBackupPlanInput) (*GetBackupPlanOutput, error) { + req, out := c.GetBackupPlanRequest(input) + return out, req.Send() +} + +// GetBackupPlanWithContext is the same as GetBackupPlan with the addition of +// the ability to pass a context and additional request options. +// +// See GetBackupPlan for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetBackupPlanWithContext(ctx aws.Context, input *GetBackupPlanInput, opts ...request.Option) (*GetBackupPlanOutput, error) { + req, out := c.GetBackupPlanRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBackupPlanFromJSON = "GetBackupPlanFromJSON" + +// GetBackupPlanFromJSONRequest generates a "aws/request.Request" representing the +// client's request for the GetBackupPlanFromJSON operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBackupPlanFromJSON for more information on using the GetBackupPlanFromJSON +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBackupPlanFromJSONRequest method. +// req, resp := client.GetBackupPlanFromJSONRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON +func (c *Backup) GetBackupPlanFromJSONRequest(input *GetBackupPlanFromJSONInput) (req *request.Request, output *GetBackupPlanFromJSONOutput) { + op := &request.Operation{ + Name: opGetBackupPlanFromJSON, + HTTPMethod: "POST", + HTTPPath: "/backup/template/json/toPlan", + } + + if input == nil { + input = &GetBackupPlanFromJSONInput{} + } + + output = &GetBackupPlanFromJSONOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBackupPlanFromJSON API operation for AWS Backup. +// +// Returns a valid JSON document specifying a backup plan or an error. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetBackupPlanFromJSON for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit in the request has been exceeded; for example, a maximum number of +// items allowed in a request. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a parameter is of the wrong type. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromJSON +func (c *Backup) GetBackupPlanFromJSON(input *GetBackupPlanFromJSONInput) (*GetBackupPlanFromJSONOutput, error) { + req, out := c.GetBackupPlanFromJSONRequest(input) + return out, req.Send() +} + +// GetBackupPlanFromJSONWithContext is the same as GetBackupPlanFromJSON with the addition of +// the ability to pass a context and additional request options. +// +// See GetBackupPlanFromJSON for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetBackupPlanFromJSONWithContext(ctx aws.Context, input *GetBackupPlanFromJSONInput, opts ...request.Option) (*GetBackupPlanFromJSONOutput, error) { + req, out := c.GetBackupPlanFromJSONRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBackupPlanFromTemplate = "GetBackupPlanFromTemplate" + +// GetBackupPlanFromTemplateRequest generates a "aws/request.Request" representing the +// client's request for the GetBackupPlanFromTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBackupPlanFromTemplate for more information on using the GetBackupPlanFromTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBackupPlanFromTemplateRequest method. +// req, resp := client.GetBackupPlanFromTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate +func (c *Backup) GetBackupPlanFromTemplateRequest(input *GetBackupPlanFromTemplateInput) (req *request.Request, output *GetBackupPlanFromTemplateOutput) { + op := &request.Operation{ + Name: opGetBackupPlanFromTemplate, + HTTPMethod: "GET", + HTTPPath: "/backup/template/plans/{templateId}/toPlan", + } + + if input == nil { + input = &GetBackupPlanFromTemplateInput{} + } + + output = &GetBackupPlanFromTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBackupPlanFromTemplate API operation for AWS Backup. +// +// Returns the template specified by its templateId as a backup plan. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetBackupPlanFromTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupPlanFromTemplate +func (c *Backup) GetBackupPlanFromTemplate(input *GetBackupPlanFromTemplateInput) (*GetBackupPlanFromTemplateOutput, error) { + req, out := c.GetBackupPlanFromTemplateRequest(input) + return out, req.Send() +} + +// GetBackupPlanFromTemplateWithContext is the same as GetBackupPlanFromTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See GetBackupPlanFromTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetBackupPlanFromTemplateWithContext(ctx aws.Context, input *GetBackupPlanFromTemplateInput, opts ...request.Option) (*GetBackupPlanFromTemplateOutput, error) { + req, out := c.GetBackupPlanFromTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBackupSelection = "GetBackupSelection" + +// GetBackupSelectionRequest generates a "aws/request.Request" representing the +// client's request for the GetBackupSelection operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBackupSelection for more information on using the GetBackupSelection +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBackupSelectionRequest method. +// req, resp := client.GetBackupSelectionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection +func (c *Backup) GetBackupSelectionRequest(input *GetBackupSelectionInput) (req *request.Request, output *GetBackupSelectionOutput) { + op := &request.Operation{ + Name: opGetBackupSelection, + HTTPMethod: "GET", + HTTPPath: "/backup/plans/{backupPlanId}/selections/{selectionId}", + } + + if input == nil { + input = &GetBackupSelectionInput{} + } + + output = &GetBackupSelectionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBackupSelection API operation for AWS Backup. +// +// Returns selection metadata and a document in JSON format that specifies a +// list of resources that are associated with a backup plan. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetBackupSelection for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupSelection +func (c *Backup) GetBackupSelection(input *GetBackupSelectionInput) (*GetBackupSelectionOutput, error) { + req, out := c.GetBackupSelectionRequest(input) + return out, req.Send() +} + +// GetBackupSelectionWithContext is the same as GetBackupSelection with the addition of +// the ability to pass a context and additional request options. +// +// See GetBackupSelection for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetBackupSelectionWithContext(ctx aws.Context, input *GetBackupSelectionInput, opts ...request.Option) (*GetBackupSelectionOutput, error) { + req, out := c.GetBackupSelectionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBackupVaultAccessPolicy = "GetBackupVaultAccessPolicy" + +// GetBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetBackupVaultAccessPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBackupVaultAccessPolicy for more information on using the GetBackupVaultAccessPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBackupVaultAccessPolicyRequest method. +// req, resp := client.GetBackupVaultAccessPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy +func (c *Backup) GetBackupVaultAccessPolicyRequest(input *GetBackupVaultAccessPolicyInput) (req *request.Request, output *GetBackupVaultAccessPolicyOutput) { + op := &request.Operation{ + Name: opGetBackupVaultAccessPolicy, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/{backupVaultName}/access-policy", + } + + if input == nil { + input = &GetBackupVaultAccessPolicyInput{} + } + + output = &GetBackupVaultAccessPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBackupVaultAccessPolicy API operation for AWS Backup. +// +// Returns the access policy document that is associated with the named backup +// vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetBackupVaultAccessPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultAccessPolicy +func (c *Backup) GetBackupVaultAccessPolicy(input *GetBackupVaultAccessPolicyInput) (*GetBackupVaultAccessPolicyOutput, error) { + req, out := c.GetBackupVaultAccessPolicyRequest(input) + return out, req.Send() +} + +// GetBackupVaultAccessPolicyWithContext is the same as GetBackupVaultAccessPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetBackupVaultAccessPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetBackupVaultAccessPolicyWithContext(ctx aws.Context, input *GetBackupVaultAccessPolicyInput, opts ...request.Option) (*GetBackupVaultAccessPolicyOutput, error) { + req, out := c.GetBackupVaultAccessPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBackupVaultNotifications = "GetBackupVaultNotifications" + +// GetBackupVaultNotificationsRequest generates a "aws/request.Request" representing the +// client's request for the GetBackupVaultNotifications operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBackupVaultNotifications for more information on using the GetBackupVaultNotifications +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBackupVaultNotificationsRequest method. +// req, resp := client.GetBackupVaultNotificationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications +func (c *Backup) GetBackupVaultNotificationsRequest(input *GetBackupVaultNotificationsInput) (req *request.Request, output *GetBackupVaultNotificationsOutput) { + op := &request.Operation{ + Name: opGetBackupVaultNotifications, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration", + } + + if input == nil { + input = &GetBackupVaultNotificationsInput{} + } + + output = &GetBackupVaultNotificationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBackupVaultNotifications API operation for AWS Backup. +// +// Returns event notifications for the specified backup vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetBackupVaultNotifications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetBackupVaultNotifications +func (c *Backup) GetBackupVaultNotifications(input *GetBackupVaultNotificationsInput) (*GetBackupVaultNotificationsOutput, error) { + req, out := c.GetBackupVaultNotificationsRequest(input) + return out, req.Send() +} + +// GetBackupVaultNotificationsWithContext is the same as GetBackupVaultNotifications with the addition of +// the ability to pass a context and additional request options. +// +// See GetBackupVaultNotifications for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetBackupVaultNotificationsWithContext(ctx aws.Context, input *GetBackupVaultNotificationsInput, opts ...request.Option) (*GetBackupVaultNotificationsOutput, error) { + req, out := c.GetBackupVaultNotificationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRecoveryPointRestoreMetadata = "GetRecoveryPointRestoreMetadata" + +// GetRecoveryPointRestoreMetadataRequest generates a "aws/request.Request" representing the +// client's request for the GetRecoveryPointRestoreMetadata operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetRecoveryPointRestoreMetadata for more information on using the GetRecoveryPointRestoreMetadata +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetRecoveryPointRestoreMetadataRequest method. +// req, resp := client.GetRecoveryPointRestoreMetadataRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata +func (c *Backup) GetRecoveryPointRestoreMetadataRequest(input *GetRecoveryPointRestoreMetadataInput) (req *request.Request, output *GetRecoveryPointRestoreMetadataOutput) { + op := &request.Operation{ + Name: opGetRecoveryPointRestoreMetadata, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}/restore-metadata", + } + + if input == nil { + input = &GetRecoveryPointRestoreMetadataInput{} + } + + output = &GetRecoveryPointRestoreMetadataOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRecoveryPointRestoreMetadata API operation for AWS Backup. +// +// Returns two sets of metadata key-value pairs. The first set lists the metadata +// that the recovery point was created with. The second set lists the metadata +// key-value pairs that are required to restore the recovery point. +// +// These sets can be the same, or the restore metadata set can contain different +// values if the target service to be restored has changed since the recovery +// point was created and now requires additional or different information in +// order to be restored. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetRecoveryPointRestoreMetadata for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetRecoveryPointRestoreMetadata +func (c *Backup) GetRecoveryPointRestoreMetadata(input *GetRecoveryPointRestoreMetadataInput) (*GetRecoveryPointRestoreMetadataOutput, error) { + req, out := c.GetRecoveryPointRestoreMetadataRequest(input) + return out, req.Send() +} + +// GetRecoveryPointRestoreMetadataWithContext is the same as GetRecoveryPointRestoreMetadata with the addition of +// the ability to pass a context and additional request options. +// +// See GetRecoveryPointRestoreMetadata for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetRecoveryPointRestoreMetadataWithContext(ctx aws.Context, input *GetRecoveryPointRestoreMetadataInput, opts ...request.Option) (*GetRecoveryPointRestoreMetadataOutput, error) { + req, out := c.GetRecoveryPointRestoreMetadataRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSupportedResourceTypes = "GetSupportedResourceTypes" + +// GetSupportedResourceTypesRequest generates a "aws/request.Request" representing the +// client's request for the GetSupportedResourceTypes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSupportedResourceTypes for more information on using the GetSupportedResourceTypes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSupportedResourceTypesRequest method. +// req, resp := client.GetSupportedResourceTypesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes +func (c *Backup) GetSupportedResourceTypesRequest(input *GetSupportedResourceTypesInput) (req *request.Request, output *GetSupportedResourceTypesOutput) { + op := &request.Operation{ + Name: opGetSupportedResourceTypes, + HTTPMethod: "GET", + HTTPPath: "/supported-resource-types", + } + + if input == nil { + input = &GetSupportedResourceTypesInput{} + } + + output = &GetSupportedResourceTypesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSupportedResourceTypes API operation for AWS Backup. +// +// Returns the AWS resource types supported by AWS Backup. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation GetSupportedResourceTypes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/GetSupportedResourceTypes +func (c *Backup) GetSupportedResourceTypes(input *GetSupportedResourceTypesInput) (*GetSupportedResourceTypesOutput, error) { + req, out := c.GetSupportedResourceTypesRequest(input) + return out, req.Send() +} + +// GetSupportedResourceTypesWithContext is the same as GetSupportedResourceTypes with the addition of +// the ability to pass a context and additional request options. +// +// See GetSupportedResourceTypes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) GetSupportedResourceTypesWithContext(ctx aws.Context, input *GetSupportedResourceTypesInput, opts ...request.Option) (*GetSupportedResourceTypesOutput, error) { + req, out := c.GetSupportedResourceTypesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListBackupJobs = "ListBackupJobs" + +// ListBackupJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListBackupJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBackupJobs for more information on using the ListBackupJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBackupJobsRequest method. +// req, resp := client.ListBackupJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs +func (c *Backup) ListBackupJobsRequest(input *ListBackupJobsInput) (req *request.Request, output *ListBackupJobsOutput) { + op := &request.Operation{ + Name: opListBackupJobs, + HTTPMethod: "GET", + HTTPPath: "/backup-jobs/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBackupJobsInput{} + } + + output = &ListBackupJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBackupJobs API operation for AWS Backup. +// +// Returns metadata about your backup jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListBackupJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupJobs +func (c *Backup) ListBackupJobs(input *ListBackupJobsInput) (*ListBackupJobsOutput, error) { + req, out := c.ListBackupJobsRequest(input) + return out, req.Send() +} + +// ListBackupJobsWithContext is the same as ListBackupJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListBackupJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupJobsWithContext(ctx aws.Context, input *ListBackupJobsInput, opts ...request.Option) (*ListBackupJobsOutput, error) { + req, out := c.ListBackupJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBackupJobsPages iterates over the pages of a ListBackupJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBackupJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListBackupJobs operation. +// pageNum := 0 +// err := client.ListBackupJobsPages(params, +// func(page *ListBackupJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListBackupJobsPages(input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool) error { + return c.ListBackupJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBackupJobsPagesWithContext same as ListBackupJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupJobsPagesWithContext(ctx aws.Context, input *ListBackupJobsInput, fn func(*ListBackupJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBackupJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBackupJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListBackupJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListBackupPlanTemplates = "ListBackupPlanTemplates" + +// ListBackupPlanTemplatesRequest generates a "aws/request.Request" representing the +// client's request for the ListBackupPlanTemplates operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBackupPlanTemplates for more information on using the ListBackupPlanTemplates +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBackupPlanTemplatesRequest method. +// req, resp := client.ListBackupPlanTemplatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates +func (c *Backup) ListBackupPlanTemplatesRequest(input *ListBackupPlanTemplatesInput) (req *request.Request, output *ListBackupPlanTemplatesOutput) { + op := &request.Operation{ + Name: opListBackupPlanTemplates, + HTTPMethod: "GET", + HTTPPath: "/backup/template/plans", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBackupPlanTemplatesInput{} + } + + output = &ListBackupPlanTemplatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBackupPlanTemplates API operation for AWS Backup. +// +// Returns metadata of your saved backup plan templates, including the template +// ID, name, and the creation and deletion dates. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListBackupPlanTemplates for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanTemplates +func (c *Backup) ListBackupPlanTemplates(input *ListBackupPlanTemplatesInput) (*ListBackupPlanTemplatesOutput, error) { + req, out := c.ListBackupPlanTemplatesRequest(input) + return out, req.Send() +} + +// ListBackupPlanTemplatesWithContext is the same as ListBackupPlanTemplates with the addition of +// the ability to pass a context and additional request options. +// +// See ListBackupPlanTemplates for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupPlanTemplatesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, opts ...request.Option) (*ListBackupPlanTemplatesOutput, error) { + req, out := c.ListBackupPlanTemplatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBackupPlanTemplatesPages iterates over the pages of a ListBackupPlanTemplates operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBackupPlanTemplates method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListBackupPlanTemplates operation. +// pageNum := 0 +// err := client.ListBackupPlanTemplatesPages(params, +// func(page *ListBackupPlanTemplatesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListBackupPlanTemplatesPages(input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool) error { + return c.ListBackupPlanTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBackupPlanTemplatesPagesWithContext same as ListBackupPlanTemplatesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupPlanTemplatesPagesWithContext(ctx aws.Context, input *ListBackupPlanTemplatesInput, fn func(*ListBackupPlanTemplatesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBackupPlanTemplatesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBackupPlanTemplatesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListBackupPlanTemplatesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListBackupPlanVersions = "ListBackupPlanVersions" + +// ListBackupPlanVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListBackupPlanVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBackupPlanVersions for more information on using the ListBackupPlanVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBackupPlanVersionsRequest method. +// req, resp := client.ListBackupPlanVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions +func (c *Backup) ListBackupPlanVersionsRequest(input *ListBackupPlanVersionsInput) (req *request.Request, output *ListBackupPlanVersionsOutput) { + op := &request.Operation{ + Name: opListBackupPlanVersions, + HTTPMethod: "GET", + HTTPPath: "/backup/plans/{backupPlanId}/versions/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBackupPlanVersionsInput{} + } + + output = &ListBackupPlanVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBackupPlanVersions API operation for AWS Backup. +// +// Returns version metadata of your backup plans, including Amazon Resource +// Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and +// version IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListBackupPlanVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlanVersions +func (c *Backup) ListBackupPlanVersions(input *ListBackupPlanVersionsInput) (*ListBackupPlanVersionsOutput, error) { + req, out := c.ListBackupPlanVersionsRequest(input) + return out, req.Send() +} + +// ListBackupPlanVersionsWithContext is the same as ListBackupPlanVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListBackupPlanVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupPlanVersionsWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, opts ...request.Option) (*ListBackupPlanVersionsOutput, error) { + req, out := c.ListBackupPlanVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBackupPlanVersionsPages iterates over the pages of a ListBackupPlanVersions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBackupPlanVersions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListBackupPlanVersions operation. +// pageNum := 0 +// err := client.ListBackupPlanVersionsPages(params, +// func(page *ListBackupPlanVersionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListBackupPlanVersionsPages(input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool) error { + return c.ListBackupPlanVersionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBackupPlanVersionsPagesWithContext same as ListBackupPlanVersionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupPlanVersionsPagesWithContext(ctx aws.Context, input *ListBackupPlanVersionsInput, fn func(*ListBackupPlanVersionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBackupPlanVersionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBackupPlanVersionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListBackupPlanVersionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListBackupPlans = "ListBackupPlans" + +// ListBackupPlansRequest generates a "aws/request.Request" representing the +// client's request for the ListBackupPlans operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBackupPlans for more information on using the ListBackupPlans +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBackupPlansRequest method. +// req, resp := client.ListBackupPlansRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans +func (c *Backup) ListBackupPlansRequest(input *ListBackupPlansInput) (req *request.Request, output *ListBackupPlansOutput) { + op := &request.Operation{ + Name: opListBackupPlans, + HTTPMethod: "GET", + HTTPPath: "/backup/plans/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBackupPlansInput{} + } + + output = &ListBackupPlansOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBackupPlans API operation for AWS Backup. +// +// Returns metadata of your saved backup plans, including Amazon Resource Names +// (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and +// creator request IDs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListBackupPlans for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupPlans +func (c *Backup) ListBackupPlans(input *ListBackupPlansInput) (*ListBackupPlansOutput, error) { + req, out := c.ListBackupPlansRequest(input) + return out, req.Send() +} + +// ListBackupPlansWithContext is the same as ListBackupPlans with the addition of +// the ability to pass a context and additional request options. +// +// See ListBackupPlans for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupPlansWithContext(ctx aws.Context, input *ListBackupPlansInput, opts ...request.Option) (*ListBackupPlansOutput, error) { + req, out := c.ListBackupPlansRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBackupPlansPages iterates over the pages of a ListBackupPlans operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBackupPlans method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListBackupPlans operation. +// pageNum := 0 +// err := client.ListBackupPlansPages(params, +// func(page *ListBackupPlansOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListBackupPlansPages(input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool) error { + return c.ListBackupPlansPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBackupPlansPagesWithContext same as ListBackupPlansPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupPlansPagesWithContext(ctx aws.Context, input *ListBackupPlansInput, fn func(*ListBackupPlansOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBackupPlansInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBackupPlansRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListBackupPlansOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListBackupSelections = "ListBackupSelections" + +// ListBackupSelectionsRequest generates a "aws/request.Request" representing the +// client's request for the ListBackupSelections operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBackupSelections for more information on using the ListBackupSelections +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBackupSelectionsRequest method. +// req, resp := client.ListBackupSelectionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections +func (c *Backup) ListBackupSelectionsRequest(input *ListBackupSelectionsInput) (req *request.Request, output *ListBackupSelectionsOutput) { + op := &request.Operation{ + Name: opListBackupSelections, + HTTPMethod: "GET", + HTTPPath: "/backup/plans/{backupPlanId}/selections/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBackupSelectionsInput{} + } + + output = &ListBackupSelectionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBackupSelections API operation for AWS Backup. +// +// Returns an array containing metadata of the resources associated with the +// target backup plan. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListBackupSelections for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupSelections +func (c *Backup) ListBackupSelections(input *ListBackupSelectionsInput) (*ListBackupSelectionsOutput, error) { + req, out := c.ListBackupSelectionsRequest(input) + return out, req.Send() +} + +// ListBackupSelectionsWithContext is the same as ListBackupSelections with the addition of +// the ability to pass a context and additional request options. +// +// See ListBackupSelections for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupSelectionsWithContext(ctx aws.Context, input *ListBackupSelectionsInput, opts ...request.Option) (*ListBackupSelectionsOutput, error) { + req, out := c.ListBackupSelectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBackupSelectionsPages iterates over the pages of a ListBackupSelections operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBackupSelections method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListBackupSelections operation. +// pageNum := 0 +// err := client.ListBackupSelectionsPages(params, +// func(page *ListBackupSelectionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListBackupSelectionsPages(input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool) error { + return c.ListBackupSelectionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBackupSelectionsPagesWithContext same as ListBackupSelectionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupSelectionsPagesWithContext(ctx aws.Context, input *ListBackupSelectionsInput, fn func(*ListBackupSelectionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBackupSelectionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBackupSelectionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListBackupSelectionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListBackupVaults = "ListBackupVaults" + +// ListBackupVaultsRequest generates a "aws/request.Request" representing the +// client's request for the ListBackupVaults operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListBackupVaults for more information on using the ListBackupVaults +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListBackupVaultsRequest method. +// req, resp := client.ListBackupVaultsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults +func (c *Backup) ListBackupVaultsRequest(input *ListBackupVaultsInput) (req *request.Request, output *ListBackupVaultsOutput) { + op := &request.Operation{ + Name: opListBackupVaults, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListBackupVaultsInput{} + } + + output = &ListBackupVaultsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBackupVaults API operation for AWS Backup. +// +// Returns a list of recovery point storage containers along with information +// about them. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListBackupVaults for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListBackupVaults +func (c *Backup) ListBackupVaults(input *ListBackupVaultsInput) (*ListBackupVaultsOutput, error) { + req, out := c.ListBackupVaultsRequest(input) + return out, req.Send() +} + +// ListBackupVaultsWithContext is the same as ListBackupVaults with the addition of +// the ability to pass a context and additional request options. +// +// See ListBackupVaults for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupVaultsWithContext(ctx aws.Context, input *ListBackupVaultsInput, opts ...request.Option) (*ListBackupVaultsOutput, error) { + req, out := c.ListBackupVaultsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListBackupVaultsPages iterates over the pages of a ListBackupVaults operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListBackupVaults method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListBackupVaults operation. +// pageNum := 0 +// err := client.ListBackupVaultsPages(params, +// func(page *ListBackupVaultsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListBackupVaultsPages(input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool) error { + return c.ListBackupVaultsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListBackupVaultsPagesWithContext same as ListBackupVaultsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListBackupVaultsPagesWithContext(ctx aws.Context, input *ListBackupVaultsInput, fn func(*ListBackupVaultsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListBackupVaultsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListBackupVaultsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListBackupVaultsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListProtectedResources = "ListProtectedResources" + +// ListProtectedResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListProtectedResources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListProtectedResources for more information on using the ListProtectedResources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListProtectedResourcesRequest method. +// req, resp := client.ListProtectedResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources +func (c *Backup) ListProtectedResourcesRequest(input *ListProtectedResourcesInput) (req *request.Request, output *ListProtectedResourcesOutput) { + op := &request.Operation{ + Name: opListProtectedResources, + HTTPMethod: "GET", + HTTPPath: "/resources/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListProtectedResourcesInput{} + } + + output = &ListProtectedResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListProtectedResources API operation for AWS Backup. +// +// Returns an array of resources successfully backed up by AWS Backup, including +// the time the resource was saved, an Amazon Resource Name (ARN) of the resource, +// and a resource type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListProtectedResources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListProtectedResources +func (c *Backup) ListProtectedResources(input *ListProtectedResourcesInput) (*ListProtectedResourcesOutput, error) { + req, out := c.ListProtectedResourcesRequest(input) + return out, req.Send() +} + +// ListProtectedResourcesWithContext is the same as ListProtectedResources with the addition of +// the ability to pass a context and additional request options. +// +// See ListProtectedResources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListProtectedResourcesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, opts ...request.Option) (*ListProtectedResourcesOutput, error) { + req, out := c.ListProtectedResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListProtectedResourcesPages iterates over the pages of a ListProtectedResources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListProtectedResources method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListProtectedResources operation. +// pageNum := 0 +// err := client.ListProtectedResourcesPages(params, +// func(page *ListProtectedResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListProtectedResourcesPages(input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool) error { + return c.ListProtectedResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListProtectedResourcesPagesWithContext same as ListProtectedResourcesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListProtectedResourcesPagesWithContext(ctx aws.Context, input *ListProtectedResourcesInput, fn func(*ListProtectedResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListProtectedResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListProtectedResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListProtectedResourcesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListRecoveryPointsByBackupVault = "ListRecoveryPointsByBackupVault" + +// ListRecoveryPointsByBackupVaultRequest generates a "aws/request.Request" representing the +// client's request for the ListRecoveryPointsByBackupVault operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRecoveryPointsByBackupVault for more information on using the ListRecoveryPointsByBackupVault +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRecoveryPointsByBackupVaultRequest method. +// req, resp := client.ListRecoveryPointsByBackupVaultRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault +func (c *Backup) ListRecoveryPointsByBackupVaultRequest(input *ListRecoveryPointsByBackupVaultInput) (req *request.Request, output *ListRecoveryPointsByBackupVaultOutput) { + op := &request.Operation{ + Name: opListRecoveryPointsByBackupVault, + HTTPMethod: "GET", + HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListRecoveryPointsByBackupVaultInput{} + } + + output = &ListRecoveryPointsByBackupVaultOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRecoveryPointsByBackupVault API operation for AWS Backup. +// +// Returns detailed information about the recovery points stored in a backup +// vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListRecoveryPointsByBackupVault for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByBackupVault +func (c *Backup) ListRecoveryPointsByBackupVault(input *ListRecoveryPointsByBackupVaultInput) (*ListRecoveryPointsByBackupVaultOutput, error) { + req, out := c.ListRecoveryPointsByBackupVaultRequest(input) + return out, req.Send() +} + +// ListRecoveryPointsByBackupVaultWithContext is the same as ListRecoveryPointsByBackupVault with the addition of +// the ability to pass a context and additional request options. +// +// See ListRecoveryPointsByBackupVault for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListRecoveryPointsByBackupVaultWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, opts ...request.Option) (*ListRecoveryPointsByBackupVaultOutput, error) { + req, out := c.ListRecoveryPointsByBackupVaultRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListRecoveryPointsByBackupVaultPages iterates over the pages of a ListRecoveryPointsByBackupVault operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListRecoveryPointsByBackupVault method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListRecoveryPointsByBackupVault operation. +// pageNum := 0 +// err := client.ListRecoveryPointsByBackupVaultPages(params, +// func(page *ListRecoveryPointsByBackupVaultOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListRecoveryPointsByBackupVaultPages(input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool) error { + return c.ListRecoveryPointsByBackupVaultPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListRecoveryPointsByBackupVaultPagesWithContext same as ListRecoveryPointsByBackupVaultPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListRecoveryPointsByBackupVaultPagesWithContext(ctx aws.Context, input *ListRecoveryPointsByBackupVaultInput, fn func(*ListRecoveryPointsByBackupVaultOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListRecoveryPointsByBackupVaultInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListRecoveryPointsByBackupVaultRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListRecoveryPointsByBackupVaultOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListRecoveryPointsByResource = "ListRecoveryPointsByResource" + +// ListRecoveryPointsByResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListRecoveryPointsByResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRecoveryPointsByResource for more information on using the ListRecoveryPointsByResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRecoveryPointsByResourceRequest method. +// req, resp := client.ListRecoveryPointsByResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource +func (c *Backup) ListRecoveryPointsByResourceRequest(input *ListRecoveryPointsByResourceInput) (req *request.Request, output *ListRecoveryPointsByResourceOutput) { + op := &request.Operation{ + Name: opListRecoveryPointsByResource, + HTTPMethod: "GET", + HTTPPath: "/resources/{resourceArn}/recovery-points/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListRecoveryPointsByResourceInput{} + } + + output = &ListRecoveryPointsByResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRecoveryPointsByResource API operation for AWS Backup. +// +// Returns detailed information about recovery points of the type specified +// by a resource Amazon Resource Name (ARN). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListRecoveryPointsByResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRecoveryPointsByResource +func (c *Backup) ListRecoveryPointsByResource(input *ListRecoveryPointsByResourceInput) (*ListRecoveryPointsByResourceOutput, error) { + req, out := c.ListRecoveryPointsByResourceRequest(input) + return out, req.Send() +} + +// ListRecoveryPointsByResourceWithContext is the same as ListRecoveryPointsByResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListRecoveryPointsByResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListRecoveryPointsByResourceWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, opts ...request.Option) (*ListRecoveryPointsByResourceOutput, error) { + req, out := c.ListRecoveryPointsByResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListRecoveryPointsByResourcePages iterates over the pages of a ListRecoveryPointsByResource operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListRecoveryPointsByResource method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListRecoveryPointsByResource operation. +// pageNum := 0 +// err := client.ListRecoveryPointsByResourcePages(params, +// func(page *ListRecoveryPointsByResourceOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListRecoveryPointsByResourcePages(input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool) error { + return c.ListRecoveryPointsByResourcePagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListRecoveryPointsByResourcePagesWithContext same as ListRecoveryPointsByResourcePages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListRecoveryPointsByResourcePagesWithContext(ctx aws.Context, input *ListRecoveryPointsByResourceInput, fn func(*ListRecoveryPointsByResourceOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListRecoveryPointsByResourceInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListRecoveryPointsByResourceRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListRecoveryPointsByResourceOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListRestoreJobs = "ListRestoreJobs" + +// ListRestoreJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListRestoreJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListRestoreJobs for more information on using the ListRestoreJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListRestoreJobsRequest method. +// req, resp := client.ListRestoreJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs +func (c *Backup) ListRestoreJobsRequest(input *ListRestoreJobsInput) (req *request.Request, output *ListRestoreJobsOutput) { + op := &request.Operation{ + Name: opListRestoreJobs, + HTTPMethod: "GET", + HTTPPath: "/restore-jobs/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListRestoreJobsInput{} + } + + output = &ListRestoreJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRestoreJobs API operation for AWS Backup. +// +// Returns a list of jobs that AWS Backup initiated to restore a saved resource, +// including metadata about the recovery process. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListRestoreJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListRestoreJobs +func (c *Backup) ListRestoreJobs(input *ListRestoreJobsInput) (*ListRestoreJobsOutput, error) { + req, out := c.ListRestoreJobsRequest(input) + return out, req.Send() +} + +// ListRestoreJobsWithContext is the same as ListRestoreJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListRestoreJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListRestoreJobsWithContext(ctx aws.Context, input *ListRestoreJobsInput, opts ...request.Option) (*ListRestoreJobsOutput, error) { + req, out := c.ListRestoreJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListRestoreJobsPages iterates over the pages of a ListRestoreJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListRestoreJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListRestoreJobs operation. +// pageNum := 0 +// err := client.ListRestoreJobsPages(params, +// func(page *ListRestoreJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListRestoreJobsPages(input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool) error { + return c.ListRestoreJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListRestoreJobsPagesWithContext same as ListRestoreJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListRestoreJobsPagesWithContext(ctx aws.Context, input *ListRestoreJobsInput, fn func(*ListRestoreJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListRestoreJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListRestoreJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListRestoreJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTags for more information on using the ListTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags +func (c *Backup) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "GET", + HTTPPath: "/tags/{resourceArn}/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for AWS Backup. +// +// Returns a list of key-value pairs assigned to a target recovery point, backup +// plan, or backup vault. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/ListTags +func (c *Backup) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagsPages iterates over the pages of a ListTags operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTags method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTags operation. +// pageNum := 0 +// err := client.ListTagsPages(params, +// func(page *ListTagsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Backup) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { + return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagsPagesWithContext same as ListTagsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPutBackupVaultAccessPolicy = "PutBackupVaultAccessPolicy" + +// PutBackupVaultAccessPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutBackupVaultAccessPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutBackupVaultAccessPolicy for more information on using the PutBackupVaultAccessPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutBackupVaultAccessPolicyRequest method. +// req, resp := client.PutBackupVaultAccessPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy +func (c *Backup) PutBackupVaultAccessPolicyRequest(input *PutBackupVaultAccessPolicyInput) (req *request.Request, output *PutBackupVaultAccessPolicyOutput) { + op := &request.Operation{ + Name: opPutBackupVaultAccessPolicy, + HTTPMethod: "PUT", + HTTPPath: "/backup-vaults/{backupVaultName}/access-policy", + } + + if input == nil { + input = &PutBackupVaultAccessPolicyInput{} + } + + output = &PutBackupVaultAccessPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutBackupVaultAccessPolicy API operation for AWS Backup. +// +// Sets a resource-based policy that is used to manage access permissions on +// the target backup vault. Requires a backup vault name and an access policy +// document in JSON format. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation PutBackupVaultAccessPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultAccessPolicy +func (c *Backup) PutBackupVaultAccessPolicy(input *PutBackupVaultAccessPolicyInput) (*PutBackupVaultAccessPolicyOutput, error) { + req, out := c.PutBackupVaultAccessPolicyRequest(input) + return out, req.Send() +} + +// PutBackupVaultAccessPolicyWithContext is the same as PutBackupVaultAccessPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutBackupVaultAccessPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) PutBackupVaultAccessPolicyWithContext(ctx aws.Context, input *PutBackupVaultAccessPolicyInput, opts ...request.Option) (*PutBackupVaultAccessPolicyOutput, error) { + req, out := c.PutBackupVaultAccessPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutBackupVaultNotifications = "PutBackupVaultNotifications" + +// PutBackupVaultNotificationsRequest generates a "aws/request.Request" representing the +// client's request for the PutBackupVaultNotifications operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutBackupVaultNotifications for more information on using the PutBackupVaultNotifications +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutBackupVaultNotificationsRequest method. +// req, resp := client.PutBackupVaultNotificationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications +func (c *Backup) PutBackupVaultNotificationsRequest(input *PutBackupVaultNotificationsInput) (req *request.Request, output *PutBackupVaultNotificationsOutput) { + op := &request.Operation{ + Name: opPutBackupVaultNotifications, + HTTPMethod: "PUT", + HTTPPath: "/backup-vaults/{backupVaultName}/notification-configuration", + } + + if input == nil { + input = &PutBackupVaultNotificationsInput{} + } + + output = &PutBackupVaultNotificationsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutBackupVaultNotifications API operation for AWS Backup. +// +// Turns on notifications on a backup vault for the specified topic and events. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation PutBackupVaultNotifications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/PutBackupVaultNotifications +func (c *Backup) PutBackupVaultNotifications(input *PutBackupVaultNotificationsInput) (*PutBackupVaultNotificationsOutput, error) { + req, out := c.PutBackupVaultNotificationsRequest(input) + return out, req.Send() +} + +// PutBackupVaultNotificationsWithContext is the same as PutBackupVaultNotifications with the addition of +// the ability to pass a context and additional request options. +// +// See PutBackupVaultNotifications for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) PutBackupVaultNotificationsWithContext(ctx aws.Context, input *PutBackupVaultNotificationsInput, opts ...request.Option) (*PutBackupVaultNotificationsOutput, error) { + req, out := c.PutBackupVaultNotificationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartBackupJob = "StartBackupJob" + +// StartBackupJobRequest generates a "aws/request.Request" representing the +// client's request for the StartBackupJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartBackupJob for more information on using the StartBackupJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartBackupJobRequest method. +// req, resp := client.StartBackupJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob +func (c *Backup) StartBackupJobRequest(input *StartBackupJobInput) (req *request.Request, output *StartBackupJobOutput) { + op := &request.Operation{ + Name: opStartBackupJob, + HTTPMethod: "PUT", + HTTPPath: "/backup-jobs", + } + + if input == nil { + input = &StartBackupJobInput{} + } + + output = &StartBackupJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartBackupJob API operation for AWS Backup. +// +// Starts a job to create a one-time backup of the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation StartBackupJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit in the request has been exceeded; for example, a maximum number of +// items allowed in a request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartBackupJob +func (c *Backup) StartBackupJob(input *StartBackupJobInput) (*StartBackupJobOutput, error) { + req, out := c.StartBackupJobRequest(input) + return out, req.Send() +} + +// StartBackupJobWithContext is the same as StartBackupJob with the addition of +// the ability to pass a context and additional request options. +// +// See StartBackupJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) StartBackupJobWithContext(ctx aws.Context, input *StartBackupJobInput, opts ...request.Option) (*StartBackupJobOutput, error) { + req, out := c.StartBackupJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartRestoreJob = "StartRestoreJob" + +// StartRestoreJobRequest generates a "aws/request.Request" representing the +// client's request for the StartRestoreJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartRestoreJob for more information on using the StartRestoreJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartRestoreJobRequest method. +// req, resp := client.StartRestoreJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob +func (c *Backup) StartRestoreJobRequest(input *StartRestoreJobInput) (req *request.Request, output *StartRestoreJobOutput) { + op := &request.Operation{ + Name: opStartRestoreJob, + HTTPMethod: "PUT", + HTTPPath: "/restore-jobs", + } + + if input == nil { + input = &StartRestoreJobInput{} + } + + output = &StartRestoreJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartRestoreJob API operation for AWS Backup. +// +// Recovers the saved resource identified by an Amazon Resource Name (ARN). +// +// If the resource ARN is included in the request, then the last complete backup +// of that resource is recovered. If the ARN of a recovery point is supplied, +// then that recovery point is restored. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation StartRestoreJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StartRestoreJob +func (c *Backup) StartRestoreJob(input *StartRestoreJobInput) (*StartRestoreJobOutput, error) { + req, out := c.StartRestoreJobRequest(input) + return out, req.Send() +} + +// StartRestoreJobWithContext is the same as StartRestoreJob with the addition of +// the ability to pass a context and additional request options. +// +// See StartRestoreJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) StartRestoreJobWithContext(ctx aws.Context, input *StartRestoreJobInput, opts ...request.Option) (*StartRestoreJobOutput, error) { + req, out := c.StartRestoreJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopBackupJob = "StopBackupJob" + +// StopBackupJobRequest generates a "aws/request.Request" representing the +// client's request for the StopBackupJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopBackupJob for more information on using the StopBackupJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopBackupJobRequest method. +// req, resp := client.StopBackupJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob +func (c *Backup) StopBackupJobRequest(input *StopBackupJobInput) (req *request.Request, output *StopBackupJobOutput) { + op := &request.Operation{ + Name: opStopBackupJob, + HTTPMethod: "POST", + HTTPPath: "/backup-jobs/{backupJobId}", + } + + if input == nil { + input = &StopBackupJobInput{} + } + + output = &StopBackupJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopBackupJob API operation for AWS Backup. +// +// Attempts to cancel a job to create a one-time backup of a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation StopBackupJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Indicates that something is wrong with the input to the request. For example, +// a parameter is of the wrong type. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/StopBackupJob +func (c *Backup) StopBackupJob(input *StopBackupJobInput) (*StopBackupJobOutput, error) { + req, out := c.StopBackupJobRequest(input) + return out, req.Send() +} + +// StopBackupJobWithContext is the same as StopBackupJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopBackupJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) StopBackupJobWithContext(ctx aws.Context, input *StopBackupJobInput, opts ...request.Option) (*StopBackupJobOutput, error) { + req, out := c.StopBackupJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource +func (c *Backup) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Backup. +// +// Assigns a set of key-value pairs to a recovery point, backup plan, or backup +// vault identified by an Amazon Resource Name (ARN). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit in the request has been exceeded; for example, a maximum number of +// items allowed in a request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/TagResource +func (c *Backup) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource +func (c *Backup) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/untag/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Backup. +// +// Removes a set of key-value pairs from a recovery point, backup plan, or backup +// vault identified by an Amazon Resource Name (ARN) +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UntagResource +func (c *Backup) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBackupPlan = "UpdateBackupPlan" + +// UpdateBackupPlanRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBackupPlan operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateBackupPlan for more information on using the UpdateBackupPlan +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateBackupPlanRequest method. +// req, resp := client.UpdateBackupPlanRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan +func (c *Backup) UpdateBackupPlanRequest(input *UpdateBackupPlanInput) (req *request.Request, output *UpdateBackupPlanOutput) { + op := &request.Operation{ + Name: opUpdateBackupPlan, + HTTPMethod: "POST", + HTTPPath: "/backup/plans/{backupPlanId}", + } + + if input == nil { + input = &UpdateBackupPlanInput{} + } + + output = &UpdateBackupPlanOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBackupPlan API operation for AWS Backup. +// +// Replaces the body of a saved backup plan identified by its backupPlanId with +// the input document in JSON format. The new version is uniquely identified +// by a VersionId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation UpdateBackupPlan for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateBackupPlan +func (c *Backup) UpdateBackupPlan(input *UpdateBackupPlanInput) (*UpdateBackupPlanOutput, error) { + req, out := c.UpdateBackupPlanRequest(input) + return out, req.Send() +} + +// UpdateBackupPlanWithContext is the same as UpdateBackupPlan with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBackupPlan for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) UpdateBackupPlanWithContext(ctx aws.Context, input *UpdateBackupPlanInput, opts ...request.Option) (*UpdateBackupPlanOutput, error) { + req, out := c.UpdateBackupPlanRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRecoveryPointLifecycle = "UpdateRecoveryPointLifecycle" + +// UpdateRecoveryPointLifecycleRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRecoveryPointLifecycle operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateRecoveryPointLifecycle for more information on using the UpdateRecoveryPointLifecycle +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateRecoveryPointLifecycleRequest method. +// req, resp := client.UpdateRecoveryPointLifecycleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle +func (c *Backup) UpdateRecoveryPointLifecycleRequest(input *UpdateRecoveryPointLifecycleInput) (req *request.Request, output *UpdateRecoveryPointLifecycleOutput) { + op := &request.Operation{ + Name: opUpdateRecoveryPointLifecycle, + HTTPMethod: "POST", + HTTPPath: "/backup-vaults/{backupVaultName}/recovery-points/{recoveryPointArn}", + } + + if input == nil { + input = &UpdateRecoveryPointLifecycleInput{} + } + + output = &UpdateRecoveryPointLifecycleOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRecoveryPointLifecycle API operation for AWS Backup. +// +// Sets the transition lifecycle of a recovery point. +// +// The lifecycle defines when a protected resource is transitioned to cold storage +// and when it expires. AWS Backup transitions and expires backups automatically +// according to the lifecycle that you define. +// +// Backups transitioned to cold storage must be stored in cold storage for a +// minimum of 90 days. Therefore, the “expire after days” setting must be 90 +// days greater than the “transition to cold after days” setting. The “transition +// to cold after days” setting cannot be changed after a backup has been transitioned +// to cold. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Backup's +// API operation UpdateRecoveryPointLifecycle for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A resource that is required for the action doesn't exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// Indicates that something is wrong with a parameter's value. For example, +// the value is out of range. +// +// * ErrCodeMissingParameterValueException "MissingParameterValueException" +// Indicates that a required parameter is missing. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The request failed due to a temporary failure of the server. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15/UpdateRecoveryPointLifecycle +func (c *Backup) UpdateRecoveryPointLifecycle(input *UpdateRecoveryPointLifecycleInput) (*UpdateRecoveryPointLifecycleOutput, error) { + req, out := c.UpdateRecoveryPointLifecycleRequest(input) + return out, req.Send() +} + +// UpdateRecoveryPointLifecycleWithContext is the same as UpdateRecoveryPointLifecycle with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRecoveryPointLifecycle for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Backup) UpdateRecoveryPointLifecycleWithContext(ctx aws.Context, input *UpdateRecoveryPointLifecycleInput, opts ...request.Option) (*UpdateRecoveryPointLifecycleOutput, error) { + req, out := c.UpdateRecoveryPointLifecycleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains DeleteAt and MoveToColdStorageAt timestamps, which are used to specify +// a lifecycle for a recovery point. +// +// The lifecycle defines when a protected resource is transitioned to cold storage +// and when it expires. AWS Backup transitions and expires backups automatically +// according to the lifecycle that you define. +// +// Backups transitioned to cold storage must be stored in cold storage for a +// minimum of 90 days. Therefore, the “expire after days” setting must be 90 +// days greater than the “transition to cold after days” setting. The “transition +// to cold after days” setting cannot be changed after a backup has been transitioned +// to cold. +type CalculatedLifecycle struct { + _ struct{} `type:"structure"` + + // A timestamp that specifies when to delete a recovery point. + DeleteAt *time.Time `type:"timestamp"` + + // A timestamp that specifies when to transition a recovery point to cold storage. + MoveToColdStorageAt *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CalculatedLifecycle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CalculatedLifecycle) GoString() string { + return s.String() +} + +// SetDeleteAt sets the DeleteAt field's value. +func (s *CalculatedLifecycle) SetDeleteAt(v time.Time) *CalculatedLifecycle { + s.DeleteAt = &v + return s +} + +// SetMoveToColdStorageAt sets the MoveToColdStorageAt field's value. +func (s *CalculatedLifecycle) SetMoveToColdStorageAt(v time.Time) *CalculatedLifecycle { + s.MoveToColdStorageAt = &v + return s +} + +// Contains an array of triplets made up of a condition type (such as StringEquals), +// a key, and a value. Conditions are used to filter resources in a selection +// that is assigned to a backup plan. +type Condition struct { + _ struct{} `type:"structure"` + + // The key in a key-value pair. For example, in "ec2:ResourceTag/Department": + // "accounting", "ec2:ResourceTag/Department" is the key. + // + // ConditionKey is a required field + ConditionKey *string `type:"string" required:"true"` + + // An operation, such as StringEquals, that is applied to a key-value pair used + // to filter resources in a selection. + // + // ConditionType is a required field + ConditionType *string `type:"string" required:"true" enum:"ConditionType"` + + // The value in a key-value pair. For example, in "ec2:ResourceTag/Department": + // "accounting", "accounting" is the value. + // + // ConditionValue is a required field + ConditionValue *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Condition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Condition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Condition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Condition"} + if s.ConditionKey == nil { + invalidParams.Add(request.NewErrParamRequired("ConditionKey")) + } + if s.ConditionType == nil { + invalidParams.Add(request.NewErrParamRequired("ConditionType")) + } + if s.ConditionValue == nil { + invalidParams.Add(request.NewErrParamRequired("ConditionValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConditionKey sets the ConditionKey field's value. +func (s *Condition) SetConditionKey(v string) *Condition { + s.ConditionKey = &v + return s +} + +// SetConditionType sets the ConditionType field's value. +func (s *Condition) SetConditionType(v string) *Condition { + s.ConditionType = &v + return s +} + +// SetConditionValue sets the ConditionValue field's value. +func (s *Condition) SetConditionValue(v string) *Condition { + s.ConditionValue = &v + return s +} + +type CreateBackupPlanInput struct { + _ struct{} `type:"structure"` + + // Specifies the body of a backup plan. Includes a BackupPlanName and one or + // more sets of Rules. + // + // BackupPlan is a required field + BackupPlan *PlanInput `type:"structure" required:"true"` + + // To help organize your resources, you can assign your own metadata to the + // resources that you create. Each tag is a key-value pair. The specified tags + // are assigned to all backups created with this plan. + BackupPlanTags map[string]*string `type:"map" sensitive:"true"` + + // Identifies the request and allows failed requests to be retried without the + // risk of executing the operation twice. If the request includes a CreatorRequestId + // that matches an existing backup plan, that plan is returned. This parameter + // is optional. + CreatorRequestId *string `type:"string"` +} + +// String returns the string representation +func (s CreateBackupPlanInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupPlanInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBackupPlanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBackupPlanInput"} + if s.BackupPlan == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlan")) + } + if s.BackupPlan != nil { + if err := s.BackupPlan.Validate(); err != nil { + invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlan sets the BackupPlan field's value. +func (s *CreateBackupPlanInput) SetBackupPlan(v *PlanInput) *CreateBackupPlanInput { + s.BackupPlan = v + return s +} + +// SetBackupPlanTags sets the BackupPlanTags field's value. +func (s *CreateBackupPlanInput) SetBackupPlanTags(v map[string]*string) *CreateBackupPlanInput { + s.BackupPlanTags = v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *CreateBackupPlanInput) SetCreatorRequestId(v string) *CreateBackupPlanInput { + s.CreatorRequestId = &v + return s +} + +type CreateBackupPlanOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for + // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. + BackupPlanArn *string `type:"string"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The date and time that a backup plan is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most + // 1024 bytes long. They cannot be edited. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s CreateBackupPlanOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupPlanOutput) GoString() string { + return s.String() +} + +// SetBackupPlanArn sets the BackupPlanArn field's value. +func (s *CreateBackupPlanOutput) SetBackupPlanArn(v string) *CreateBackupPlanOutput { + s.BackupPlanArn = &v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *CreateBackupPlanOutput) SetBackupPlanId(v string) *CreateBackupPlanOutput { + s.BackupPlanId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *CreateBackupPlanOutput) SetCreationDate(v time.Time) *CreateBackupPlanOutput { + s.CreationDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *CreateBackupPlanOutput) SetVersionId(v string) *CreateBackupPlanOutput { + s.VersionId = &v + return s +} + +type CreateBackupSelectionInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies the backup plan to be associated with the selection of + // resources. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` + + // Specifies the body of a request to assign a set of resources to a backup + // plan. + // + // It includes an array of resources, an optional array of patterns to exclude + // resources, an optional role to provide access to the AWS service the resource + // belongs to, and an optional array of tags used to identify a set of resources. + // + // BackupSelection is a required field + BackupSelection *Selection `type:"structure" required:"true"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` +} + +// String returns the string representation +func (s CreateBackupSelectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupSelectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBackupSelectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBackupSelectionInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + if s.BackupSelection == nil { + invalidParams.Add(request.NewErrParamRequired("BackupSelection")) + } + if s.BackupSelection != nil { + if err := s.BackupSelection.Validate(); err != nil { + invalidParams.AddNested("BackupSelection", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *CreateBackupSelectionInput) SetBackupPlanId(v string) *CreateBackupSelectionInput { + s.BackupPlanId = &v + return s +} + +// SetBackupSelection sets the BackupSelection field's value. +func (s *CreateBackupSelectionInput) SetBackupSelection(v *Selection) *CreateBackupSelectionInput { + s.BackupSelection = v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *CreateBackupSelectionInput) SetCreatorRequestId(v string) *CreateBackupSelectionInput { + s.CreatorRequestId = &v + return s +} + +type CreateBackupSelectionOutput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The date and time a backup selection is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // Uniquely identifies the body of a request to assign a set of resources to + // a backup plan. + SelectionId *string `type:"string"` +} + +// String returns the string representation +func (s CreateBackupSelectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupSelectionOutput) GoString() string { + return s.String() +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *CreateBackupSelectionOutput) SetBackupPlanId(v string) *CreateBackupSelectionOutput { + s.BackupPlanId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *CreateBackupSelectionOutput) SetCreationDate(v time.Time) *CreateBackupSelectionOutput { + s.CreationDate = &v + return s +} + +// SetSelectionId sets the SelectionId field's value. +func (s *CreateBackupSelectionOutput) SetSelectionId(v string) *CreateBackupSelectionOutput { + s.SelectionId = &v + return s +} + +type CreateBackupVaultInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // Metadata that you can assign to help organize the resources that you create. + // Each tag is a key-value pair. + BackupVaultTags map[string]*string `type:"map" sensitive:"true"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // The server-side encryption key that is used to protect your backups; for + // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + EncryptionKeyArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateBackupVaultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupVaultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBackupVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBackupVaultInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *CreateBackupVaultInput) SetBackupVaultName(v string) *CreateBackupVaultInput { + s.BackupVaultName = &v + return s +} + +// SetBackupVaultTags sets the BackupVaultTags field's value. +func (s *CreateBackupVaultInput) SetBackupVaultTags(v map[string]*string) *CreateBackupVaultInput { + s.BackupVaultTags = v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *CreateBackupVaultInput) SetCreatorRequestId(v string) *CreateBackupVaultInput { + s.CreatorRequestId = &v + return s +} + +// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. +func (s *CreateBackupVaultInput) SetEncryptionKeyArn(v string) *CreateBackupVaultInput { + s.EncryptionKeyArn = &v + return s +} + +type CreateBackupVaultOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the Region where they are created. They consist of lowercase letters, numbers, + // and hyphens. + BackupVaultName *string `type:"string"` + + // The date and time a backup vault is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CreateBackupVaultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupVaultOutput) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *CreateBackupVaultOutput) SetBackupVaultArn(v string) *CreateBackupVaultOutput { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *CreateBackupVaultOutput) SetBackupVaultName(v string) *CreateBackupVaultOutput { + s.BackupVaultName = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *CreateBackupVaultOutput) SetCreationDate(v time.Time) *CreateBackupVaultOutput { + s.CreationDate = &v + return s +} + +type DeleteBackupPlanInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBackupPlanInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupPlanInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupPlanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupPlanInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *DeleteBackupPlanInput) SetBackupPlanId(v string) *DeleteBackupPlanInput { + s.BackupPlanId = &v + return s +} + +type DeleteBackupPlanOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for + // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. + BackupPlanArn *string `type:"string"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The date and time a backup plan is deleted, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + DeletionDate *time.Time `type:"timestamp"` + + // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most + // 1,024 bytes long. Version Ids cannot be edited. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s DeleteBackupPlanOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupPlanOutput) GoString() string { + return s.String() +} + +// SetBackupPlanArn sets the BackupPlanArn field's value. +func (s *DeleteBackupPlanOutput) SetBackupPlanArn(v string) *DeleteBackupPlanOutput { + s.BackupPlanArn = &v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *DeleteBackupPlanOutput) SetBackupPlanId(v string) *DeleteBackupPlanOutput { + s.BackupPlanId = &v + return s +} + +// SetDeletionDate sets the DeletionDate field's value. +func (s *DeleteBackupPlanOutput) SetDeletionDate(v time.Time) *DeleteBackupPlanOutput { + s.DeletionDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *DeleteBackupPlanOutput) SetVersionId(v string) *DeleteBackupPlanOutput { + s.VersionId = &v + return s +} + +type DeleteBackupSelectionInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` + + // Uniquely identifies the body of a request to assign a set of resources to + // a backup plan. + // + // SelectionId is a required field + SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBackupSelectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupSelectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupSelectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupSelectionInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + if s.SelectionId == nil { + invalidParams.Add(request.NewErrParamRequired("SelectionId")) + } + if s.SelectionId != nil && len(*s.SelectionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *DeleteBackupSelectionInput) SetBackupPlanId(v string) *DeleteBackupSelectionInput { + s.BackupPlanId = &v + return s +} + +// SetSelectionId sets the SelectionId field's value. +func (s *DeleteBackupSelectionInput) SetSelectionId(v string) *DeleteBackupSelectionInput { + s.SelectionId = &v + return s +} + +type DeleteBackupSelectionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBackupSelectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupSelectionOutput) GoString() string { + return s.String() +} + +type DeleteBackupVaultAccessPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBackupVaultAccessPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupVaultAccessPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupVaultAccessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultAccessPolicyInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DeleteBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *DeleteBackupVaultAccessPolicyInput { + s.BackupVaultName = &v + return s +} + +type DeleteBackupVaultAccessPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBackupVaultAccessPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupVaultAccessPolicyOutput) GoString() string { + return s.String() +} + +type DeleteBackupVaultInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // theAWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBackupVaultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupVaultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DeleteBackupVaultInput) SetBackupVaultName(v string) *DeleteBackupVaultInput { + s.BackupVaultName = &v + return s +} + +type DeleteBackupVaultNotificationsInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the Region where they are created. They consist of lowercase letters, numbers, + // and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBackupVaultNotificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupVaultNotificationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupVaultNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupVaultNotificationsInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DeleteBackupVaultNotificationsInput) SetBackupVaultName(v string) *DeleteBackupVaultNotificationsInput { + s.BackupVaultName = &v + return s +} + +type DeleteBackupVaultNotificationsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBackupVaultNotificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupVaultNotificationsOutput) GoString() string { + return s.String() +} + +type DeleteBackupVaultOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBackupVaultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupVaultOutput) GoString() string { + return s.String() +} + +type DeleteRecoveryPointInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + // + // RecoveryPointArn is a required field + RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRecoveryPointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRecoveryPointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRecoveryPointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRecoveryPointInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + if s.RecoveryPointArn == nil { + invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) + } + if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DeleteRecoveryPointInput) SetBackupVaultName(v string) *DeleteRecoveryPointInput { + s.BackupVaultName = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *DeleteRecoveryPointInput) SetRecoveryPointArn(v string) *DeleteRecoveryPointInput { + s.RecoveryPointArn = &v + return s +} + +type DeleteRecoveryPointOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteRecoveryPointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRecoveryPointOutput) GoString() string { + return s.String() +} + +type DescribeBackupJobInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a request to AWS Backup to back up a resource. + // + // BackupJobId is a required field + BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBackupJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBackupJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBackupJobInput"} + if s.BackupJobId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupJobId")) + } + if s.BackupJobId != nil && len(*s.BackupJobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupJobId sets the BackupJobId field's value. +func (s *DescribeBackupJobInput) SetBackupJobId(v string) *DescribeBackupJobInput { + s.BackupJobId = &v + return s +} + +type DescribeBackupJobOutput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a request to AWS Backup to back up a resource. + BackupJobId *string `type:"string"` + + // The size, in bytes, of a backup. + BackupSizeInBytes *int64 `type:"long"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + BackupVaultName *string `type:"string"` + + // The size in bytes transferred to a backup vault at the time that the job + // status was queried. + BytesTransferred *int64 `type:"long"` + + // The date and time that a job to create a backup job is completed, in Unix + // format and Coordinated Universal Time (UTC). The value of CreationDate is + // accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + CompletionDate *time.Time `type:"timestamp"` + + // Contains identifying information about the creation of a backup job, including + // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the + // backup plan that is used to create it. + CreatedBy *RecoveryPointCreator `type:"structure"` + + // The date and time that a backup job is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The date and time that a job to back up resources is expected to be completed, + // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate + // is accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + ExpectedCompletionDate *time.Time `type:"timestamp"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // Contains an estimated percentage that is complete of a job at the time the + // job status was queried. + PercentDone *string `type:"string"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // An ARN that uniquely identifies a saved resource. The format of the ARN depends + // on the resource type. + ResourceArn *string `type:"string"` + + // The type of AWS resource to be backed-up; for example, an Amazon Elastic + // Block Store (Amazon EBS) volume or an Amazon Relational Database Service + // (Amazon RDS) database. + ResourceType *string `type:"string"` + + // Specifies the time in Unix format and Coordinated Universal Time (UTC) when + // a backup job must be started before it is canceled. The value is calculated + // by adding the start window to the scheduled time. So if the scheduled time + // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 + // PM on the date specified. The value of StartBy is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + StartBy *time.Time `type:"timestamp"` + + // The current state of a resource recovery point. + State *string `type:"string" enum:"JobState"` + + // A detailed message explaining the status of the job to back up a resource. + StatusMessage *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBackupJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupJobOutput) GoString() string { + return s.String() +} + +// SetBackupJobId sets the BackupJobId field's value. +func (s *DescribeBackupJobOutput) SetBackupJobId(v string) *DescribeBackupJobOutput { + s.BackupJobId = &v + return s +} + +// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. +func (s *DescribeBackupJobOutput) SetBackupSizeInBytes(v int64) *DescribeBackupJobOutput { + s.BackupSizeInBytes = &v + return s +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *DescribeBackupJobOutput) SetBackupVaultArn(v string) *DescribeBackupJobOutput { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DescribeBackupJobOutput) SetBackupVaultName(v string) *DescribeBackupJobOutput { + s.BackupVaultName = &v + return s +} + +// SetBytesTransferred sets the BytesTransferred field's value. +func (s *DescribeBackupJobOutput) SetBytesTransferred(v int64) *DescribeBackupJobOutput { + s.BytesTransferred = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *DescribeBackupJobOutput) SetCompletionDate(v time.Time) *DescribeBackupJobOutput { + s.CompletionDate = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *DescribeBackupJobOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeBackupJobOutput { + s.CreatedBy = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *DescribeBackupJobOutput) SetCreationDate(v time.Time) *DescribeBackupJobOutput { + s.CreationDate = &v + return s +} + +// SetExpectedCompletionDate sets the ExpectedCompletionDate field's value. +func (s *DescribeBackupJobOutput) SetExpectedCompletionDate(v time.Time) *DescribeBackupJobOutput { + s.ExpectedCompletionDate = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *DescribeBackupJobOutput) SetIamRoleArn(v string) *DescribeBackupJobOutput { + s.IamRoleArn = &v + return s +} + +// SetPercentDone sets the PercentDone field's value. +func (s *DescribeBackupJobOutput) SetPercentDone(v string) *DescribeBackupJobOutput { + s.PercentDone = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *DescribeBackupJobOutput) SetRecoveryPointArn(v string) *DescribeBackupJobOutput { + s.RecoveryPointArn = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DescribeBackupJobOutput) SetResourceArn(v string) *DescribeBackupJobOutput { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeBackupJobOutput) SetResourceType(v string) *DescribeBackupJobOutput { + s.ResourceType = &v + return s +} + +// SetStartBy sets the StartBy field's value. +func (s *DescribeBackupJobOutput) SetStartBy(v time.Time) *DescribeBackupJobOutput { + s.StartBy = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeBackupJobOutput) SetState(v string) *DescribeBackupJobOutput { + s.State = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *DescribeBackupJobOutput) SetStatusMessage(v string) *DescribeBackupJobOutput { + s.StatusMessage = &v + return s +} + +type DescribeBackupVaultInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBackupVaultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupVaultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBackupVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBackupVaultInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DescribeBackupVaultInput) SetBackupVaultName(v string) *DescribeBackupVaultInput { + s.BackupVaultName = &v + return s +} + +type DescribeBackupVaultOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the Region where they are created. They consist of lowercase letters, numbers, + // and hyphens. + BackupVaultName *string `type:"string"` + + // The date and time that a backup vault is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // The server-side encryption key that is used to protect your backups; for + // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + EncryptionKeyArn *string `type:"string"` + + // The number of recovery points that are stored in a backup vault. + NumberOfRecoveryPoints *int64 `type:"long"` +} + +// String returns the string representation +func (s DescribeBackupVaultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupVaultOutput) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *DescribeBackupVaultOutput) SetBackupVaultArn(v string) *DescribeBackupVaultOutput { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DescribeBackupVaultOutput) SetBackupVaultName(v string) *DescribeBackupVaultOutput { + s.BackupVaultName = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *DescribeBackupVaultOutput) SetCreationDate(v time.Time) *DescribeBackupVaultOutput { + s.CreationDate = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *DescribeBackupVaultOutput) SetCreatorRequestId(v string) *DescribeBackupVaultOutput { + s.CreatorRequestId = &v + return s +} + +// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. +func (s *DescribeBackupVaultOutput) SetEncryptionKeyArn(v string) *DescribeBackupVaultOutput { + s.EncryptionKeyArn = &v + return s +} + +// SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value. +func (s *DescribeBackupVaultOutput) SetNumberOfRecoveryPoints(v int64) *DescribeBackupVaultOutput { + s.NumberOfRecoveryPoints = &v + return s +} + +type DescribeProtectedResourceInput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format + // of the ARN depends on the resource type. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeProtectedResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProtectedResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeProtectedResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeProtectedResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DescribeProtectedResourceInput) SetResourceArn(v string) *DescribeProtectedResourceInput { + s.ResourceArn = &v + return s +} + +type DescribeProtectedResourceOutput struct { + _ struct{} `type:"structure"` + + // The date and time that a resource was last backed up, in Unix format and + // Coordinated Universal Time (UTC). The value of LastBackupTime is accurate + // to milliseconds. For example, the value 1516925490.087 represents Friday, + // January 26, 2018 12:11:30.087 AM. + LastBackupTime *time.Time `type:"timestamp"` + + // An ARN that uniquely identifies a resource. The format of the ARN depends + // on the resource type. + ResourceArn *string `type:"string"` + + // The type of AWS resource saved as a recovery point; for example, an EBS volume + // or an Amazon RDS database. + ResourceType *string `type:"string"` +} + +// String returns the string representation +func (s DescribeProtectedResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeProtectedResourceOutput) GoString() string { + return s.String() +} + +// SetLastBackupTime sets the LastBackupTime field's value. +func (s *DescribeProtectedResourceOutput) SetLastBackupTime(v time.Time) *DescribeProtectedResourceOutput { + s.LastBackupTime = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DescribeProtectedResourceOutput) SetResourceArn(v string) *DescribeProtectedResourceOutput { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeProtectedResourceOutput) SetResourceType(v string) *DescribeProtectedResourceOutput { + s.ResourceType = &v + return s +} + +type DescribeRecoveryPointInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + // + // RecoveryPointArn is a required field + RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeRecoveryPointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRecoveryPointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRecoveryPointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRecoveryPointInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + if s.RecoveryPointArn == nil { + invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) + } + if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DescribeRecoveryPointInput) SetBackupVaultName(v string) *DescribeRecoveryPointInput { + s.BackupVaultName = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *DescribeRecoveryPointInput) SetRecoveryPointArn(v string) *DescribeRecoveryPointInput { + s.RecoveryPointArn = &v + return s +} + +type DescribeRecoveryPointOutput struct { + _ struct{} `type:"structure"` + + // The size, in bytes, of a backup. + BackupSizeInBytes *int64 `type:"long"` + + // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the Region where they are created. They consist of lowercase letters, numbers, + // and hyphens. + BackupVaultName *string `type:"string"` + + // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt + // timestamps. + CalculatedLifecycle *CalculatedLifecycle `type:"structure"` + + // The date and time that a job to create a recovery point is completed, in + // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate + // is accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + CompletionDate *time.Time `type:"timestamp"` + + // Contains identifying information about the creation of a recovery point, + // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId + // of the backup plan used to create it. + CreatedBy *RecoveryPointCreator `type:"structure"` + + // The date and time that a recovery point is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The server-side encryption key used to protect your backups; for example, + // arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + EncryptionKeyArn *string `type:"string"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // A Boolean value that is returned as TRUE if the specified recovery point + // is encrypted, or FALSE if the recovery point is not encrypted. + IsEncrypted *bool `type:"boolean"` + + // The date and time that a recovery point was last restored, in Unix format + // and Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate + // to milliseconds. For example, the value 1516925490.087 represents Friday, + // January 26, 2018 12:11:30.087 AM. + LastRestoreTime *time.Time `type:"timestamp"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup transitions and expires backups automatically + // according to the lifecycle that you define. + // + // Backups that are transitioned to cold storage must be stored in cold storage + // for a minimum of 90 days. Therefore, the “expire after days” setting must + // be 90 days greater than the “transition to cold after days” setting. The + // “transition to cold after days” setting cannot be changed after a backup + // has been transitioned to cold. + Lifecycle *Lifecycle `type:"structure"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // An ARN that uniquely identifies a saved resource. The format of the ARN depends + // on the resource type. + ResourceArn *string `type:"string"` + + // The type of AWS resource to save as a recovery point; for example, an Amazon + // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database + // Service (Amazon RDS) database. + ResourceType *string `type:"string"` + + // A status code specifying the state of the recovery point. + // + // A partial status indicates that the recovery point was not successfully re-created + // and must be retried. + Status *string `type:"string" enum:"RecoveryPointStatus"` + + // Specifies the storage class of the recovery point. Valid values are WARM + // or COLD. + StorageClass *string `type:"string" enum:"StorageClass"` +} + +// String returns the string representation +func (s DescribeRecoveryPointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRecoveryPointOutput) GoString() string { + return s.String() +} + +// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. +func (s *DescribeRecoveryPointOutput) SetBackupSizeInBytes(v int64) *DescribeRecoveryPointOutput { + s.BackupSizeInBytes = &v + return s +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *DescribeRecoveryPointOutput) SetBackupVaultArn(v string) *DescribeRecoveryPointOutput { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *DescribeRecoveryPointOutput) SetBackupVaultName(v string) *DescribeRecoveryPointOutput { + s.BackupVaultName = &v + return s +} + +// SetCalculatedLifecycle sets the CalculatedLifecycle field's value. +func (s *DescribeRecoveryPointOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *DescribeRecoveryPointOutput { + s.CalculatedLifecycle = v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *DescribeRecoveryPointOutput) SetCompletionDate(v time.Time) *DescribeRecoveryPointOutput { + s.CompletionDate = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *DescribeRecoveryPointOutput) SetCreatedBy(v *RecoveryPointCreator) *DescribeRecoveryPointOutput { + s.CreatedBy = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *DescribeRecoveryPointOutput) SetCreationDate(v time.Time) *DescribeRecoveryPointOutput { + s.CreationDate = &v + return s +} + +// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. +func (s *DescribeRecoveryPointOutput) SetEncryptionKeyArn(v string) *DescribeRecoveryPointOutput { + s.EncryptionKeyArn = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *DescribeRecoveryPointOutput) SetIamRoleArn(v string) *DescribeRecoveryPointOutput { + s.IamRoleArn = &v + return s +} + +// SetIsEncrypted sets the IsEncrypted field's value. +func (s *DescribeRecoveryPointOutput) SetIsEncrypted(v bool) *DescribeRecoveryPointOutput { + s.IsEncrypted = &v + return s +} + +// SetLastRestoreTime sets the LastRestoreTime field's value. +func (s *DescribeRecoveryPointOutput) SetLastRestoreTime(v time.Time) *DescribeRecoveryPointOutput { + s.LastRestoreTime = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *DescribeRecoveryPointOutput) SetLifecycle(v *Lifecycle) *DescribeRecoveryPointOutput { + s.Lifecycle = v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *DescribeRecoveryPointOutput) SetRecoveryPointArn(v string) *DescribeRecoveryPointOutput { + s.RecoveryPointArn = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DescribeRecoveryPointOutput) SetResourceArn(v string) *DescribeRecoveryPointOutput { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeRecoveryPointOutput) SetResourceType(v string) *DescribeRecoveryPointOutput { + s.ResourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeRecoveryPointOutput) SetStatus(v string) *DescribeRecoveryPointOutput { + s.Status = &v + return s +} + +// SetStorageClass sets the StorageClass field's value. +func (s *DescribeRecoveryPointOutput) SetStorageClass(v string) *DescribeRecoveryPointOutput { + s.StorageClass = &v + return s +} + +type DescribeRestoreJobInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies the job that restores a recovery point. + // + // RestoreJobId is a required field + RestoreJobId *string `location:"uri" locationName:"restoreJobId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeRestoreJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRestoreJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeRestoreJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeRestoreJobInput"} + if s.RestoreJobId == nil { + invalidParams.Add(request.NewErrParamRequired("RestoreJobId")) + } + if s.RestoreJobId != nil && len(*s.RestoreJobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestoreJobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRestoreJobId sets the RestoreJobId field's value. +func (s *DescribeRestoreJobInput) SetRestoreJobId(v string) *DescribeRestoreJobInput { + s.RestoreJobId = &v + return s +} + +type DescribeRestoreJobOutput struct { + _ struct{} `type:"structure"` + + // The size, in bytes, of the restored resource. + BackupSizeInBytes *int64 `type:"long"` + + // The date and time that a job to restore a recovery point is completed, in + // Unix format and Coordinated Universal Time (UTC). The value of CompletionDate + // is accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + CompletionDate *time.Time `type:"timestamp"` + + // An Amazon Resource Name (ARN) that uniquely identifies a resource whose recovery + // point is being restored. The format of the ARN depends on the resource type + // of the backed-up resource. + CreatedResourceArn *string `type:"string"` + + // The date and time that a restore job is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The amount of time in minutes that a job restoring a recovery point is expected + // to take. + ExpectedCompletionTimeMinutes *int64 `type:"long"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // Contains an estimated percentage that is complete of a job at the time the + // job status was queried. + PercentDone *string `type:"string"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // Uniquely identifies the job that restores a recovery point. + RestoreJobId *string `type:"string"` + + // Status code specifying the state of the job that is initiated by AWS Backup + // to restore a recovery point. + Status *string `type:"string" enum:"RestoreJobStatus"` + + // A detailed message explaining the status of a job to restore a recovery point. + StatusMessage *string `type:"string"` +} + +// String returns the string representation +func (s DescribeRestoreJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRestoreJobOutput) GoString() string { + return s.String() +} + +// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. +func (s *DescribeRestoreJobOutput) SetBackupSizeInBytes(v int64) *DescribeRestoreJobOutput { + s.BackupSizeInBytes = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *DescribeRestoreJobOutput) SetCompletionDate(v time.Time) *DescribeRestoreJobOutput { + s.CompletionDate = &v + return s +} + +// SetCreatedResourceArn sets the CreatedResourceArn field's value. +func (s *DescribeRestoreJobOutput) SetCreatedResourceArn(v string) *DescribeRestoreJobOutput { + s.CreatedResourceArn = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *DescribeRestoreJobOutput) SetCreationDate(v time.Time) *DescribeRestoreJobOutput { + s.CreationDate = &v + return s +} + +// SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value. +func (s *DescribeRestoreJobOutput) SetExpectedCompletionTimeMinutes(v int64) *DescribeRestoreJobOutput { + s.ExpectedCompletionTimeMinutes = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *DescribeRestoreJobOutput) SetIamRoleArn(v string) *DescribeRestoreJobOutput { + s.IamRoleArn = &v + return s +} + +// SetPercentDone sets the PercentDone field's value. +func (s *DescribeRestoreJobOutput) SetPercentDone(v string) *DescribeRestoreJobOutput { + s.PercentDone = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *DescribeRestoreJobOutput) SetRecoveryPointArn(v string) *DescribeRestoreJobOutput { + s.RecoveryPointArn = &v + return s +} + +// SetRestoreJobId sets the RestoreJobId field's value. +func (s *DescribeRestoreJobOutput) SetRestoreJobId(v string) *DescribeRestoreJobOutput { + s.RestoreJobId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeRestoreJobOutput) SetStatus(v string) *DescribeRestoreJobOutput { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *DescribeRestoreJobOutput) SetStatusMessage(v string) *DescribeRestoreJobOutput { + s.StatusMessage = &v + return s +} + +type ExportBackupPlanTemplateInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExportBackupPlanTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportBackupPlanTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportBackupPlanTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportBackupPlanTemplateInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *ExportBackupPlanTemplateInput) SetBackupPlanId(v string) *ExportBackupPlanTemplateInput { + s.BackupPlanId = &v + return s +} + +type ExportBackupPlanTemplateOutput struct { + _ struct{} `type:"structure"` + + // The body of a backup plan template in JSON format. + // + // This is a signed JSON document that cannot be modified before being passed + // to GetBackupPlanFromJSON. + BackupPlanTemplateJson *string `type:"string"` +} + +// String returns the string representation +func (s ExportBackupPlanTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportBackupPlanTemplateOutput) GoString() string { + return s.String() +} + +// SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value. +func (s *ExportBackupPlanTemplateOutput) SetBackupPlanTemplateJson(v string) *ExportBackupPlanTemplateOutput { + s.BackupPlanTemplateJson = &v + return s +} + +type GetBackupPlanFromJSONInput struct { + _ struct{} `type:"structure"` + + // A customer-supplied backup plan document in JSON format. + // + // BackupPlanTemplateJson is a required field + BackupPlanTemplateJson *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBackupPlanFromJSONInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupPlanFromJSONInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBackupPlanFromJSONInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromJSONInput"} + if s.BackupPlanTemplateJson == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateJson")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanTemplateJson sets the BackupPlanTemplateJson field's value. +func (s *GetBackupPlanFromJSONInput) SetBackupPlanTemplateJson(v string) *GetBackupPlanFromJSONInput { + s.BackupPlanTemplateJson = &v + return s +} + +type GetBackupPlanFromJSONOutput struct { + _ struct{} `type:"structure"` + + // Specifies the body of a backup plan. Includes a BackupPlanName and one or + // more sets of Rules. + BackupPlan *Plan `type:"structure"` +} + +// String returns the string representation +func (s GetBackupPlanFromJSONOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupPlanFromJSONOutput) GoString() string { + return s.String() +} + +// SetBackupPlan sets the BackupPlan field's value. +func (s *GetBackupPlanFromJSONOutput) SetBackupPlan(v *Plan) *GetBackupPlanFromJSONOutput { + s.BackupPlan = v + return s +} + +type GetBackupPlanFromTemplateInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a stored backup plan template. + // + // BackupPlanTemplateId is a required field + BackupPlanTemplateId *string `location:"uri" locationName:"templateId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBackupPlanFromTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupPlanFromTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBackupPlanFromTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanFromTemplateInput"} + if s.BackupPlanTemplateId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanTemplateId")) + } + if s.BackupPlanTemplateId != nil && len(*s.BackupPlanTemplateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanTemplateId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value. +func (s *GetBackupPlanFromTemplateInput) SetBackupPlanTemplateId(v string) *GetBackupPlanFromTemplateInput { + s.BackupPlanTemplateId = &v + return s +} + +type GetBackupPlanFromTemplateOutput struct { + _ struct{} `type:"structure"` + + // Returns the body of a backup plan based on the target template, including + // the name, rules, and backup vault of the plan. + BackupPlanDocument *Plan `type:"structure"` +} + +// String returns the string representation +func (s GetBackupPlanFromTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupPlanFromTemplateOutput) GoString() string { + return s.String() +} + +// SetBackupPlanDocument sets the BackupPlanDocument field's value. +func (s *GetBackupPlanFromTemplateOutput) SetBackupPlanDocument(v *Plan) *GetBackupPlanFromTemplateOutput { + s.BackupPlanDocument = v + return s +} + +type GetBackupPlanInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` + + // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most + // 1,024 bytes long. Version IDs cannot be edited. + VersionId *string `location:"querystring" locationName:"versionId" type:"string"` +} + +// String returns the string representation +func (s GetBackupPlanInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupPlanInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBackupPlanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBackupPlanInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *GetBackupPlanInput) SetBackupPlanId(v string) *GetBackupPlanInput { + s.BackupPlanId = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetBackupPlanInput) SetVersionId(v string) *GetBackupPlanInput { + s.VersionId = &v + return s +} + +type GetBackupPlanOutput struct { + _ struct{} `type:"structure"` + + // Specifies the body of a backup plan. Includes a BackupPlanName and one or + // more sets of Rules. + BackupPlan *Plan `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for + // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. + BackupPlanArn *string `type:"string"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The date and time that a backup plan is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // The date and time that a backup plan is deleted, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + DeletionDate *time.Time `type:"timestamp"` + + // The last time a job to back up resources was executed with this backup plan. + // A date and time, in Unix format and Coordinated Universal Time (UTC). The + // value of LastExecutionDate is accurate to milliseconds. For example, the + // value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. + LastExecutionDate *time.Time `type:"timestamp"` + + // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most + // 1,024 bytes long. Version IDs cannot be edited. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s GetBackupPlanOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupPlanOutput) GoString() string { + return s.String() +} + +// SetBackupPlan sets the BackupPlan field's value. +func (s *GetBackupPlanOutput) SetBackupPlan(v *Plan) *GetBackupPlanOutput { + s.BackupPlan = v + return s +} + +// SetBackupPlanArn sets the BackupPlanArn field's value. +func (s *GetBackupPlanOutput) SetBackupPlanArn(v string) *GetBackupPlanOutput { + s.BackupPlanArn = &v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *GetBackupPlanOutput) SetBackupPlanId(v string) *GetBackupPlanOutput { + s.BackupPlanId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *GetBackupPlanOutput) SetCreationDate(v time.Time) *GetBackupPlanOutput { + s.CreationDate = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *GetBackupPlanOutput) SetCreatorRequestId(v string) *GetBackupPlanOutput { + s.CreatorRequestId = &v + return s +} + +// SetDeletionDate sets the DeletionDate field's value. +func (s *GetBackupPlanOutput) SetDeletionDate(v time.Time) *GetBackupPlanOutput { + s.DeletionDate = &v + return s +} + +// SetLastExecutionDate sets the LastExecutionDate field's value. +func (s *GetBackupPlanOutput) SetLastExecutionDate(v time.Time) *GetBackupPlanOutput { + s.LastExecutionDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetBackupPlanOutput) SetVersionId(v string) *GetBackupPlanOutput { + s.VersionId = &v + return s +} + +type GetBackupSelectionInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` + + // Uniquely identifies the body of a request to assign a set of resources to + // a backup plan. + // + // SelectionId is a required field + SelectionId *string `location:"uri" locationName:"selectionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBackupSelectionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupSelectionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBackupSelectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBackupSelectionInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + if s.SelectionId == nil { + invalidParams.Add(request.NewErrParamRequired("SelectionId")) + } + if s.SelectionId != nil && len(*s.SelectionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SelectionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *GetBackupSelectionInput) SetBackupPlanId(v string) *GetBackupSelectionInput { + s.BackupPlanId = &v + return s +} + +// SetSelectionId sets the SelectionId field's value. +func (s *GetBackupSelectionInput) SetSelectionId(v string) *GetBackupSelectionInput { + s.SelectionId = &v + return s +} + +type GetBackupSelectionOutput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // Specifies the body of a request to assign a set of resources to a backup + // plan. + // + // It includes an array of resources, an optional array of patterns to exclude + // resources, an optional role to provide access to the AWS service that the + // resource belongs to, and an optional array of tags used to identify a set + // of resources. + BackupSelection *Selection `type:"structure"` + + // The date and time a backup selection is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // Uniquely identifies the body of a request to assign a set of resources to + // a backup plan. + SelectionId *string `type:"string"` +} + +// String returns the string representation +func (s GetBackupSelectionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupSelectionOutput) GoString() string { + return s.String() +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *GetBackupSelectionOutput) SetBackupPlanId(v string) *GetBackupSelectionOutput { + s.BackupPlanId = &v + return s +} + +// SetBackupSelection sets the BackupSelection field's value. +func (s *GetBackupSelectionOutput) SetBackupSelection(v *Selection) *GetBackupSelectionOutput { + s.BackupSelection = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *GetBackupSelectionOutput) SetCreationDate(v time.Time) *GetBackupSelectionOutput { + s.CreationDate = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *GetBackupSelectionOutput) SetCreatorRequestId(v string) *GetBackupSelectionOutput { + s.CreatorRequestId = &v + return s +} + +// SetSelectionId sets the SelectionId field's value. +func (s *GetBackupSelectionOutput) SetSelectionId(v string) *GetBackupSelectionOutput { + s.SelectionId = &v + return s +} + +type GetBackupVaultAccessPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBackupVaultAccessPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupVaultAccessPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBackupVaultAccessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultAccessPolicyInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *GetBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyInput { + s.BackupVaultName = &v + return s +} + +type GetBackupVaultAccessPolicyOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the Region where they are created. They consist of lowercase letters, numbers, + // and hyphens. + BackupVaultName *string `type:"string"` + + // The backup vault access policy document in JSON format. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s GetBackupVaultAccessPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupVaultAccessPolicyOutput) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultArn(v string) *GetBackupVaultAccessPolicyOutput { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *GetBackupVaultAccessPolicyOutput) SetBackupVaultName(v string) *GetBackupVaultAccessPolicyOutput { + s.BackupVaultName = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *GetBackupVaultAccessPolicyOutput) SetPolicy(v string) *GetBackupVaultAccessPolicyOutput { + s.Policy = &v + return s +} + +type GetBackupVaultNotificationsInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBackupVaultNotificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupVaultNotificationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBackupVaultNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBackupVaultNotificationsInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *GetBackupVaultNotificationsInput) SetBackupVaultName(v string) *GetBackupVaultNotificationsInput { + s.BackupVaultName = &v + return s +} + +type GetBackupVaultNotificationsOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // An array of events that indicate the status of jobs to back up resources + // to the backup vault. + BackupVaultEvents []*string `type:"list"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the Region where they are created. They consist of lowercase letters, numbers, + // and hyphens. + BackupVaultName *string `type:"string"` + + // An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon + // SNS) topic; for example, arn:aws:sns:us-west-2:111122223333:MyTopic. + SNSTopicArn *string `type:"string"` +} + +// String returns the string representation +func (s GetBackupVaultNotificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBackupVaultNotificationsOutput) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *GetBackupVaultNotificationsOutput) SetBackupVaultArn(v string) *GetBackupVaultNotificationsOutput { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultEvents sets the BackupVaultEvents field's value. +func (s *GetBackupVaultNotificationsOutput) SetBackupVaultEvents(v []*string) *GetBackupVaultNotificationsOutput { + s.BackupVaultEvents = v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *GetBackupVaultNotificationsOutput) SetBackupVaultName(v string) *GetBackupVaultNotificationsOutput { + s.BackupVaultName = &v + return s +} + +// SetSNSTopicArn sets the SNSTopicArn field's value. +func (s *GetBackupVaultNotificationsOutput) SetSNSTopicArn(v string) *GetBackupVaultNotificationsOutput { + s.SNSTopicArn = &v + return s +} + +type GetRecoveryPointRestoreMetadataInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + // + // RecoveryPointArn is a required field + RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRecoveryPointRestoreMetadataInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRecoveryPointRestoreMetadataInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRecoveryPointRestoreMetadataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRecoveryPointRestoreMetadataInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + if s.RecoveryPointArn == nil { + invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) + } + if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *GetRecoveryPointRestoreMetadataInput) SetBackupVaultName(v string) *GetRecoveryPointRestoreMetadataInput { + s.BackupVaultName = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *GetRecoveryPointRestoreMetadataInput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataInput { + s.RecoveryPointArn = &v + return s +} + +type GetRecoveryPointRestoreMetadataOutput struct { + _ struct{} `type:"structure"` + + // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // A set of metadata key-value pairs that lists the metadata key-value pairs + // that are required to restore the recovery point. + RestoreMetadata map[string]*string `type:"map"` +} + +// String returns the string representation +func (s GetRecoveryPointRestoreMetadataOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRecoveryPointRestoreMetadataOutput) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *GetRecoveryPointRestoreMetadataOutput) SetBackupVaultArn(v string) *GetRecoveryPointRestoreMetadataOutput { + s.BackupVaultArn = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *GetRecoveryPointRestoreMetadataOutput) SetRecoveryPointArn(v string) *GetRecoveryPointRestoreMetadataOutput { + s.RecoveryPointArn = &v + return s +} + +// SetRestoreMetadata sets the RestoreMetadata field's value. +func (s *GetRecoveryPointRestoreMetadataOutput) SetRestoreMetadata(v map[string]*string) *GetRecoveryPointRestoreMetadataOutput { + s.RestoreMetadata = v + return s +} + +type GetSupportedResourceTypesInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetSupportedResourceTypesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSupportedResourceTypesInput) GoString() string { + return s.String() +} + +type GetSupportedResourceTypesOutput struct { + _ struct{} `type:"structure"` + + // Contains a string with the supported AWS resource types: + // + // * EBS for Amazon Elastic Block Store + // + // * SGW for AWS Storage Gateway + // + // * RDS for Amazon Relational Database Service + // + // * DDB for Amazon DynamoDB + // + // * EFS for Amazon Elastic File System + ResourceTypes []*string `type:"list"` +} + +// String returns the string representation +func (s GetSupportedResourceTypesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSupportedResourceTypesOutput) GoString() string { + return s.String() +} + +// SetResourceTypes sets the ResourceTypes field's value. +func (s *GetSupportedResourceTypesOutput) SetResourceTypes(v []*string) *GetSupportedResourceTypesOutput { + s.ResourceTypes = v + return s +} + +// Contains detailed information about a backup job. +type Job struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a request to AWS Backup to back up a resource. + BackupJobId *string `type:"string"` + + // The size, in bytes, of a backup. + BackupSizeInBytes *int64 `type:"long"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + BackupVaultName *string `type:"string"` + + // The size in bytes transferred to a backup vault at the time that the job + // status was queried. + BytesTransferred *int64 `type:"long"` + + // The date and time a job to create a backup job is completed, in Unix format + // and Coordinated Universal Time (UTC). The value of CompletionDate is accurate + // to milliseconds. For example, the value 1516925490.087 represents Friday, + // January 26, 2018 12:11:30.087 AM. + CompletionDate *time.Time `type:"timestamp"` + + // Contains identifying information about the creation of a backup job, including + // the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId of the + // backup plan used to create it. + CreatedBy *RecoveryPointCreator `type:"structure"` + + // The date and time a backup job is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The date and time a job to back up resources is expected to be completed, + // in Unix format and Coordinated Universal Time (UTC). The value of ExpectedCompletionDate + // is accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + ExpectedCompletionDate *time.Time `type:"timestamp"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // Contains an estimated percentage complete of a job at the time the job status + // was queried. + PercentDone *string `type:"string"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // An ARN that uniquely identifies a resource. The format of the ARN depends + // on the resource type. + ResourceArn *string `type:"string"` + + // The type of AWS resource to be backed-up; for example, an Amazon Elastic + // Block Store (Amazon EBS) volume or an Amazon Relational Database Service + // (Amazon RDS) database. + ResourceType *string `type:"string"` + + // Specifies the time in Unix format and Coordinated Universal Time (UTC) when + // a backup job must be started before it is canceled. The value is calculated + // by adding the start window to the scheduled time. So if the scheduled time + // were 6:00 PM and the start window is 2 hours, the StartBy time would be 8:00 + // PM on the date specified. The value of StartBy is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + StartBy *time.Time `type:"timestamp"` + + // The current state of a resource recovery point. + State *string `type:"string" enum:"JobState"` + + // A detailed message explaining the status of the job to back up a resource. + StatusMessage *string `type:"string"` +} + +// String returns the string representation +func (s Job) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Job) GoString() string { + return s.String() +} + +// SetBackupJobId sets the BackupJobId field's value. +func (s *Job) SetBackupJobId(v string) *Job { + s.BackupJobId = &v + return s +} + +// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. +func (s *Job) SetBackupSizeInBytes(v int64) *Job { + s.BackupSizeInBytes = &v + return s +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *Job) SetBackupVaultArn(v string) *Job { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *Job) SetBackupVaultName(v string) *Job { + s.BackupVaultName = &v + return s +} + +// SetBytesTransferred sets the BytesTransferred field's value. +func (s *Job) SetBytesTransferred(v int64) *Job { + s.BytesTransferred = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *Job) SetCompletionDate(v time.Time) *Job { + s.CompletionDate = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *Job) SetCreatedBy(v *RecoveryPointCreator) *Job { + s.CreatedBy = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *Job) SetCreationDate(v time.Time) *Job { + s.CreationDate = &v + return s +} + +// SetExpectedCompletionDate sets the ExpectedCompletionDate field's value. +func (s *Job) SetExpectedCompletionDate(v time.Time) *Job { + s.ExpectedCompletionDate = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *Job) SetIamRoleArn(v string) *Job { + s.IamRoleArn = &v + return s +} + +// SetPercentDone sets the PercentDone field's value. +func (s *Job) SetPercentDone(v string) *Job { + s.PercentDone = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *Job) SetRecoveryPointArn(v string) *Job { + s.RecoveryPointArn = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *Job) SetResourceArn(v string) *Job { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *Job) SetResourceType(v string) *Job { + s.ResourceType = &v + return s +} + +// SetStartBy sets the StartBy field's value. +func (s *Job) SetStartBy(v time.Time) *Job { + s.StartBy = &v + return s +} + +// SetState sets the State field's value. +func (s *Job) SetState(v string) *Job { + s.State = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *Job) SetStatusMessage(v string) *Job { + s.StatusMessage = &v + return s +} + +// Contains an array of Transition objects specifying how long in days before +// a recovery point transitions to cold storage or is deleted. +type Lifecycle struct { + _ struct{} `type:"structure"` + + // Specifies the number of days after creation that a recovery point is deleted. + // Must be greater than MoveToColdStorageAfterDays. + DeleteAfterDays *int64 `type:"long"` + + // Specifies the number of days after creation that a recovery point is moved + // to cold storage. + MoveToColdStorageAfterDays *int64 `type:"long"` +} + +// String returns the string representation +func (s Lifecycle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Lifecycle) GoString() string { + return s.String() +} + +// SetDeleteAfterDays sets the DeleteAfterDays field's value. +func (s *Lifecycle) SetDeleteAfterDays(v int64) *Lifecycle { + s.DeleteAfterDays = &v + return s +} + +// SetMoveToColdStorageAfterDays sets the MoveToColdStorageAfterDays field's value. +func (s *Lifecycle) SetMoveToColdStorageAfterDays(v int64) *Lifecycle { + s.MoveToColdStorageAfterDays = &v + return s +} + +type ListBackupJobsInput struct { + _ struct{} `type:"structure"` + + // Returns only backup jobs that will be stored in the specified backup vault. + // Backup vaults are identified by names that are unique to the account used + // to create them and the AWS Region where they are created. They consist of + // lowercase letters, numbers, and hyphens. + ByBackupVaultName *string `location:"querystring" locationName:"backupVaultName" type:"string"` + + // Returns only backup jobs that were created after the specified date. + ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"` + + // Returns only backup jobs that were created before the specified date. + ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"` + + // Returns only backup jobs that match the specified resource Amazon Resource + // Name (ARN). + ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"` + + // Returns only backup jobs for the specified resources: + // + // * EBS for Amazon Elastic Block Store + // + // * SGW for AWS Storage Gateway + // + // * RDS for Amazon Relational Database Service + // + // * DDB for Amazon DynamoDB + // + // * EFS for Amazon Elastic File System + ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` + + // Returns only backup jobs that are in the specified state. + ByState *string `location:"querystring" locationName:"state" type:"string" enum:"JobState"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBackupJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBackupJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBackupJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetByBackupVaultName sets the ByBackupVaultName field's value. +func (s *ListBackupJobsInput) SetByBackupVaultName(v string) *ListBackupJobsInput { + s.ByBackupVaultName = &v + return s +} + +// SetByCreatedAfter sets the ByCreatedAfter field's value. +func (s *ListBackupJobsInput) SetByCreatedAfter(v time.Time) *ListBackupJobsInput { + s.ByCreatedAfter = &v + return s +} + +// SetByCreatedBefore sets the ByCreatedBefore field's value. +func (s *ListBackupJobsInput) SetByCreatedBefore(v time.Time) *ListBackupJobsInput { + s.ByCreatedBefore = &v + return s +} + +// SetByResourceArn sets the ByResourceArn field's value. +func (s *ListBackupJobsInput) SetByResourceArn(v string) *ListBackupJobsInput { + s.ByResourceArn = &v + return s +} + +// SetByResourceType sets the ByResourceType field's value. +func (s *ListBackupJobsInput) SetByResourceType(v string) *ListBackupJobsInput { + s.ByResourceType = &v + return s +} + +// SetByState sets the ByState field's value. +func (s *ListBackupJobsInput) SetByState(v string) *ListBackupJobsInput { + s.ByState = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBackupJobsInput) SetMaxResults(v int64) *ListBackupJobsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupJobsInput) SetNextToken(v string) *ListBackupJobsInput { + s.NextToken = &v + return s +} + +type ListBackupJobsOutput struct { + _ struct{} `type:"structure"` + + // An array of structures containing metadata about your backup jobs returned + // in JSON format. + BackupJobs []*Job `type:"list"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBackupJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupJobsOutput) GoString() string { + return s.String() +} + +// SetBackupJobs sets the BackupJobs field's value. +func (s *ListBackupJobsOutput) SetBackupJobs(v []*Job) *ListBackupJobsOutput { + s.BackupJobs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupJobsOutput) SetNextToken(v string) *ListBackupJobsOutput { + s.NextToken = &v + return s +} + +type ListBackupPlanTemplatesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBackupPlanTemplatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupPlanTemplatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBackupPlanTemplatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanTemplatesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBackupPlanTemplatesInput) SetMaxResults(v int64) *ListBackupPlanTemplatesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupPlanTemplatesInput) SetNextToken(v string) *ListBackupPlanTemplatesInput { + s.NextToken = &v + return s +} + +type ListBackupPlanTemplatesOutput struct { + _ struct{} `type:"structure"` + + // An array of template list items containing metadata about your saved templates. + BackupPlanTemplatesList []*PlanTemplatesListMember `type:"list"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBackupPlanTemplatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupPlanTemplatesOutput) GoString() string { + return s.String() +} + +// SetBackupPlanTemplatesList sets the BackupPlanTemplatesList field's value. +func (s *ListBackupPlanTemplatesOutput) SetBackupPlanTemplatesList(v []*PlanTemplatesListMember) *ListBackupPlanTemplatesOutput { + s.BackupPlanTemplatesList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupPlanTemplatesOutput) SetNextToken(v string) *ListBackupPlanTemplatesOutput { + s.NextToken = &v + return s +} + +type ListBackupPlanVersionsInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBackupPlanVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupPlanVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBackupPlanVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBackupPlanVersionsInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *ListBackupPlanVersionsInput) SetBackupPlanId(v string) *ListBackupPlanVersionsInput { + s.BackupPlanId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBackupPlanVersionsInput) SetMaxResults(v int64) *ListBackupPlanVersionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupPlanVersionsInput) SetNextToken(v string) *ListBackupPlanVersionsInput { + s.NextToken = &v + return s +} + +type ListBackupPlanVersionsOutput struct { + _ struct{} `type:"structure"` + + // An array of version list items containing metadata about your backup plans. + BackupPlanVersionsList []*PlansListMember `type:"list"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBackupPlanVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupPlanVersionsOutput) GoString() string { + return s.String() +} + +// SetBackupPlanVersionsList sets the BackupPlanVersionsList field's value. +func (s *ListBackupPlanVersionsOutput) SetBackupPlanVersionsList(v []*PlansListMember) *ListBackupPlanVersionsOutput { + s.BackupPlanVersionsList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupPlanVersionsOutput) SetNextToken(v string) *ListBackupPlanVersionsOutput { + s.NextToken = &v + return s +} + +type ListBackupPlansInput struct { + _ struct{} `type:"structure"` + + // A Boolean value with a default value of FALSE that returns deleted backup + // plans when set to TRUE. + IncludeDeleted *bool `location:"querystring" locationName:"includeDeleted" type:"boolean"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBackupPlansInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupPlansInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBackupPlansInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBackupPlansInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIncludeDeleted sets the IncludeDeleted field's value. +func (s *ListBackupPlansInput) SetIncludeDeleted(v bool) *ListBackupPlansInput { + s.IncludeDeleted = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBackupPlansInput) SetMaxResults(v int64) *ListBackupPlansInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupPlansInput) SetNextToken(v string) *ListBackupPlansInput { + s.NextToken = &v + return s +} + +type ListBackupPlansOutput struct { + _ struct{} `type:"structure"` + + // An array of backup plan list items containing metadata about your saved backup + // plans. + BackupPlansList []*PlansListMember `type:"list"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBackupPlansOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupPlansOutput) GoString() string { + return s.String() +} + +// SetBackupPlansList sets the BackupPlansList field's value. +func (s *ListBackupPlansOutput) SetBackupPlansList(v []*PlansListMember) *ListBackupPlansOutput { + s.BackupPlansList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupPlansOutput) SetNextToken(v string) *ListBackupPlansOutput { + s.NextToken = &v + return s +} + +type ListBackupSelectionsInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBackupSelectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupSelectionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBackupSelectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBackupSelectionsInput"} + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *ListBackupSelectionsInput) SetBackupPlanId(v string) *ListBackupSelectionsInput { + s.BackupPlanId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBackupSelectionsInput) SetMaxResults(v int64) *ListBackupSelectionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupSelectionsInput) SetNextToken(v string) *ListBackupSelectionsInput { + s.NextToken = &v + return s +} + +type ListBackupSelectionsOutput struct { + _ struct{} `type:"structure"` + + // An array of backup selection list items containing metadata about each resource + // in the list. + BackupSelectionsList []*SelectionsListMember `type:"list"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBackupSelectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupSelectionsOutput) GoString() string { + return s.String() +} + +// SetBackupSelectionsList sets the BackupSelectionsList field's value. +func (s *ListBackupSelectionsOutput) SetBackupSelectionsList(v []*SelectionsListMember) *ListBackupSelectionsOutput { + s.BackupSelectionsList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupSelectionsOutput) SetNextToken(v string) *ListBackupSelectionsOutput { + s.NextToken = &v + return s +} + +type ListBackupVaultsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBackupVaultsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupVaultsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBackupVaultsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBackupVaultsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBackupVaultsInput) SetMaxResults(v int64) *ListBackupVaultsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupVaultsInput) SetNextToken(v string) *ListBackupVaultsInput { + s.NextToken = &v + return s +} + +type ListBackupVaultsOutput struct { + _ struct{} `type:"structure"` + + // An array of backup vault list members containing vault metadata, including + // Amazon Resource Name (ARN), display name, creation date, number of saved + // recovery points, and encryption information if the resources saved in the + // backup vault are encrypted. + BackupVaultList []*VaultListMember `type:"list"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListBackupVaultsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBackupVaultsOutput) GoString() string { + return s.String() +} + +// SetBackupVaultList sets the BackupVaultList field's value. +func (s *ListBackupVaultsOutput) SetBackupVaultList(v []*VaultListMember) *ListBackupVaultsOutput { + s.BackupVaultList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBackupVaultsOutput) SetNextToken(v string) *ListBackupVaultsOutput { + s.NextToken = &v + return s +} + +type ListProtectedResourcesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListProtectedResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProtectedResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListProtectedResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProtectedResourcesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListProtectedResourcesInput) SetMaxResults(v int64) *ListProtectedResourcesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListProtectedResourcesInput) SetNextToken(v string) *ListProtectedResourcesInput { + s.NextToken = &v + return s +} + +type ListProtectedResourcesOutput struct { + _ struct{} `type:"structure"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` + + // An array of resources successfully backed up by AWS Backup including the + // time the resource was saved, an Amazon Resource Name (ARN) of the resource, + // and a resource type. + Results []*ProtectedResource `type:"list"` +} + +// String returns the string representation +func (s ListProtectedResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProtectedResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListProtectedResourcesOutput) SetNextToken(v string) *ListProtectedResourcesOutput { + s.NextToken = &v + return s +} + +// SetResults sets the Results field's value. +func (s *ListProtectedResourcesOutput) SetResults(v []*ProtectedResource) *ListProtectedResourcesOutput { + s.Results = v + return s +} + +type ListRecoveryPointsByBackupVaultInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // Returns only recovery points that match the specified backup plan ID. + ByBackupPlanId *string `location:"querystring" locationName:"backupPlanId" type:"string"` + + // Returns only recovery points that were created after the specified timestamp. + ByCreatedAfter *time.Time `location:"querystring" locationName:"createdAfter" type:"timestamp"` + + // Returns only recovery points that were created before the specified timestamp. + ByCreatedBefore *time.Time `location:"querystring" locationName:"createdBefore" type:"timestamp"` + + // Returns only recovery points that match the specified resource Amazon Resource + // Name (ARN). + ByResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string"` + + // Returns only recovery points that match the specified resource type. + ByResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListRecoveryPointsByBackupVaultInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecoveryPointsByBackupVaultInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRecoveryPointsByBackupVaultInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByBackupVaultInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetBackupVaultName(v string) *ListRecoveryPointsByBackupVaultInput { + s.BackupVaultName = &v + return s +} + +// SetByBackupPlanId sets the ByBackupPlanId field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetByBackupPlanId(v string) *ListRecoveryPointsByBackupVaultInput { + s.ByBackupPlanId = &v + return s +} + +// SetByCreatedAfter sets the ByCreatedAfter field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedAfter(v time.Time) *ListRecoveryPointsByBackupVaultInput { + s.ByCreatedAfter = &v + return s +} + +// SetByCreatedBefore sets the ByCreatedBefore field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetByCreatedBefore(v time.Time) *ListRecoveryPointsByBackupVaultInput { + s.ByCreatedBefore = &v + return s +} + +// SetByResourceArn sets the ByResourceArn field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceArn(v string) *ListRecoveryPointsByBackupVaultInput { + s.ByResourceArn = &v + return s +} + +// SetByResourceType sets the ByResourceType field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetByResourceType(v string) *ListRecoveryPointsByBackupVaultInput { + s.ByResourceType = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetMaxResults(v int64) *ListRecoveryPointsByBackupVaultInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRecoveryPointsByBackupVaultInput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultInput { + s.NextToken = &v + return s +} + +type ListRecoveryPointsByBackupVaultOutput struct { + _ struct{} `type:"structure"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` + + // An array of objects that contain detailed information about recovery points + // saved in a backup vault. + RecoveryPoints []*RecoveryPointByBackupVault `type:"list"` +} + +// String returns the string representation +func (s ListRecoveryPointsByBackupVaultOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecoveryPointsByBackupVaultOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRecoveryPointsByBackupVaultOutput) SetNextToken(v string) *ListRecoveryPointsByBackupVaultOutput { + s.NextToken = &v + return s +} + +// SetRecoveryPoints sets the RecoveryPoints field's value. +func (s *ListRecoveryPointsByBackupVaultOutput) SetRecoveryPoints(v []*RecoveryPointByBackupVault) *ListRecoveryPointsByBackupVaultOutput { + s.RecoveryPoints = v + return s +} + +type ListRecoveryPointsByResourceInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // An ARN that uniquely identifies a resource. The format of the ARN depends + // on the resource type. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListRecoveryPointsByResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecoveryPointsByResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRecoveryPointsByResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRecoveryPointsByResourceInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListRecoveryPointsByResourceInput) SetMaxResults(v int64) *ListRecoveryPointsByResourceInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRecoveryPointsByResourceInput) SetNextToken(v string) *ListRecoveryPointsByResourceInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListRecoveryPointsByResourceInput) SetResourceArn(v string) *ListRecoveryPointsByResourceInput { + s.ResourceArn = &v + return s +} + +type ListRecoveryPointsByResourceOutput struct { + _ struct{} `type:"structure"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` + + // An array of objects that contain detailed information about recovery points + // of the specified resource type. + RecoveryPoints []*RecoveryPointByResource `type:"list"` +} + +// String returns the string representation +func (s ListRecoveryPointsByResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecoveryPointsByResourceOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRecoveryPointsByResourceOutput) SetNextToken(v string) *ListRecoveryPointsByResourceOutput { + s.NextToken = &v + return s +} + +// SetRecoveryPoints sets the RecoveryPoints field's value. +func (s *ListRecoveryPointsByResourceOutput) SetRecoveryPoints(v []*RecoveryPointByResource) *ListRecoveryPointsByResourceOutput { + s.RecoveryPoints = v + return s +} + +type ListRestoreJobsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListRestoreJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRestoreJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRestoreJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRestoreJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListRestoreJobsInput) SetMaxResults(v int64) *ListRestoreJobsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRestoreJobsInput) SetNextToken(v string) *ListRestoreJobsInput { + s.NextToken = &v + return s +} + +type ListRestoreJobsOutput struct { + _ struct{} `type:"structure"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` + + // An array of objects that contain detailed information about jobs to restore + // saved resources. + RestoreJobs []*RestoreJobsListMember `type:"list"` +} + +// String returns the string representation +func (s ListRestoreJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRestoreJobsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListRestoreJobsOutput) SetNextToken(v string) *ListRestoreJobsOutput { + s.NextToken = &v + return s +} + +// SetRestoreJobs sets the RestoreJobs field's value. +func (s *ListRestoreJobsOutput) SetRestoreJobs(v []*RestoreJobsListMember) *ListRestoreJobsOutput { + s.RestoreJobs = v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to be returned. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format + // of the ARN depends on the type of resource. Valid targets for ListTags are + // recovery points, backup plans, and backup vaults. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput { + s.ResourceArn = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // The next item following a partial list of returned items. For example, if + // a request is made to return maxResults number of items, NextToken allows + // you to return more items in your list starting at the location pointed to + // by the next token. + NextToken *string `type:"string"` + + // To help organize your resources, you can assign your own metadata to the + // resources you create. Each tag is a key-value pair. + Tags map[string]*string `type:"map" sensitive:"true"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { + s.Tags = v + return s +} + +// Contains an optional backup plan display name and an array of BackupRule +// objects, each of which specifies a backup rule. Each rule in a backup plan +// is a separate scheduled task and can back up a different selection of AWS +// resources. +type Plan struct { + _ struct{} `type:"structure"` + + // The display name of a backup plan. + // + // BackupPlanName is a required field + BackupPlanName *string `type:"string" required:"true"` + + // An array of BackupRule objects, each of which specifies a scheduled task + // that is used to back up a selection of resources. + // + // Rules is a required field + Rules []*Rule `type:"list" required:"true"` +} + +// String returns the string representation +func (s Plan) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Plan) GoString() string { + return s.String() +} + +// SetBackupPlanName sets the BackupPlanName field's value. +func (s *Plan) SetBackupPlanName(v string) *Plan { + s.BackupPlanName = &v + return s +} + +// SetRules sets the Rules field's value. +func (s *Plan) SetRules(v []*Rule) *Plan { + s.Rules = v + return s +} + +// Contains an optional backup plan display name and an array of BackupRule +// objects, each of which specifies a backup rule. Each rule in a backup plan +// is a separate scheduled task and can back up a different selection of AWS +// resources. +type PlanInput struct { + _ struct{} `type:"structure"` + + // The display name of a backup plan. + // + // BackupPlanName is a required field + BackupPlanName *string `type:"string" required:"true"` + + // An array of BackupRule objects, each of which specifies a scheduled task + // that is used to back up a selection of resources. + // + // Rules is a required field + Rules []*RuleInput `type:"list" required:"true"` +} + +// String returns the string representation +func (s PlanInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PlanInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PlanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PlanInput"} + if s.BackupPlanName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanName")) + } + if s.Rules == nil { + invalidParams.Add(request.NewErrParamRequired("Rules")) + } + if s.Rules != nil { + for i, v := range s.Rules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlanName sets the BackupPlanName field's value. +func (s *PlanInput) SetBackupPlanName(v string) *PlanInput { + s.BackupPlanName = &v + return s +} + +// SetRules sets the Rules field's value. +func (s *PlanInput) SetRules(v []*RuleInput) *PlanInput { + s.Rules = v + return s +} + +// An object specifying metadata associated with a backup plan template. +type PlanTemplatesListMember struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a stored backup plan template. + BackupPlanTemplateId *string `type:"string"` + + // The optional display name of a backup plan template. + BackupPlanTemplateName *string `type:"string"` +} + +// String returns the string representation +func (s PlanTemplatesListMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PlanTemplatesListMember) GoString() string { + return s.String() +} + +// SetBackupPlanTemplateId sets the BackupPlanTemplateId field's value. +func (s *PlanTemplatesListMember) SetBackupPlanTemplateId(v string) *PlanTemplatesListMember { + s.BackupPlanTemplateId = &v + return s +} + +// SetBackupPlanTemplateName sets the BackupPlanTemplateName field's value. +func (s *PlanTemplatesListMember) SetBackupPlanTemplateName(v string) *PlanTemplatesListMember { + s.BackupPlanTemplateName = &v + return s +} + +// Contains metadata about a backup plan. +type PlansListMember struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for + // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. + BackupPlanArn *string `type:"string"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The display name of a saved backup plan. + BackupPlanName *string `type:"string"` + + // The date and time a resource backup plan is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // The date and time a backup plan is deleted, in Unix format and Coordinated + // Universal Time (UTC). The value of DeletionDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + DeletionDate *time.Time `type:"timestamp"` + + // The last time a job to back up resources was executed with this rule. A date + // and time, in Unix format and Coordinated Universal Time (UTC). The value + // of LastExecutionDate is accurate to milliseconds. For example, the value + // 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. + LastExecutionDate *time.Time `type:"timestamp"` + + // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most + // 1,024 bytes long. Version IDs cannot be edited. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s PlansListMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PlansListMember) GoString() string { + return s.String() +} + +// SetBackupPlanArn sets the BackupPlanArn field's value. +func (s *PlansListMember) SetBackupPlanArn(v string) *PlansListMember { + s.BackupPlanArn = &v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *PlansListMember) SetBackupPlanId(v string) *PlansListMember { + s.BackupPlanId = &v + return s +} + +// SetBackupPlanName sets the BackupPlanName field's value. +func (s *PlansListMember) SetBackupPlanName(v string) *PlansListMember { + s.BackupPlanName = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *PlansListMember) SetCreationDate(v time.Time) *PlansListMember { + s.CreationDate = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *PlansListMember) SetCreatorRequestId(v string) *PlansListMember { + s.CreatorRequestId = &v + return s +} + +// SetDeletionDate sets the DeletionDate field's value. +func (s *PlansListMember) SetDeletionDate(v time.Time) *PlansListMember { + s.DeletionDate = &v + return s +} + +// SetLastExecutionDate sets the LastExecutionDate field's value. +func (s *PlansListMember) SetLastExecutionDate(v time.Time) *PlansListMember { + s.LastExecutionDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *PlansListMember) SetVersionId(v string) *PlansListMember { + s.VersionId = &v + return s +} + +// A structure that contains information about a backed-up resource. +type ProtectedResource struct { + _ struct{} `type:"structure"` + + // The date and time a resource was last backed up, in Unix format and Coordinated + // Universal Time (UTC). The value of LastBackupTime is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + LastBackupTime *time.Time `type:"timestamp"` + + // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format + // of the ARN depends on the resource type. + ResourceArn *string `type:"string"` + + // The type of AWS resource; for example, an Amazon Elastic Block Store (Amazon + // EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. + ResourceType *string `type:"string"` +} + +// String returns the string representation +func (s ProtectedResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProtectedResource) GoString() string { + return s.String() +} + +// SetLastBackupTime sets the LastBackupTime field's value. +func (s *ProtectedResource) SetLastBackupTime(v time.Time) *ProtectedResource { + s.LastBackupTime = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ProtectedResource) SetResourceArn(v string) *ProtectedResource { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ProtectedResource) SetResourceType(v string) *ProtectedResource { + s.ResourceType = &v + return s +} + +type PutBackupVaultAccessPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // The backup vault access policy document in JSON format. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s PutBackupVaultAccessPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBackupVaultAccessPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBackupVaultAccessPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultAccessPolicyInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *PutBackupVaultAccessPolicyInput) SetBackupVaultName(v string) *PutBackupVaultAccessPolicyInput { + s.BackupVaultName = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *PutBackupVaultAccessPolicyInput) SetPolicy(v string) *PutBackupVaultAccessPolicyInput { + s.Policy = &v + return s +} + +type PutBackupVaultAccessPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutBackupVaultAccessPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBackupVaultAccessPolicyOutput) GoString() string { + return s.String() +} + +type PutBackupVaultNotificationsInput struct { + _ struct{} `type:"structure"` + + // An array of events that indicate the status of jobs to back up resources + // to the backup vault. + // + // BackupVaultEvents is a required field + BackupVaultEvents []*string `type:"list" required:"true"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s + // events; for example, arn:aws:sns:us-west-2:111122223333:MyVaultTopic. + // + // SNSTopicArn is a required field + SNSTopicArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PutBackupVaultNotificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBackupVaultNotificationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutBackupVaultNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutBackupVaultNotificationsInput"} + if s.BackupVaultEvents == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultEvents")) + } + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + if s.SNSTopicArn == nil { + invalidParams.Add(request.NewErrParamRequired("SNSTopicArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultEvents sets the BackupVaultEvents field's value. +func (s *PutBackupVaultNotificationsInput) SetBackupVaultEvents(v []*string) *PutBackupVaultNotificationsInput { + s.BackupVaultEvents = v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *PutBackupVaultNotificationsInput) SetBackupVaultName(v string) *PutBackupVaultNotificationsInput { + s.BackupVaultName = &v + return s +} + +// SetSNSTopicArn sets the SNSTopicArn field's value. +func (s *PutBackupVaultNotificationsInput) SetSNSTopicArn(v string) *PutBackupVaultNotificationsInput { + s.SNSTopicArn = &v + return s +} + +type PutBackupVaultNotificationsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutBackupVaultNotificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutBackupVaultNotificationsOutput) GoString() string { + return s.String() +} + +// Contains detailed information about the recovery points stored in a backup +// vault. +type RecoveryPointByBackupVault struct { + _ struct{} `type:"structure"` + + // The size, in bytes, of a backup. + BackupSizeInBytes *int64 `type:"long"` + + // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + BackupVaultName *string `type:"string"` + + // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt + // timestamps. + CalculatedLifecycle *CalculatedLifecycle `type:"structure"` + + // The date and time a job to restore a recovery point is completed, in Unix + // format and Coordinated Universal Time (UTC). The value of CompletionDate + // is accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + CompletionDate *time.Time `type:"timestamp"` + + // Contains identifying information about the creation of a recovery point, + // including the BackupPlanArn, BackupPlanId, BackupPlanVersion, and BackupRuleId + // of the backup plan that is used to create it. + CreatedBy *RecoveryPointCreator `type:"structure"` + + // The date and time a recovery point is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The server-side encryption key that is used to protect your backups; for + // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + EncryptionKeyArn *string `type:"string"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // A Boolean value that is returned as TRUE if the specified recovery point + // is encrypted, or FALSE if the recovery point is not encrypted. + IsEncrypted *bool `type:"boolean"` + + // The date and time a recovery point was last restored, in Unix format and + // Coordinated Universal Time (UTC). The value of LastRestoreTime is accurate + // to milliseconds. For example, the value 1516925490.087 represents Friday, + // January 26, 2018 12:11:30.087 AM. + LastRestoreTime *time.Time `type:"timestamp"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup transitions and expires backups automatically + // according to the lifecycle that you define. + // + // Backups transitioned to cold storage must be stored in cold storage for a + // minimum of 90 days. Therefore, the “expire after days” setting must be 90 + // days greater than the “transition to cold after days” setting. The “transition + // to cold after days” setting cannot be changed after a backup has been transitioned + // to cold. + Lifecycle *Lifecycle `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // An ARN that uniquely identifies a resource. The format of the ARN depends + // on the resource type. + ResourceArn *string `type:"string"` + + // The type of AWS resource saved as a recovery point; for example, an Amazon + // Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database + // Service (Amazon RDS) database. + ResourceType *string `type:"string"` + + // A status code specifying the state of the recovery point. + Status *string `type:"string" enum:"RecoveryPointStatus"` +} + +// String returns the string representation +func (s RecoveryPointByBackupVault) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecoveryPointByBackupVault) GoString() string { + return s.String() +} + +// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. +func (s *RecoveryPointByBackupVault) SetBackupSizeInBytes(v int64) *RecoveryPointByBackupVault { + s.BackupSizeInBytes = &v + return s +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *RecoveryPointByBackupVault) SetBackupVaultArn(v string) *RecoveryPointByBackupVault { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *RecoveryPointByBackupVault) SetBackupVaultName(v string) *RecoveryPointByBackupVault { + s.BackupVaultName = &v + return s +} + +// SetCalculatedLifecycle sets the CalculatedLifecycle field's value. +func (s *RecoveryPointByBackupVault) SetCalculatedLifecycle(v *CalculatedLifecycle) *RecoveryPointByBackupVault { + s.CalculatedLifecycle = v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *RecoveryPointByBackupVault) SetCompletionDate(v time.Time) *RecoveryPointByBackupVault { + s.CompletionDate = &v + return s +} + +// SetCreatedBy sets the CreatedBy field's value. +func (s *RecoveryPointByBackupVault) SetCreatedBy(v *RecoveryPointCreator) *RecoveryPointByBackupVault { + s.CreatedBy = v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *RecoveryPointByBackupVault) SetCreationDate(v time.Time) *RecoveryPointByBackupVault { + s.CreationDate = &v + return s +} + +// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. +func (s *RecoveryPointByBackupVault) SetEncryptionKeyArn(v string) *RecoveryPointByBackupVault { + s.EncryptionKeyArn = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *RecoveryPointByBackupVault) SetIamRoleArn(v string) *RecoveryPointByBackupVault { + s.IamRoleArn = &v + return s +} + +// SetIsEncrypted sets the IsEncrypted field's value. +func (s *RecoveryPointByBackupVault) SetIsEncrypted(v bool) *RecoveryPointByBackupVault { + s.IsEncrypted = &v + return s +} + +// SetLastRestoreTime sets the LastRestoreTime field's value. +func (s *RecoveryPointByBackupVault) SetLastRestoreTime(v time.Time) *RecoveryPointByBackupVault { + s.LastRestoreTime = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *RecoveryPointByBackupVault) SetLifecycle(v *Lifecycle) *RecoveryPointByBackupVault { + s.Lifecycle = v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *RecoveryPointByBackupVault) SetRecoveryPointArn(v string) *RecoveryPointByBackupVault { + s.RecoveryPointArn = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *RecoveryPointByBackupVault) SetResourceArn(v string) *RecoveryPointByBackupVault { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *RecoveryPointByBackupVault) SetResourceType(v string) *RecoveryPointByBackupVault { + s.ResourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *RecoveryPointByBackupVault) SetStatus(v string) *RecoveryPointByBackupVault { + s.Status = &v + return s +} + +// Contains detailed information about a saved recovery point. +type RecoveryPointByResource struct { + _ struct{} `type:"structure"` + + // The size, in bytes, of a backup. + BackupSizeBytes *int64 `type:"long"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + BackupVaultName *string `type:"string"` + + // The date and time a recovery point is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The server-side encryption key that is used to protect your backups; for + // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + EncryptionKeyArn *string `type:"string"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // A status code specifying the state of the recovery point. + Status *string `type:"string" enum:"RecoveryPointStatus"` +} + +// String returns the string representation +func (s RecoveryPointByResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecoveryPointByResource) GoString() string { + return s.String() +} + +// SetBackupSizeBytes sets the BackupSizeBytes field's value. +func (s *RecoveryPointByResource) SetBackupSizeBytes(v int64) *RecoveryPointByResource { + s.BackupSizeBytes = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *RecoveryPointByResource) SetBackupVaultName(v string) *RecoveryPointByResource { + s.BackupVaultName = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *RecoveryPointByResource) SetCreationDate(v time.Time) *RecoveryPointByResource { + s.CreationDate = &v + return s +} + +// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. +func (s *RecoveryPointByResource) SetEncryptionKeyArn(v string) *RecoveryPointByResource { + s.EncryptionKeyArn = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *RecoveryPointByResource) SetRecoveryPointArn(v string) *RecoveryPointByResource { + s.RecoveryPointArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *RecoveryPointByResource) SetStatus(v string) *RecoveryPointByResource { + s.Status = &v + return s +} + +// Contains information about the backup plan and rule that AWS Backup used +// to initiate the recovery point backup. +type RecoveryPointCreator struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for + // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. + BackupPlanArn *string `type:"string"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings + // that are at most 1,024 bytes long. They cannot be edited. + BackupPlanVersion *string `type:"string"` + + // Uniquely identifies a rule used to schedule the backup of a selection of + // resources. + BackupRuleId *string `type:"string"` +} + +// String returns the string representation +func (s RecoveryPointCreator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecoveryPointCreator) GoString() string { + return s.String() +} + +// SetBackupPlanArn sets the BackupPlanArn field's value. +func (s *RecoveryPointCreator) SetBackupPlanArn(v string) *RecoveryPointCreator { + s.BackupPlanArn = &v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *RecoveryPointCreator) SetBackupPlanId(v string) *RecoveryPointCreator { + s.BackupPlanId = &v + return s +} + +// SetBackupPlanVersion sets the BackupPlanVersion field's value. +func (s *RecoveryPointCreator) SetBackupPlanVersion(v string) *RecoveryPointCreator { + s.BackupPlanVersion = &v + return s +} + +// SetBackupRuleId sets the BackupRuleId field's value. +func (s *RecoveryPointCreator) SetBackupRuleId(v string) *RecoveryPointCreator { + s.BackupRuleId = &v + return s +} + +// Contains metadata about a restore job. +type RestoreJobsListMember struct { + _ struct{} `type:"structure"` + + // The size, in bytes, of the restored resource. + BackupSizeInBytes *int64 `type:"long"` + + // The date and time a job to restore a recovery point is completed, in Unix + // format and Coordinated Universal Time (UTC). The value of CompletionDate + // is accurate to milliseconds. For example, the value 1516925490.087 represents + // Friday, January 26, 2018 12:11:30.087 AM. + CompletionDate *time.Time `type:"timestamp"` + + // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format + // of the ARN depends on the resource type. + CreatedResourceArn *string `type:"string"` + + // The date and time a restore job is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // The amount of time in minutes that a job restoring a recovery point is expected + // to take. + ExpectedCompletionTimeMinutes *int64 `type:"long"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // Contains an estimated percentage complete of a job at the time the job status + // was queried. + PercentDone *string `type:"string"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` + + // Uniquely identifies the job that restores a recovery point. + RestoreJobId *string `type:"string"` + + // A status code specifying the state of the job initiated by AWS Backup to + // restore a recovery point. + Status *string `type:"string" enum:"RestoreJobStatus"` + + // A detailed message explaining the status of the job to restore a recovery + // point. + StatusMessage *string `type:"string"` +} + +// String returns the string representation +func (s RestoreJobsListMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreJobsListMember) GoString() string { + return s.String() +} + +// SetBackupSizeInBytes sets the BackupSizeInBytes field's value. +func (s *RestoreJobsListMember) SetBackupSizeInBytes(v int64) *RestoreJobsListMember { + s.BackupSizeInBytes = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *RestoreJobsListMember) SetCompletionDate(v time.Time) *RestoreJobsListMember { + s.CompletionDate = &v + return s +} + +// SetCreatedResourceArn sets the CreatedResourceArn field's value. +func (s *RestoreJobsListMember) SetCreatedResourceArn(v string) *RestoreJobsListMember { + s.CreatedResourceArn = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *RestoreJobsListMember) SetCreationDate(v time.Time) *RestoreJobsListMember { + s.CreationDate = &v + return s +} + +// SetExpectedCompletionTimeMinutes sets the ExpectedCompletionTimeMinutes field's value. +func (s *RestoreJobsListMember) SetExpectedCompletionTimeMinutes(v int64) *RestoreJobsListMember { + s.ExpectedCompletionTimeMinutes = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *RestoreJobsListMember) SetIamRoleArn(v string) *RestoreJobsListMember { + s.IamRoleArn = &v + return s +} + +// SetPercentDone sets the PercentDone field's value. +func (s *RestoreJobsListMember) SetPercentDone(v string) *RestoreJobsListMember { + s.PercentDone = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *RestoreJobsListMember) SetRecoveryPointArn(v string) *RestoreJobsListMember { + s.RecoveryPointArn = &v + return s +} + +// SetRestoreJobId sets the RestoreJobId field's value. +func (s *RestoreJobsListMember) SetRestoreJobId(v string) *RestoreJobsListMember { + s.RestoreJobId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *RestoreJobsListMember) SetStatus(v string) *RestoreJobsListMember { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *RestoreJobsListMember) SetStatusMessage(v string) *RestoreJobsListMember { + s.StatusMessage = &v + return s +} + +// Specifies a scheduled task used to back up a selection of resources. +type Rule struct { + _ struct{} `type:"structure"` + + // A value in minutes after a backup job is successfully started before it must + // be completed or it is canceled by AWS Backup. This value is optional. + CompletionWindowMinutes *int64 `type:"long"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup transitions and expires backups automatically + // according to the lifecycle that you define. + // + // Backups transitioned to cold storage must be stored in cold storage for a + // minimum of 90 days. Therefore, the “expire after days” setting must be 90 + // days greater than the “transition to cold after days” setting. The “transition + // to cold after days” setting cannot be changed after a backup has been transitioned + // to cold. + Lifecycle *Lifecycle `type:"structure"` + + // An array of key-value pair strings that are assigned to resources that are + // associated with this rule when restored from backup. + RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` + + // Uniquely identifies a rule that is used to schedule the backup of a selection + // of resources. + RuleId *string `type:"string"` + + // An optional display name for a backup rule. + // + // RuleName is a required field + RuleName *string `type:"string" required:"true"` + + // A CRON expression specifying when AWS Backup initiates a backup job. + ScheduleExpression *string `type:"string"` + + // An optional value that specifies a period of time in minutes after a backup + // is scheduled before a job is canceled if it doesn't start successfully. + StartWindowMinutes *int64 `type:"long"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // TargetBackupVaultName is a required field + TargetBackupVaultName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Rule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Rule) GoString() string { + return s.String() +} + +// SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value. +func (s *Rule) SetCompletionWindowMinutes(v int64) *Rule { + s.CompletionWindowMinutes = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *Rule) SetLifecycle(v *Lifecycle) *Rule { + s.Lifecycle = v + return s +} + +// SetRecoveryPointTags sets the RecoveryPointTags field's value. +func (s *Rule) SetRecoveryPointTags(v map[string]*string) *Rule { + s.RecoveryPointTags = v + return s +} + +// SetRuleId sets the RuleId field's value. +func (s *Rule) SetRuleId(v string) *Rule { + s.RuleId = &v + return s +} + +// SetRuleName sets the RuleName field's value. +func (s *Rule) SetRuleName(v string) *Rule { + s.RuleName = &v + return s +} + +// SetScheduleExpression sets the ScheduleExpression field's value. +func (s *Rule) SetScheduleExpression(v string) *Rule { + s.ScheduleExpression = &v + return s +} + +// SetStartWindowMinutes sets the StartWindowMinutes field's value. +func (s *Rule) SetStartWindowMinutes(v int64) *Rule { + s.StartWindowMinutes = &v + return s +} + +// SetTargetBackupVaultName sets the TargetBackupVaultName field's value. +func (s *Rule) SetTargetBackupVaultName(v string) *Rule { + s.TargetBackupVaultName = &v + return s +} + +// Specifies a scheduled task used to back up a selection of resources. +type RuleInput struct { + _ struct{} `type:"structure"` + + // The amount of time AWS Backup attempts a backup before canceling the job + // and returning an error. + CompletionWindowMinutes *int64 `type:"long"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup will transition and expire backups automatically + // according to the lifecycle that you define. + // + // Backups transitioned to cold storage must be stored in cold storage for a + // minimum of 90 days. Therefore, the “expire after days” setting must be 90 + // days greater than the “transition to cold after days”. The “transition to + // cold after days” setting cannot be changed after a backup has been transitioned + // to cold. + Lifecycle *Lifecycle `type:"structure"` + + // To help organize your resources, you can assign your own metadata to the + // resources that you create. Each tag is a key-value pair. + RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` + + // >An optional display name for a backup rule. + // + // RuleName is a required field + RuleName *string `type:"string" required:"true"` + + // A CRON expression specifying when AWS Backup initiates a backup job. + ScheduleExpression *string `type:"string"` + + // The amount of time in minutes before beginning a backup. + StartWindowMinutes *int64 `type:"long"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // TargetBackupVaultName is a required field + TargetBackupVaultName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RuleInput"} + if s.RuleName == nil { + invalidParams.Add(request.NewErrParamRequired("RuleName")) + } + if s.TargetBackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetBackupVaultName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompletionWindowMinutes sets the CompletionWindowMinutes field's value. +func (s *RuleInput) SetCompletionWindowMinutes(v int64) *RuleInput { + s.CompletionWindowMinutes = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *RuleInput) SetLifecycle(v *Lifecycle) *RuleInput { + s.Lifecycle = v + return s +} + +// SetRecoveryPointTags sets the RecoveryPointTags field's value. +func (s *RuleInput) SetRecoveryPointTags(v map[string]*string) *RuleInput { + s.RecoveryPointTags = v + return s +} + +// SetRuleName sets the RuleName field's value. +func (s *RuleInput) SetRuleName(v string) *RuleInput { + s.RuleName = &v + return s +} + +// SetScheduleExpression sets the ScheduleExpression field's value. +func (s *RuleInput) SetScheduleExpression(v string) *RuleInput { + s.ScheduleExpression = &v + return s +} + +// SetStartWindowMinutes sets the StartWindowMinutes field's value. +func (s *RuleInput) SetStartWindowMinutes(v int64) *RuleInput { + s.StartWindowMinutes = &v + return s +} + +// SetTargetBackupVaultName sets the TargetBackupVaultName field's value. +func (s *RuleInput) SetTargetBackupVaultName(v string) *RuleInput { + s.TargetBackupVaultName = &v + return s +} + +// Used to specify a set of resources to a backup plan. +type Selection struct { + _ struct{} `type:"structure"` + + // The ARN of the IAM role that AWS Backup uses to authenticate when restoring + // the target resource; for example, arn:aws:iam::123456789012:role/S3Access. + // + // IamRoleArn is a required field + IamRoleArn *string `type:"string" required:"true"` + + // An array of conditions used to specify a set of resources to assign to a + // backup plan; for example, "StringEquals": {"ec2:ResourceTag/Department": + // "accounting". + ListOfTags []*Condition `type:"list"` + + // An array of strings that either contain Amazon Resource Names (ARNs) or match + // patterns such as "arn:aws:ec2:us-east-1:123456789012:volume/*" of resources + // to assign to a backup plan. + Resources []*string `type:"list"` + + // The display name of a resource selection document. + // + // SelectionName is a required field + SelectionName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Selection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Selection) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Selection) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Selection"} + if s.IamRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) + } + if s.SelectionName == nil { + invalidParams.Add(request.NewErrParamRequired("SelectionName")) + } + if s.ListOfTags != nil { + for i, v := range s.ListOfTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ListOfTags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *Selection) SetIamRoleArn(v string) *Selection { + s.IamRoleArn = &v + return s +} + +// SetListOfTags sets the ListOfTags field's value. +func (s *Selection) SetListOfTags(v []*Condition) *Selection { + s.ListOfTags = v + return s +} + +// SetResources sets the Resources field's value. +func (s *Selection) SetResources(v []*string) *Selection { + s.Resources = v + return s +} + +// SetSelectionName sets the SelectionName field's value. +func (s *Selection) SetSelectionName(v string) *Selection { + s.SelectionName = &v + return s +} + +// Contains metadata about a BackupSelection object. +type SelectionsListMember struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The date and time a backup plan is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // Specifies the IAM role Amazon Resource Name (ARN) to create the target recovery + // point; for example, arn:aws:iam::123456789012:role/S3Access. + IamRoleArn *string `type:"string"` + + // Uniquely identifies a request to assign a set of resources to a backup plan. + SelectionId *string `type:"string"` + + // The display name of a resource selection document. + SelectionName *string `type:"string"` +} + +// String returns the string representation +func (s SelectionsListMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SelectionsListMember) GoString() string { + return s.String() +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *SelectionsListMember) SetBackupPlanId(v string) *SelectionsListMember { + s.BackupPlanId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *SelectionsListMember) SetCreationDate(v time.Time) *SelectionsListMember { + s.CreationDate = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *SelectionsListMember) SetCreatorRequestId(v string) *SelectionsListMember { + s.CreatorRequestId = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *SelectionsListMember) SetIamRoleArn(v string) *SelectionsListMember { + s.IamRoleArn = &v + return s +} + +// SetSelectionId sets the SelectionId field's value. +func (s *SelectionsListMember) SetSelectionId(v string) *SelectionsListMember { + s.SelectionId = &v + return s +} + +// SetSelectionName sets the SelectionName field's value. +func (s *SelectionsListMember) SetSelectionName(v string) *SelectionsListMember { + s.SelectionName = &v + return s +} + +type StartBackupJobInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `type:"string" required:"true"` + + // The amount of time AWS Backup attempts a backup before canceling the job + // and returning an error. + CompleteWindowMinutes *int64 `type:"long"` + + // Specifies the IAM role ARN used to create the target recovery point; for + // example, arn:aws:iam::123456789012:role/S3Access. + // + // IamRoleArn is a required field + IamRoleArn *string `type:"string" required:"true"` + + // A customer chosen string that can be used to distinguish between calls to + // StartBackupJob. Idempotency tokens time out after one hour. Therefore, if + // you call StartBackupJob multiple times with the same idempotency token within + // one hour, AWS Backup recognizes that you are requesting only one backup job + // and initiates only one. If you change the idempotency token for each call, + // AWS Backup recognizes that you are requesting to start multiple backups. + IdempotencyToken *string `type:"string"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup will transition and expire backups automatically + // according to the lifecycle that you define. + // + // Backups transitioned to cold storage must be stored in cold storage for a + // minimum of 90 days. Therefore, the “expire after days” setting must be 90 + // days greater than the “transition to cold after days” setting. The “transition + // to cold after days” setting cannot be changed after a backup has been transitioned + // to cold. + Lifecycle *Lifecycle `type:"structure"` + + // To help organize your resources, you can assign your own metadata to the + // resources that you create. Each tag is a key-value pair. + RecoveryPointTags map[string]*string `type:"map" sensitive:"true"` + + // An Amazon Resource Name (ARN) that uniquely identifies a resource. The format + // of the ARN depends on the resource type. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // The amount of time in minutes before beginning a backup. + StartWindowMinutes *int64 `type:"long"` +} + +// String returns the string representation +func (s StartBackupJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartBackupJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartBackupJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartBackupJobInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.IamRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *StartBackupJobInput) SetBackupVaultName(v string) *StartBackupJobInput { + s.BackupVaultName = &v + return s +} + +// SetCompleteWindowMinutes sets the CompleteWindowMinutes field's value. +func (s *StartBackupJobInput) SetCompleteWindowMinutes(v int64) *StartBackupJobInput { + s.CompleteWindowMinutes = &v + return s +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *StartBackupJobInput) SetIamRoleArn(v string) *StartBackupJobInput { + s.IamRoleArn = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *StartBackupJobInput) SetIdempotencyToken(v string) *StartBackupJobInput { + s.IdempotencyToken = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *StartBackupJobInput) SetLifecycle(v *Lifecycle) *StartBackupJobInput { + s.Lifecycle = v + return s +} + +// SetRecoveryPointTags sets the RecoveryPointTags field's value. +func (s *StartBackupJobInput) SetRecoveryPointTags(v map[string]*string) *StartBackupJobInput { + s.RecoveryPointTags = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *StartBackupJobInput) SetResourceArn(v string) *StartBackupJobInput { + s.ResourceArn = &v + return s +} + +// SetStartWindowMinutes sets the StartWindowMinutes field's value. +func (s *StartBackupJobInput) SetStartWindowMinutes(v int64) *StartBackupJobInput { + s.StartWindowMinutes = &v + return s +} + +type StartBackupJobOutput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a request to AWS Backup to back up a resource. + BackupJobId *string `type:"string"` + + // The date and time that a backup job is started, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` +} + +// String returns the string representation +func (s StartBackupJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartBackupJobOutput) GoString() string { + return s.String() +} + +// SetBackupJobId sets the BackupJobId field's value. +func (s *StartBackupJobOutput) SetBackupJobId(v string) *StartBackupJobOutput { + s.BackupJobId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *StartBackupJobOutput) SetCreationDate(v time.Time) *StartBackupJobOutput { + s.CreationDate = &v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *StartBackupJobOutput) SetRecoveryPointArn(v string) *StartBackupJobOutput { + s.RecoveryPointArn = &v + return s +} + +type StartRestoreJobInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create + // the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access. + // + // IamRoleArn is a required field + IamRoleArn *string `type:"string" required:"true"` + + // A customer chosen string that can be used to distinguish between calls to + // StartRestoreJob. Idempotency tokens time out after one hour. Therefore, if + // you call StartRestoreJob multiple times with the same idempotency token within + // one hour, AWS Backup recognizes that you are requesting only one restore + // job and initiates only one. If you change the idempotency token for each + // call, AWS Backup recognizes that you are requesting to start multiple restores. + IdempotencyToken *string `type:"string"` + + // A set of metadata key-value pairs. Lists the metadata that the recovery point + // was created with. + // + // Metadata is a required field + Metadata map[string]*string `type:"map" required:"true"` + + // An ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + // + // RecoveryPointArn is a required field + RecoveryPointArn *string `type:"string" required:"true"` + + // Starts a job to restore a recovery point for one of the following resources: + // + // * EBS for Amazon Elastic Block Store + // + // * SGW for AWS Storage Gateway + // + // * RDS for Amazon Relational Database Service + // + // * DDB for Amazon DynamoDB + // + // * EFS for Amazon Elastic File System + ResourceType *string `type:"string"` +} + +// String returns the string representation +func (s StartRestoreJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartRestoreJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartRestoreJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartRestoreJobInput"} + if s.IamRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("IamRoleArn")) + } + if s.Metadata == nil { + invalidParams.Add(request.NewErrParamRequired("Metadata")) + } + if s.RecoveryPointArn == nil { + invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIamRoleArn sets the IamRoleArn field's value. +func (s *StartRestoreJobInput) SetIamRoleArn(v string) *StartRestoreJobInput { + s.IamRoleArn = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *StartRestoreJobInput) SetIdempotencyToken(v string) *StartRestoreJobInput { + s.IdempotencyToken = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *StartRestoreJobInput) SetMetadata(v map[string]*string) *StartRestoreJobInput { + s.Metadata = v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *StartRestoreJobInput) SetRecoveryPointArn(v string) *StartRestoreJobInput { + s.RecoveryPointArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *StartRestoreJobInput) SetResourceType(v string) *StartRestoreJobInput { + s.ResourceType = &v + return s +} + +type StartRestoreJobOutput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies the job that restores a recovery point. + RestoreJobId *string `type:"string"` +} + +// String returns the string representation +func (s StartRestoreJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartRestoreJobOutput) GoString() string { + return s.String() +} + +// SetRestoreJobId sets the RestoreJobId field's value. +func (s *StartRestoreJobOutput) SetRestoreJobId(v string) *StartRestoreJobOutput { + s.RestoreJobId = &v + return s +} + +type StopBackupJobInput struct { + _ struct{} `type:"structure"` + + // Uniquely identifies a request to AWS Backup to back up a resource. + // + // BackupJobId is a required field + BackupJobId *string `location:"uri" locationName:"backupJobId" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopBackupJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopBackupJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopBackupJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopBackupJobInput"} + if s.BackupJobId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupJobId")) + } + if s.BackupJobId != nil && len(*s.BackupJobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupJobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupJobId sets the BackupJobId field's value. +func (s *StopBackupJobInput) SetBackupJobId(v string) *StopBackupJobInput { + s.BackupJobId = &v + return s +} + +type StopBackupJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopBackupJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopBackupJobOutput) GoString() string { + return s.String() +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // An ARN that uniquely identifies a resource. The format of the ARN depends + // on the type of the tagged resource. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // Key-value pairs that are used to help organize your resources. You can assign + // your own metadata to the resources you create. + // + // Tags is a required field + Tags map[string]*string `type:"map" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // An ARN that uniquely identifies a resource. The format of the ARN depends + // on the type of the tagged resource. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // A list of keys to identify which key-value tags to remove from a resource. + // + // TagKeyList is a required field + TagKeyList []*string `type:"list" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeyList == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeyList")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeyList sets the TagKeyList field's value. +func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput { + s.TagKeyList = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +type UpdateBackupPlanInput struct { + _ struct{} `type:"structure"` + + // Specifies the body of a backup plan. Includes a BackupPlanName and one or + // more sets of Rules. + // + // BackupPlan is a required field + BackupPlan *PlanInput `type:"structure" required:"true"` + + // Uniquely identifies a backup plan. + // + // BackupPlanId is a required field + BackupPlanId *string `location:"uri" locationName:"backupPlanId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateBackupPlanInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBackupPlanInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBackupPlanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBackupPlanInput"} + if s.BackupPlan == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlan")) + } + if s.BackupPlanId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupPlanId")) + } + if s.BackupPlanId != nil && len(*s.BackupPlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupPlanId", 1)) + } + if s.BackupPlan != nil { + if err := s.BackupPlan.Validate(); err != nil { + invalidParams.AddNested("BackupPlan", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupPlan sets the BackupPlan field's value. +func (s *UpdateBackupPlanInput) SetBackupPlan(v *PlanInput) *UpdateBackupPlanInput { + s.BackupPlan = v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *UpdateBackupPlanInput) SetBackupPlanId(v string) *UpdateBackupPlanInput { + s.BackupPlanId = &v + return s +} + +type UpdateBackupPlanOutput struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for + // example, arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50. + BackupPlanArn *string `type:"string"` + + // Uniquely identifies a backup plan. + BackupPlanId *string `type:"string"` + + // The date and time a backup plan is updated, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most + // 1,024 bytes long. Version Ids cannot be edited. + VersionId *string `type:"string"` +} + +// String returns the string representation +func (s UpdateBackupPlanOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBackupPlanOutput) GoString() string { + return s.String() +} + +// SetBackupPlanArn sets the BackupPlanArn field's value. +func (s *UpdateBackupPlanOutput) SetBackupPlanArn(v string) *UpdateBackupPlanOutput { + s.BackupPlanArn = &v + return s +} + +// SetBackupPlanId sets the BackupPlanId field's value. +func (s *UpdateBackupPlanOutput) SetBackupPlanId(v string) *UpdateBackupPlanOutput { + s.BackupPlanId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *UpdateBackupPlanOutput) SetCreationDate(v time.Time) *UpdateBackupPlanOutput { + s.CreationDate = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *UpdateBackupPlanOutput) SetVersionId(v string) *UpdateBackupPlanOutput { + s.VersionId = &v + return s +} + +type UpdateRecoveryPointLifecycleInput struct { + _ struct{} `type:"structure"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + // + // BackupVaultName is a required field + BackupVaultName *string `location:"uri" locationName:"backupVaultName" type:"string" required:"true"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup transitions and expires backups automatically + // according to the lifecycle that you define. + // + // Backups transitioned to cold storage must be stored in cold storage for a + // minimum of 90 days. Therefore, the “expire after days” setting must be 90 + // days greater than the “transition to cold after days” setting. The “transition + // to cold after days” setting cannot be changed after a backup has been transitioned + // to cold. + Lifecycle *Lifecycle `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + // + // RecoveryPointArn is a required field + RecoveryPointArn *string `location:"uri" locationName:"recoveryPointArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateRecoveryPointLifecycleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRecoveryPointLifecycleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRecoveryPointLifecycleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRecoveryPointLifecycleInput"} + if s.BackupVaultName == nil { + invalidParams.Add(request.NewErrParamRequired("BackupVaultName")) + } + if s.BackupVaultName != nil && len(*s.BackupVaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BackupVaultName", 1)) + } + if s.RecoveryPointArn == nil { + invalidParams.Add(request.NewErrParamRequired("RecoveryPointArn")) + } + if s.RecoveryPointArn != nil && len(*s.RecoveryPointArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecoveryPointArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *UpdateRecoveryPointLifecycleInput) SetBackupVaultName(v string) *UpdateRecoveryPointLifecycleInput { + s.BackupVaultName = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *UpdateRecoveryPointLifecycleInput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleInput { + s.Lifecycle = v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *UpdateRecoveryPointLifecycleInput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleInput { + s.RecoveryPointArn = &v + return s +} + +type UpdateRecoveryPointLifecycleOutput struct { + _ struct{} `type:"structure"` + + // An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt + // timestamps. + CalculatedLifecycle *CalculatedLifecycle `type:"structure"` + + // The lifecycle defines when a protected resource is transitioned to cold storage + // and when it expires. AWS Backup transitions and expires backups automatically + // according to the lifecycle that you define. + // + // Backups transitioned to cold storage must be stored in cold storage for a + // minimum of 90 days. Therefore, the “expire after days” setting must be 90 + // days greater than the “transition to cold after days” setting. The “transition + // to cold after days” setting cannot be changed after a backup has been transitioned + // to cold. + Lifecycle *Lifecycle `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a recovery point; + // for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. + RecoveryPointArn *string `type:"string"` +} + +// String returns the string representation +func (s UpdateRecoveryPointLifecycleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRecoveryPointLifecycleOutput) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *UpdateRecoveryPointLifecycleOutput) SetBackupVaultArn(v string) *UpdateRecoveryPointLifecycleOutput { + s.BackupVaultArn = &v + return s +} + +// SetCalculatedLifecycle sets the CalculatedLifecycle field's value. +func (s *UpdateRecoveryPointLifecycleOutput) SetCalculatedLifecycle(v *CalculatedLifecycle) *UpdateRecoveryPointLifecycleOutput { + s.CalculatedLifecycle = v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *UpdateRecoveryPointLifecycleOutput) SetLifecycle(v *Lifecycle) *UpdateRecoveryPointLifecycleOutput { + s.Lifecycle = v + return s +} + +// SetRecoveryPointArn sets the RecoveryPointArn field's value. +func (s *UpdateRecoveryPointLifecycleOutput) SetRecoveryPointArn(v string) *UpdateRecoveryPointLifecycleOutput { + s.RecoveryPointArn = &v + return s +} + +// Contains metadata about a backup vault. +type VaultListMember struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for + // example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault. + BackupVaultArn *string `type:"string"` + + // The name of a logical container where backups are stored. Backup vaults are + // identified by names that are unique to the account used to create them and + // the AWS Region where they are created. They consist of lowercase letters, + // numbers, and hyphens. + BackupVaultName *string `type:"string"` + + // The date and time a resource backup is created, in Unix format and Coordinated + // Universal Time (UTC). The value of CreationDate is accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + CreationDate *time.Time `type:"timestamp"` + + // A unique string that identifies the request and allows failed requests to + // be retried without the risk of executing the operation twice. + CreatorRequestId *string `type:"string"` + + // The server-side encryption key that is used to protect your backups; for + // example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. + EncryptionKeyArn *string `type:"string"` + + // The number of recovery points that are stored in a backup vault. + NumberOfRecoveryPoints *int64 `type:"long"` +} + +// String returns the string representation +func (s VaultListMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VaultListMember) GoString() string { + return s.String() +} + +// SetBackupVaultArn sets the BackupVaultArn field's value. +func (s *VaultListMember) SetBackupVaultArn(v string) *VaultListMember { + s.BackupVaultArn = &v + return s +} + +// SetBackupVaultName sets the BackupVaultName field's value. +func (s *VaultListMember) SetBackupVaultName(v string) *VaultListMember { + s.BackupVaultName = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *VaultListMember) SetCreationDate(v time.Time) *VaultListMember { + s.CreationDate = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *VaultListMember) SetCreatorRequestId(v string) *VaultListMember { + s.CreatorRequestId = &v + return s +} + +// SetEncryptionKeyArn sets the EncryptionKeyArn field's value. +func (s *VaultListMember) SetEncryptionKeyArn(v string) *VaultListMember { + s.EncryptionKeyArn = &v + return s +} + +// SetNumberOfRecoveryPoints sets the NumberOfRecoveryPoints field's value. +func (s *VaultListMember) SetNumberOfRecoveryPoints(v int64) *VaultListMember { + s.NumberOfRecoveryPoints = &v + return s +} + +const ( + // ConditionTypeStringequals is a ConditionType enum value + ConditionTypeStringequals = "STRINGEQUALS" +) + +const ( + // JobStateCreated is a JobState enum value + JobStateCreated = "CREATED" + + // JobStatePending is a JobState enum value + JobStatePending = "PENDING" + + // JobStateRunning is a JobState enum value + JobStateRunning = "RUNNING" + + // JobStateAborting is a JobState enum value + JobStateAborting = "ABORTING" + + // JobStateAborted is a JobState enum value + JobStateAborted = "ABORTED" + + // JobStateCompleted is a JobState enum value + JobStateCompleted = "COMPLETED" + + // JobStateFailed is a JobState enum value + JobStateFailed = "FAILED" + + // JobStateExpired is a JobState enum value + JobStateExpired = "EXPIRED" +) + +const ( + // RecoveryPointStatusCompleted is a RecoveryPointStatus enum value + RecoveryPointStatusCompleted = "COMPLETED" + + // RecoveryPointStatusPartial is a RecoveryPointStatus enum value + RecoveryPointStatusPartial = "PARTIAL" + + // RecoveryPointStatusDeleting is a RecoveryPointStatus enum value + RecoveryPointStatusDeleting = "DELETING" + + // RecoveryPointStatusExpired is a RecoveryPointStatus enum value + RecoveryPointStatusExpired = "EXPIRED" +) + +const ( + // RestoreJobStatusPending is a RestoreJobStatus enum value + RestoreJobStatusPending = "PENDING" + + // RestoreJobStatusRunning is a RestoreJobStatus enum value + RestoreJobStatusRunning = "RUNNING" + + // RestoreJobStatusCompleted is a RestoreJobStatus enum value + RestoreJobStatusCompleted = "COMPLETED" + + // RestoreJobStatusAborted is a RestoreJobStatus enum value + RestoreJobStatusAborted = "ABORTED" + + // RestoreJobStatusFailed is a RestoreJobStatus enum value + RestoreJobStatusFailed = "FAILED" +) + +const ( + // StorageClassWarm is a StorageClass enum value + StorageClassWarm = "WARM" + + // StorageClassCold is a StorageClass enum value + StorageClassCold = "COLD" + + // StorageClassDeleted is a StorageClass enum value + StorageClassDeleted = "DELETED" +) + +const ( + // VaultEventBackupJobStarted is a VaultEvent enum value + VaultEventBackupJobStarted = "BACKUP_JOB_STARTED" + + // VaultEventBackupJobCompleted is a VaultEvent enum value + VaultEventBackupJobCompleted = "BACKUP_JOB_COMPLETED" + + // VaultEventRestoreJobStarted is a VaultEvent enum value + VaultEventRestoreJobStarted = "RESTORE_JOB_STARTED" + + // VaultEventRestoreJobCompleted is a VaultEvent enum value + VaultEventRestoreJobCompleted = "RESTORE_JOB_COMPLETED" + + // VaultEventRecoveryPointModified is a VaultEvent enum value + VaultEventRecoveryPointModified = "RECOVERY_POINT_MODIFIED" + + // VaultEventBackupPlanCreated is a VaultEvent enum value + VaultEventBackupPlanCreated = "BACKUP_PLAN_CREATED" + + // VaultEventBackupPlanModified is a VaultEvent enum value + VaultEventBackupPlanModified = "BACKUP_PLAN_MODIFIED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/doc.go b/vendor/github.com/aws/aws-sdk-go/service/backup/doc.go new file mode 100644 index 000000000..d1013b4c2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/backup/doc.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package backup provides the client and types for making API +// requests to AWS Backup. +// +// AWS Backup is a unified backup service designed to protect AWS services and +// their associated data. AWS Backup simplifies the creation, migration, restoration, +// and deletion of backups, while also providing reporting and auditing. +// +// See https://docs.aws.amazon.com/goto/WebAPI/backup-2018-11-15 for more information on this service. +// +// See backup package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/backup/ +// +// Using the Client +// +// To contact AWS Backup with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Backup client Backup for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/backup/#New +package backup diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/errors.go b/vendor/github.com/aws/aws-sdk-go/service/backup/errors.go new file mode 100644 index 000000000..06cc16b5a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/backup/errors.go @@ -0,0 +1,58 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package backup + +const ( + + // ErrCodeAlreadyExistsException for service response error code + // "AlreadyExistsException". + // + // The required resource already exists. + ErrCodeAlreadyExistsException = "AlreadyExistsException" + + // ErrCodeDependencyFailureException for service response error code + // "DependencyFailureException". + // + // A dependent AWS service or resource returned an error to the AWS Backup service, + // and the action cannot be completed. + ErrCodeDependencyFailureException = "DependencyFailureException" + + // ErrCodeInvalidParameterValueException for service response error code + // "InvalidParameterValueException". + // + // Indicates that something is wrong with a parameter's value. For example, + // the value is out of range. + ErrCodeInvalidParameterValueException = "InvalidParameterValueException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // Indicates that something is wrong with the input to the request. For example, + // a parameter is of the wrong type. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // A limit in the request has been exceeded; for example, a maximum number of + // items allowed in a request. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeMissingParameterValueException for service response error code + // "MissingParameterValueException". + // + // Indicates that a required parameter is missing. + ErrCodeMissingParameterValueException = "MissingParameterValueException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // A resource that is required for the action doesn't exist. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // The request failed due to a temporary failure of the server. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/backup/service.go b/vendor/github.com/aws/aws-sdk-go/service/backup/service.go new file mode 100644 index 000000000..7ec6d9502 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/backup/service.go @@ -0,0 +1,96 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package backup + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// Backup provides the API operation methods for making requests to +// AWS Backup. See this package's package overview docs +// for details on the service. +// +// Backup methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Backup struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Backup" // Name of service. + EndpointsID = "backup" // ID to lookup a service endpoint with. + ServiceID = "Backup" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Backup client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Backup client from just a session. +// svc := backup.New(mySession) +// +// // Create a Backup client with additional configuration +// svc := backup.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Backup { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Backup { + svc := &Backup{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-11-15", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Backup operation and runs any +// custom request initialization. +func (c *Backup) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 51c2b997a..b033dc8c5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -4706,30 +4706,71 @@ func (s ContinueUpdateRollbackOutput) GoString() string { type CreateChangeSetInput struct { _ struct{} `type:"structure"` - // A list of values that you must specify before AWS CloudFormation can update - // certain stacks. Some stack templates might include resources that can affect - // permissions in your AWS account, for example, by creating new AWS Identity - // and Access Management (IAM) users. For those stacks, you must explicitly - // acknowledge their capabilities by specifying this parameter. + // In some cases, you must explicity acknowledge that your stack template contains + // certain capabilities in order for AWS CloudFormation to create the stack. + // + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM + // + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stacks, you must explicitly acknowledge + // this by specifying one of these capabilities. + // + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. + // + // If you have IAM resources, you can specify either capability. + // + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. + // + // + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html), - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html), - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html), - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html), - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html), - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html), - // and AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html). // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some template contain macros. Macros perform custom processing on templates; + // this can include simple actions like find-and-replace operations, all + // the way to extensive transformations of entire templates. Because of this, + // users typically create a change set from the processed template, so that + // they can review the changes resulting from the macros before actually + // creating the stack. If your stack template contains one or more macros, + // and you choose to create a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation. + // + // This capacity does not apply to creating change sets, and specifying it when + // creating change sets has no effect. + // + // Also, change sets do not currently support nested stacks. If you want to + // create a stack from a stack template that contains macros and nested stacks, + // you must create or update the stack directly from the template using the + // CreateStack or UpdateStack action, and specifying this capability. + // + // For more information on macros, see Using AWS CloudFormation Macros to Perform + // Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). Capabilities []*string `type:"list"` // The name of the change set. The name must be unique among all change sets @@ -5064,7 +5105,7 @@ type CreateStackInput struct { // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). // // * CAPABILITY_AUTO_EXPAND // @@ -5076,8 +5117,8 @@ type CreateStackInput struct { // creating the stack. If your stack template contains one or more macros, // and you choose to create a stack directly from the processed template, // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) // transforms, which are macros hosted by AWS CloudFormation. // // Change sets do not currently support nested stacks. If you want to create @@ -5092,7 +5133,7 @@ type CreateStackInput struct { // function operation without AWS CloudFormation being notified. // // For more information, see Using AWS CloudFormation Macros to Perform Custom - // Processing on Templates (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). + // Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). Capabilities []*string `type:"list"` // A unique identifier for this CreateStack request. Specify this token if you @@ -5596,40 +5637,62 @@ type CreateStackSetInput struct { // in the AWS CloudFormation User Guide. AdministrationRoleARN *string `min:"20" type:"string"` - // A list of values that you must specify before AWS CloudFormation can create - // certain stack sets. Some stack set templates might include resources that - // can affect permissions in your AWS account—for example, by creating new AWS - // Identity and Access Management (IAM) users. For those stack sets, you must - // explicitly acknowledge their capabilities by specifying this parameter. + // In some cases, you must explicity acknowledge that your stack set template + // contains certain capabilities in order for AWS CloudFormation to create the + // stack set and related stack instances. // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM // - // * AWS::IAM::AccessKey + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stack sets, you must explicitly acknowledge + // this by specifying one of these capabilities. // - // * AWS::IAM::Group + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. // - // * AWS::IAM::InstanceProfile + // If you have IAM resources, you can specify either capability. // - // * AWS::IAM::Policy + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. // - // * AWS::IAM::Role // - // * AWS::IAM::User - // - // * AWS::IAM::UserToGroupAddition + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. // // If your stack template contains these resources, we recommend that you review - // all permissions that are associated with them and edit their permissions - // if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates. (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some templates contain macros. If your stack template contains one or more + // macros, and you choose to create a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. For more information, see Using AWS CloudFormation + // Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). + // + // Stack sets do not currently support macros in stack templates. (This includes + // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation.) Even if you + // specify this capability, if you include a macro in your template the stack + // set operation will fail. Capabilities []*string `type:"list"` // A unique identifier for this CreateStackSet request. Specify this token if @@ -9975,7 +10038,7 @@ type Stack struct { // Information on whether a stack's actual configuration differs, or has drifted, // from it's expected configuration, as defined in the stack template and any // values specified as template parameters. For more information, see Detecting - // Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + // Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). DriftInformation *StackDriftInformation `type:"structure"` // Whether termination protection is enabled for the stack. @@ -10630,7 +10693,7 @@ type StackResource struct { // Information about whether the resource's actual configuration differs, or // has drifted, from its expected configuration, as defined in the stack template // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). DriftInformation *StackResourceDriftInformation `type:"structure"` // The logical name of the resource specified in the template. @@ -10749,7 +10812,7 @@ type StackResourceDetail struct { // Information about whether the resource's actual configuration differs, or // has drifted, from its expected configuration, as defined in the stack template // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). DriftInformation *StackResourceDriftInformation `type:"structure"` // Time the status was updated. @@ -10877,7 +10940,7 @@ func (s *StackResourceDetail) SetStackName(v string) *StackResourceDetail { // // Resources that do not currently support drift detection cannot be checked. // For a list of resources that support drift detection, see Resources that -// Support Drift Detection (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). +// Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). // // Use DetectStackResourceDrift to detect drift on individual resources, or // DetectStackDrift to detect drift on all resources in a given stack that support @@ -11137,7 +11200,7 @@ type StackResourceSummary struct { // Information about whether the resource's actual configuration differs, or // has drifted, from its expected configuration, as defined in the stack template // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). DriftInformation *StackResourceDriftInformationSummary `type:"structure"` // Time the status was updated. @@ -11853,7 +11916,7 @@ type StackSummary struct { // Summarizes information on whether a stack's actual configuration differs, // or has drifted, from it's expected configuration, as defined in the stack // template and any values specified as template parameters. For more information, - // see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + // see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). DriftInformation *StackDriftInformationSummary `type:"structure"` // The time the stack was last updated. This field will only be returned if @@ -12199,7 +12262,7 @@ type UpdateStackInput struct { // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). // // * CAPABILITY_AUTO_EXPAND // @@ -12211,8 +12274,8 @@ type UpdateStackInput struct { // updating the stack. If your stack template contains one or more macros, // and you choose to update a stack directly from the processed template, // without first reviewing the resulting changes in a change set, you must - // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) // transforms, which are macros hosted by AWS CloudFormation. // // Change sets do not currently support nested stacks. If you want to update @@ -12227,7 +12290,7 @@ type UpdateStackInput struct { // function operation without AWS CloudFormation being notified. // // For more information, see Using AWS CloudFormation Macros to Perform Custom - // Processing on Templates (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). + // Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). Capabilities []*string `type:"list"` // A unique identifier for this UpdateStack request. Specify this token if you @@ -12750,40 +12813,62 @@ type UpdateStackSetInput struct { // on the stack set. AdministrationRoleARN *string `min:"20" type:"string"` - // A list of values that you must specify before AWS CloudFormation can create - // certain stack sets. Some stack set templates might include resources that - // can affect permissions in your AWS account—for example, by creating new AWS - // Identity and Access Management (IAM) users. For those stack sets, you must - // explicitly acknowledge their capabilities by specifying this parameter. + // In some cases, you must explicity acknowledge that your stack template contains + // certain capabilities in order for AWS CloudFormation to update the stack + // set and its associated stack instances. // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM // - // * AWS::IAM::AccessKey + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stacks sets, you must explicitly acknowledge + // this by specifying one of these capabilities. // - // * AWS::IAM::Group + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. // - // * AWS::IAM::InstanceProfile + // If you have IAM resources, you can specify either capability. // - // * AWS::IAM::Policy + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. // - // * AWS::IAM::Role // - // * AWS::IAM::User - // - // * AWS::IAM::UserToGroupAddition + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. // // If your stack template contains these resources, we recommend that you review - // all permissions that are associated with them and edit their permissions - // if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates. (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some templates contain macros. If your stack template contains one or more + // macros, and you choose to update a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. For more information, see Using AWS CloudFormation + // Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). + // + // Stack sets do not currently support macros in stack templates. (This includes + // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation.) Even if you + // specify this capability, if you include a macro in your template the stack + // set operation will fail. Capabilities []*string `type:"list"` // A brief description of updates that you are making. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go new file mode 100644 index 000000000..dbbf3a16a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go @@ -0,0 +1,6406 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudsearch + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opBuildSuggesters = "BuildSuggesters" + +// BuildSuggestersRequest generates a "aws/request.Request" representing the +// client's request for the BuildSuggesters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BuildSuggesters for more information on using the BuildSuggesters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BuildSuggestersRequest method. +// req, resp := client.BuildSuggestersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) BuildSuggestersRequest(input *BuildSuggestersInput) (req *request.Request, output *BuildSuggestersOutput) { + op := &request.Operation{ + Name: opBuildSuggesters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BuildSuggestersInput{} + } + + output = &BuildSuggestersOutput{} + req = c.newRequest(op, input, output) + return +} + +// BuildSuggesters API operation for Amazon CloudSearch. +// +// Indexes the search suggestions. For more information, see Configuring Suggesters +// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html#configuring-suggesters) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation BuildSuggesters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) BuildSuggesters(input *BuildSuggestersInput) (*BuildSuggestersOutput, error) { + req, out := c.BuildSuggestersRequest(input) + return out, req.Send() +} + +// BuildSuggestersWithContext is the same as BuildSuggesters with the addition of +// the ability to pass a context and additional request options. +// +// See BuildSuggesters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) BuildSuggestersWithContext(ctx aws.Context, input *BuildSuggestersInput, opts ...request.Option) (*BuildSuggestersOutput, error) { + req, out := c.BuildSuggestersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDomain = "CreateDomain" + +// CreateDomainRequest generates a "aws/request.Request" representing the +// client's request for the CreateDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDomain for more information on using the CreateDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDomainRequest method. +// req, resp := client.CreateDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) CreateDomainRequest(input *CreateDomainInput) (req *request.Request, output *CreateDomainOutput) { + op := &request.Operation{ + Name: opCreateDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDomainInput{} + } + + output = &CreateDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDomain API operation for Amazon CloudSearch. +// +// Creates a new search domain. For more information, see Creating a Search +// Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/creating-domains.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation CreateDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +func (c *CloudSearch) CreateDomain(input *CreateDomainInput) (*CreateDomainOutput, error) { + req, out := c.CreateDomainRequest(input) + return out, req.Send() +} + +// CreateDomainWithContext is the same as CreateDomain with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) CreateDomainWithContext(ctx aws.Context, input *CreateDomainInput, opts ...request.Option) (*CreateDomainOutput, error) { + req, out := c.CreateDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDefineAnalysisScheme = "DefineAnalysisScheme" + +// DefineAnalysisSchemeRequest generates a "aws/request.Request" representing the +// client's request for the DefineAnalysisScheme operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DefineAnalysisScheme for more information on using the DefineAnalysisScheme +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DefineAnalysisSchemeRequest method. +// req, resp := client.DefineAnalysisSchemeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DefineAnalysisSchemeRequest(input *DefineAnalysisSchemeInput) (req *request.Request, output *DefineAnalysisSchemeOutput) { + op := &request.Operation{ + Name: opDefineAnalysisScheme, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DefineAnalysisSchemeInput{} + } + + output = &DefineAnalysisSchemeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DefineAnalysisScheme API operation for Amazon CloudSearch. +// +// Configures an analysis scheme that can be applied to a text or text-array +// field to define language-specific text processing options. For more information, +// see Configuring Analysis Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DefineAnalysisScheme for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DefineAnalysisScheme(input *DefineAnalysisSchemeInput) (*DefineAnalysisSchemeOutput, error) { + req, out := c.DefineAnalysisSchemeRequest(input) + return out, req.Send() +} + +// DefineAnalysisSchemeWithContext is the same as DefineAnalysisScheme with the addition of +// the ability to pass a context and additional request options. +// +// See DefineAnalysisScheme for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DefineAnalysisSchemeWithContext(ctx aws.Context, input *DefineAnalysisSchemeInput, opts ...request.Option) (*DefineAnalysisSchemeOutput, error) { + req, out := c.DefineAnalysisSchemeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDefineExpression = "DefineExpression" + +// DefineExpressionRequest generates a "aws/request.Request" representing the +// client's request for the DefineExpression operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DefineExpression for more information on using the DefineExpression +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DefineExpressionRequest method. +// req, resp := client.DefineExpressionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DefineExpressionRequest(input *DefineExpressionInput) (req *request.Request, output *DefineExpressionOutput) { + op := &request.Operation{ + Name: opDefineExpression, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DefineExpressionInput{} + } + + output = &DefineExpressionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DefineExpression API operation for Amazon CloudSearch. +// +// Configures an Expression for the search domain. Used to create new expressions +// and modify existing ones. If the expression exists, the new configuration +// replaces the old one. For more information, see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DefineExpression for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DefineExpression(input *DefineExpressionInput) (*DefineExpressionOutput, error) { + req, out := c.DefineExpressionRequest(input) + return out, req.Send() +} + +// DefineExpressionWithContext is the same as DefineExpression with the addition of +// the ability to pass a context and additional request options. +// +// See DefineExpression for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DefineExpressionWithContext(ctx aws.Context, input *DefineExpressionInput, opts ...request.Option) (*DefineExpressionOutput, error) { + req, out := c.DefineExpressionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDefineIndexField = "DefineIndexField" + +// DefineIndexFieldRequest generates a "aws/request.Request" representing the +// client's request for the DefineIndexField operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DefineIndexField for more information on using the DefineIndexField +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DefineIndexFieldRequest method. +// req, resp := client.DefineIndexFieldRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DefineIndexFieldRequest(input *DefineIndexFieldInput) (req *request.Request, output *DefineIndexFieldOutput) { + op := &request.Operation{ + Name: opDefineIndexField, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DefineIndexFieldInput{} + } + + output = &DefineIndexFieldOutput{} + req = c.newRequest(op, input, output) + return +} + +// DefineIndexField API operation for Amazon CloudSearch. +// +// Configures an IndexField for the search domain. Used to create new fields +// and modify existing ones. You must specify the name of the domain you are +// configuring and an index field configuration. The index field configuration +// specifies a unique name, the index field type, and the options you want to +// configure for the field. The options you can specify depend on the IndexFieldType. +// If the field exists, the new configuration replaces the old one. For more +// information, see Configuring Index Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DefineIndexField for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DefineIndexField(input *DefineIndexFieldInput) (*DefineIndexFieldOutput, error) { + req, out := c.DefineIndexFieldRequest(input) + return out, req.Send() +} + +// DefineIndexFieldWithContext is the same as DefineIndexField with the addition of +// the ability to pass a context and additional request options. +// +// See DefineIndexField for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DefineIndexFieldWithContext(ctx aws.Context, input *DefineIndexFieldInput, opts ...request.Option) (*DefineIndexFieldOutput, error) { + req, out := c.DefineIndexFieldRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDefineSuggester = "DefineSuggester" + +// DefineSuggesterRequest generates a "aws/request.Request" representing the +// client's request for the DefineSuggester operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DefineSuggester for more information on using the DefineSuggester +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DefineSuggesterRequest method. +// req, resp := client.DefineSuggesterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DefineSuggesterRequest(input *DefineSuggesterInput) (req *request.Request, output *DefineSuggesterOutput) { + op := &request.Operation{ + Name: opDefineSuggester, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DefineSuggesterInput{} + } + + output = &DefineSuggesterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DefineSuggester API operation for Amazon CloudSearch. +// +// Configures a suggester for a domain. A suggester enables you to display possible +// matches before users finish typing their queries. When you configure a suggester, +// you must specify the name of the text field you want to search for possible +// matches and a unique name for the suggester. For more information, see Getting +// Search Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DefineSuggester for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DefineSuggester(input *DefineSuggesterInput) (*DefineSuggesterOutput, error) { + req, out := c.DefineSuggesterRequest(input) + return out, req.Send() +} + +// DefineSuggesterWithContext is the same as DefineSuggester with the addition of +// the ability to pass a context and additional request options. +// +// See DefineSuggester for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DefineSuggesterWithContext(ctx aws.Context, input *DefineSuggesterInput, opts ...request.Option) (*DefineSuggesterOutput, error) { + req, out := c.DefineSuggesterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAnalysisScheme = "DeleteAnalysisScheme" + +// DeleteAnalysisSchemeRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAnalysisScheme operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAnalysisScheme for more information on using the DeleteAnalysisScheme +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAnalysisSchemeRequest method. +// req, resp := client.DeleteAnalysisSchemeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DeleteAnalysisSchemeRequest(input *DeleteAnalysisSchemeInput) (req *request.Request, output *DeleteAnalysisSchemeOutput) { + op := &request.Operation{ + Name: opDeleteAnalysisScheme, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAnalysisSchemeInput{} + } + + output = &DeleteAnalysisSchemeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteAnalysisScheme API operation for Amazon CloudSearch. +// +// Deletes an analysis scheme. For more information, see Configuring Analysis +// Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DeleteAnalysisScheme for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DeleteAnalysisScheme(input *DeleteAnalysisSchemeInput) (*DeleteAnalysisSchemeOutput, error) { + req, out := c.DeleteAnalysisSchemeRequest(input) + return out, req.Send() +} + +// DeleteAnalysisSchemeWithContext is the same as DeleteAnalysisScheme with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAnalysisScheme for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DeleteAnalysisSchemeWithContext(ctx aws.Context, input *DeleteAnalysisSchemeInput, opts ...request.Option) (*DeleteAnalysisSchemeOutput, error) { + req, out := c.DeleteAnalysisSchemeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDomain = "DeleteDomain" + +// DeleteDomainRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDomain for more information on using the DeleteDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDomainRequest method. +// req, resp := client.DeleteDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) { + op := &request.Operation{ + Name: opDeleteDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDomainInput{} + } + + output = &DeleteDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDomain API operation for Amazon CloudSearch. +// +// Permanently deletes a search domain and all of its data. Once a domain has +// been deleted, it cannot be recovered. For more information, see Deleting +// a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/deleting-domains.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DeleteDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +func (c *CloudSearch) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) { + req, out := c.DeleteDomainRequest(input) + return out, req.Send() +} + +// DeleteDomainWithContext is the same as DeleteDomain with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) { + req, out := c.DeleteDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteExpression = "DeleteExpression" + +// DeleteExpressionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteExpression operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteExpression for more information on using the DeleteExpression +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteExpressionRequest method. +// req, resp := client.DeleteExpressionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DeleteExpressionRequest(input *DeleteExpressionInput) (req *request.Request, output *DeleteExpressionOutput) { + op := &request.Operation{ + Name: opDeleteExpression, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteExpressionInput{} + } + + output = &DeleteExpressionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteExpression API operation for Amazon CloudSearch. +// +// Removes an Expression from the search domain. For more information, see Configuring +// Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DeleteExpression for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DeleteExpression(input *DeleteExpressionInput) (*DeleteExpressionOutput, error) { + req, out := c.DeleteExpressionRequest(input) + return out, req.Send() +} + +// DeleteExpressionWithContext is the same as DeleteExpression with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteExpression for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DeleteExpressionWithContext(ctx aws.Context, input *DeleteExpressionInput, opts ...request.Option) (*DeleteExpressionOutput, error) { + req, out := c.DeleteExpressionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteIndexField = "DeleteIndexField" + +// DeleteIndexFieldRequest generates a "aws/request.Request" representing the +// client's request for the DeleteIndexField operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteIndexField for more information on using the DeleteIndexField +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteIndexFieldRequest method. +// req, resp := client.DeleteIndexFieldRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DeleteIndexFieldRequest(input *DeleteIndexFieldInput) (req *request.Request, output *DeleteIndexFieldOutput) { + op := &request.Operation{ + Name: opDeleteIndexField, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteIndexFieldInput{} + } + + output = &DeleteIndexFieldOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteIndexField API operation for Amazon CloudSearch. +// +// Removes an IndexField from the search domain. For more information, see Configuring +// Index Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DeleteIndexField for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DeleteIndexField(input *DeleteIndexFieldInput) (*DeleteIndexFieldOutput, error) { + req, out := c.DeleteIndexFieldRequest(input) + return out, req.Send() +} + +// DeleteIndexFieldWithContext is the same as DeleteIndexField with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteIndexField for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DeleteIndexFieldWithContext(ctx aws.Context, input *DeleteIndexFieldInput, opts ...request.Option) (*DeleteIndexFieldOutput, error) { + req, out := c.DeleteIndexFieldRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSuggester = "DeleteSuggester" + +// DeleteSuggesterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSuggester operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteSuggester for more information on using the DeleteSuggester +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteSuggesterRequest method. +// req, resp := client.DeleteSuggesterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DeleteSuggesterRequest(input *DeleteSuggesterInput) (req *request.Request, output *DeleteSuggesterOutput) { + op := &request.Operation{ + Name: opDeleteSuggester, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSuggesterInput{} + } + + output = &DeleteSuggesterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSuggester API operation for Amazon CloudSearch. +// +// Deletes a suggester. For more information, see Getting Search Suggestions +// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DeleteSuggester for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DeleteSuggester(input *DeleteSuggesterInput) (*DeleteSuggesterOutput, error) { + req, out := c.DeleteSuggesterRequest(input) + return out, req.Send() +} + +// DeleteSuggesterWithContext is the same as DeleteSuggester with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSuggester for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DeleteSuggesterWithContext(ctx aws.Context, input *DeleteSuggesterInput, opts ...request.Option) (*DeleteSuggesterOutput, error) { + req, out := c.DeleteSuggesterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAnalysisSchemes = "DescribeAnalysisSchemes" + +// DescribeAnalysisSchemesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAnalysisSchemes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAnalysisSchemes for more information on using the DescribeAnalysisSchemes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAnalysisSchemesRequest method. +// req, resp := client.DescribeAnalysisSchemesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeAnalysisSchemesRequest(input *DescribeAnalysisSchemesInput) (req *request.Request, output *DescribeAnalysisSchemesOutput) { + op := &request.Operation{ + Name: opDescribeAnalysisSchemes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAnalysisSchemesInput{} + } + + output = &DescribeAnalysisSchemesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAnalysisSchemes API operation for Amazon CloudSearch. +// +// Gets the analysis schemes configured for a domain. An analysis scheme defines +// language-specific text processing options for a text field. Can be limited +// to specific analysis schemes by name. By default, shows all analysis schemes +// and includes any pending changes to the configuration. Set the Deployed option +// to true to show the active configuration and exclude pending changes. For +// more information, see Configuring Analysis Schemes (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeAnalysisSchemes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DescribeAnalysisSchemes(input *DescribeAnalysisSchemesInput) (*DescribeAnalysisSchemesOutput, error) { + req, out := c.DescribeAnalysisSchemesRequest(input) + return out, req.Send() +} + +// DescribeAnalysisSchemesWithContext is the same as DescribeAnalysisSchemes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAnalysisSchemes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeAnalysisSchemesWithContext(ctx aws.Context, input *DescribeAnalysisSchemesInput, opts ...request.Option) (*DescribeAnalysisSchemesOutput, error) { + req, out := c.DescribeAnalysisSchemesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAvailabilityOptions = "DescribeAvailabilityOptions" + +// DescribeAvailabilityOptionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAvailabilityOptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAvailabilityOptions for more information on using the DescribeAvailabilityOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAvailabilityOptionsRequest method. +// req, resp := client.DescribeAvailabilityOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeAvailabilityOptionsRequest(input *DescribeAvailabilityOptionsInput) (req *request.Request, output *DescribeAvailabilityOptionsOutput) { + op := &request.Operation{ + Name: opDescribeAvailabilityOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAvailabilityOptionsInput{} + } + + output = &DescribeAvailabilityOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAvailabilityOptions API operation for Amazon CloudSearch. +// +// Gets the availability options configured for a domain. By default, shows +// the configuration with any pending changes. Set the Deployed option to true +// to show the active configuration and exclude pending changes. For more information, +// see Configuring Availability Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeAvailabilityOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +// * ErrCodeDisabledOperationException "DisabledAction" +// The request was rejected because it attempted an operation which is not enabled. +// +func (c *CloudSearch) DescribeAvailabilityOptions(input *DescribeAvailabilityOptionsInput) (*DescribeAvailabilityOptionsOutput, error) { + req, out := c.DescribeAvailabilityOptionsRequest(input) + return out, req.Send() +} + +// DescribeAvailabilityOptionsWithContext is the same as DescribeAvailabilityOptions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAvailabilityOptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeAvailabilityOptionsWithContext(ctx aws.Context, input *DescribeAvailabilityOptionsInput, opts ...request.Option) (*DescribeAvailabilityOptionsOutput, error) { + req, out := c.DescribeAvailabilityOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDomains = "DescribeDomains" + +// DescribeDomainsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDomains operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDomains for more information on using the DescribeDomains +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDomainsRequest method. +// req, resp := client.DescribeDomainsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeDomainsRequest(input *DescribeDomainsInput) (req *request.Request, output *DescribeDomainsOutput) { + op := &request.Operation{ + Name: opDescribeDomains, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDomainsInput{} + } + + output = &DescribeDomainsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDomains API operation for Amazon CloudSearch. +// +// Gets information about the search domains owned by this account. Can be limited +// to specific domains. Shows all domains by default. To get the number of searchable +// documents in a domain, use the console or submit a matchall request to your +// domain's search endpoint: q=matchall&q.parser=structured&size=0. +// For more information, see Getting Information about a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-domain-info.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeDomains for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +func (c *CloudSearch) DescribeDomains(input *DescribeDomainsInput) (*DescribeDomainsOutput, error) { + req, out := c.DescribeDomainsRequest(input) + return out, req.Send() +} + +// DescribeDomainsWithContext is the same as DescribeDomains with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDomains for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeDomainsWithContext(ctx aws.Context, input *DescribeDomainsInput, opts ...request.Option) (*DescribeDomainsOutput, error) { + req, out := c.DescribeDomainsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeExpressions = "DescribeExpressions" + +// DescribeExpressionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeExpressions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeExpressions for more information on using the DescribeExpressions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeExpressionsRequest method. +// req, resp := client.DescribeExpressionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeExpressionsRequest(input *DescribeExpressionsInput) (req *request.Request, output *DescribeExpressionsOutput) { + op := &request.Operation{ + Name: opDescribeExpressions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeExpressionsInput{} + } + + output = &DescribeExpressionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeExpressions API operation for Amazon CloudSearch. +// +// Gets the expressions configured for the search domain. Can be limited to +// specific expressions by name. By default, shows all expressions and includes +// any pending changes to the configuration. Set the Deployed option to true +// to show the active configuration and exclude pending changes. For more information, +// see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeExpressions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DescribeExpressions(input *DescribeExpressionsInput) (*DescribeExpressionsOutput, error) { + req, out := c.DescribeExpressionsRequest(input) + return out, req.Send() +} + +// DescribeExpressionsWithContext is the same as DescribeExpressions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeExpressions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeExpressionsWithContext(ctx aws.Context, input *DescribeExpressionsInput, opts ...request.Option) (*DescribeExpressionsOutput, error) { + req, out := c.DescribeExpressionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeIndexFields = "DescribeIndexFields" + +// DescribeIndexFieldsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeIndexFields operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeIndexFields for more information on using the DescribeIndexFields +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeIndexFieldsRequest method. +// req, resp := client.DescribeIndexFieldsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeIndexFieldsRequest(input *DescribeIndexFieldsInput) (req *request.Request, output *DescribeIndexFieldsOutput) { + op := &request.Operation{ + Name: opDescribeIndexFields, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeIndexFieldsInput{} + } + + output = &DescribeIndexFieldsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeIndexFields API operation for Amazon CloudSearch. +// +// Gets information about the index fields configured for the search domain. +// Can be limited to specific fields by name. By default, shows all fields and +// includes any pending changes to the configuration. Set the Deployed option +// to true to show the active configuration and exclude pending changes. For +// more information, see Getting Domain Information (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-domain-info.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeIndexFields for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DescribeIndexFields(input *DescribeIndexFieldsInput) (*DescribeIndexFieldsOutput, error) { + req, out := c.DescribeIndexFieldsRequest(input) + return out, req.Send() +} + +// DescribeIndexFieldsWithContext is the same as DescribeIndexFields with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeIndexFields for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeIndexFieldsWithContext(ctx aws.Context, input *DescribeIndexFieldsInput, opts ...request.Option) (*DescribeIndexFieldsOutput, error) { + req, out := c.DescribeIndexFieldsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeScalingParameters = "DescribeScalingParameters" + +// DescribeScalingParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeScalingParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeScalingParameters for more information on using the DescribeScalingParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeScalingParametersRequest method. +// req, resp := client.DescribeScalingParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeScalingParametersRequest(input *DescribeScalingParametersInput) (req *request.Request, output *DescribeScalingParametersOutput) { + op := &request.Operation{ + Name: opDescribeScalingParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeScalingParametersInput{} + } + + output = &DescribeScalingParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeScalingParameters API operation for Amazon CloudSearch. +// +// Gets the scaling parameters configured for a domain. A domain's scaling parameters +// specify the desired search instance type and replication count. For more +// information, see Configuring Scaling Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeScalingParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DescribeScalingParameters(input *DescribeScalingParametersInput) (*DescribeScalingParametersOutput, error) { + req, out := c.DescribeScalingParametersRequest(input) + return out, req.Send() +} + +// DescribeScalingParametersWithContext is the same as DescribeScalingParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeScalingParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeScalingParametersWithContext(ctx aws.Context, input *DescribeScalingParametersInput, opts ...request.Option) (*DescribeScalingParametersOutput, error) { + req, out := c.DescribeScalingParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeServiceAccessPolicies = "DescribeServiceAccessPolicies" + +// DescribeServiceAccessPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeServiceAccessPolicies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeServiceAccessPolicies for more information on using the DescribeServiceAccessPolicies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeServiceAccessPoliciesRequest method. +// req, resp := client.DescribeServiceAccessPoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeServiceAccessPoliciesRequest(input *DescribeServiceAccessPoliciesInput) (req *request.Request, output *DescribeServiceAccessPoliciesOutput) { + op := &request.Operation{ + Name: opDescribeServiceAccessPolicies, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeServiceAccessPoliciesInput{} + } + + output = &DescribeServiceAccessPoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeServiceAccessPolicies API operation for Amazon CloudSearch. +// +// Gets information about the access policies that control access to the domain's +// document and search endpoints. By default, shows the configuration with any +// pending changes. Set the Deployed option to true to show the active configuration +// and exclude pending changes. For more information, see Configuring Access +// for a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeServiceAccessPolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DescribeServiceAccessPolicies(input *DescribeServiceAccessPoliciesInput) (*DescribeServiceAccessPoliciesOutput, error) { + req, out := c.DescribeServiceAccessPoliciesRequest(input) + return out, req.Send() +} + +// DescribeServiceAccessPoliciesWithContext is the same as DescribeServiceAccessPolicies with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeServiceAccessPolicies for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeServiceAccessPoliciesWithContext(ctx aws.Context, input *DescribeServiceAccessPoliciesInput, opts ...request.Option) (*DescribeServiceAccessPoliciesOutput, error) { + req, out := c.DescribeServiceAccessPoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSuggesters = "DescribeSuggesters" + +// DescribeSuggestersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSuggesters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSuggesters for more information on using the DescribeSuggesters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSuggestersRequest method. +// req, resp := client.DescribeSuggestersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) DescribeSuggestersRequest(input *DescribeSuggestersInput) (req *request.Request, output *DescribeSuggestersOutput) { + op := &request.Operation{ + Name: opDescribeSuggesters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSuggestersInput{} + } + + output = &DescribeSuggestersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSuggesters API operation for Amazon CloudSearch. +// +// Gets the suggesters configured for a domain. A suggester enables you to display +// possible matches before users finish typing their queries. Can be limited +// to specific suggesters by name. By default, shows all suggesters and includes +// any pending changes to the configuration. Set the Deployed option to true +// to show the active configuration and exclude pending changes. For more information, +// see Getting Search Suggestions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation DescribeSuggesters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) DescribeSuggesters(input *DescribeSuggestersInput) (*DescribeSuggestersOutput, error) { + req, out := c.DescribeSuggestersRequest(input) + return out, req.Send() +} + +// DescribeSuggestersWithContext is the same as DescribeSuggesters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSuggesters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) DescribeSuggestersWithContext(ctx aws.Context, input *DescribeSuggestersInput, opts ...request.Option) (*DescribeSuggestersOutput, error) { + req, out := c.DescribeSuggestersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opIndexDocuments = "IndexDocuments" + +// IndexDocumentsRequest generates a "aws/request.Request" representing the +// client's request for the IndexDocuments operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See IndexDocuments for more information on using the IndexDocuments +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the IndexDocumentsRequest method. +// req, resp := client.IndexDocumentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) IndexDocumentsRequest(input *IndexDocumentsInput) (req *request.Request, output *IndexDocumentsOutput) { + op := &request.Operation{ + Name: opIndexDocuments, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IndexDocumentsInput{} + } + + output = &IndexDocumentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// IndexDocuments API operation for Amazon CloudSearch. +// +// Tells the search domain to start indexing its documents using the latest +// indexing options. This operation must be invoked to activate options whose +// OptionStatus is RequiresIndexDocuments. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation IndexDocuments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +func (c *CloudSearch) IndexDocuments(input *IndexDocumentsInput) (*IndexDocumentsOutput, error) { + req, out := c.IndexDocumentsRequest(input) + return out, req.Send() +} + +// IndexDocumentsWithContext is the same as IndexDocuments with the addition of +// the ability to pass a context and additional request options. +// +// See IndexDocuments for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) IndexDocumentsWithContext(ctx aws.Context, input *IndexDocumentsInput, opts ...request.Option) (*IndexDocumentsOutput, error) { + req, out := c.IndexDocumentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDomainNames = "ListDomainNames" + +// ListDomainNamesRequest generates a "aws/request.Request" representing the +// client's request for the ListDomainNames operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDomainNames for more information on using the ListDomainNames +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDomainNamesRequest method. +// req, resp := client.ListDomainNamesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) ListDomainNamesRequest(input *ListDomainNamesInput) (req *request.Request, output *ListDomainNamesOutput) { + op := &request.Operation{ + Name: opListDomainNames, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListDomainNamesInput{} + } + + output = &ListDomainNamesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDomainNames API operation for Amazon CloudSearch. +// +// Lists all search domains owned by an account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation ListDomainNames for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +func (c *CloudSearch) ListDomainNames(input *ListDomainNamesInput) (*ListDomainNamesOutput, error) { + req, out := c.ListDomainNamesRequest(input) + return out, req.Send() +} + +// ListDomainNamesWithContext is the same as ListDomainNames with the addition of +// the ability to pass a context and additional request options. +// +// See ListDomainNames for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) ListDomainNamesWithContext(ctx aws.Context, input *ListDomainNamesInput, opts ...request.Option) (*ListDomainNamesOutput, error) { + req, out := c.ListDomainNamesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAvailabilityOptions = "UpdateAvailabilityOptions" + +// UpdateAvailabilityOptionsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAvailabilityOptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAvailabilityOptions for more information on using the UpdateAvailabilityOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAvailabilityOptionsRequest method. +// req, resp := client.UpdateAvailabilityOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) UpdateAvailabilityOptionsRequest(input *UpdateAvailabilityOptionsInput) (req *request.Request, output *UpdateAvailabilityOptionsOutput) { + op := &request.Operation{ + Name: opUpdateAvailabilityOptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAvailabilityOptionsInput{} + } + + output = &UpdateAvailabilityOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAvailabilityOptions API operation for Amazon CloudSearch. +// +// Configures the availability options for a domain. Enabling the Multi-AZ option +// expands an Amazon CloudSearch domain to an additional Availability Zone in +// the same Region to increase fault tolerance in the event of a service disruption. +// Changes to the Multi-AZ option can take about half an hour to become active. +// For more information, see Configuring Availability Options (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation UpdateAvailabilityOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +// * ErrCodeDisabledOperationException "DisabledAction" +// The request was rejected because it attempted an operation which is not enabled. +// +func (c *CloudSearch) UpdateAvailabilityOptions(input *UpdateAvailabilityOptionsInput) (*UpdateAvailabilityOptionsOutput, error) { + req, out := c.UpdateAvailabilityOptionsRequest(input) + return out, req.Send() +} + +// UpdateAvailabilityOptionsWithContext is the same as UpdateAvailabilityOptions with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAvailabilityOptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) UpdateAvailabilityOptionsWithContext(ctx aws.Context, input *UpdateAvailabilityOptionsInput, opts ...request.Option) (*UpdateAvailabilityOptionsOutput, error) { + req, out := c.UpdateAvailabilityOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateScalingParameters = "UpdateScalingParameters" + +// UpdateScalingParametersRequest generates a "aws/request.Request" representing the +// client's request for the UpdateScalingParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateScalingParameters for more information on using the UpdateScalingParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateScalingParametersRequest method. +// req, resp := client.UpdateScalingParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) UpdateScalingParametersRequest(input *UpdateScalingParametersInput) (req *request.Request, output *UpdateScalingParametersOutput) { + op := &request.Operation{ + Name: opUpdateScalingParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateScalingParametersInput{} + } + + output = &UpdateScalingParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateScalingParameters API operation for Amazon CloudSearch. +// +// Configures scaling parameters for a domain. A domain's scaling parameters +// specify the desired search instance type and replication count. Amazon CloudSearch +// will still automatically scale your domain based on the volume of data and +// traffic, but not below the desired instance type and replication count. If +// the Multi-AZ option is enabled, these values control the resources used per +// Availability Zone. For more information, see Configuring Scaling Options +// (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html) +// in the Amazon CloudSearch Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation UpdateScalingParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +func (c *CloudSearch) UpdateScalingParameters(input *UpdateScalingParametersInput) (*UpdateScalingParametersOutput, error) { + req, out := c.UpdateScalingParametersRequest(input) + return out, req.Send() +} + +// UpdateScalingParametersWithContext is the same as UpdateScalingParameters with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateScalingParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) UpdateScalingParametersWithContext(ctx aws.Context, input *UpdateScalingParametersInput, opts ...request.Option) (*UpdateScalingParametersOutput, error) { + req, out := c.UpdateScalingParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateServiceAccessPolicies = "UpdateServiceAccessPolicies" + +// UpdateServiceAccessPoliciesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateServiceAccessPolicies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateServiceAccessPolicies for more information on using the UpdateServiceAccessPolicies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateServiceAccessPoliciesRequest method. +// req, resp := client.UpdateServiceAccessPoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *CloudSearch) UpdateServiceAccessPoliciesRequest(input *UpdateServiceAccessPoliciesInput) (req *request.Request, output *UpdateServiceAccessPoliciesOutput) { + op := &request.Operation{ + Name: opUpdateServiceAccessPolicies, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateServiceAccessPoliciesInput{} + } + + output = &UpdateServiceAccessPoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateServiceAccessPolicies API operation for Amazon CloudSearch. +// +// Configures the access rules that control access to the domain's document +// and search endpoints. For more information, see Configuring Access for an +// Amazon CloudSearch Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CloudSearch's +// API operation UpdateServiceAccessPolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// An internal error occurred while processing the request. If this problem +// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because a resource limit has already been met. +// +// * ErrCodeResourceNotFoundException "ResourceNotFound" +// The request was rejected because it attempted to reference a resource that +// does not exist. +// +// * ErrCodeInvalidTypeException "InvalidType" +// The request was rejected because it specified an invalid type definition. +// +func (c *CloudSearch) UpdateServiceAccessPolicies(input *UpdateServiceAccessPoliciesInput) (*UpdateServiceAccessPoliciesOutput, error) { + req, out := c.UpdateServiceAccessPoliciesRequest(input) + return out, req.Send() +} + +// UpdateServiceAccessPoliciesWithContext is the same as UpdateServiceAccessPolicies with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateServiceAccessPolicies for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CloudSearch) UpdateServiceAccessPoliciesWithContext(ctx aws.Context, input *UpdateServiceAccessPoliciesInput, opts ...request.Option) (*UpdateServiceAccessPoliciesOutput, error) { + req, out := c.UpdateServiceAccessPoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// The configured access rules for the domain's document and search endpoints, +// and the current status of those rules. +type AccessPoliciesStatus struct { + _ struct{} `type:"structure"` + + // Access rules for a domain's document or search service endpoints. For more + // information, see Configuring Access for a Search Domain (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html) + // in the Amazon CloudSearch Developer Guide. The maximum size of a policy document + // is 100 KB. + // + // Options is a required field + Options *string `type:"string" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AccessPoliciesStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccessPoliciesStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *AccessPoliciesStatus) SetOptions(v string) *AccessPoliciesStatus { + s.Options = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AccessPoliciesStatus) SetStatus(v *OptionStatus) *AccessPoliciesStatus { + s.Status = v + return s +} + +// Synonyms, stopwords, and stemming options for an analysis scheme. Includes +// tokenization dictionary for Japanese. +type AnalysisOptions struct { + _ struct{} `type:"structure"` + + // The level of algorithmic stemming to perform: none, minimal, light, or full. + // The available levels vary depending on the language. For more information, + // see Language Specific Text Processing Settings (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/text-processing.html#text-processing-settings) + // in the Amazon CloudSearch Developer Guide + AlgorithmicStemming *string `type:"string" enum:"AlgorithmicStemming"` + + // A JSON array that contains a collection of terms, tokens, readings and part + // of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary + // enables you to override the default tokenization for selected terms. This + // is only valid for Japanese language fields. + JapaneseTokenizationDictionary *string `type:"string"` + + // A JSON object that contains a collection of string:value pairs that each + // map a term to its stem. For example, {"term1": "stem1", "term2": "stem2", + // "term3": "stem3"}. The stemming dictionary is applied in addition to any + // algorithmic stemming. This enables you to override the results of the algorithmic + // stemming to correct specific cases of overstemming or understemming. The + // maximum size of a stemming dictionary is 500 KB. + StemmingDictionary *string `type:"string"` + + // A JSON array of terms to ignore during indexing and searching. For example, + // ["a", "an", "the", "of"]. The stopwords dictionary must explicitly list each + // word you want to ignore. Wildcards and regular expressions are not supported. + Stopwords *string `type:"string"` + + // A JSON object that defines synonym groups and aliases. A synonym group is + // an array of arrays, where each sub-array is a group of terms where each term + // in the group is considered a synonym of every other term in the group. The + // aliases value is an object that contains a collection of string:value pairs + // where the string specifies a term and the array of values specifies each + // of the aliases for that term. An alias is considered a synonym of the specified + // term, but the term is not considered a synonym of the alias. For more information + // about specifying synonyms, see Synonyms (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-analysis-schemes.html#synonyms) + // in the Amazon CloudSearch Developer Guide. + Synonyms *string `type:"string"` +} + +// String returns the string representation +func (s AnalysisOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisOptions) GoString() string { + return s.String() +} + +// SetAlgorithmicStemming sets the AlgorithmicStemming field's value. +func (s *AnalysisOptions) SetAlgorithmicStemming(v string) *AnalysisOptions { + s.AlgorithmicStemming = &v + return s +} + +// SetJapaneseTokenizationDictionary sets the JapaneseTokenizationDictionary field's value. +func (s *AnalysisOptions) SetJapaneseTokenizationDictionary(v string) *AnalysisOptions { + s.JapaneseTokenizationDictionary = &v + return s +} + +// SetStemmingDictionary sets the StemmingDictionary field's value. +func (s *AnalysisOptions) SetStemmingDictionary(v string) *AnalysisOptions { + s.StemmingDictionary = &v + return s +} + +// SetStopwords sets the Stopwords field's value. +func (s *AnalysisOptions) SetStopwords(v string) *AnalysisOptions { + s.Stopwords = &v + return s +} + +// SetSynonyms sets the Synonyms field's value. +func (s *AnalysisOptions) SetSynonyms(v string) *AnalysisOptions { + s.Synonyms = &v + return s +} + +// Configuration information for an analysis scheme. Each analysis scheme has +// a unique name and specifies the language of the text to be processed. The +// following options can be configured for an analysis scheme: Synonyms, Stopwords, +// StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming. +type AnalysisScheme struct { + _ struct{} `type:"structure"` + + // Synonyms, stopwords, and stemming options for an analysis scheme. Includes + // tokenization dictionary for Japanese. + AnalysisOptions *AnalysisOptions `type:"structure"` + + // An IETF RFC 4646 (http://tools.ietf.org/html/rfc4646) language code or mul + // for multiple languages. + // + // AnalysisSchemeLanguage is a required field + AnalysisSchemeLanguage *string `type:"string" required:"true" enum:"AnalysisSchemeLanguage"` + + // Names must begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). + // + // AnalysisSchemeName is a required field + AnalysisSchemeName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AnalysisScheme) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisScheme) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AnalysisScheme) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AnalysisScheme"} + if s.AnalysisSchemeLanguage == nil { + invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeLanguage")) + } + if s.AnalysisSchemeName == nil { + invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeName")) + } + if s.AnalysisSchemeName != nil && len(*s.AnalysisSchemeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AnalysisSchemeName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnalysisOptions sets the AnalysisOptions field's value. +func (s *AnalysisScheme) SetAnalysisOptions(v *AnalysisOptions) *AnalysisScheme { + s.AnalysisOptions = v + return s +} + +// SetAnalysisSchemeLanguage sets the AnalysisSchemeLanguage field's value. +func (s *AnalysisScheme) SetAnalysisSchemeLanguage(v string) *AnalysisScheme { + s.AnalysisSchemeLanguage = &v + return s +} + +// SetAnalysisSchemeName sets the AnalysisSchemeName field's value. +func (s *AnalysisScheme) SetAnalysisSchemeName(v string) *AnalysisScheme { + s.AnalysisSchemeName = &v + return s +} + +// The status and configuration of an AnalysisScheme. +type AnalysisSchemeStatus struct { + _ struct{} `type:"structure"` + + // Configuration information for an analysis scheme. Each analysis scheme has + // a unique name and specifies the language of the text to be processed. The + // following options can be configured for an analysis scheme: Synonyms, Stopwords, + // StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming. + // + // Options is a required field + Options *AnalysisScheme `type:"structure" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AnalysisSchemeStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisSchemeStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *AnalysisSchemeStatus) SetOptions(v *AnalysisScheme) *AnalysisSchemeStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *AnalysisSchemeStatus) SetStatus(v *OptionStatus) *AnalysisSchemeStatus { + s.Status = v + return s +} + +// The status and configuration of the domain's availability options. +type AvailabilityOptionsStatus struct { + _ struct{} `type:"structure"` + + // The availability options configured for the domain. + // + // Options is a required field + Options *bool `type:"boolean" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AvailabilityOptionsStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityOptionsStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *AvailabilityOptionsStatus) SetOptions(v bool) *AvailabilityOptionsStatus { + s.Options = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AvailabilityOptionsStatus) SetStatus(v *OptionStatus) *AvailabilityOptionsStatus { + s.Status = v + return s +} + +// Container for the parameters to the BuildSuggester operation. Specifies the +// name of the domain you want to update. +type BuildSuggestersInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s BuildSuggestersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BuildSuggestersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BuildSuggestersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BuildSuggestersInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *BuildSuggestersInput) SetDomainName(v string) *BuildSuggestersInput { + s.DomainName = &v + return s +} + +// The result of a BuildSuggester request. Contains a list of the fields used +// for suggestions. +type BuildSuggestersOutput struct { + _ struct{} `type:"structure"` + + // A list of field names. + FieldNames []*string `type:"list"` +} + +// String returns the string representation +func (s BuildSuggestersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BuildSuggestersOutput) GoString() string { + return s.String() +} + +// SetFieldNames sets the FieldNames field's value. +func (s *BuildSuggestersOutput) SetFieldNames(v []*string) *BuildSuggestersOutput { + s.FieldNames = v + return s +} + +// Container for the parameters to the CreateDomain operation. Specifies a name +// for the new search domain. +type CreateDomainInput struct { + _ struct{} `type:"structure"` + + // A name for the domain you are creating. Allowed characters are a-z (lower-case + // letters), 0-9, and hyphen (-). Domain names must start with a letter or number + // and be at least 3 and no more than 28 characters long. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { + s.DomainName = &v + return s +} + +// The result of a CreateDomainRequest. Contains the status of a newly created +// domain. +type CreateDomainOutput struct { + _ struct{} `type:"structure"` + + // The current status of the search domain. + DomainStatus *DomainStatus `type:"structure"` +} + +// String returns the string representation +func (s CreateDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainOutput) GoString() string { + return s.String() +} + +// SetDomainStatus sets the DomainStatus field's value. +func (s *CreateDomainOutput) SetDomainStatus(v *DomainStatus) *CreateDomainOutput { + s.DomainStatus = v + return s +} + +// Options for a field that contains an array of dates. Present if IndexFieldType +// specifies the field is of type date-array. All options are enabled by default. +type DateArrayOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // A list of source fields to map to the field. + SourceFields *string `type:"string"` +} + +// String returns the string representation +func (s DateArrayOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DateArrayOptions) GoString() string { + return s.String() +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *DateArrayOptions) SetDefaultValue(v string) *DateArrayOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *DateArrayOptions) SetFacetEnabled(v bool) *DateArrayOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *DateArrayOptions) SetReturnEnabled(v bool) *DateArrayOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *DateArrayOptions) SetSearchEnabled(v bool) *DateArrayOptions { + s.SearchEnabled = &v + return s +} + +// SetSourceFields sets the SourceFields field's value. +func (s *DateArrayOptions) SetSourceFields(v string) *DateArrayOptions { + s.SourceFields = &v + return s +} + +// Options for a date field. Dates and times are specified in UTC (Coordinated +// Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present +// if IndexFieldType specifies the field is of type date. All options are enabled +// by default. +type DateOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // Whether the field can be used to sort the search results. + SortEnabled *bool `type:"boolean"` + + // A string that represents the name of an index field. CloudSearch supports + // regular index fields as well as dynamic fields. A dynamic field's name defines + // a pattern that begins or ends with a wildcard. Any document fields that don't + // map to a regular index field but do match a dynamic field's pattern are configured + // with the dynamic field's indexing options. + // + // Regular field names begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin + // or end with a wildcard (*). The wildcard can also be the only character in + // a dynamic field name. Multiple wildcards, and wildcards embedded within a + // string are not supported. + // + // The name score is reserved and cannot be used as a field name. To reference + // a document's ID, you can use the name _id. + SourceField *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DateOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DateOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DateOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DateOptions"} + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *DateOptions) SetDefaultValue(v string) *DateOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *DateOptions) SetFacetEnabled(v bool) *DateOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *DateOptions) SetReturnEnabled(v bool) *DateOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *DateOptions) SetSearchEnabled(v bool) *DateOptions { + s.SearchEnabled = &v + return s +} + +// SetSortEnabled sets the SortEnabled field's value. +func (s *DateOptions) SetSortEnabled(v bool) *DateOptions { + s.SortEnabled = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *DateOptions) SetSourceField(v string) *DateOptions { + s.SourceField = &v + return s +} + +// Container for the parameters to the DefineAnalysisScheme operation. Specifies +// the name of the domain you want to update and the analysis scheme configuration. +type DefineAnalysisSchemeInput struct { + _ struct{} `type:"structure"` + + // Configuration information for an analysis scheme. Each analysis scheme has + // a unique name and specifies the language of the text to be processed. The + // following options can be configured for an analysis scheme: Synonyms, Stopwords, + // StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming. + // + // AnalysisScheme is a required field + AnalysisScheme *AnalysisScheme `type:"structure" required:"true"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DefineAnalysisSchemeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineAnalysisSchemeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DefineAnalysisSchemeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DefineAnalysisSchemeInput"} + if s.AnalysisScheme == nil { + invalidParams.Add(request.NewErrParamRequired("AnalysisScheme")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.AnalysisScheme != nil { + if err := s.AnalysisScheme.Validate(); err != nil { + invalidParams.AddNested("AnalysisScheme", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnalysisScheme sets the AnalysisScheme field's value. +func (s *DefineAnalysisSchemeInput) SetAnalysisScheme(v *AnalysisScheme) *DefineAnalysisSchemeInput { + s.AnalysisScheme = v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DefineAnalysisSchemeInput) SetDomainName(v string) *DefineAnalysisSchemeInput { + s.DomainName = &v + return s +} + +// The result of a DefineAnalysisScheme request. Contains the status of the +// newly-configured analysis scheme. +type DefineAnalysisSchemeOutput struct { + _ struct{} `type:"structure"` + + // The status and configuration of an AnalysisScheme. + // + // AnalysisScheme is a required field + AnalysisScheme *AnalysisSchemeStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineAnalysisSchemeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineAnalysisSchemeOutput) GoString() string { + return s.String() +} + +// SetAnalysisScheme sets the AnalysisScheme field's value. +func (s *DefineAnalysisSchemeOutput) SetAnalysisScheme(v *AnalysisSchemeStatus) *DefineAnalysisSchemeOutput { + s.AnalysisScheme = v + return s +} + +// Container for the parameters to the DefineExpression operation. Specifies +// the name of the domain you want to update and the expression you want to +// configure. +type DefineExpressionInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // A named expression that can be evaluated at search time. Can be used to sort + // the search results, define other expressions, or return computed information + // in the search results. + // + // Expression is a required field + Expression *Expression `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineExpressionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineExpressionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DefineExpressionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DefineExpressionInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.Expression == nil { + invalidParams.Add(request.NewErrParamRequired("Expression")) + } + if s.Expression != nil { + if err := s.Expression.Validate(); err != nil { + invalidParams.AddNested("Expression", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DefineExpressionInput) SetDomainName(v string) *DefineExpressionInput { + s.DomainName = &v + return s +} + +// SetExpression sets the Expression field's value. +func (s *DefineExpressionInput) SetExpression(v *Expression) *DefineExpressionInput { + s.Expression = v + return s +} + +// The result of a DefineExpression request. Contains the status of the newly-configured +// expression. +type DefineExpressionOutput struct { + _ struct{} `type:"structure"` + + // The value of an Expression and its current status. + // + // Expression is a required field + Expression *ExpressionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineExpressionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineExpressionOutput) GoString() string { + return s.String() +} + +// SetExpression sets the Expression field's value. +func (s *DefineExpressionOutput) SetExpression(v *ExpressionStatus) *DefineExpressionOutput { + s.Expression = v + return s +} + +// Container for the parameters to the DefineIndexField operation. Specifies +// the name of the domain you want to update and the index field configuration. +type DefineIndexFieldInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // The index field and field options you want to configure. + // + // IndexField is a required field + IndexField *IndexField `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineIndexFieldInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineIndexFieldInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DefineIndexFieldInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DefineIndexFieldInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.IndexField == nil { + invalidParams.Add(request.NewErrParamRequired("IndexField")) + } + if s.IndexField != nil { + if err := s.IndexField.Validate(); err != nil { + invalidParams.AddNested("IndexField", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DefineIndexFieldInput) SetDomainName(v string) *DefineIndexFieldInput { + s.DomainName = &v + return s +} + +// SetIndexField sets the IndexField field's value. +func (s *DefineIndexFieldInput) SetIndexField(v *IndexField) *DefineIndexFieldInput { + s.IndexField = v + return s +} + +// The result of a DefineIndexField request. Contains the status of the newly-configured +// index field. +type DefineIndexFieldOutput struct { + _ struct{} `type:"structure"` + + // The value of an IndexField and its current status. + // + // IndexField is a required field + IndexField *IndexFieldStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineIndexFieldOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineIndexFieldOutput) GoString() string { + return s.String() +} + +// SetIndexField sets the IndexField field's value. +func (s *DefineIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DefineIndexFieldOutput { + s.IndexField = v + return s +} + +// Container for the parameters to the DefineSuggester operation. Specifies +// the name of the domain you want to update and the suggester configuration. +type DefineSuggesterInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // Configuration information for a search suggester. Each suggester has a unique + // name and specifies the text field you want to use for suggestions. The following + // options can be configured for a suggester: FuzzyMatching, SortExpression. + // + // Suggester is a required field + Suggester *Suggester `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineSuggesterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineSuggesterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DefineSuggesterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DefineSuggesterInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.Suggester == nil { + invalidParams.Add(request.NewErrParamRequired("Suggester")) + } + if s.Suggester != nil { + if err := s.Suggester.Validate(); err != nil { + invalidParams.AddNested("Suggester", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DefineSuggesterInput) SetDomainName(v string) *DefineSuggesterInput { + s.DomainName = &v + return s +} + +// SetSuggester sets the Suggester field's value. +func (s *DefineSuggesterInput) SetSuggester(v *Suggester) *DefineSuggesterInput { + s.Suggester = v + return s +} + +// The result of a DefineSuggester request. Contains the status of the newly-configured +// suggester. +type DefineSuggesterOutput struct { + _ struct{} `type:"structure"` + + // The value of a Suggester and its current status. + // + // Suggester is a required field + Suggester *SuggesterStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DefineSuggesterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefineSuggesterOutput) GoString() string { + return s.String() +} + +// SetSuggester sets the Suggester field's value. +func (s *DefineSuggesterOutput) SetSuggester(v *SuggesterStatus) *DefineSuggesterOutput { + s.Suggester = v + return s +} + +// Container for the parameters to the DeleteAnalysisScheme operation. Specifies +// the name of the domain you want to update and the analysis scheme you want +// to delete. +type DeleteAnalysisSchemeInput struct { + _ struct{} `type:"structure"` + + // The name of the analysis scheme you want to delete. + // + // AnalysisSchemeName is a required field + AnalysisSchemeName *string `min:"1" type:"string" required:"true"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAnalysisSchemeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAnalysisSchemeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAnalysisSchemeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAnalysisSchemeInput"} + if s.AnalysisSchemeName == nil { + invalidParams.Add(request.NewErrParamRequired("AnalysisSchemeName")) + } + if s.AnalysisSchemeName != nil && len(*s.AnalysisSchemeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AnalysisSchemeName", 1)) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnalysisSchemeName sets the AnalysisSchemeName field's value. +func (s *DeleteAnalysisSchemeInput) SetAnalysisSchemeName(v string) *DeleteAnalysisSchemeInput { + s.AnalysisSchemeName = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteAnalysisSchemeInput) SetDomainName(v string) *DeleteAnalysisSchemeInput { + s.DomainName = &v + return s +} + +// The result of a DeleteAnalysisScheme request. Contains the status of the +// deleted analysis scheme. +type DeleteAnalysisSchemeOutput struct { + _ struct{} `type:"structure"` + + // The status of the analysis scheme being deleted. + // + // AnalysisScheme is a required field + AnalysisScheme *AnalysisSchemeStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteAnalysisSchemeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAnalysisSchemeOutput) GoString() string { + return s.String() +} + +// SetAnalysisScheme sets the AnalysisScheme field's value. +func (s *DeleteAnalysisSchemeOutput) SetAnalysisScheme(v *AnalysisSchemeStatus) *DeleteAnalysisSchemeOutput { + s.AnalysisScheme = v + return s +} + +// Container for the parameters to the DeleteDomain operation. Specifies the +// name of the domain you want to delete. +type DeleteDomainInput struct { + _ struct{} `type:"structure"` + + // The name of the domain you want to permanently delete. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { + s.DomainName = &v + return s +} + +// The result of a DeleteDomain request. Contains the status of a newly deleted +// domain, or no status if the domain has already been completely deleted. +type DeleteDomainOutput struct { + _ struct{} `type:"structure"` + + // The current status of the search domain. + DomainStatus *DomainStatus `type:"structure"` +} + +// String returns the string representation +func (s DeleteDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainOutput) GoString() string { + return s.String() +} + +// SetDomainStatus sets the DomainStatus field's value. +func (s *DeleteDomainOutput) SetDomainStatus(v *DomainStatus) *DeleteDomainOutput { + s.DomainStatus = v + return s +} + +// Container for the parameters to the DeleteExpression operation. Specifies +// the name of the domain you want to update and the name of the expression +// you want to delete. +type DeleteExpressionInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // The name of the Expression to delete. + // + // ExpressionName is a required field + ExpressionName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteExpressionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteExpressionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteExpressionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteExpressionInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.ExpressionName == nil { + invalidParams.Add(request.NewErrParamRequired("ExpressionName")) + } + if s.ExpressionName != nil && len(*s.ExpressionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpressionName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteExpressionInput) SetDomainName(v string) *DeleteExpressionInput { + s.DomainName = &v + return s +} + +// SetExpressionName sets the ExpressionName field's value. +func (s *DeleteExpressionInput) SetExpressionName(v string) *DeleteExpressionInput { + s.ExpressionName = &v + return s +} + +// The result of a DeleteExpression request. Specifies the expression being +// deleted. +type DeleteExpressionOutput struct { + _ struct{} `type:"structure"` + + // The status of the expression being deleted. + // + // Expression is a required field + Expression *ExpressionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteExpressionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteExpressionOutput) GoString() string { + return s.String() +} + +// SetExpression sets the Expression field's value. +func (s *DeleteExpressionOutput) SetExpression(v *ExpressionStatus) *DeleteExpressionOutput { + s.Expression = v + return s +} + +// Container for the parameters to the DeleteIndexField operation. Specifies +// the name of the domain you want to update and the name of the index field +// you want to delete. +type DeleteIndexFieldInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // The name of the index field your want to remove from the domain's indexing + // options. + // + // IndexFieldName is a required field + IndexFieldName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteIndexFieldInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIndexFieldInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIndexFieldInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIndexFieldInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.IndexFieldName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexFieldName")) + } + if s.IndexFieldName != nil && len(*s.IndexFieldName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IndexFieldName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteIndexFieldInput) SetDomainName(v string) *DeleteIndexFieldInput { + s.DomainName = &v + return s +} + +// SetIndexFieldName sets the IndexFieldName field's value. +func (s *DeleteIndexFieldInput) SetIndexFieldName(v string) *DeleteIndexFieldInput { + s.IndexFieldName = &v + return s +} + +// The result of a DeleteIndexField request. +type DeleteIndexFieldOutput struct { + _ struct{} `type:"structure"` + + // The status of the index field being deleted. + // + // IndexField is a required field + IndexField *IndexFieldStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteIndexFieldOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIndexFieldOutput) GoString() string { + return s.String() +} + +// SetIndexField sets the IndexField field's value. +func (s *DeleteIndexFieldOutput) SetIndexField(v *IndexFieldStatus) *DeleteIndexFieldOutput { + s.IndexField = v + return s +} + +// Container for the parameters to the DeleteSuggester operation. Specifies +// the name of the domain you want to update and name of the suggester you want +// to delete. +type DeleteSuggesterInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // Specifies the name of the suggester you want to delete. + // + // SuggesterName is a required field + SuggesterName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSuggesterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSuggesterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSuggesterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSuggesterInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.SuggesterName == nil { + invalidParams.Add(request.NewErrParamRequired("SuggesterName")) + } + if s.SuggesterName != nil && len(*s.SuggesterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SuggesterName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteSuggesterInput) SetDomainName(v string) *DeleteSuggesterInput { + s.DomainName = &v + return s +} + +// SetSuggesterName sets the SuggesterName field's value. +func (s *DeleteSuggesterInput) SetSuggesterName(v string) *DeleteSuggesterInput { + s.SuggesterName = &v + return s +} + +// The result of a DeleteSuggester request. Contains the status of the deleted +// suggester. +type DeleteSuggesterOutput struct { + _ struct{} `type:"structure"` + + // The status of the suggester being deleted. + // + // Suggester is a required field + Suggester *SuggesterStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteSuggesterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSuggesterOutput) GoString() string { + return s.String() +} + +// SetSuggester sets the Suggester field's value. +func (s *DeleteSuggesterOutput) SetSuggester(v *SuggesterStatus) *DeleteSuggesterOutput { + s.Suggester = v + return s +} + +// Container for the parameters to the DescribeAnalysisSchemes operation. Specifies +// the name of the domain you want to describe. To limit the response to particular +// analysis schemes, specify the names of the analysis schemes you want to describe. +// To show the active configuration and exclude any pending changes, set the +// Deployed option to true. +type DescribeAnalysisSchemesInput struct { + _ struct{} `type:"structure"` + + // The analysis schemes you want to describe. + AnalysisSchemeNames []*string `type:"list"` + + // Whether to display the deployed configuration (true) or include any pending + // changes (false). Defaults to false. + Deployed *bool `type:"boolean"` + + // The name of the domain you want to describe. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAnalysisSchemesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAnalysisSchemesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAnalysisSchemesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAnalysisSchemesInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnalysisSchemeNames sets the AnalysisSchemeNames field's value. +func (s *DescribeAnalysisSchemesInput) SetAnalysisSchemeNames(v []*string) *DescribeAnalysisSchemesInput { + s.AnalysisSchemeNames = v + return s +} + +// SetDeployed sets the Deployed field's value. +func (s *DescribeAnalysisSchemesInput) SetDeployed(v bool) *DescribeAnalysisSchemesInput { + s.Deployed = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeAnalysisSchemesInput) SetDomainName(v string) *DescribeAnalysisSchemesInput { + s.DomainName = &v + return s +} + +// The result of a DescribeAnalysisSchemes request. Contains the analysis schemes +// configured for the domain specified in the request. +type DescribeAnalysisSchemesOutput struct { + _ struct{} `type:"structure"` + + // The analysis scheme descriptions. + // + // AnalysisSchemes is a required field + AnalysisSchemes []*AnalysisSchemeStatus `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeAnalysisSchemesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAnalysisSchemesOutput) GoString() string { + return s.String() +} + +// SetAnalysisSchemes sets the AnalysisSchemes field's value. +func (s *DescribeAnalysisSchemesOutput) SetAnalysisSchemes(v []*AnalysisSchemeStatus) *DescribeAnalysisSchemesOutput { + s.AnalysisSchemes = v + return s +} + +// Container for the parameters to the DescribeAvailabilityOptions operation. +// Specifies the name of the domain you want to describe. To show the active +// configuration and exclude any pending changes, set the Deployed option to +// true. +type DescribeAvailabilityOptionsInput struct { + _ struct{} `type:"structure"` + + // Whether to display the deployed configuration (true) or include any pending + // changes (false). Defaults to false. + Deployed *bool `type:"boolean"` + + // The name of the domain you want to describe. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAvailabilityOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAvailabilityOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAvailabilityOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAvailabilityOptionsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeployed sets the Deployed field's value. +func (s *DescribeAvailabilityOptionsInput) SetDeployed(v bool) *DescribeAvailabilityOptionsInput { + s.Deployed = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeAvailabilityOptionsInput) SetDomainName(v string) *DescribeAvailabilityOptionsInput { + s.DomainName = &v + return s +} + +// The result of a DescribeAvailabilityOptions request. Indicates whether or +// not the Multi-AZ option is enabled for the domain specified in the request. +type DescribeAvailabilityOptionsOutput struct { + _ struct{} `type:"structure"` + + // The availability options configured for the domain. Indicates whether Multi-AZ + // is enabled for the domain. + AvailabilityOptions *AvailabilityOptionsStatus `type:"structure"` +} + +// String returns the string representation +func (s DescribeAvailabilityOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAvailabilityOptionsOutput) GoString() string { + return s.String() +} + +// SetAvailabilityOptions sets the AvailabilityOptions field's value. +func (s *DescribeAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *DescribeAvailabilityOptionsOutput { + s.AvailabilityOptions = v + return s +} + +// Container for the parameters to the DescribeDomains operation. By default +// shows the status of all domains. To restrict the response to particular domains, +// specify the names of the domains you want to describe. +type DescribeDomainsInput struct { + _ struct{} `type:"structure"` + + // The names of the domains you want to include in the response. + DomainNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeDomainsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDomainsInput) GoString() string { + return s.String() +} + +// SetDomainNames sets the DomainNames field's value. +func (s *DescribeDomainsInput) SetDomainNames(v []*string) *DescribeDomainsInput { + s.DomainNames = v + return s +} + +// The result of a DescribeDomains request. Contains the status of the domains +// specified in the request or all domains owned by the account. +type DescribeDomainsOutput struct { + _ struct{} `type:"structure"` + + // A list that contains the status of each requested domain. + // + // DomainStatusList is a required field + DomainStatusList []*DomainStatus `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeDomainsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDomainsOutput) GoString() string { + return s.String() +} + +// SetDomainStatusList sets the DomainStatusList field's value. +func (s *DescribeDomainsOutput) SetDomainStatusList(v []*DomainStatus) *DescribeDomainsOutput { + s.DomainStatusList = v + return s +} + +// Container for the parameters to the DescribeDomains operation. Specifies +// the name of the domain you want to describe. To restrict the response to +// particular expressions, specify the names of the expressions you want to +// describe. To show the active configuration and exclude any pending changes, +// set the Deployed option to true. +type DescribeExpressionsInput struct { + _ struct{} `type:"structure"` + + // Whether to display the deployed configuration (true) or include any pending + // changes (false). Defaults to false. + Deployed *bool `type:"boolean"` + + // The name of the domain you want to describe. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // Limits the DescribeExpressions response to the specified expressions. If + // not specified, all expressions are shown. + ExpressionNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeExpressionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExpressionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeExpressionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeExpressionsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeployed sets the Deployed field's value. +func (s *DescribeExpressionsInput) SetDeployed(v bool) *DescribeExpressionsInput { + s.Deployed = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeExpressionsInput) SetDomainName(v string) *DescribeExpressionsInput { + s.DomainName = &v + return s +} + +// SetExpressionNames sets the ExpressionNames field's value. +func (s *DescribeExpressionsInput) SetExpressionNames(v []*string) *DescribeExpressionsInput { + s.ExpressionNames = v + return s +} + +// The result of a DescribeExpressions request. Contains the expressions configured +// for the domain specified in the request. +type DescribeExpressionsOutput struct { + _ struct{} `type:"structure"` + + // The expressions configured for the domain. + // + // Expressions is a required field + Expressions []*ExpressionStatus `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeExpressionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeExpressionsOutput) GoString() string { + return s.String() +} + +// SetExpressions sets the Expressions field's value. +func (s *DescribeExpressionsOutput) SetExpressions(v []*ExpressionStatus) *DescribeExpressionsOutput { + s.Expressions = v + return s +} + +// Container for the parameters to the DescribeIndexFields operation. Specifies +// the name of the domain you want to describe. To restrict the response to +// particular index fields, specify the names of the index fields you want to +// describe. To show the active configuration and exclude any pending changes, +// set the Deployed option to true. +type DescribeIndexFieldsInput struct { + _ struct{} `type:"structure"` + + // Whether to display the deployed configuration (true) or include any pending + // changes (false). Defaults to false. + Deployed *bool `type:"boolean"` + + // The name of the domain you want to describe. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // A list of the index fields you want to describe. If not specified, information + // is returned for all configured index fields. + FieldNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeIndexFieldsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIndexFieldsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeIndexFieldsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeIndexFieldsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeployed sets the Deployed field's value. +func (s *DescribeIndexFieldsInput) SetDeployed(v bool) *DescribeIndexFieldsInput { + s.Deployed = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeIndexFieldsInput) SetDomainName(v string) *DescribeIndexFieldsInput { + s.DomainName = &v + return s +} + +// SetFieldNames sets the FieldNames field's value. +func (s *DescribeIndexFieldsInput) SetFieldNames(v []*string) *DescribeIndexFieldsInput { + s.FieldNames = v + return s +} + +// The result of a DescribeIndexFields request. Contains the index fields configured +// for the domain specified in the request. +type DescribeIndexFieldsOutput struct { + _ struct{} `type:"structure"` + + // The index fields configured for the domain. + // + // IndexFields is a required field + IndexFields []*IndexFieldStatus `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeIndexFieldsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIndexFieldsOutput) GoString() string { + return s.String() +} + +// SetIndexFields sets the IndexFields field's value. +func (s *DescribeIndexFieldsOutput) SetIndexFields(v []*IndexFieldStatus) *DescribeIndexFieldsOutput { + s.IndexFields = v + return s +} + +// Container for the parameters to the DescribeScalingParameters operation. +// Specifies the name of the domain you want to describe. +type DescribeScalingParametersInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeScalingParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScalingParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScalingParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScalingParametersInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeScalingParametersInput) SetDomainName(v string) *DescribeScalingParametersInput { + s.DomainName = &v + return s +} + +// The result of a DescribeScalingParameters request. Contains the scaling parameters +// configured for the domain specified in the request. +type DescribeScalingParametersOutput struct { + _ struct{} `type:"structure"` + + // The status and configuration of a search domain's scaling parameters. + // + // ScalingParameters is a required field + ScalingParameters *ScalingParametersStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeScalingParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScalingParametersOutput) GoString() string { + return s.String() +} + +// SetScalingParameters sets the ScalingParameters field's value. +func (s *DescribeScalingParametersOutput) SetScalingParameters(v *ScalingParametersStatus) *DescribeScalingParametersOutput { + s.ScalingParameters = v + return s +} + +// Container for the parameters to the DescribeServiceAccessPolicies operation. +// Specifies the name of the domain you want to describe. To show the active +// configuration and exclude any pending changes, set the Deployed option to +// true. +type DescribeServiceAccessPoliciesInput struct { + _ struct{} `type:"structure"` + + // Whether to display the deployed configuration (true) or include any pending + // changes (false). Defaults to false. + Deployed *bool `type:"boolean"` + + // The name of the domain you want to describe. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeServiceAccessPoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServiceAccessPoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeServiceAccessPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServiceAccessPoliciesInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeployed sets the Deployed field's value. +func (s *DescribeServiceAccessPoliciesInput) SetDeployed(v bool) *DescribeServiceAccessPoliciesInput { + s.Deployed = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeServiceAccessPoliciesInput) SetDomainName(v string) *DescribeServiceAccessPoliciesInput { + s.DomainName = &v + return s +} + +// The result of a DescribeServiceAccessPolicies request. +type DescribeServiceAccessPoliciesOutput struct { + _ struct{} `type:"structure"` + + // The access rules configured for the domain specified in the request. + // + // AccessPolicies is a required field + AccessPolicies *AccessPoliciesStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeServiceAccessPoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeServiceAccessPoliciesOutput) GoString() string { + return s.String() +} + +// SetAccessPolicies sets the AccessPolicies field's value. +func (s *DescribeServiceAccessPoliciesOutput) SetAccessPolicies(v *AccessPoliciesStatus) *DescribeServiceAccessPoliciesOutput { + s.AccessPolicies = v + return s +} + +// Container for the parameters to the DescribeSuggester operation. Specifies +// the name of the domain you want to describe. To restrict the response to +// particular suggesters, specify the names of the suggesters you want to describe. +// To show the active configuration and exclude any pending changes, set the +// Deployed option to true. +type DescribeSuggestersInput struct { + _ struct{} `type:"structure"` + + // Whether to display the deployed configuration (true) or include any pending + // changes (false). Defaults to false. + Deployed *bool `type:"boolean"` + + // The name of the domain you want to describe. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // The suggesters you want to describe. + SuggesterNames []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeSuggestersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSuggestersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSuggestersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSuggestersInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeployed sets the Deployed field's value. +func (s *DescribeSuggestersInput) SetDeployed(v bool) *DescribeSuggestersInput { + s.Deployed = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DescribeSuggestersInput) SetDomainName(v string) *DescribeSuggestersInput { + s.DomainName = &v + return s +} + +// SetSuggesterNames sets the SuggesterNames field's value. +func (s *DescribeSuggestersInput) SetSuggesterNames(v []*string) *DescribeSuggestersInput { + s.SuggesterNames = v + return s +} + +// The result of a DescribeSuggesters request. +type DescribeSuggestersOutput struct { + _ struct{} `type:"structure"` + + // The suggesters configured for the domain specified in the request. + // + // Suggesters is a required field + Suggesters []*SuggesterStatus `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeSuggestersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSuggestersOutput) GoString() string { + return s.String() +} + +// SetSuggesters sets the Suggesters field's value. +func (s *DescribeSuggestersOutput) SetSuggesters(v []*SuggesterStatus) *DescribeSuggestersOutput { + s.Suggesters = v + return s +} + +// Options for a search suggester. +type DocumentSuggesterOptions struct { + _ struct{} `type:"structure"` + + // The level of fuzziness allowed when suggesting matches for a string: none, + // low, or high. With none, the specified string is treated as an exact prefix. + // With low, suggestions must differ from the specified string by no more than + // one character. With high, suggestions can differ by up to two characters. + // The default is none. + FuzzyMatching *string `type:"string" enum:"SuggesterFuzzyMatching"` + + // An expression that computes a score for each suggestion to control how they + // are sorted. The scores are rounded to the nearest integer, with a floor of + // 0 and a ceiling of 2^31-1. A document's relevance score is not computed for + // suggestions, so sort expressions cannot reference the _score value. To sort + // suggestions using a numeric field or existing expression, simply specify + // the name of the field or expression. If no expression is configured for the + // suggester, the suggestions are sorted with the closest matches listed first. + SortExpression *string `type:"string"` + + // The name of the index field you want to use for suggestions. + // + // SourceField is a required field + SourceField *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DocumentSuggesterOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DocumentSuggesterOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DocumentSuggesterOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DocumentSuggesterOptions"} + if s.SourceField == nil { + invalidParams.Add(request.NewErrParamRequired("SourceField")) + } + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFuzzyMatching sets the FuzzyMatching field's value. +func (s *DocumentSuggesterOptions) SetFuzzyMatching(v string) *DocumentSuggesterOptions { + s.FuzzyMatching = &v + return s +} + +// SetSortExpression sets the SortExpression field's value. +func (s *DocumentSuggesterOptions) SetSortExpression(v string) *DocumentSuggesterOptions { + s.SortExpression = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *DocumentSuggesterOptions) SetSourceField(v string) *DocumentSuggesterOptions { + s.SourceField = &v + return s +} + +// The current status of the search domain. +type DomainStatus struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the search domain. See Identifiers for + // IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_Identifiers.html) + // in Using AWS Identity and Access Management for more information. + ARN *string `type:"string"` + + // True if the search domain is created. It can take several minutes to initialize + // a domain when CreateDomain is called. Newly created search domains are returned + // from DescribeDomains with a false value for Created until domain creation + // is complete. + Created *bool `type:"boolean"` + + // True if the search domain has been deleted. The system must clean up resources + // dedicated to the search domain when DeleteDomain is called. Newly deleted + // search domains are returned from DescribeDomains with a true value for IsDeleted + // for several minutes until resource cleanup is complete. + Deleted *bool `type:"boolean"` + + // The service endpoint for updating documents in a search domain. + DocService *ServiceEndpoint `type:"structure"` + + // An internally generated unique identifier for a domain. + // + // DomainId is a required field + DomainId *string `min:"1" type:"string" required:"true"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + Limits *Limits `type:"structure"` + + // True if processing is being done to activate the current domain configuration. + Processing *bool `type:"boolean"` + + // True if IndexDocuments needs to be called to activate the current domain + // configuration. + // + // RequiresIndexDocuments is a required field + RequiresIndexDocuments *bool `type:"boolean" required:"true"` + + // The number of search instances that are available to process search requests. + SearchInstanceCount *int64 `min:"1" type:"integer"` + + // The instance type that is being used to process search requests. + SearchInstanceType *string `type:"string"` + + // The number of partitions across which the search index is spread. + SearchPartitionCount *int64 `min:"1" type:"integer"` + + // The service endpoint for requesting search results from a search domain. + SearchService *ServiceEndpoint `type:"structure"` +} + +// String returns the string representation +func (s DomainStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DomainStatus) GoString() string { + return s.String() +} + +// SetARN sets the ARN field's value. +func (s *DomainStatus) SetARN(v string) *DomainStatus { + s.ARN = &v + return s +} + +// SetCreated sets the Created field's value. +func (s *DomainStatus) SetCreated(v bool) *DomainStatus { + s.Created = &v + return s +} + +// SetDeleted sets the Deleted field's value. +func (s *DomainStatus) SetDeleted(v bool) *DomainStatus { + s.Deleted = &v + return s +} + +// SetDocService sets the DocService field's value. +func (s *DomainStatus) SetDocService(v *ServiceEndpoint) *DomainStatus { + s.DocService = v + return s +} + +// SetDomainId sets the DomainId field's value. +func (s *DomainStatus) SetDomainId(v string) *DomainStatus { + s.DomainId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DomainStatus) SetDomainName(v string) *DomainStatus { + s.DomainName = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *DomainStatus) SetLimits(v *Limits) *DomainStatus { + s.Limits = v + return s +} + +// SetProcessing sets the Processing field's value. +func (s *DomainStatus) SetProcessing(v bool) *DomainStatus { + s.Processing = &v + return s +} + +// SetRequiresIndexDocuments sets the RequiresIndexDocuments field's value. +func (s *DomainStatus) SetRequiresIndexDocuments(v bool) *DomainStatus { + s.RequiresIndexDocuments = &v + return s +} + +// SetSearchInstanceCount sets the SearchInstanceCount field's value. +func (s *DomainStatus) SetSearchInstanceCount(v int64) *DomainStatus { + s.SearchInstanceCount = &v + return s +} + +// SetSearchInstanceType sets the SearchInstanceType field's value. +func (s *DomainStatus) SetSearchInstanceType(v string) *DomainStatus { + s.SearchInstanceType = &v + return s +} + +// SetSearchPartitionCount sets the SearchPartitionCount field's value. +func (s *DomainStatus) SetSearchPartitionCount(v int64) *DomainStatus { + s.SearchPartitionCount = &v + return s +} + +// SetSearchService sets the SearchService field's value. +func (s *DomainStatus) SetSearchService(v *ServiceEndpoint) *DomainStatus { + s.SearchService = v + return s +} + +// Options for a field that contains an array of double-precision 64-bit floating +// point values. Present if IndexFieldType specifies the field is of type double-array. +// All options are enabled by default. +type DoubleArrayOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *float64 `type:"double"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // A list of source fields to map to the field. + SourceFields *string `type:"string"` +} + +// String returns the string representation +func (s DoubleArrayOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DoubleArrayOptions) GoString() string { + return s.String() +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *DoubleArrayOptions) SetDefaultValue(v float64) *DoubleArrayOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *DoubleArrayOptions) SetFacetEnabled(v bool) *DoubleArrayOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *DoubleArrayOptions) SetReturnEnabled(v bool) *DoubleArrayOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *DoubleArrayOptions) SetSearchEnabled(v bool) *DoubleArrayOptions { + s.SearchEnabled = &v + return s +} + +// SetSourceFields sets the SourceFields field's value. +func (s *DoubleArrayOptions) SetSourceFields(v string) *DoubleArrayOptions { + s.SourceFields = &v + return s +} + +// Options for a double-precision 64-bit floating point field. Present if IndexFieldType +// specifies the field is of type double. All options are enabled by default. +type DoubleOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + // This can be important if you are using the field in an expression and that + // field is not present in every document. + DefaultValue *float64 `type:"double"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // Whether the field can be used to sort the search results. + SortEnabled *bool `type:"boolean"` + + // The name of the source field to map to the field. + SourceField *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DoubleOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DoubleOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DoubleOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DoubleOptions"} + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *DoubleOptions) SetDefaultValue(v float64) *DoubleOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *DoubleOptions) SetFacetEnabled(v bool) *DoubleOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *DoubleOptions) SetReturnEnabled(v bool) *DoubleOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *DoubleOptions) SetSearchEnabled(v bool) *DoubleOptions { + s.SearchEnabled = &v + return s +} + +// SetSortEnabled sets the SortEnabled field's value. +func (s *DoubleOptions) SetSortEnabled(v bool) *DoubleOptions { + s.SortEnabled = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *DoubleOptions) SetSourceField(v string) *DoubleOptions { + s.SourceField = &v + return s +} + +// A named expression that can be evaluated at search time. Can be used to sort +// the search results, define other expressions, or return computed information +// in the search results. +type Expression struct { + _ struct{} `type:"structure"` + + // Names must begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). + // + // ExpressionName is a required field + ExpressionName *string `min:"1" type:"string" required:"true"` + + // The expression to evaluate for sorting while processing a search request. + // The Expression syntax is based on JavaScript expressions. For more information, + // see Configuring Expressions (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-expressions.html) + // in the Amazon CloudSearch Developer Guide. + // + // ExpressionValue is a required field + ExpressionValue *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Expression) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Expression) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Expression) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Expression"} + if s.ExpressionName == nil { + invalidParams.Add(request.NewErrParamRequired("ExpressionName")) + } + if s.ExpressionName != nil && len(*s.ExpressionName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpressionName", 1)) + } + if s.ExpressionValue == nil { + invalidParams.Add(request.NewErrParamRequired("ExpressionValue")) + } + if s.ExpressionValue != nil && len(*s.ExpressionValue) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExpressionValue", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpressionName sets the ExpressionName field's value. +func (s *Expression) SetExpressionName(v string) *Expression { + s.ExpressionName = &v + return s +} + +// SetExpressionValue sets the ExpressionValue field's value. +func (s *Expression) SetExpressionValue(v string) *Expression { + s.ExpressionValue = &v + return s +} + +// The value of an Expression and its current status. +type ExpressionStatus struct { + _ struct{} `type:"structure"` + + // The expression that is evaluated for sorting while processing a search request. + // + // Options is a required field + Options *Expression `type:"structure" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ExpressionStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExpressionStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *ExpressionStatus) SetOptions(v *Expression) *ExpressionStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ExpressionStatus) SetStatus(v *OptionStatus) *ExpressionStatus { + s.Status = v + return s +} + +// Container for the parameters to the IndexDocuments operation. Specifies the +// name of the domain you want to re-index. +type IndexDocumentsInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s IndexDocumentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IndexDocumentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IndexDocumentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IndexDocumentsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *IndexDocumentsInput) SetDomainName(v string) *IndexDocumentsInput { + s.DomainName = &v + return s +} + +// The result of an IndexDocuments request. Contains the status of the indexing +// operation, including the fields being indexed. +type IndexDocumentsOutput struct { + _ struct{} `type:"structure"` + + // The names of the fields that are currently being indexed. + FieldNames []*string `type:"list"` +} + +// String returns the string representation +func (s IndexDocumentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IndexDocumentsOutput) GoString() string { + return s.String() +} + +// SetFieldNames sets the FieldNames field's value. +func (s *IndexDocumentsOutput) SetFieldNames(v []*string) *IndexDocumentsOutput { + s.FieldNames = v + return s +} + +// Configuration information for a field in the index, including its name, type, +// and options. The supported options depend on the IndexFieldType. +type IndexField struct { + _ struct{} `type:"structure"` + + // Options for a field that contains an array of dates. Present if IndexFieldType + // specifies the field is of type date-array. All options are enabled by default. + DateArrayOptions *DateArrayOptions `type:"structure"` + + // Options for a date field. Dates and times are specified in UTC (Coordinated + // Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present + // if IndexFieldType specifies the field is of type date. All options are enabled + // by default. + DateOptions *DateOptions `type:"structure"` + + // Options for a field that contains an array of double-precision 64-bit floating + // point values. Present if IndexFieldType specifies the field is of type double-array. + // All options are enabled by default. + DoubleArrayOptions *DoubleArrayOptions `type:"structure"` + + // Options for a double-precision 64-bit floating point field. Present if IndexFieldType + // specifies the field is of type double. All options are enabled by default. + DoubleOptions *DoubleOptions `type:"structure"` + + // A string that represents the name of an index field. CloudSearch supports + // regular index fields as well as dynamic fields. A dynamic field's name defines + // a pattern that begins or ends with a wildcard. Any document fields that don't + // map to a regular index field but do match a dynamic field's pattern are configured + // with the dynamic field's indexing options. + // + // Regular field names begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin + // or end with a wildcard (*). The wildcard can also be the only character in + // a dynamic field name. Multiple wildcards, and wildcards embedded within a + // string are not supported. + // + // The name score is reserved and cannot be used as a field name. To reference + // a document's ID, you can use the name _id. + // + // IndexFieldName is a required field + IndexFieldName *string `min:"1" type:"string" required:"true"` + + // The type of field. The valid options for a field depend on the field type. + // For more information about the supported field types, see Configuring Index + // Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) + // in the Amazon CloudSearch Developer Guide. + // + // IndexFieldType is a required field + IndexFieldType *string `type:"string" required:"true" enum:"IndexFieldType"` + + // Options for a field that contains an array of 64-bit signed integers. Present + // if IndexFieldType specifies the field is of type int-array. All options are + // enabled by default. + IntArrayOptions *IntArrayOptions `type:"structure"` + + // Options for a 64-bit signed integer field. Present if IndexFieldType specifies + // the field is of type int. All options are enabled by default. + IntOptions *IntOptions `type:"structure"` + + // Options for a latlon field. A latlon field contains a location stored as + // a latitude and longitude value pair. Present if IndexFieldType specifies + // the field is of type latlon. All options are enabled by default. + LatLonOptions *LatLonOptions `type:"structure"` + + // Options for a field that contains an array of literal strings. Present if + // IndexFieldType specifies the field is of type literal-array. All options + // are enabled by default. + LiteralArrayOptions *LiteralArrayOptions `type:"structure"` + + // Options for literal field. Present if IndexFieldType specifies the field + // is of type literal. All options are enabled by default. + LiteralOptions *LiteralOptions `type:"structure"` + + // Options for a field that contains an array of text strings. Present if IndexFieldType + // specifies the field is of type text-array. A text-array field is always searchable. + // All options are enabled by default. + TextArrayOptions *TextArrayOptions `type:"structure"` + + // Options for text field. Present if IndexFieldType specifies the field is + // of type text. A text field is always searchable. All options are enabled + // by default. + TextOptions *TextOptions `type:"structure"` +} + +// String returns the string representation +func (s IndexField) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IndexField) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IndexField) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IndexField"} + if s.IndexFieldName == nil { + invalidParams.Add(request.NewErrParamRequired("IndexFieldName")) + } + if s.IndexFieldName != nil && len(*s.IndexFieldName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IndexFieldName", 1)) + } + if s.IndexFieldType == nil { + invalidParams.Add(request.NewErrParamRequired("IndexFieldType")) + } + if s.DateOptions != nil { + if err := s.DateOptions.Validate(); err != nil { + invalidParams.AddNested("DateOptions", err.(request.ErrInvalidParams)) + } + } + if s.DoubleOptions != nil { + if err := s.DoubleOptions.Validate(); err != nil { + invalidParams.AddNested("DoubleOptions", err.(request.ErrInvalidParams)) + } + } + if s.IntOptions != nil { + if err := s.IntOptions.Validate(); err != nil { + invalidParams.AddNested("IntOptions", err.(request.ErrInvalidParams)) + } + } + if s.LatLonOptions != nil { + if err := s.LatLonOptions.Validate(); err != nil { + invalidParams.AddNested("LatLonOptions", err.(request.ErrInvalidParams)) + } + } + if s.LiteralOptions != nil { + if err := s.LiteralOptions.Validate(); err != nil { + invalidParams.AddNested("LiteralOptions", err.(request.ErrInvalidParams)) + } + } + if s.TextOptions != nil { + if err := s.TextOptions.Validate(); err != nil { + invalidParams.AddNested("TextOptions", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDateArrayOptions sets the DateArrayOptions field's value. +func (s *IndexField) SetDateArrayOptions(v *DateArrayOptions) *IndexField { + s.DateArrayOptions = v + return s +} + +// SetDateOptions sets the DateOptions field's value. +func (s *IndexField) SetDateOptions(v *DateOptions) *IndexField { + s.DateOptions = v + return s +} + +// SetDoubleArrayOptions sets the DoubleArrayOptions field's value. +func (s *IndexField) SetDoubleArrayOptions(v *DoubleArrayOptions) *IndexField { + s.DoubleArrayOptions = v + return s +} + +// SetDoubleOptions sets the DoubleOptions field's value. +func (s *IndexField) SetDoubleOptions(v *DoubleOptions) *IndexField { + s.DoubleOptions = v + return s +} + +// SetIndexFieldName sets the IndexFieldName field's value. +func (s *IndexField) SetIndexFieldName(v string) *IndexField { + s.IndexFieldName = &v + return s +} + +// SetIndexFieldType sets the IndexFieldType field's value. +func (s *IndexField) SetIndexFieldType(v string) *IndexField { + s.IndexFieldType = &v + return s +} + +// SetIntArrayOptions sets the IntArrayOptions field's value. +func (s *IndexField) SetIntArrayOptions(v *IntArrayOptions) *IndexField { + s.IntArrayOptions = v + return s +} + +// SetIntOptions sets the IntOptions field's value. +func (s *IndexField) SetIntOptions(v *IntOptions) *IndexField { + s.IntOptions = v + return s +} + +// SetLatLonOptions sets the LatLonOptions field's value. +func (s *IndexField) SetLatLonOptions(v *LatLonOptions) *IndexField { + s.LatLonOptions = v + return s +} + +// SetLiteralArrayOptions sets the LiteralArrayOptions field's value. +func (s *IndexField) SetLiteralArrayOptions(v *LiteralArrayOptions) *IndexField { + s.LiteralArrayOptions = v + return s +} + +// SetLiteralOptions sets the LiteralOptions field's value. +func (s *IndexField) SetLiteralOptions(v *LiteralOptions) *IndexField { + s.LiteralOptions = v + return s +} + +// SetTextArrayOptions sets the TextArrayOptions field's value. +func (s *IndexField) SetTextArrayOptions(v *TextArrayOptions) *IndexField { + s.TextArrayOptions = v + return s +} + +// SetTextOptions sets the TextOptions field's value. +func (s *IndexField) SetTextOptions(v *TextOptions) *IndexField { + s.TextOptions = v + return s +} + +// The value of an IndexField and its current status. +type IndexFieldStatus struct { + _ struct{} `type:"structure"` + + // Configuration information for a field in the index, including its name, type, + // and options. The supported options depend on the IndexFieldType. + // + // Options is a required field + Options *IndexField `type:"structure" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s IndexFieldStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IndexFieldStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *IndexFieldStatus) SetOptions(v *IndexField) *IndexFieldStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *IndexFieldStatus) SetStatus(v *OptionStatus) *IndexFieldStatus { + s.Status = v + return s +} + +// Options for a field that contains an array of 64-bit signed integers. Present +// if IndexFieldType specifies the field is of type int-array. All options are +// enabled by default. +type IntArrayOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *int64 `type:"long"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // A list of source fields to map to the field. + SourceFields *string `type:"string"` +} + +// String returns the string representation +func (s IntArrayOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IntArrayOptions) GoString() string { + return s.String() +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *IntArrayOptions) SetDefaultValue(v int64) *IntArrayOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *IntArrayOptions) SetFacetEnabled(v bool) *IntArrayOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *IntArrayOptions) SetReturnEnabled(v bool) *IntArrayOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *IntArrayOptions) SetSearchEnabled(v bool) *IntArrayOptions { + s.SearchEnabled = &v + return s +} + +// SetSourceFields sets the SourceFields field's value. +func (s *IntArrayOptions) SetSourceFields(v string) *IntArrayOptions { + s.SourceFields = &v + return s +} + +// Options for a 64-bit signed integer field. Present if IndexFieldType specifies +// the field is of type int. All options are enabled by default. +type IntOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + // This can be important if you are using the field in an expression and that + // field is not present in every document. + DefaultValue *int64 `type:"long"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // Whether the field can be used to sort the search results. + SortEnabled *bool `type:"boolean"` + + // The name of the source field to map to the field. + SourceField *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s IntOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IntOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IntOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IntOptions"} + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *IntOptions) SetDefaultValue(v int64) *IntOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *IntOptions) SetFacetEnabled(v bool) *IntOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *IntOptions) SetReturnEnabled(v bool) *IntOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *IntOptions) SetSearchEnabled(v bool) *IntOptions { + s.SearchEnabled = &v + return s +} + +// SetSortEnabled sets the SortEnabled field's value. +func (s *IntOptions) SetSortEnabled(v bool) *IntOptions { + s.SortEnabled = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *IntOptions) SetSourceField(v string) *IntOptions { + s.SourceField = &v + return s +} + +// Options for a latlon field. A latlon field contains a location stored as +// a latitude and longitude value pair. Present if IndexFieldType specifies +// the field is of type latlon. All options are enabled by default. +type LatLonOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // Whether the field can be used to sort the search results. + SortEnabled *bool `type:"boolean"` + + // A string that represents the name of an index field. CloudSearch supports + // regular index fields as well as dynamic fields. A dynamic field's name defines + // a pattern that begins or ends with a wildcard. Any document fields that don't + // map to a regular index field but do match a dynamic field's pattern are configured + // with the dynamic field's indexing options. + // + // Regular field names begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin + // or end with a wildcard (*). The wildcard can also be the only character in + // a dynamic field name. Multiple wildcards, and wildcards embedded within a + // string are not supported. + // + // The name score is reserved and cannot be used as a field name. To reference + // a document's ID, you can use the name _id. + SourceField *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LatLonOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LatLonOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LatLonOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LatLonOptions"} + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *LatLonOptions) SetDefaultValue(v string) *LatLonOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *LatLonOptions) SetFacetEnabled(v bool) *LatLonOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *LatLonOptions) SetReturnEnabled(v bool) *LatLonOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *LatLonOptions) SetSearchEnabled(v bool) *LatLonOptions { + s.SearchEnabled = &v + return s +} + +// SetSortEnabled sets the SortEnabled field's value. +func (s *LatLonOptions) SetSortEnabled(v bool) *LatLonOptions { + s.SortEnabled = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *LatLonOptions) SetSourceField(v string) *LatLonOptions { + s.SourceField = &v + return s +} + +type Limits struct { + _ struct{} `type:"structure"` + + // MaximumPartitionCount is a required field + MaximumPartitionCount *int64 `min:"1" type:"integer" required:"true"` + + // MaximumReplicationCount is a required field + MaximumReplicationCount *int64 `min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s Limits) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Limits) GoString() string { + return s.String() +} + +// SetMaximumPartitionCount sets the MaximumPartitionCount field's value. +func (s *Limits) SetMaximumPartitionCount(v int64) *Limits { + s.MaximumPartitionCount = &v + return s +} + +// SetMaximumReplicationCount sets the MaximumReplicationCount field's value. +func (s *Limits) SetMaximumReplicationCount(v int64) *Limits { + s.MaximumReplicationCount = &v + return s +} + +type ListDomainNamesInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ListDomainNamesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainNamesInput) GoString() string { + return s.String() +} + +// The result of a ListDomainNames request. Contains a list of the domains owned +// by an account. +type ListDomainNamesOutput struct { + _ struct{} `type:"structure"` + + // The names of the search domains owned by an account. + DomainNames map[string]*string `type:"map"` +} + +// String returns the string representation +func (s ListDomainNamesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDomainNamesOutput) GoString() string { + return s.String() +} + +// SetDomainNames sets the DomainNames field's value. +func (s *ListDomainNamesOutput) SetDomainNames(v map[string]*string) *ListDomainNamesOutput { + s.DomainNames = v + return s +} + +// Options for a field that contains an array of literal strings. Present if +// IndexFieldType specifies the field is of type literal-array. All options +// are enabled by default. +type LiteralArrayOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // A list of source fields to map to the field. + SourceFields *string `type:"string"` +} + +// String returns the string representation +func (s LiteralArrayOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LiteralArrayOptions) GoString() string { + return s.String() +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *LiteralArrayOptions) SetDefaultValue(v string) *LiteralArrayOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *LiteralArrayOptions) SetFacetEnabled(v bool) *LiteralArrayOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *LiteralArrayOptions) SetReturnEnabled(v bool) *LiteralArrayOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *LiteralArrayOptions) SetSearchEnabled(v bool) *LiteralArrayOptions { + s.SearchEnabled = &v + return s +} + +// SetSourceFields sets the SourceFields field's value. +func (s *LiteralArrayOptions) SetSourceFields(v string) *LiteralArrayOptions { + s.SourceFields = &v + return s +} + +// Options for literal field. Present if IndexFieldType specifies the field +// is of type literal. All options are enabled by default. +type LiteralOptions struct { + _ struct{} `type:"structure"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether facet information can be returned for the field. + FacetEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the contents of the field are searchable. + SearchEnabled *bool `type:"boolean"` + + // Whether the field can be used to sort the search results. + SortEnabled *bool `type:"boolean"` + + // A string that represents the name of an index field. CloudSearch supports + // regular index fields as well as dynamic fields. A dynamic field's name defines + // a pattern that begins or ends with a wildcard. Any document fields that don't + // map to a regular index field but do match a dynamic field's pattern are configured + // with the dynamic field's indexing options. + // + // Regular field names begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin + // or end with a wildcard (*). The wildcard can also be the only character in + // a dynamic field name. Multiple wildcards, and wildcards embedded within a + // string are not supported. + // + // The name score is reserved and cannot be used as a field name. To reference + // a document's ID, you can use the name _id. + SourceField *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LiteralOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LiteralOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LiteralOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LiteralOptions"} + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *LiteralOptions) SetDefaultValue(v string) *LiteralOptions { + s.DefaultValue = &v + return s +} + +// SetFacetEnabled sets the FacetEnabled field's value. +func (s *LiteralOptions) SetFacetEnabled(v bool) *LiteralOptions { + s.FacetEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *LiteralOptions) SetReturnEnabled(v bool) *LiteralOptions { + s.ReturnEnabled = &v + return s +} + +// SetSearchEnabled sets the SearchEnabled field's value. +func (s *LiteralOptions) SetSearchEnabled(v bool) *LiteralOptions { + s.SearchEnabled = &v + return s +} + +// SetSortEnabled sets the SortEnabled field's value. +func (s *LiteralOptions) SetSortEnabled(v bool) *LiteralOptions { + s.SortEnabled = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *LiteralOptions) SetSourceField(v string) *LiteralOptions { + s.SourceField = &v + return s +} + +// The status of domain configuration option. +type OptionStatus struct { + _ struct{} `type:"structure"` + + // A timestamp for when this option was created. + // + // CreationDate is a required field + CreationDate *time.Time `type:"timestamp" required:"true"` + + // Indicates that the option will be deleted once processing is complete. + PendingDeletion *bool `type:"boolean"` + + // The state of processing a change to an option. Possible values: + // + // * RequiresIndexDocuments: the option's latest value will not be deployed + // until IndexDocuments has been called and indexing is complete. + // * Processing: the option's latest value is in the process of being activated. + // + // * Active: the option's latest value is completely deployed. + // * FailedToValidate: the option value is not compatible with the domain's + // data and cannot be used to index the data. You must either modify the + // option value or update or remove the incompatible documents. + // + // State is a required field + State *string `type:"string" required:"true" enum:"OptionState"` + + // A timestamp for when this option was last updated. + // + // UpdateDate is a required field + UpdateDate *time.Time `type:"timestamp" required:"true"` + + // A unique integer that indicates when this option was last updated. + UpdateVersion *int64 `type:"integer"` +} + +// String returns the string representation +func (s OptionStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OptionStatus) GoString() string { + return s.String() +} + +// SetCreationDate sets the CreationDate field's value. +func (s *OptionStatus) SetCreationDate(v time.Time) *OptionStatus { + s.CreationDate = &v + return s +} + +// SetPendingDeletion sets the PendingDeletion field's value. +func (s *OptionStatus) SetPendingDeletion(v bool) *OptionStatus { + s.PendingDeletion = &v + return s +} + +// SetState sets the State field's value. +func (s *OptionStatus) SetState(v string) *OptionStatus { + s.State = &v + return s +} + +// SetUpdateDate sets the UpdateDate field's value. +func (s *OptionStatus) SetUpdateDate(v time.Time) *OptionStatus { + s.UpdateDate = &v + return s +} + +// SetUpdateVersion sets the UpdateVersion field's value. +func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { + s.UpdateVersion = &v + return s +} + +// The desired instance type and desired number of replicas of each index partition. +type ScalingParameters struct { + _ struct{} `type:"structure"` + + // The instance type that you want to preconfigure for your domain. For example, + // search.m1.small. + DesiredInstanceType *string `type:"string" enum:"PartitionInstanceType"` + + // The number of partitions you want to preconfigure for your domain. Only valid + // when you select m2.2xlarge as the desired instance type. + DesiredPartitionCount *int64 `type:"integer"` + + // The number of replicas you want to preconfigure for each index partition. + DesiredReplicationCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s ScalingParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalingParameters) GoString() string { + return s.String() +} + +// SetDesiredInstanceType sets the DesiredInstanceType field's value. +func (s *ScalingParameters) SetDesiredInstanceType(v string) *ScalingParameters { + s.DesiredInstanceType = &v + return s +} + +// SetDesiredPartitionCount sets the DesiredPartitionCount field's value. +func (s *ScalingParameters) SetDesiredPartitionCount(v int64) *ScalingParameters { + s.DesiredPartitionCount = &v + return s +} + +// SetDesiredReplicationCount sets the DesiredReplicationCount field's value. +func (s *ScalingParameters) SetDesiredReplicationCount(v int64) *ScalingParameters { + s.DesiredReplicationCount = &v + return s +} + +// The status and configuration of a search domain's scaling parameters. +type ScalingParametersStatus struct { + _ struct{} `type:"structure"` + + // The desired instance type and desired number of replicas of each index partition. + // + // Options is a required field + Options *ScalingParameters `type:"structure" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ScalingParametersStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScalingParametersStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *ScalingParametersStatus) SetOptions(v *ScalingParameters) *ScalingParametersStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ScalingParametersStatus) SetStatus(v *OptionStatus) *ScalingParametersStatus { + s.Status = v + return s +} + +// The endpoint to which service requests can be submitted. +type ServiceEndpoint struct { + _ struct{} `type:"structure"` + + // The endpoint to which service requests can be submitted. For example, search-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com + // or doc-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.cloudsearch.amazonaws.com. + Endpoint *string `type:"string"` +} + +// String returns the string representation +func (s ServiceEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceEndpoint) GoString() string { + return s.String() +} + +// SetEndpoint sets the Endpoint field's value. +func (s *ServiceEndpoint) SetEndpoint(v string) *ServiceEndpoint { + s.Endpoint = &v + return s +} + +// Configuration information for a search suggester. Each suggester has a unique +// name and specifies the text field you want to use for suggestions. The following +// options can be configured for a suggester: FuzzyMatching, SortExpression. +type Suggester struct { + _ struct{} `type:"structure"` + + // Options for a search suggester. + // + // DocumentSuggesterOptions is a required field + DocumentSuggesterOptions *DocumentSuggesterOptions `type:"structure" required:"true"` + + // Names must begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). + // + // SuggesterName is a required field + SuggesterName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Suggester) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Suggester) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Suggester) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Suggester"} + if s.DocumentSuggesterOptions == nil { + invalidParams.Add(request.NewErrParamRequired("DocumentSuggesterOptions")) + } + if s.SuggesterName == nil { + invalidParams.Add(request.NewErrParamRequired("SuggesterName")) + } + if s.SuggesterName != nil && len(*s.SuggesterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SuggesterName", 1)) + } + if s.DocumentSuggesterOptions != nil { + if err := s.DocumentSuggesterOptions.Validate(); err != nil { + invalidParams.AddNested("DocumentSuggesterOptions", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDocumentSuggesterOptions sets the DocumentSuggesterOptions field's value. +func (s *Suggester) SetDocumentSuggesterOptions(v *DocumentSuggesterOptions) *Suggester { + s.DocumentSuggesterOptions = v + return s +} + +// SetSuggesterName sets the SuggesterName field's value. +func (s *Suggester) SetSuggesterName(v string) *Suggester { + s.SuggesterName = &v + return s +} + +// The value of a Suggester and its current status. +type SuggesterStatus struct { + _ struct{} `type:"structure"` + + // Configuration information for a search suggester. Each suggester has a unique + // name and specifies the text field you want to use for suggestions. The following + // options can be configured for a suggester: FuzzyMatching, SortExpression. + // + // Options is a required field + Options *Suggester `type:"structure" required:"true"` + + // The status of domain configuration option. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SuggesterStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuggesterStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *SuggesterStatus) SetOptions(v *Suggester) *SuggesterStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *SuggesterStatus) SetStatus(v *OptionStatus) *SuggesterStatus { + s.Status = v + return s +} + +// Options for a field that contains an array of text strings. Present if IndexFieldType +// specifies the field is of type text-array. A text-array field is always searchable. +// All options are enabled by default. +type TextArrayOptions struct { + _ struct{} `type:"structure"` + + // The name of an analysis scheme for a text-array field. + AnalysisScheme *string `type:"string"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether highlights can be returned for the field. + HighlightEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // A list of source fields to map to the field. + SourceFields *string `type:"string"` +} + +// String returns the string representation +func (s TextArrayOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TextArrayOptions) GoString() string { + return s.String() +} + +// SetAnalysisScheme sets the AnalysisScheme field's value. +func (s *TextArrayOptions) SetAnalysisScheme(v string) *TextArrayOptions { + s.AnalysisScheme = &v + return s +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *TextArrayOptions) SetDefaultValue(v string) *TextArrayOptions { + s.DefaultValue = &v + return s +} + +// SetHighlightEnabled sets the HighlightEnabled field's value. +func (s *TextArrayOptions) SetHighlightEnabled(v bool) *TextArrayOptions { + s.HighlightEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *TextArrayOptions) SetReturnEnabled(v bool) *TextArrayOptions { + s.ReturnEnabled = &v + return s +} + +// SetSourceFields sets the SourceFields field's value. +func (s *TextArrayOptions) SetSourceFields(v string) *TextArrayOptions { + s.SourceFields = &v + return s +} + +// Options for text field. Present if IndexFieldType specifies the field is +// of type text. A text field is always searchable. All options are enabled +// by default. +type TextOptions struct { + _ struct{} `type:"structure"` + + // The name of an analysis scheme for a text field. + AnalysisScheme *string `type:"string"` + + // A value to use for the field if the field isn't specified for a document. + DefaultValue *string `type:"string"` + + // Whether highlights can be returned for the field. + HighlightEnabled *bool `type:"boolean"` + + // Whether the contents of the field can be returned in the search results. + ReturnEnabled *bool `type:"boolean"` + + // Whether the field can be used to sort the search results. + SortEnabled *bool `type:"boolean"` + + // A string that represents the name of an index field. CloudSearch supports + // regular index fields as well as dynamic fields. A dynamic field's name defines + // a pattern that begins or ends with a wildcard. Any document fields that don't + // map to a regular index field but do match a dynamic field's pattern are configured + // with the dynamic field's indexing options. + // + // Regular field names begin with a letter and can contain the following characters: + // a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin + // or end with a wildcard (*). The wildcard can also be the only character in + // a dynamic field name. Multiple wildcards, and wildcards embedded within a + // string are not supported. + // + // The name score is reserved and cannot be used as a field name. To reference + // a document's ID, you can use the name _id. + SourceField *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s TextOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TextOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TextOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TextOptions"} + if s.SourceField != nil && len(*s.SourceField) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceField", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnalysisScheme sets the AnalysisScheme field's value. +func (s *TextOptions) SetAnalysisScheme(v string) *TextOptions { + s.AnalysisScheme = &v + return s +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *TextOptions) SetDefaultValue(v string) *TextOptions { + s.DefaultValue = &v + return s +} + +// SetHighlightEnabled sets the HighlightEnabled field's value. +func (s *TextOptions) SetHighlightEnabled(v bool) *TextOptions { + s.HighlightEnabled = &v + return s +} + +// SetReturnEnabled sets the ReturnEnabled field's value. +func (s *TextOptions) SetReturnEnabled(v bool) *TextOptions { + s.ReturnEnabled = &v + return s +} + +// SetSortEnabled sets the SortEnabled field's value. +func (s *TextOptions) SetSortEnabled(v bool) *TextOptions { + s.SortEnabled = &v + return s +} + +// SetSourceField sets the SourceField field's value. +func (s *TextOptions) SetSourceField(v string) *TextOptions { + s.SourceField = &v + return s +} + +// Container for the parameters to the UpdateAvailabilityOptions operation. +// Specifies the name of the domain you want to update and the Multi-AZ availability +// option. +type UpdateAvailabilityOptionsInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // You expand an existing search domain to a second Availability Zone by setting + // the Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option + // to downgrade the domain to a single Availability Zone by setting the Multi-AZ + // option to false. + // + // MultiAZ is a required field + MultiAZ *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s UpdateAvailabilityOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAvailabilityOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAvailabilityOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAvailabilityOptionsInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.MultiAZ == nil { + invalidParams.Add(request.NewErrParamRequired("MultiAZ")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateAvailabilityOptionsInput) SetDomainName(v string) *UpdateAvailabilityOptionsInput { + s.DomainName = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *UpdateAvailabilityOptionsInput) SetMultiAZ(v bool) *UpdateAvailabilityOptionsInput { + s.MultiAZ = &v + return s +} + +// The result of a UpdateAvailabilityOptions request. Contains the status of +// the domain's availability options. +type UpdateAvailabilityOptionsOutput struct { + _ struct{} `type:"structure"` + + // The newly-configured availability options. Indicates whether Multi-AZ is + // enabled for the domain. + AvailabilityOptions *AvailabilityOptionsStatus `type:"structure"` +} + +// String returns the string representation +func (s UpdateAvailabilityOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAvailabilityOptionsOutput) GoString() string { + return s.String() +} + +// SetAvailabilityOptions sets the AvailabilityOptions field's value. +func (s *UpdateAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *UpdateAvailabilityOptionsOutput { + s.AvailabilityOptions = v + return s +} + +// Container for the parameters to the UpdateScalingParameters operation. Specifies +// the name of the domain you want to update and the scaling parameters you +// want to configure. +type UpdateScalingParametersInput struct { + _ struct{} `type:"structure"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` + + // The desired instance type and desired number of replicas of each index partition. + // + // ScalingParameters is a required field + ScalingParameters *ScalingParameters `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateScalingParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateScalingParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateScalingParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateScalingParametersInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + if s.ScalingParameters == nil { + invalidParams.Add(request.NewErrParamRequired("ScalingParameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateScalingParametersInput) SetDomainName(v string) *UpdateScalingParametersInput { + s.DomainName = &v + return s +} + +// SetScalingParameters sets the ScalingParameters field's value. +func (s *UpdateScalingParametersInput) SetScalingParameters(v *ScalingParameters) *UpdateScalingParametersInput { + s.ScalingParameters = v + return s +} + +// The result of a UpdateScalingParameters request. Contains the status of the +// newly-configured scaling parameters. +type UpdateScalingParametersOutput struct { + _ struct{} `type:"structure"` + + // The status and configuration of a search domain's scaling parameters. + // + // ScalingParameters is a required field + ScalingParameters *ScalingParametersStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateScalingParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateScalingParametersOutput) GoString() string { + return s.String() +} + +// SetScalingParameters sets the ScalingParameters field's value. +func (s *UpdateScalingParametersOutput) SetScalingParameters(v *ScalingParametersStatus) *UpdateScalingParametersOutput { + s.ScalingParameters = v + return s +} + +// Container for the parameters to the UpdateServiceAccessPolicies operation. +// Specifies the name of the domain you want to update and the access rules +// you want to configure. +type UpdateServiceAccessPoliciesInput struct { + _ struct{} `type:"structure"` + + // The access rules you want to configure. These rules replace any existing + // rules. + // + // AccessPolicies is a required field + AccessPolicies *string `type:"string" required:"true"` + + // A string that represents the name of a domain. Domain names are unique across + // the domains owned by an account within an AWS region. Domain names start + // with a letter or number and can contain the following characters: a-z (lowercase), + // 0-9, and - (hyphen). + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateServiceAccessPoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceAccessPoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServiceAccessPoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServiceAccessPoliciesInput"} + if s.AccessPolicies == nil { + invalidParams.Add(request.NewErrParamRequired("AccessPolicies")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessPolicies sets the AccessPolicies field's value. +func (s *UpdateServiceAccessPoliciesInput) SetAccessPolicies(v string) *UpdateServiceAccessPoliciesInput { + s.AccessPolicies = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *UpdateServiceAccessPoliciesInput) SetDomainName(v string) *UpdateServiceAccessPoliciesInput { + s.DomainName = &v + return s +} + +// The result of an UpdateServiceAccessPolicies request. Contains the new access +// policies. +type UpdateServiceAccessPoliciesOutput struct { + _ struct{} `type:"structure"` + + // The access rules configured for the domain. + // + // AccessPolicies is a required field + AccessPolicies *AccessPoliciesStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateServiceAccessPoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceAccessPoliciesOutput) GoString() string { + return s.String() +} + +// SetAccessPolicies sets the AccessPolicies field's value. +func (s *UpdateServiceAccessPoliciesOutput) SetAccessPolicies(v *AccessPoliciesStatus) *UpdateServiceAccessPoliciesOutput { + s.AccessPolicies = v + return s +} + +const ( + // AlgorithmicStemmingNone is a AlgorithmicStemming enum value + AlgorithmicStemmingNone = "none" + + // AlgorithmicStemmingMinimal is a AlgorithmicStemming enum value + AlgorithmicStemmingMinimal = "minimal" + + // AlgorithmicStemmingLight is a AlgorithmicStemming enum value + AlgorithmicStemmingLight = "light" + + // AlgorithmicStemmingFull is a AlgorithmicStemming enum value + AlgorithmicStemmingFull = "full" +) + +// An IETF RFC 4646 (http://tools.ietf.org/html/rfc4646) language code or mul +// for multiple languages. +const ( + // AnalysisSchemeLanguageAr is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageAr = "ar" + + // AnalysisSchemeLanguageBg is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageBg = "bg" + + // AnalysisSchemeLanguageCa is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageCa = "ca" + + // AnalysisSchemeLanguageCs is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageCs = "cs" + + // AnalysisSchemeLanguageDa is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageDa = "da" + + // AnalysisSchemeLanguageDe is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageDe = "de" + + // AnalysisSchemeLanguageEl is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageEl = "el" + + // AnalysisSchemeLanguageEn is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageEn = "en" + + // AnalysisSchemeLanguageEs is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageEs = "es" + + // AnalysisSchemeLanguageEu is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageEu = "eu" + + // AnalysisSchemeLanguageFa is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageFa = "fa" + + // AnalysisSchemeLanguageFi is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageFi = "fi" + + // AnalysisSchemeLanguageFr is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageFr = "fr" + + // AnalysisSchemeLanguageGa is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageGa = "ga" + + // AnalysisSchemeLanguageGl is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageGl = "gl" + + // AnalysisSchemeLanguageHe is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageHe = "he" + + // AnalysisSchemeLanguageHi is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageHi = "hi" + + // AnalysisSchemeLanguageHu is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageHu = "hu" + + // AnalysisSchemeLanguageHy is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageHy = "hy" + + // AnalysisSchemeLanguageId is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageId = "id" + + // AnalysisSchemeLanguageIt is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageIt = "it" + + // AnalysisSchemeLanguageJa is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageJa = "ja" + + // AnalysisSchemeLanguageKo is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageKo = "ko" + + // AnalysisSchemeLanguageLv is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageLv = "lv" + + // AnalysisSchemeLanguageMul is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageMul = "mul" + + // AnalysisSchemeLanguageNl is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageNl = "nl" + + // AnalysisSchemeLanguageNo is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageNo = "no" + + // AnalysisSchemeLanguagePt is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguagePt = "pt" + + // AnalysisSchemeLanguageRo is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageRo = "ro" + + // AnalysisSchemeLanguageRu is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageRu = "ru" + + // AnalysisSchemeLanguageSv is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageSv = "sv" + + // AnalysisSchemeLanguageTh is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageTh = "th" + + // AnalysisSchemeLanguageTr is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageTr = "tr" + + // AnalysisSchemeLanguageZhHans is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageZhHans = "zh-Hans" + + // AnalysisSchemeLanguageZhHant is a AnalysisSchemeLanguage enum value + AnalysisSchemeLanguageZhHant = "zh-Hant" +) + +// The type of field. The valid options for a field depend on the field type. +// For more information about the supported field types, see Configuring Index +// Fields (http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-index-fields.html) +// in the Amazon CloudSearch Developer Guide. +const ( + // IndexFieldTypeInt is a IndexFieldType enum value + IndexFieldTypeInt = "int" + + // IndexFieldTypeDouble is a IndexFieldType enum value + IndexFieldTypeDouble = "double" + + // IndexFieldTypeLiteral is a IndexFieldType enum value + IndexFieldTypeLiteral = "literal" + + // IndexFieldTypeText is a IndexFieldType enum value + IndexFieldTypeText = "text" + + // IndexFieldTypeDate is a IndexFieldType enum value + IndexFieldTypeDate = "date" + + // IndexFieldTypeLatlon is a IndexFieldType enum value + IndexFieldTypeLatlon = "latlon" + + // IndexFieldTypeIntArray is a IndexFieldType enum value + IndexFieldTypeIntArray = "int-array" + + // IndexFieldTypeDoubleArray is a IndexFieldType enum value + IndexFieldTypeDoubleArray = "double-array" + + // IndexFieldTypeLiteralArray is a IndexFieldType enum value + IndexFieldTypeLiteralArray = "literal-array" + + // IndexFieldTypeTextArray is a IndexFieldType enum value + IndexFieldTypeTextArray = "text-array" + + // IndexFieldTypeDateArray is a IndexFieldType enum value + IndexFieldTypeDateArray = "date-array" +) + +// The state of processing a change to an option. One of: +// +// * RequiresIndexDocuments: The option's latest value will not be deployed +// until IndexDocuments has been called and indexing is complete. +// * Processing: The option's latest value is in the process of being activated. +// +// * Active: The option's latest value is fully deployed. +// * FailedToValidate: The option value is not compatible with the domain's +// data and cannot be used to index the data. You must either modify the +// option value or update or remove the incompatible documents. +const ( + // OptionStateRequiresIndexDocuments is a OptionState enum value + OptionStateRequiresIndexDocuments = "RequiresIndexDocuments" + + // OptionStateProcessing is a OptionState enum value + OptionStateProcessing = "Processing" + + // OptionStateActive is a OptionState enum value + OptionStateActive = "Active" + + // OptionStateFailedToValidate is a OptionState enum value + OptionStateFailedToValidate = "FailedToValidate" +) + +// The instance type (such as search.m1.small) on which an index partition is +// hosted. +const ( + // PartitionInstanceTypeSearchM1Small is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM1Small = "search.m1.small" + + // PartitionInstanceTypeSearchM1Large is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM1Large = "search.m1.large" + + // PartitionInstanceTypeSearchM2Xlarge is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM2Xlarge = "search.m2.xlarge" + + // PartitionInstanceTypeSearchM22xlarge is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM22xlarge = "search.m2.2xlarge" + + // PartitionInstanceTypeSearchM3Medium is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM3Medium = "search.m3.medium" + + // PartitionInstanceTypeSearchM3Large is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM3Large = "search.m3.large" + + // PartitionInstanceTypeSearchM3Xlarge is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM3Xlarge = "search.m3.xlarge" + + // PartitionInstanceTypeSearchM32xlarge is a PartitionInstanceType enum value + PartitionInstanceTypeSearchM32xlarge = "search.m3.2xlarge" +) + +const ( + // SuggesterFuzzyMatchingNone is a SuggesterFuzzyMatching enum value + SuggesterFuzzyMatchingNone = "none" + + // SuggesterFuzzyMatchingLow is a SuggesterFuzzyMatching enum value + SuggesterFuzzyMatchingLow = "low" + + // SuggesterFuzzyMatchingHigh is a SuggesterFuzzyMatching enum value + SuggesterFuzzyMatchingHigh = "high" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go new file mode 100644 index 000000000..cdcf458a9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go @@ -0,0 +1,33 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package cloudsearch provides the client and types for making API +// requests to Amazon CloudSearch. +// +// You use the Amazon CloudSearch configuration service to create, configure, +// and manage search domains. Configuration service requests are submitted using +// the AWS Query protocol. AWS Query requests are HTTP or HTTPS requests submitted +// via HTTP GET or POST with a query parameter named Action. +// +// The endpoint for configuration service requests is region-specific: cloudsearch.region.amazonaws.com. +// For example, cloudsearch.us-east-1.amazonaws.com. For a current list of supported +// regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#cloudsearch_region). +// +// See cloudsearch package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/ +// +// Using the Client +// +// To contact Amazon CloudSearch with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon CloudSearch client CloudSearch for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/#New +package cloudsearch diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go new file mode 100644 index 000000000..f0ed2f1e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go @@ -0,0 +1,44 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudsearch + +const ( + + // ErrCodeBaseException for service response error code + // "BaseException". + // + // An error occurred while processing the request. + ErrCodeBaseException = "BaseException" + + // ErrCodeDisabledOperationException for service response error code + // "DisabledAction". + // + // The request was rejected because it attempted an operation which is not enabled. + ErrCodeDisabledOperationException = "DisabledAction" + + // ErrCodeInternalException for service response error code + // "InternalException". + // + // An internal error occurred while processing the request. If this problem + // persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/). + ErrCodeInternalException = "InternalException" + + // ErrCodeInvalidTypeException for service response error code + // "InvalidType". + // + // The request was rejected because it specified an invalid type definition. + ErrCodeInvalidTypeException = "InvalidType" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceeded". + // + // The request was rejected because a resource limit has already been met. + ErrCodeLimitExceededException = "LimitExceeded" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFound". + // + // The request was rejected because it attempted to reference a resource that + // does not exist. + ErrCodeResourceNotFoundException = "ResourceNotFound" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go new file mode 100644 index 000000000..850bc1370 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go @@ -0,0 +1,95 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudsearch + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/query" +) + +// CloudSearch provides the API operation methods for making requests to +// Amazon CloudSearch. See this package's package overview docs +// for details on the service. +// +// CloudSearch methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type CloudSearch struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "cloudsearch" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudSearch" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the CloudSearch client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a CloudSearch client from just a session. +// svc := cloudsearch.New(mySession) +// +// // Create a CloudSearch client with additional configuration +// svc := cloudsearch.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearch { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudSearch { + svc := &CloudSearch{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2013-01-01", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a CloudSearch operation and runs any +// custom request initialization. +func (c *CloudSearch) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index 49c997cb7..d0e806829 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -3615,7 +3615,7 @@ func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request // StartQuery API operation for Amazon CloudWatch Logs. // // Schedules a query of a log group using CloudWatch Logs Insights. You specify -// the log group to query, the query string to use, and the time to query. +// the log group and time range to query, and the query string to use. // // For more information, see CloudWatch Logs Insights Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). // @@ -8265,8 +8265,8 @@ func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { type StartQueryInput struct { _ struct{} `type:"structure"` - // The time to end this query, if it is still running. Specified as epoch time, - // the number of seconds since January 1, 1970, 00:00:00 UTC. + // The end of the time range to query. Specified as epoch time, the number of + // seconds since January 1, 1970, 00:00:00 UTC. // // EndTime is a required field EndTime *int64 `locationName:"endTime" type:"long" required:"true"` @@ -8286,8 +8286,8 @@ type StartQueryInput struct { // QueryString is a required field QueryString *string `locationName:"queryString" type:"string" required:"true"` - // The time to start the query. Specified as epoch time, the number of seconds - // since January 1, 1970, 00:00:00 UTC. + // The beginning of the time range to query. Specified as epoch time, the number + // of seconds since January 1, 1970, 00:00:00 UTC. // // StartTime is a required field StartTime *int64 `locationName:"startTime" type:"long" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 35ba8422c..864e7db1b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -4390,11 +4390,34 @@ type ProjectEnvironment struct { // project. EnvironmentVariables []*EnvironmentVariable `locationName:"environmentVariables" type:"list"` - // The ID of the Docker image to use for this build project. + // The image tag or image digest that identifies the Docker image to use for + // this build project. Use the following formats: + // + // * For an image tag: registry/repository:tag. For example, to specify an + // image with the tag "latest," use registry/repository:latest. + // + // * For an image digest: registry/repository@digest. For example, to specify + // an image with the digest "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf," + // use registry/repository@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf. // // Image is a required field Image *string `locationName:"image" min:"1" type:"string" required:"true"` + // The type of credentials AWS CodeBuild uses to pull images in your build. + // There are two valid values: + // + // * CODEBUILD specifies that AWS CodeBuild uses its own credentials. This + // requires that you modify your ECR repository policy to trust AWS CodeBuild's + // service principal. + // + // * SERVICE_ROLE specifies that AWS CodeBuild uses your build project's + // service role. + // + // When you use a cross-account or private registry image, you must use SERVICE_ROLE + // credentials. When you use an AWS CodeBuild curated image, you must use CODEBUILD + // credentials. + ImagePullCredentialsType *string `locationName:"imagePullCredentialsType" type:"string" enum:"ImagePullCredentialsType"` + // Enables running the Docker daemon inside a Docker container. Set to true // only if the build project is be used to build Docker images, and the specified // build environment image is not provided by AWS CodeBuild with Docker support. @@ -4419,6 +4442,9 @@ type ProjectEnvironment struct { // .; sleep 1; done" PrivilegedMode *bool `locationName:"privilegedMode" type:"boolean"` + // The credentials for access to a private registry. + RegistryCredential *RegistryCredential `locationName:"registryCredential" type:"structure"` + // The type of build environment to use for related builds. // // Type is a required field @@ -4460,6 +4486,11 @@ func (s *ProjectEnvironment) Validate() error { } } } + if s.RegistryCredential != nil { + if err := s.RegistryCredential.Validate(); err != nil { + invalidParams.AddNested("RegistryCredential", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4491,12 +4522,24 @@ func (s *ProjectEnvironment) SetImage(v string) *ProjectEnvironment { return s } +// SetImagePullCredentialsType sets the ImagePullCredentialsType field's value. +func (s *ProjectEnvironment) SetImagePullCredentialsType(v string) *ProjectEnvironment { + s.ImagePullCredentialsType = &v + return s +} + // SetPrivilegedMode sets the PrivilegedMode field's value. func (s *ProjectEnvironment) SetPrivilegedMode(v bool) *ProjectEnvironment { s.PrivilegedMode = &v return s } +// SetRegistryCredential sets the RegistryCredential field's value. +func (s *ProjectEnvironment) SetRegistryCredential(v *RegistryCredential) *ProjectEnvironment { + s.RegistryCredential = v + return s +} + // SetType sets the Type field's value. func (s *ProjectEnvironment) SetType(v string) *ProjectEnvironment { s.Type = &v @@ -4749,6 +4792,75 @@ func (s *ProjectSourceVersion) SetSourceVersion(v string) *ProjectSourceVersion return s } +// Information about credentials that provide access to a private Docker registry. +// When this is set: +// +// * imagePullCredentialsType must be set to SERVICE_ROLE. +// +// * images cannot be curated or an Amazon ECR image. +// +// For more information, see Private Registry with AWS Secrets Manager Samle +// for AWS CodeBuild (http://docs.aws.amazon.com/codebuild/latest/userguide/sample-private-registry.html). +type RegistryCredential struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets + // Manager. + // + // The credential can use the name of the credentials only if they exist in + // your current region. + // + // Credential is a required field + Credential *string `locationName:"credential" min:"1" type:"string" required:"true"` + + // The service that created the credentials to access a private Docker registry. + // The valid value, SECRETS_MANAGER, is for AWS Secrets Manager. + // + // CredentialProvider is a required field + CredentialProvider *string `locationName:"credentialProvider" type:"string" required:"true" enum:"CredentialProviderType"` +} + +// String returns the string representation +func (s RegistryCredential) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RegistryCredential) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegistryCredential) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegistryCredential"} + if s.Credential == nil { + invalidParams.Add(request.NewErrParamRequired("Credential")) + } + if s.Credential != nil && len(*s.Credential) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Credential", 1)) + } + if s.CredentialProvider == nil { + invalidParams.Add(request.NewErrParamRequired("CredentialProvider")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCredential sets the Credential field's value. +func (s *RegistryCredential) SetCredential(v string) *RegistryCredential { + s.Credential = &v + return s +} + +// SetCredentialProvider sets the CredentialProvider field's value. +func (s *RegistryCredential) SetCredentialProvider(v string) *RegistryCredential { + s.CredentialProvider = &v + return s +} + // Information about S3 logs for a build project. type S3LogsConfig struct { _ struct{} `type:"structure"` @@ -4949,6 +5061,21 @@ type StartBuildInput struct { // build project. ImageOverride *string `locationName:"imageOverride" min:"1" type:"string"` + // The type of credentials AWS CodeBuild uses to pull images in your build. + // There are two valid values: + // + // * CODEBUILD specifies that AWS CodeBuild uses its own credentials. This + // requires that you modify your ECR repository policy to trust AWS CodeBuild's + // service principal. + // + // * SERVICE_ROLE specifies that AWS CodeBuild uses your build project's + // service role. + // + // When using a cross-account or private registry image, you must use SERVICE_ROLE + // credentials. When using an AWS CodeBuild curated image, you must use CODEBUILD + // credentials. + ImagePullCredentialsTypeOverride *string `locationName:"imagePullCredentialsTypeOverride" type:"string" enum:"ImagePullCredentialsType"` + // Enable this flag to override the insecure SSL setting that is specified in // the build project. The insecure SSL setting determines whether to ignore // SSL warnings while connecting to the project source code. This override applies @@ -4970,6 +5097,9 @@ type StartBuildInput struct { // The number of minutes a build is allowed to be queued before it times out. QueuedTimeoutInMinutesOverride *int64 `locationName:"queuedTimeoutInMinutesOverride" min:"5" type:"integer"` + // The credentials for access to a private registry. + RegistryCredentialOverride *RegistryCredential `locationName:"registryCredentialOverride" type:"structure"` + // Set to true to report to your source provider the status of a build's start // and completion. If you use this option with a source provider other than // GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown. @@ -5084,6 +5214,11 @@ func (s *StartBuildInput) Validate() error { invalidParams.AddNested("LogsConfigOverride", err.(request.ErrInvalidParams)) } } + if s.RegistryCredentialOverride != nil { + if err := s.RegistryCredentialOverride.Validate(); err != nil { + invalidParams.AddNested("RegistryCredentialOverride", err.(request.ErrInvalidParams)) + } + } if s.SecondaryArtifactsOverride != nil { for i, v := range s.SecondaryArtifactsOverride { if v == nil { @@ -5186,6 +5321,12 @@ func (s *StartBuildInput) SetImageOverride(v string) *StartBuildInput { return s } +// SetImagePullCredentialsTypeOverride sets the ImagePullCredentialsTypeOverride field's value. +func (s *StartBuildInput) SetImagePullCredentialsTypeOverride(v string) *StartBuildInput { + s.ImagePullCredentialsTypeOverride = &v + return s +} + // SetInsecureSslOverride sets the InsecureSslOverride field's value. func (s *StartBuildInput) SetInsecureSslOverride(v bool) *StartBuildInput { s.InsecureSslOverride = &v @@ -5216,6 +5357,12 @@ func (s *StartBuildInput) SetQueuedTimeoutInMinutesOverride(v int64) *StartBuild return s } +// SetRegistryCredentialOverride sets the RegistryCredentialOverride field's value. +func (s *StartBuildInput) SetRegistryCredentialOverride(v *RegistryCredential) *StartBuildInput { + s.RegistryCredentialOverride = v + return s +} + // SetReportBuildStatusOverride sets the ReportBuildStatusOverride field's value. func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput { s.ReportBuildStatusOverride = &v @@ -6004,6 +6151,11 @@ const ( ComputeTypeBuildGeneral1Large = "BUILD_GENERAL1_LARGE" ) +const ( + // CredentialProviderTypeSecretsManager is a CredentialProviderType enum value + CredentialProviderTypeSecretsManager = "SECRETS_MANAGER" +) + const ( // EnvironmentTypeWindowsContainer is a EnvironmentType enum value EnvironmentTypeWindowsContainer = "WINDOWS_CONTAINER" @@ -6020,6 +6172,14 @@ const ( EnvironmentVariableTypeParameterStore = "PARAMETER_STORE" ) +const ( + // ImagePullCredentialsTypeCodebuild is a ImagePullCredentialsType enum value + ImagePullCredentialsTypeCodebuild = "CODEBUILD" + + // ImagePullCredentialsTypeServiceRole is a ImagePullCredentialsType enum value + ImagePullCredentialsTypeServiceRole = "SERVICE_ROLE" +) + const ( // LanguageTypeJava is a LanguageType enum value LanguageTypeJava = "JAVA" diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index 2f8d260bd..a897e65b8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -4043,6 +4043,13 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // can be added using PutFile is 6 MB. For files larger than 6 MB but smaller // than 2 GB, add them using a Git client. // +// * ErrCodeFolderContentSizeLimitExceededException "FolderContentSizeLimitExceededException" +// The specified file is in a folder that exceeds the folder content size limit. +// Either save the file in a folder that has less content, or remove files or +// subfolders from the folder so it does not exceed the size limit. For more +// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide +// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). +// // * ErrCodePathRequiredException "PathRequiredException" // The folderPath for a location cannot be null. // @@ -4115,6 +4122,11 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // provide a different name for the file, or specify a different path for the // file. // +// * ErrCodeFilePathConflictsWithSubmodulePathException "FilePathConflictsWithSubmodulePathException" +// The specified file path or folder has the same path as a submodule in this +// repository. Either provide a different name for the file, or save the file +// in a directory that does not conflict with the submodule path. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PutFile func (c *CodeCommit) PutFile(input *PutFileInput) (*PutFileOutput, error) { req, out := c.PutFileRequest(input) diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go index 2301b41f5..f0db5077f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go @@ -220,6 +220,14 @@ const ( // file name. ErrCodeFileNameConflictsWithDirectoryNameException = "FileNameConflictsWithDirectoryNameException" + // ErrCodeFilePathConflictsWithSubmodulePathException for service response error code + // "FilePathConflictsWithSubmodulePathException". + // + // The specified file path or folder has the same path as a submodule in this + // repository. Either provide a different name for the file, or save the file + // in a directory that does not conflict with the submodule path. + ErrCodeFilePathConflictsWithSubmodulePathException = "FilePathConflictsWithSubmodulePathException" + // ErrCodeFileTooLargeException for service response error code // "FileTooLargeException". // @@ -228,6 +236,16 @@ const ( // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). ErrCodeFileTooLargeException = "FileTooLargeException" + // ErrCodeFolderContentSizeLimitExceededException for service response error code + // "FolderContentSizeLimitExceededException". + // + // The specified file is in a folder that exceeds the folder content size limit. + // Either save the file in a folder that has less content, or remove files or + // subfolders from the folder so it does not exceed the size limit. For more + // information about limits in AWS CodeCommit, see AWS CodeCommit User Guide + // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). + ErrCodeFolderContentSizeLimitExceededException = "FolderContentSizeLimitExceededException" + // ErrCodeFolderDoesNotExistException for service response error code // "FolderDoesNotExistException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index 274ca2a32..8c469f5af 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -71,13 +71,13 @@ func (c *CodeDeploy) AddTagsToOnPremisesInstancesRequest(input *AddTagsToOnPremi // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeTagRequiredException "TagRequiredException" // A tag was not specified. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeTagLimitExceededException "TagLimitExceededException" // The maximum allowed number of tags was exceeded. @@ -166,7 +166,7 @@ func (c *CodeDeploy) BatchGetApplicationRevisionsRequest(input *BatchGetApplicat // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -266,7 +266,7 @@ func (c *CodeDeploy) BatchGetApplicationsRequest(input *BatchGetApplicationsInpu // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. @@ -354,7 +354,7 @@ func (c *CodeDeploy) BatchGetDeploymentGroupsRequest(input *BatchGetDeploymentGr // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -366,8 +366,7 @@ func (c *CodeDeploy) BatchGetDeploymentGroupsRequest(input *BatchGetDeploymentGr // The maximum number of names or IDs allowed for this request (100) was exceeded. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentGroups func (c *CodeDeploy) BatchGetDeploymentGroups(input *BatchGetDeploymentGroupsInput) (*BatchGetDeploymentGroupsOutput, error) { @@ -440,8 +439,7 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // BatchGetDeploymentInstances API operation for AWS CodeDeploy. // -// This method works, but is considered deprecated. Use BatchGetDeploymentTargets -// instead. +// This method works, but is deprecated. Use BatchGetDeploymentTargets instead. // // Returns an array of instances associated with a deployment. This method works // with EC2/On-premises and AWS Lambda compute platforms. The newer BatchGetDeploymentTargets @@ -459,7 +457,7 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeInstanceIdRequiredException "InstanceIdRequiredException" // The instance ID was not specified. @@ -468,7 +466,7 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // At least one of the deployment IDs was specified in an invalid format. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. @@ -551,11 +549,11 @@ func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentT // // The type of targets returned depends on the deployment's compute platform: // -// * EC2/On-premises - Information about EC2 instance targets. +// * EC2/On-premises: Information about EC2 instance targets. // -// * AWS Lambda - Information about Lambda functions targets. +// * AWS Lambda: Information about Lambda functions targets. // -// * Amazon ECS - Information about ECS service targets. +// * Amazon ECS: Information about Amazon ECS service targets. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -572,13 +570,13 @@ func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentT // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" // A deployment target ID was not provided. // // * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" -// The target ID provide was not valid. +// The target ID provided was not valid. // // * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" // The provided target ID does not belong to the attempted deployment. @@ -754,7 +752,7 @@ func (c *CodeDeploy) BatchGetOnPremisesInstancesRequest(input *BatchGetOnPremise // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. @@ -845,7 +843,7 @@ func (c *CodeDeploy) ContinueDeploymentRequest(input *ContinueDeploymentInput) ( // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. @@ -948,8 +946,8 @@ func (c *CodeDeploy) CreateApplicationRequest(input *CreateApplicationInput) (re // The application name was specified in an invalid format. // // * ErrCodeApplicationAlreadyExistsException "ApplicationAlreadyExistsException" -// An application with the specified name already exists with the applicable -// IAM user or AWS account. +// An application with the specified name with the IAM user or AWS account already +// exists. // // * ErrCodeApplicationLimitExceededException "ApplicationLimitExceededException" // More applications were attempted to be created than are allowed. @@ -1040,7 +1038,7 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -1049,14 +1047,13 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeRevisionRequiredException "RevisionRequiredException" // The revision ID was not specified. // // * ErrCodeRevisionDoesNotExistException "RevisionDoesNotExistException" -// The named revision does not exist with the applicable IAM user or AWS account. +// The named revision does not exist with the IAM user or AWS account. // // * ErrCodeInvalidRevisionException "InvalidRevisionException" // The revision was specified in an invalid format. @@ -1065,8 +1062,7 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The deployment configuration name was specified in an invalid format. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeDescriptionTooLongException "DescriptionTooLongException" // The description is too long. @@ -1088,7 +1084,7 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // // * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" // The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled but an invalid triggering event +// For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. // // * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" @@ -1096,14 +1092,14 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // // * ErrCodeInvalidFileExistsBehaviorException "InvalidFileExistsBehaviorException" // An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy -// handles files or directories that already exist in a deployment target location +// handles files or directories that already exist in a deployment target location, // but weren't part of the previous successful deployment. Valid values include -// "DISALLOW", "OVERWRITE", and "RETAIN". +// "DISALLOW," "OVERWRITE," and "RETAIN." // // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" // The Auto Scaling group was specified in an invalid format or does not exist. @@ -1205,8 +1201,8 @@ func (c *CodeDeploy) CreateDeploymentConfigRequest(input *CreateDeploymentConfig // The deployment configuration name was not specified. // // * ErrCodeDeploymentConfigAlreadyExistsException "DeploymentConfigAlreadyExistsException" -// A deployment configuration with the specified name already exists with the -// applicable IAM user or AWS account. +// A deployment configuration with the specified name with the IAM user or AWS +// account already exists . // // * ErrCodeInvalidMinimumHealthyHostValueException "InvalidMinimumHealthyHostValueException" // The minimum healthy instance value was specified in an invalid format. @@ -1287,7 +1283,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // CreateDeploymentGroup API operation for AWS CodeDeploy. // -// Creates a deployment group to which application revisions will be deployed. +// Creates a deployment group to which application revisions are deployed. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1304,7 +1300,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -1313,14 +1309,14 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupAlreadyExistsException "DeploymentGroupAlreadyExistsException" -// A deployment group with the specified name already exists with the applicable -// IAM user or AWS account. +// A deployment group with the specified name with the IAM user or AWS account +// already exists. // // * ErrCodeInvalidEC2TagException "InvalidEC2TagException" // The tag was specified in an invalid format. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" // The Auto Scaling group was specified in an invalid format or does not exist. @@ -1329,8 +1325,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // The deployment configuration name was specified in an invalid format. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeRoleRequiredException "RoleRequiredException" // The role ID was not specified. @@ -1338,7 +1333,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // * ErrCodeDeploymentGroupLimitExceededException "DeploymentGroupLimitExceededException" // The deployment groups limit was exceeded. @@ -1359,18 +1354,18 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // // * The alarm object is null. // -// * The alarm name is empty or null or exceeds the 255 character limit. +// * The alarm name is empty or null or exceeds the limit of 255 characters. // // * Two alarms with the same name have been specified. // -// * The alarm configuration is enabled but the alarm list is empty. +// * The alarm configuration is enabled, but the alarm list is empty. // // * ErrCodeAlarmsLimitExceededException "AlarmsLimitExceededException" // The maximum number of alarms for a deployment group (10) was exceeded. // // * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" // The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled but an invalid triggering event +// For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. // // * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" @@ -1378,8 +1373,8 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // // * ErrCodeInvalidDeploymentStyleException "InvalidDeploymentStyleException" // An invalid deployment style was specified. Valid deployment types include -// "IN_PLACE" and "BLUE_GREEN". Valid deployment options include "WITH_TRAFFIC_CONTROL" -// and "WITHOUT_TRAFFIC_CONTROL". +// "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" +// and "WITHOUT_TRAFFIC_CONTROL." // // * ErrCodeInvalidBlueGreenDeploymentConfigurationException "InvalidBlueGreenDeploymentConfigurationException" // The configuration for the blue/green deployment group was provided in an @@ -1399,7 +1394,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // allowed limit of 3. // // * ErrCodeInvalidInputException "InvalidInputException" -// The specified input was specified in an invalid format. +// The input was specified in an invalid format. // // * ErrCodeThrottlingException "ThrottlingException" // An API function was called too frequently. @@ -1412,7 +1407,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // // * ErrCodeECSServiceMappingLimitExceededException "ECSServiceMappingLimitExceededException" // The Amazon ECS service is associated with more than one deployment groups. -// An ECS service can only be associated with one deployment group. +// An Amazon ECS service can be associated with only one deployment group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentGroup func (c *CodeDeploy) CreateDeploymentGroup(input *CreateDeploymentGroupInput) (*CreateDeploymentGroupOutput, error) { @@ -1680,7 +1675,7 @@ func (c *CodeDeploy) DeleteDeploymentGroupRequest(input *DeleteDeploymentGroupIn // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentGroup func (c *CodeDeploy) DeleteDeploymentGroup(input *DeleteDeploymentGroupInput) (*DeleteDeploymentGroupOutput, error) { @@ -1854,7 +1849,7 @@ func (c *CodeDeploy) DeregisterOnPremisesInstanceRequest(input *DeregisterOnPrem // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeregisterOnPremisesInstance func (c *CodeDeploy) DeregisterOnPremisesInstance(input *DeregisterOnPremisesInstanceInput) (*DeregisterOnPremisesInstanceOutput, error) { @@ -1939,7 +1934,7 @@ func (c *CodeDeploy) GetApplicationRequest(input *GetApplicationInput) (req *req // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetApplication func (c *CodeDeploy) GetApplication(input *GetApplicationInput) (*GetApplicationOutput, error) { @@ -2018,7 +2013,7 @@ func (c *CodeDeploy) GetApplicationRevisionRequest(input *GetApplicationRevision // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -2027,7 +2022,7 @@ func (c *CodeDeploy) GetApplicationRevisionRequest(input *GetApplicationRevision // The application name was specified in an invalid format. // // * ErrCodeRevisionDoesNotExistException "RevisionDoesNotExistException" -// The named revision does not exist with the applicable IAM user or AWS account. +// The named revision does not exist with the IAM user or AWS account. // // * ErrCodeRevisionRequiredException "RevisionRequiredException" // The revision ID was not specified. @@ -2118,7 +2113,7 @@ func (c *CodeDeploy) GetDeploymentRequest(input *GetDeploymentInput) (req *reque // At least one of the deployment IDs was specified in an invalid format. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeployment func (c *CodeDeploy) GetDeployment(input *GetDeploymentInput) (*GetDeploymentOutput, error) { @@ -2203,8 +2198,7 @@ func (c *CodeDeploy) GetDeploymentConfigRequest(input *GetDeploymentConfigInput) // The deployment configuration name was not specified. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" // The computePlatform is invalid. The computePlatform should be Lambda or Server. @@ -2292,7 +2286,7 @@ func (c *CodeDeploy) GetDeploymentGroupRequest(input *GetDeploymentGroupInput) ( // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -2301,12 +2295,10 @@ func (c *CodeDeploy) GetDeploymentGroupRequest(input *GetDeploymentGroupInput) ( // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentGroup func (c *CodeDeploy) GetDeploymentGroup(input *GetDeploymentGroupInput) (*GetDeploymentGroupOutput, error) { @@ -2393,7 +2385,7 @@ func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceIn // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeInstanceIdRequiredException "InstanceIdRequiredException" // The instance ID was not specified. @@ -2405,7 +2397,7 @@ func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceIn // The specified instance does not exist in the deployment group. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" // The computePlatform is invalid. The computePlatform should be Lambda or Server. @@ -2497,19 +2489,19 @@ func (c *CodeDeploy) GetDeploymentTargetRequest(input *GetDeploymentTargetInput) // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" // A deployment target ID was not provided. // // * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" -// The target ID provide was not valid. +// The target ID provided was not valid. // // * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" // The provided target ID does not belong to the attempted deployment. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentTarget func (c *CodeDeploy) GetDeploymentTarget(input *GetDeploymentTargetInput) (*GetDeploymentTargetOutput, error) { @@ -2594,7 +2586,7 @@ func (c *CodeDeploy) GetOnPremisesInstanceRequest(input *GetOnPremisesInstanceIn // The specified on-premises instance is not registered. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetOnPremisesInstance func (c *CodeDeploy) GetOnPremisesInstance(input *GetOnPremisesInstanceInput) (*GetOnPremisesInstanceOutput, error) { @@ -2679,7 +2671,7 @@ func (c *CodeDeploy) ListApplicationRevisionsRequest(input *ListApplicationRevis // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -2831,7 +2823,7 @@ func (c *CodeDeploy) ListApplicationsRequest(input *ListApplicationsInput) (req // ListApplications API operation for AWS CodeDeploy. // -// Lists the applications registered with the applicable IAM user or AWS account. +// Lists the applications registered with the IAM user or AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2966,7 +2958,7 @@ func (c *CodeDeploy) ListDeploymentConfigsRequest(input *ListDeploymentConfigsIn // ListDeploymentConfigs API operation for AWS CodeDeploy. // -// Lists the deployment configurations with the applicable IAM user or AWS account. +// Lists the deployment configurations with the IAM user or AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3101,8 +3093,8 @@ func (c *CodeDeploy) ListDeploymentGroupsRequest(input *ListDeploymentGroupsInpu // ListDeploymentGroups API operation for AWS CodeDeploy. // -// Lists the deployment groups for an application registered with the applicable -// IAM user or AWS account. +// Lists the deployment groups for an application registered with the IAM user +// or AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3119,7 +3111,7 @@ func (c *CodeDeploy) ListDeploymentGroupsRequest(input *ListDeploymentGroupsInpu // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" // The next token was specified in an invalid format. @@ -3255,8 +3247,7 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // with all compute types. ListDeploymentInstances throws an exception if it // is used with a compute platform other than EC2/On-premises or AWS Lambda. // -// Lists the instance for a deployment associated with the applicable IAM user -// or AWS account. +// Lists the instance for a deployment associated with the IAM user or AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3270,7 +3261,7 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" // The specified deployment has not started. @@ -3437,7 +3428,7 @@ func (c *CodeDeploy) ListDeploymentTargetsRequest(input *ListDeploymentTargetsIn // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" // The specified deployment has not started. @@ -3533,7 +3524,7 @@ func (c *CodeDeploy) ListDeploymentsRequest(input *ListDeploymentsInput) (req *r // ListDeployments API operation for AWS CodeDeploy. // // Lists the deployments in a deployment group for an application registered -// with the applicable IAM user or AWS account. +// with the IAM user or AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3550,14 +3541,13 @@ func (c *CodeDeploy) ListDeploymentsRequest(input *ListDeploymentsInput) (req *r // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -3775,7 +3765,7 @@ func (c *CodeDeploy) ListOnPremisesInstancesRequest(input *ListOnPremisesInstanc // Gets a list of names for one or more on-premises instances. // // Unless otherwise specified, both registered and deregistered on-premises -// instance names will be listed. To list only registered or deregistered on-premises +// instance names are listed. To list only registered or deregistered on-premises // instance names, use the registration status parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3790,7 +3780,7 @@ func (c *CodeDeploy) ListOnPremisesInstancesRequest(input *ListOnPremisesInstanc // The registration status was specified in an invalid format. // // * ErrCodeInvalidTagFilterException "InvalidTagFilterException" -// The specified tag filter was specified in an invalid format. +// The tag filter was specified in an invalid format. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" // The next token was specified in an invalid format. @@ -3888,7 +3878,7 @@ func (c *CodeDeploy) PutLifecycleEventHookExecutionStatusRequest(input *PutLifec // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" // At least one of the deployment IDs was specified in an invalid format. @@ -3974,7 +3964,7 @@ func (c *CodeDeploy) RegisterApplicationRevisionRequest(input *RegisterApplicati // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -4092,7 +4082,7 @@ func (c *CodeDeploy) RegisterOnPremisesInstanceRequest(input *RegisterOnPremises // An IAM user ARN was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeInvalidIamSessionArnException "InvalidIamSessionArnException" // The IAM session ARN was specified in an invalid format. @@ -4185,13 +4175,13 @@ func (c *CodeDeploy) RemoveTagsFromOnPremisesInstancesRequest(input *RemoveTagsF // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeTagRequiredException "TagRequiredException" // A tag was not specified. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeTagLimitExceededException "TagLimitExceededException" // The maximum allowed number of tags was exceeded. @@ -4276,7 +4266,7 @@ func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTi // SkipWaitTimeForInstanceTermination API operation for AWS CodeDeploy. // // In a blue/green deployment, overrides any specified wait time and starts -// terminating instances immediately after the traffic routing is completed. +// terminating instances immediately after the traffic routing is complete. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -4290,7 +4280,7 @@ func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTi // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. @@ -4388,11 +4378,10 @@ func (c *CodeDeploy) StopDeploymentRequest(input *StopDeploymentInput) (req *req // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. @@ -4484,11 +4473,11 @@ func (c *CodeDeploy) UpdateApplicationRequest(input *UpdateApplicationInput) (re // The application name was specified in an invalid format. // // * ErrCodeApplicationAlreadyExistsException "ApplicationAlreadyExistsException" -// An application with the specified name already exists with the applicable -// IAM user or AWS account. +// An application with the specified name with the IAM user or AWS account already +// exists. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateApplication func (c *CodeDeploy) UpdateApplication(input *UpdateApplicationInput) (*UpdateApplicationOutput, error) { @@ -4573,27 +4562,26 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupAlreadyExistsException "DeploymentGroupAlreadyExistsException" -// A deployment group with the specified name already exists with the applicable -// IAM user or AWS account. +// A deployment group with the specified name with the IAM user or AWS account +// already exists. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeInvalidEC2TagException "InvalidEC2TagException" // The tag was specified in an invalid format. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" // The Auto Scaling group was specified in an invalid format or does not exist. @@ -4602,13 +4590,12 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // The deployment configuration name was specified in an invalid format. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // * ErrCodeLifecycleHookLimitExceededException "LifecycleHookLimitExceededException" // The limit for lifecycle hooks was exceeded. @@ -4626,18 +4613,18 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // // * The alarm object is null. // -// * The alarm name is empty or null or exceeds the 255 character limit. +// * The alarm name is empty or null or exceeds the limit of 255 characters. // // * Two alarms with the same name have been specified. // -// * The alarm configuration is enabled but the alarm list is empty. +// * The alarm configuration is enabled, but the alarm list is empty. // // * ErrCodeAlarmsLimitExceededException "AlarmsLimitExceededException" // The maximum number of alarms for a deployment group (10) was exceeded. // // * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" // The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled but an invalid triggering event +// For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. // // * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" @@ -4645,8 +4632,8 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // // * ErrCodeInvalidDeploymentStyleException "InvalidDeploymentStyleException" // An invalid deployment style was specified. Valid deployment types include -// "IN_PLACE" and "BLUE_GREEN". Valid deployment options include "WITH_TRAFFIC_CONTROL" -// and "WITHOUT_TRAFFIC_CONTROL". +// "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" +// and "WITHOUT_TRAFFIC_CONTROL." // // * ErrCodeInvalidBlueGreenDeploymentConfigurationException "InvalidBlueGreenDeploymentConfigurationException" // The configuration for the blue/green deployment group was provided in an @@ -4666,7 +4653,7 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // allowed limit of 3. // // * ErrCodeInvalidInputException "InvalidInputException" -// The specified input was specified in an invalid format. +// The input was specified in an invalid format. // // * ErrCodeThrottlingException "ThrottlingException" // An API function was called too frequently. @@ -4679,7 +4666,7 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // // * ErrCodeECSServiceMappingLimitExceededException "ECSServiceMappingLimitExceededException" // The Amazon ECS service is associated with more than one deployment groups. -// An ECS service can only be associated with one deployment group. +// An Amazon ECS service can be associated with only one deployment group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateDeploymentGroup func (c *CodeDeploy) UpdateDeploymentGroup(input *UpdateDeploymentGroupInput) (*UpdateDeploymentGroupOutput, error) { @@ -4813,11 +4800,11 @@ type AlarmConfiguration struct { // state of alarms cannot be retrieved from Amazon CloudWatch. The default value // is false. // - // * true: The deployment will proceed even if alarm status information can't + // * true: The deployment proceeds even if alarm status information can't // be retrieved from Amazon CloudWatch. // - // * false: The deployment will stop if alarm status information can't be - // retrieved from Amazon CloudWatch. + // * false: The deployment stops if alarm status information can't be retrieved + // from Amazon CloudWatch. IgnorePollAlarmFailure *bool `locationName:"ignorePollAlarmFailure" type:"boolean"` } @@ -4858,12 +4845,12 @@ type AppSpecContent struct { // The YAML-formatted or JSON-formatted revision string. // - // For an AWS Lambda deployment the content includes a Lambda function name, + // For an AWS Lambda deployment, the content includes a Lambda function name, // the alias for its original version, and the alias for its replacement version. // The deployment shifts traffic from the original version of the Lambda function // to the replacement version. // - // For an Amazon ECS deployment the content includes the task name, information + // For an Amazon ECS deployment, the content includes the task name, information // about the load balancer that serves traffic to the container, and more. // // For both types of deployments, the content can specify Lambda functions that @@ -4916,8 +4903,8 @@ type ApplicationInfo struct { // The name for a connection to a GitHub account. GitHubAccountName *string `locationName:"gitHubAccountName" type:"string"` - // True if the user has authenticated with GitHub for the specified application; - // otherwise, false. + // True if the user has authenticated with GitHub for the specified application. + // Otherwise, false. LinkedToGitHub *bool `locationName:"linkedToGitHub" type:"boolean"` } @@ -4968,7 +4955,7 @@ func (s *ApplicationInfo) SetLinkedToGitHub(v bool) *ApplicationInfo { } // Information about a configuration for automatically rolling back to a previous -// version of an application revision when a deployment doesn't complete successfully. +// version of an application revision when a deployment is not completed successfully. type AutoRollbackConfiguration struct { _ struct{} `type:"structure"` @@ -5098,7 +5085,7 @@ type BatchGetApplicationRevisionsOutput struct { // The name of the application that corresponds to the revisions. ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - // Information about errors that may have occurred during the API call. + // Information about errors that might have occurred during the API call. ErrorMessage *string `locationName:"errorMessage" type:"string"` // Additional information about the revisions, including the type and location. @@ -5206,7 +5193,7 @@ type BatchGetDeploymentGroupsInput struct { // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - // The deployment groups' names. + // The names of the deployment groups. // // DeploymentGroupNames is a required field DeploymentGroupNames []*string `locationName:"deploymentGroupNames" type:"list" required:"true"` @@ -5260,7 +5247,7 @@ type BatchGetDeploymentGroupsOutput struct { // Information about the deployment groups. DeploymentGroupsInfo []*DeploymentGroupInfo `locationName:"deploymentGroupsInfo" type:"list"` - // Information about errors that may have occurred during the API call. + // Information about errors that might have occurred during the API call. ErrorMessage *string `locationName:"errorMessage" type:"string"` } @@ -5295,7 +5282,7 @@ type BatchGetDeploymentInstancesInput struct { // DeploymentId is a required field DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` - // The unique IDs of instances of the deployment. + // The unique IDs of instances used in the deployment. // // InstanceIds is a required field InstanceIds []*string `locationName:"instanceIds" type:"list" required:"true"` @@ -5343,7 +5330,7 @@ func (s *BatchGetDeploymentInstancesInput) SetInstanceIds(v []*string) *BatchGet type BatchGetDeploymentInstancesOutput struct { _ struct{} `type:"structure"` - // Information about errors that may have occurred during the API call. + // Information about errors that might have occurred during the API call. ErrorMessage *string `locationName:"errorMessage" type:"string"` // Information about the instance. @@ -5382,11 +5369,11 @@ type BatchGetDeploymentTargetsInput struct { // determines the type of the targets and their formats. // // * For deployments that use the EC2/On-premises compute platform, the - // target IDs are EC2 or on-premises instances IDs and their target type + // target IDs are EC2 or on-premises instances IDs, and their target type // is instanceTarget. // // * For deployments that use the AWS Lambda compute platform, the target - // IDs are the names of Lambda functions and their target type is instanceTarget. + // IDs are the names of Lambda functions, and their target type is instanceTarget. // // // * For deployments that use the Amazon ECS compute platform, the target @@ -5424,13 +5411,13 @@ type BatchGetDeploymentTargetsOutput struct { // about the target, such as its status and lifecycle events. The type of the // target objects depends on the deployment' compute platform. // - // * EC2/On-premises - Each target object is an EC2 or on-premises instance. + // * EC2/On-premises: Each target object is an EC2 or on-premises instance. // // - // * AWS Lambda - The target object is a specific version of an AWS Lambda + // * AWS Lambda: The target object is a specific version of an AWS Lambda // function. // - // * Amazon ECS - The target object is an Amazon ECS service. + // * Amazon ECS: The target object is an Amazon ECS service. DeploymentTargets []*DeploymentTarget `locationName:"deploymentTargets" type:"list"` } @@ -5821,7 +5808,7 @@ type CreateDeploymentConfigInput struct { // FLEET_PERCENT and a value of 95. MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - // The configuration that specifies how the deployment traffic will be routed. + // The configuration that specifies how the deployment traffic is routed. TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` } @@ -5907,8 +5894,8 @@ type CreateDeploymentGroupInput struct { // is created. AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -5917,7 +5904,7 @@ type CreateDeploymentGroupInput struct { // deployment group is created. AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - // A list of associated Auto Scaling groups. + // A list of associated Amazon EC2 Auto Scaling groups. AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` // Information about blue/green deployment options for a deployment group. @@ -5929,7 +5916,7 @@ type CreateDeploymentGroupInput struct { // operation. // // CodeDeployDefault.OneAtATime is the default deployment configuration. It - // is used if a configuration isn't specified for the deployment or the deployment + // is used if a configuration isn't specified for the deployment or deployment // group. // // For more information about the predefined deployment configurations in AWS @@ -5946,32 +5933,32 @@ type CreateDeploymentGroupInput struct { // want to run and whether to route deployment traffic behind a load balancer. DeploymentStyle *DeploymentStyle `locationName:"deploymentStyle" type:"structure"` - // The Amazon EC2 tags on which to filter. The deployment group will include - // EC2 instances with any of the specified tags. Cannot be used in the same - // call as ec2TagSet. + // The Amazon EC2 tags on which to filter. The deployment group includes EC2 + // instances with any of the specified tags. Cannot be used in the same call + // as ec2TagSet. Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` // Information about groups of tags applied to EC2 instances. The deployment - // group will include only EC2 instances identified by all the tag groups. Cannot + // group includes only EC2 instances identified by all the tag groups. Cannot // be used in the same call as ec2TagFilters. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - // The target ECS services in the deployment group. This only applies to deployment - // groups that use the Amazon ECS compute platform. A target ECS service is - // specified as an Amazon ECS cluster and service name pair using the format - // :. + // The target Amazon ECS services in the deployment group. This applies only + // to deployment groups that use the Amazon ECS compute platform. A target Amazon + // ECS service is specified as an Amazon ECS cluster and service name pair using + // the format :. EcsServices []*ECSService `locationName:"ecsServices" type:"list"` // Information about the load balancer used in a deployment. LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` - // The on-premises instance tags on which to filter. The deployment group will - // include on-premises instances with any of the specified tags. Cannot be used - // in the same call as OnPremisesTagSet. + // The on-premises instance tags on which to filter. The deployment group includes + // on-premises instances with any of the specified tags. Cannot be used in the + // same call as OnPremisesTagSet. OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` // Information about groups of tags applied to on-premises instances. The deployment - // group will include only on-premises instances identified by all the tag groups. + // group includes only on-premises instances identified by all of the tag groups. // Cannot be used in the same call as onPremisesInstanceTagFilters. OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` @@ -6149,8 +6136,8 @@ func (s *CreateDeploymentGroupOutput) SetDeploymentGroupId(v string) *CreateDepl type CreateDeploymentInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -6159,12 +6146,12 @@ type CreateDeploymentInput struct { // deployment is created. AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - // The name of a deployment configuration associated with the applicable IAM - // user or AWS account. + // The name of a deployment configuration associated with the IAM user or AWS + // account. // - // If not specified, the value configured in the deployment group will be used - // as the default. If the deployment group does not have a deployment configuration - // associated with it, then CodeDeployDefault.OneAtATime will be used by default. + // If not specified, the value configured in the deployment group is used as + // the default. If the deployment group does not have a deployment configuration + // associated with it, CodeDeployDefault.OneAtATime is used by default. DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` // The name of the deployment group. @@ -6190,20 +6177,20 @@ type CreateDeploymentInput struct { FileExistsBehavior *string `locationName:"fileExistsBehavior" type:"string" enum:"FileExistsBehavior"` // If set to true, then if the deployment causes the ApplicationStop deployment - // lifecycle event to an instance to fail, the deployment to that instance will - // not be considered to have failed at that point and will continue on to the - // BeforeInstall deployment lifecycle event. + // lifecycle event to an instance to fail, the deployment to that instance is + // considered to have failed at that point and continues on to the BeforeInstall + // deployment lifecycle event. // // If set to false or not specified, then if the deployment causes the ApplicationStop // deployment lifecycle event to fail to an instance, the deployment to that - // instance will stop, and the deployment to that instance will be considered - // to have failed. + // instance stops, and the deployment to that instance is considered to have + // failed. IgnoreApplicationStopFailures *bool `locationName:"ignoreApplicationStopFailures" type:"boolean"` // The type and location of the revision to deploy. Revision *RevisionLocation `locationName:"revision" type:"structure"` - // Information about the instances that will belong to the replacement environment + // Information about the instances that belong to the replacement environment // in a blue/green deployment. TargetInstances *TargetInstances `locationName:"targetInstances" type:"structure"` @@ -6332,8 +6319,8 @@ func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutp type DeleteApplicationInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -6389,8 +6376,8 @@ func (s DeleteApplicationOutput) GoString() string { type DeleteDeploymentConfigInput struct { _ struct{} `type:"structure"` - // The name of a deployment configuration associated with the applicable IAM - // user or AWS account. + // The name of a deployment configuration associated with the IAM user or AWS + // account. // // DeploymentConfigName is a required field DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` @@ -6446,13 +6433,13 @@ func (s DeleteDeploymentConfigOutput) GoString() string { type DeleteDeploymentGroupInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - // The name of an existing deployment group for the specified application. + // The name of a deployment group for the specified application. // // DeploymentGroupName is a required field DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` @@ -6598,7 +6585,7 @@ type DeploymentConfigInfo struct { // Information about the number or percentage of minimum healthy instance. MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - // The configuration specifying how the deployment traffic will be routed. Only + // The configuration that specifies how the deployment traffic is routed. Only // deployments with a Lambda compute platform can specify this. TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` } @@ -6690,14 +6677,14 @@ type DeploymentGroupInfo struct { Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` // Information about groups of tags applied to an EC2 instance. The deployment - // group includes only EC2 instances identified by all the tag groups. Cannot + // group includes only EC2 instances identified by all of the tag groups. Cannot // be used in the same call as ec2TagFilters. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - // The target ECS services in the deployment group. This only applies to deployment - // groups that use the Amazon ECS compute platform. A target ECS service is - // specified as an Amazon ECS cluster and service name pair using the format - // :. + // The target Amazon ECS services in the deployment group. This applies only + // to deployment groups that use the Amazon ECS compute platform. A target Amazon + // ECS service is specified as an Amazon ECS cluster and service name pair using + // the format :. EcsServices []*ECSService `locationName:"ecsServices" type:"list"` // Information about the most recent attempted deployment to the deployment @@ -6885,20 +6872,20 @@ type DeploymentInfo struct { // Information about blue/green deployment options for this deployment. BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` - // A timestamp indicating when the deployment was complete. + // A timestamp that indicates when the deployment was complete. CompleteTime *time.Time `locationName:"completeTime" type:"timestamp"` // The destination platform type for the deployment (Lambda or Server). ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - // A timestamp indicating when the deployment was created. + // A timestamp that indicates when the deployment was created. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The means by which the deployment was created: // // * user: A user created the deployment. // - // * autoscaling: Auto Scaling created the deployment. + // * autoscaling: Amazon EC2 Auto Scaling created the deployment. // // * codeDeployRollback: A rollback process created the deployment. Creator *string `locationName:"creator" type:"string" enum:"DeploymentCreator"` @@ -6943,19 +6930,19 @@ type DeploymentInfo struct { FileExistsBehavior *string `locationName:"fileExistsBehavior" type:"string" enum:"FileExistsBehavior"` // If true, then if the deployment causes the ApplicationStop deployment lifecycle - // event to an instance to fail, the deployment to that instance will not be - // considered to have failed at that point and will continue on to the BeforeInstall - // deployment lifecycle event. + // event to an instance to fail, the deployment to that instance is not considered + // to have failed at that point and continues on to the BeforeInstall deployment + // lifecycle event. // // If false or not specified, then if the deployment causes the ApplicationStop // deployment lifecycle event to an instance to fail, the deployment to that - // instance will stop, and the deployment to that instance will be considered - // to have failed. + // instance stops, and the deployment to that instance is considered to have + // failed. IgnoreApplicationStopFailures *bool `locationName:"ignoreApplicationStopFailures" type:"boolean"` // Indicates whether the wait period set for the termination of instances in // the original environment has started. Status is 'false' if the KEEP_ALIVE - // option is specified; otherwise, 'true' as soon as the termination wait period + // option is specified. Otherwise, 'true' as soon as the termination wait period // starts. InstanceTerminationWaitTimeStarted *bool `locationName:"instanceTerminationWaitTimeStarted" type:"boolean"` @@ -6973,11 +6960,11 @@ type DeploymentInfo struct { // Information about a deployment rollback. RollbackInfo *RollbackInfo `locationName:"rollbackInfo" type:"structure"` - // A timestamp indicating when the deployment was deployed to the deployment + // A timestamp that indicates when the deployment was deployed to the deployment // group. // - // In some cases, the reported value of the start time may be later than the - // complete time. This is due to differences in the clock settings of back-end + // In some cases, the reported value of the start time might be later than the + // complete time. This is due to differences in the clock settings of backend // servers that participate in the deployment process. StartTime *time.Time `locationName:"startTime" type:"timestamp"` @@ -7255,8 +7242,8 @@ type DeploymentReadyOption struct { ActionOnTimeout *string `locationName:"actionOnTimeout" type:"string" enum:"DeploymentReadyAction"` // The number of minutes to wait before the status of a blue/green deployment - // changed to Stopped if rerouting is not started manually. Applies only to - // the STOP_DEPLOYMENT option for actionOnTimeout + // is changed to Stopped if rerouting is not started manually. Applies only + // to the STOP_DEPLOYMENT option for actionOnTimeout WaitTimeInMinutes *int64 `locationName:"waitTimeInMinutes" type:"integer"` } @@ -7320,7 +7307,7 @@ func (s *DeploymentStyle) SetDeploymentType(v string) *DeploymentStyle { type DeploymentTarget struct { _ struct{} `type:"structure"` - // The deployment type which is specific to the deployment's compute platform. + // The deployment type that is specific to the deployment's compute platform. DeploymentTargetType *string `locationName:"deploymentTargetType" type:"string" enum:"DeploymentTargetType"` // Information about the target for a deployment that uses the Amazon ECS compute @@ -7543,9 +7530,9 @@ func (s *EC2TagFilter) SetValue(v string) *EC2TagFilter { type EC2TagSet struct { _ struct{} `type:"structure"` - // A list containing other lists of EC2 instance tag groups. In order for an - // instance to be included in the deployment group, it must be identified by - // all the tag groups in the list. + // A list that contains other lists of EC2 instance tag groups. For an instance + // to be included in the deployment group, it must be identified by all of the + // tag groups in the list. Ec2TagSetList [][]*EC2TagFilter `locationName:"ec2TagSetList" type:"list"` } @@ -7570,10 +7557,10 @@ func (s *EC2TagSet) SetEc2TagSetList(v [][]*EC2TagFilter) *EC2TagSet { type ECSService struct { _ struct{} `type:"structure"` - // The name of the cluster that the ECS service is associated with. + // The name of the cluster that the Amazon ECS service is associated with. ClusterName *string `locationName:"clusterName" type:"string"` - // The name of the target ECS service. + // The name of the target Amazon ECS service. ServiceName *string `locationName:"serviceName" type:"string"` } @@ -7678,18 +7665,17 @@ func (s *ECSTarget) SetTaskSetsInfo(v []*ECSTaskSet) *ECSTarget { return s } -// A set of Amazon ECS tasks. A task set runs a specified number of instances -// of a task definition simultaneously inside an Amazon ECS service. Information -// about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. An Amazon -// ECS task set includes details such as the desired number of tasks, how many -// tasks are running, and whether the task set serves production traffic or -// not. +// Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. +// An Amazon ECS task set includes details such as the desired number of tasks, +// how many tasks are running, and whether the task set serves production traffic. +// An AWS CodeDeploy application that uses the Amazon ECS compute platform deploys +// a containerized application in an Amazon ECS service as a task set. type ECSTaskSet struct { _ struct{} `type:"structure"` // The number of tasks in a task set. During a deployment that uses the Amazon - // ECS compute type, CodeDeploy asks Amazon ECS to create a new task set and - // uses this value to determine how many tasks to create. After the updated + // ECS compute type, CodeDeploy instructs Amazon ECS to create a new task set + // and uses this value to determine how many tasks to create. After the updated // task set is created, CodeDeploy shifts traffic to the new task set. DesiredCount *int64 `locationName:"desiredCount" type:"long"` @@ -7709,11 +7695,11 @@ type ECSTaskSet struct { // The status of the task set. There are three valid task set statuses: // - // * PRIMARY - indicates the task set is serving production traffic. + // * PRIMARY: Indicates the task set is serving production traffic. // - // * ACTIVE - indicates the task set is not serving production traffic. + // * ACTIVE: Indicates the task set is not serving production traffic. // - // * DRAINING - indicates the tasks in the task set are being stopped and + // * DRAINING: Indicates the tasks in the task set are being stopped and // their corresponding targets are being deregistered from their target group. Status *string `locationName:"status" type:"string"` @@ -7793,11 +7779,11 @@ func (s *ECSTaskSet) SetTrafficWeight(v float64) *ECSTaskSet { type ELBInfo struct { _ struct{} `type:"structure"` - // For blue/green deployments, the name of the load balancer that will be used - // to route traffic from original instances to replacement instances in a blue/green + // For blue/green deployments, the name of the load balancer that is used to + // route traffic from original instances to replacement instances in a blue/green // deployment. For in-place deployments, the name of the load balancer that // instances are deregistered from so they are not serving traffic during a - // deployment, and then re-registered with after the deployment completes. + // deployment, and then re-registered with after the deployment is complete. Name *string `locationName:"name" type:"string"` } @@ -7821,19 +7807,18 @@ func (s *ELBInfo) SetName(v string) *ELBInfo { type ErrorInformation struct { _ struct{} `type:"structure"` - // For information about additional error codes, see Error Codes for AWS CodeDeploy - // (http://docs.aws.amazon.com/codedeploy/latest/userguide/error-codes.html) + // For more information, see Error Codes for AWS CodeDeploy (http://docs.aws.amazon.com/codedeploy/latest/userguide/error-codes.html) // in the AWS CodeDeploy User Guide (http://docs.aws.amazon.com/codedeploy/latest/userguide). // // The error code: // - // * APPLICATION_MISSING: The application was missing. This error code will - // most likely be raised if the application is deleted after the deployment - // is created but before it is started. + // * APPLICATION_MISSING: The application was missing. This error code is + // most likely raised if the application is deleted after the deployment + // is created, but before it is started. // // * DEPLOYMENT_GROUP_MISSING: The deployment group was missing. This error - // code will most likely be raised if the deployment group is deleted after - // the deployment is created but before it is started. + // code is most likely raised if the deployment group is deleted after the + // deployment is created, but before it is started. // // * HEALTH_CONSTRAINTS: The deployment failed on too many instances to be // successfully deployed within the instance health constraints specified. @@ -7847,21 +7832,21 @@ type ErrorInformation struct { // // * INTERNAL_ERROR: There was an internal error. // - // * NO_EC2_SUBSCRIPTION: The calling account is not subscribed to the Amazon - // EC2 service. + // * NO_EC2_SUBSCRIPTION: The calling account is not subscribed to Amazon + // EC2. // - // * NO_INSTANCES: No instance were specified, or no instance can be found. + // * NO_INSTANCES: No instances were specified, or no instances can be found. // - // * OVER_MAX_INSTANCES: The maximum number of instance was exceeded. + // * OVER_MAX_INSTANCES: The maximum number of instances was exceeded. // // * THROTTLED: The operation was throttled because the calling account exceeded // the throttling limits of one or more AWS services. // // * TIMEOUT: The deployment has timed out. // - // * REVISION_MISSING: The revision ID was missing. This error code will - // most likely be raised if the revision is deleted after the deployment - // is created but before it is started. + // * REVISION_MISSING: The revision ID was missing. This error code is most + // likely raised if the revision is deleted after the deployment is created, + // but before it is started. Code *string `locationName:"code" type:"string" enum:"ErrorCode"` // An accompanying error message. @@ -7954,8 +7939,8 @@ func (s *GenericRevisionInfo) SetRegisterTime(v time.Time) *GenericRevisionInfo type GetApplicationInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -8119,8 +8104,8 @@ func (s *GetApplicationRevisionOutput) SetRevisionInfo(v *GenericRevisionInfo) * type GetDeploymentConfigInput struct { _ struct{} `type:"structure"` - // The name of a deployment configuration associated with the applicable IAM - // user or AWS account. + // The name of a deployment configuration associated with the IAM user or AWS + // account. // // DeploymentConfigName is a required field DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` @@ -8186,13 +8171,13 @@ func (s *GetDeploymentConfigOutput) SetDeploymentConfigInfo(v *DeploymentConfigI type GetDeploymentGroupInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - // The name of an existing deployment group for the specified application. + // The name of a deployment group for the specified application. // // DeploymentGroupName is a required field DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` @@ -8270,8 +8255,7 @@ func (s *GetDeploymentGroupOutput) SetDeploymentGroupInfo(v *DeploymentGroupInfo type GetDeploymentInput struct { _ struct{} `type:"structure"` - // The unique ID of a deployment associated with the applicable IAM user or - // AWS account. + // The unique ID of a deployment associated with the IAM user or AWS account. // // DeploymentId is a required field DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` @@ -8443,7 +8427,7 @@ type GetDeploymentTargetOutput struct { _ struct{} `type:"structure"` // A deployment target that contains information about a deployment such as - // its status, lifecyle events, and when it was updated last. It also contains + // its status, lifecyle events, and when it was last updated. It also contains // metadata about the deployment target. The deployment target metadata depends // on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget). DeploymentTarget *DeploymentTarget `locationName:"deploymentTarget" type:"structure"` @@ -8695,7 +8679,7 @@ type InstanceSummary struct { // * GREEN: The instance is part of the replacement environment. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // A timestamp indicating when the instance information was last updated. + // A timestamp that indicaties when the instance information was last updated. LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // A list of lifecycle events for this instance. @@ -8917,15 +8901,15 @@ func (s *LambdaTarget) SetTargetId(v string) *LambdaTarget { type LastDeploymentInfo struct { _ struct{} `type:"structure"` - // A timestamp indicating when the most recent deployment to the deployment + // A timestamp that indicates when the most recent deployment to the deployment // group started. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The unique ID of a deployment. DeploymentId *string `locationName:"deploymentId" type:"string"` - // A timestamp indicating when the most recent deployment to the deployment - // group completed. + // A timestamp that indicates when the most recent deployment to the deployment + // group was complete. EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The status of the most recent deployment. @@ -8973,14 +8957,14 @@ type LifecycleEvent struct { // Diagnostic information about the deployment lifecycle event. Diagnostics *Diagnostics `locationName:"diagnostics" type:"structure"` - // A timestamp indicating when the deployment lifecycle event ended. + // A timestamp that indicates when the deployment lifecycle event ended. EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, // AfterInstall, ApplicationStart, or ValidateService. LifecycleEventName *string `locationName:"lifecycleEventName" type:"string"` - // A timestamp indicating when the deployment lifecycle event started. + // A timestamp that indicates when the deployment lifecycle event started. StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The deployment lifecycle event status: @@ -9043,8 +9027,8 @@ func (s *LifecycleEvent) SetStatus(v string) *LifecycleEvent { type ListApplicationRevisionsInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -9081,7 +9065,7 @@ type ListApplicationRevisionsInput struct { // // * lastUsedTime: Sort by the time the revisions were last used in a deployment. // - // If not specified or set to null, the results will be returned in an arbitrary + // If not specified or set to null, the results are returned in an arbitrary // order. SortBy *string `locationName:"sortBy" type:"string" enum:"ApplicationRevisionSortBy"` @@ -9091,9 +9075,9 @@ type ListApplicationRevisionsInput struct { // // * descending: descending order. // - // If not specified, the results will be sorted in ascending order. + // If not specified, the results are sorted in ascending order. // - // If set to null, the results will be sorted in an arbitrary order. + // If set to null, the results are sorted in an arbitrary order. SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrder"` } @@ -9169,9 +9153,9 @@ func (s *ListApplicationRevisionsInput) SetSortOrder(v string) *ListApplicationR type ListApplicationRevisionsOutput struct { _ struct{} `type:"structure"` - // If a large amount of information is returned, an identifier will also be - // returned. It can be used in a subsequent list application revisions call - // to return the next set of application revisions in the list. + // If a large amount of information is returned, an identifier is also returned. + // It can be used in a subsequent list application revisions call to return + // the next set of application revisions in the list. NextToken *string `locationName:"nextToken" type:"string"` // A list of locations that contain the matching revisions. @@ -9234,7 +9218,7 @@ type ListApplicationsOutput struct { // If a large amount of information is returned, an identifier is also returned. // It can be used in a subsequent list applications call to return the next - // set of applications, will also be returned. in the list. + // set of applications in the list. NextToken *string `locationName:"nextToken" type:"string"` } @@ -9325,8 +9309,8 @@ func (s *ListDeploymentConfigsOutput) SetNextToken(v string) *ListDeploymentConf type ListDeploymentGroupsInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -9381,7 +9365,7 @@ type ListDeploymentGroupsOutput struct { // The application name. ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - // A list of corresponding deployment group names. + // A list of deployment group names. DeploymentGroups []*string `locationName:"deploymentGroups" type:"list"` // If a large amount of information is returned, an identifier is also returned. @@ -9429,17 +9413,17 @@ type ListDeploymentInstancesInput struct { // A subset of instances to list by status: // - // * Pending: Include those instance with pending deployments. + // * Pending: Include those instances with pending deployments. // - // * InProgress: Include those instance where deployments are still in progress. + // * InProgress: Include those instances where deployments are still in progress. // // * Succeeded: Include those instances with successful deployments. // - // * Failed: Include those instance with failed deployments. + // * Failed: Include those instances with failed deployments. // - // * Skipped: Include those instance with skipped deployments. + // * Skipped: Include those instances with skipped deployments. // - // * Unknown: Include those instance with deployments in an unknown state. + // * Unknown: Include those instances with deployments in an unknown state. InstanceStatusFilter []*string `locationName:"instanceStatusFilter" type:"list"` // The set of instances in a blue/green deployment, either those in the original @@ -9579,9 +9563,9 @@ func (s *ListDeploymentTargetsInput) SetTargetFilters(v map[string][]*string) *L type ListDeploymentTargetsOutput struct { _ struct{} `type:"structure"` - // If a large amount of information is returned, a token identifier will also - // be returned. It can be used in a subsequent ListDeploymentTargets call to - // return the next set of deployment targets in the list. + // If a large amount of information is returned, a token identifier is also + // returned. It can be used in a subsequent ListDeploymentTargets call to return + // the next set of deployment targets in the list. NextToken *string `locationName:"nextToken" type:"string"` // The unique IDs of deployment targets. @@ -9614,14 +9598,14 @@ func (s *ListDeploymentTargetsOutput) SetTargetIds(v []*string) *ListDeploymentT type ListDeploymentsInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` // A time range (start and end) for returning a subset of the list of deployments. CreateTimeRange *TimeRange `locationName:"createTimeRange" type:"structure"` - // The name of an existing deployment group for the specified application. + // The name of a deployment group for the specified application. DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` // A subset of deployments to list by status: @@ -9812,8 +9796,8 @@ type ListOnPremisesInstancesInput struct { // list. RegistrationStatus *string `locationName:"registrationStatus" type:"string" enum:"RegistrationStatus"` - // The on-premises instance tags that will be used to restrict the corresponding - // on-premises instance names returned. + // The on-premises instance tags that are used to restrict the on-premises instance + // names returned. TagFilters []*TagFilter `locationName:"tagFilters" type:"list"` } @@ -9845,7 +9829,7 @@ func (s *ListOnPremisesInstancesInput) SetTagFilters(v []*TagFilter) *ListOnPrem return s } -// Represents the output of list on-premises instances operation. +// Represents the output of the list on-premises instances operation. type ListOnPremisesInstancesOutput struct { _ struct{} `type:"structure"` @@ -9885,16 +9869,16 @@ func (s *ListOnPremisesInstancesOutput) SetNextToken(v string) *ListOnPremisesIn type LoadBalancerInfo struct { _ struct{} `type:"structure"` - // An array containing information about the load balancer to use for load balancing - // in a deployment. In Elastic Load Balancing, load balancers are used with - // Classic Load Balancers. + // An array that contains information about the load balancer to use for load + // balancing in a deployment. In Elastic Load Balancing, load balancers are + // used with Classic Load Balancers. // // Adding more than one load balancer to the array is not supported. ElbInfoList []*ELBInfo `locationName:"elbInfoList" type:"list"` - // An array containing information about the target group to use for load balancing - // in a deployment. In Elastic Load Balancing, target groups are used with Application - // Load Balancers. + // An array that contains information about the target group to use for load + // balancing in a deployment. In Elastic Load Balancing, target groups are used + // with Application Load Balancers. // // Adding more than one target group to the array is not supported. TargetGroupInfoList []*TargetGroupInfo `locationName:"targetGroupInfoList" type:"list"` @@ -9944,21 +9928,21 @@ type MinimumHealthyHosts struct { // of the total number of instance in the deployment. // // In an example of nine instance, if a HOST_COUNT of six is specified, deploy - // to up to three instances at a time. The deployment will be successful if - // six or more instances are deployed to successfully; otherwise, the deployment - // fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance - // at a time. The deployment will be successful if four or more instance are - // deployed to successfully; otherwise, the deployment fails. + // to up to three instances at a time. The deployment is successful if six or + // more instances are deployed to successfully. Otherwise, the deployment fails. + // If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a + // time. The deployment is successful if four or more instance are deployed + // to successfully. Otherwise, the deployment fails. // // In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime - // will return a minimum healthy instance type of MOST_CONCURRENCY and a value - // of 1. This means a deployment to only one instance at a time. (You cannot - // set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In - // addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy will try to ensure - // that all instances but one are kept in a healthy state during the deployment. + // returns a minimum healthy instance type of MOST_CONCURRENCY and a value of + // 1. This means a deployment to only one instance at a time. (You cannot set + // the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, + // with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that + // all instances but one are kept in a healthy state during the deployment. // Although this allows one instance at a time to be taken offline for a new // deployment, it also means that if the deployment to the last instance fails, - // the overall deployment still succeeds. + // the overall deployment is still successful. // // For more information, see AWS CodeDeploy Instance Health (http://docs.aws.amazon.com/codedeploy/latest/userguide/instances-health.html) // in the AWS CodeDeploy User Guide. @@ -9994,9 +9978,9 @@ func (s *MinimumHealthyHosts) SetValue(v int64) *MinimumHealthyHosts { type OnPremisesTagSet struct { _ struct{} `type:"structure"` - // A list containing other lists of on-premises instance tag groups. In order - // for an instance to be included in the deployment group, it must be identified - // by all the tag groups in the list. + // A list that contains other lists of on-premises instance tag groups. For + // an instance to be included in the deployment group, it must be identified + // by all of the tag groups in the list. OnPremisesTagSetList [][]*TagFilter `locationName:"onPremisesTagSetList" type:"list"` } @@ -10127,8 +10111,8 @@ func (s *RawString) SetSha256(v string) *RawString { type RegisterApplicationRevisionInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -10392,10 +10376,10 @@ type RevisionLocation struct { // * S3: An application revision stored in Amazon S3. // // * GitHub: An application revision stored in GitHub (EC2/On-premises deployments - // only) + // only). // // * String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments - // only) + // only). RevisionType *string `locationName:"revisionType" type:"string" enum:"RevisionLocationType"` // Information about the location of a revision stored in Amazon S3. @@ -10453,8 +10437,8 @@ type RollbackInfo struct { // The ID of the deployment rollback. RollbackDeploymentId *string `locationName:"rollbackDeploymentId" type:"string"` - // Information describing the status of a deployment rollback; for example, - // whether the deployment can't be rolled back, is in progress, failed, or succeeded. + // Information that describes the status of a deployment rollback (for example, + // whether the deployment can't be rolled back, is in progress, failed, or succeeded). RollbackMessage *string `locationName:"rollbackMessage" type:"string"` // The deployment ID of the deployment that was underway and triggered a rollback @@ -10511,7 +10495,7 @@ type S3Location struct { // the application revision. // // If the ETag is not specified as an input parameter, ETag validation of the - // object will be skipped. + // object is skipped. ETag *string `locationName:"eTag" type:"string"` // The name of the Amazon S3 object that represents the bundled artifacts for @@ -10521,7 +10505,7 @@ type S3Location struct { // A specific version of the Amazon S3 object that represents the bundled artifacts // for the application revision. // - // If the version is not specified, the system will use the most recent version + // If the version is not specified, the system uses the most recent version // by default. Version *string `locationName:"version" type:"string"` } @@ -10780,9 +10764,10 @@ type TargetGroupInfo struct { // For blue/green deployments, the name of the target group that instances in // the original environment are deregistered from, and instances in the replacement - // environment registered with. For in-place deployments, the name of the target - // group that instances are deregistered from, so they are not serving traffic - // during a deployment, and then re-registered with after the deployment completes. + // environment are registered with. For in-place deployments, the name of the + // target group that instances are deregistered from, so they are not serving + // traffic during a deployment, and then re-registered with after the deployment + // is complete. Name *string `locationName:"name" type:"string"` } @@ -10802,7 +10787,7 @@ func (s *TargetGroupInfo) SetName(v string) *TargetGroupInfo { return s } -// Information about two target groups and how traffic routes during an Amazon +// Information about two target groups and how traffic is routed during an Amazon // ECS deployment. An optional test traffic route can be specified. type TargetGroupPairInfo struct { _ struct{} `type:"structure"` @@ -10812,12 +10797,12 @@ type TargetGroupPairInfo struct { ProdTrafficRoute *TrafficRoute `locationName:"prodTrafficRoute" type:"structure"` // One pair of target groups. One is associated with the original task set. - // The second target is associated with the task set that serves traffic after - // the deployment completes. + // The second is associated with the task set that serves traffic after the + // deployment is complete. TargetGroups []*TargetGroupInfo `locationName:"targetGroups" type:"list"` // An optional path used by a load balancer to route test traffic after an Amazon - // ECS deployment. Validation can happen while test traffic is served during + // ECS deployment. Validation can occur while test traffic is served during // a deployment. TestTrafficRoute *TrafficRoute `locationName:"testTrafficRoute" type:"structure"` } @@ -11200,7 +11185,7 @@ type UpdateDeploymentGroupInput struct { // group is updated. AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - // The application name corresponding to the deployment group to update. + // The application name that corresponds to the deployment group to update. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -11237,13 +11222,13 @@ type UpdateDeploymentGroupInput struct { Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` // Information about groups of tags applied to on-premises instances. The deployment - // group will include only EC2 instances identified by all the tag groups. + // group includes only EC2 instances identified by all the tag groups. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` - // The target ECS services in the deployment group. This only applies to deployment - // groups that use the Amazon ECS compute platform. A target ECS service is - // specified as an Amazon ECS cluster and service name pair using the format - // :. + // The target Amazon ECS services in the deployment group. This applies only + // to deployment groups that use the Amazon ECS compute platform. A target Amazon + // ECS service is specified as an Amazon ECS cluster and service name pair using + // the format :. EcsServices []*ECSService `locationName:"ecsServices" type:"list"` // Information about the load balancer used in a deployment. @@ -11257,8 +11242,8 @@ type UpdateDeploymentGroupInput struct { // tags, do not enter any tag names. OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` - // Information about an on-premises instance tag set. The deployment group will - // include only on-premises instances identified by all the tag groups. + // Information about an on-premises instance tag set. The deployment group includes + // only on-premises instances identified by all the tag groups. OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` // A replacement ARN for the service role, if you want to change it. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go index 48544140b..472970920 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go @@ -5,14 +5,14 @@ // // AWS CodeDeploy is a deployment service that automates application deployments // to Amazon EC2 instances, on-premises instances running in your own facility, -// or serverless AWS Lambda functions. +// serverless AWS Lambda functions, or applications in an Amazon ECS service. // // You can deploy a nearly unlimited variety of application content, such as -// an updated Lambda function, code, web and configuration files, executables, -// packages, scripts, multimedia files, and so on. AWS CodeDeploy can deploy -// application content stored in Amazon S3 buckets, GitHub repositories, or -// Bitbucket repositories. You do not need to make changes to your existing -// code before you can use AWS CodeDeploy. +// an updated Lambda function, updated applications in an Amazon ECS service, +// code, web and configuration files, executables, packages, scripts, multimedia +// files, and so on. AWS CodeDeploy can deploy application content stored in +// Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do +// not need to make changes to your existing code before you can use AWS CodeDeploy. // // AWS CodeDeploy makes it easier for you to rapidly release new features, helps // you avoid downtime during application deployment, and handles the complexity @@ -29,30 +29,39 @@ // to ensure the correct combination of revision, deployment configuration, // and deployment group are referenced during a deployment. // -// * Deployment group: A set of individual instances or CodeDeploy Lambda -// applications. A Lambda deployment group contains a group of applications. -// An EC2/On-premises deployment group contains individually tagged instances, -// Amazon EC2 instances in Auto Scaling groups, or both. +// * Deployment group: A set of individual instances, CodeDeploy Lambda deployment +// configuration settings, or an Amazon ECS service and network details. +// A Lambda deployment group specifies how to route traffic to a new version +// of a Lambda function. An Amazon ECS deployment group specifies the service +// created in Amazon ECS to deploy, a load balancer, and a listener to reroute +// production traffic to an updated containerized application. An EC2/On-premises +// deployment group contains individually tagged instances, Amazon EC2 instances +// in Amazon EC2 Auto Scaling groups, or both. All deployment groups can +// specify optional trigger, alarm, and rollback settings. // // * Deployment configuration: A set of deployment rules and deployment success // and failure conditions used by AWS CodeDeploy during a deployment. // -// * Deployment: The process and the components used in the process of updating -// a Lambda function or of installing content on one or more instances. +// * Deployment: The process and the components used when updating a Lambda +// function, a containerized application in an Amazon ECS service, or of +// installing content on one or more instances. // // * Application revisions: For an AWS Lambda deployment, this is an AppSpec -// file that specifies the Lambda function to update and one or more functions -// to validate deployment lifecycle events. For an EC2/On-premises deployment, -// this is an archive file containing source content—source code, web pages, -// executable files, and deployment scripts—along with an AppSpec file. Revisions -// are stored in Amazon S3 buckets or GitHub repositories. For Amazon S3, -// a revision is uniquely identified by its Amazon S3 object key and its -// ETag, version, or both. For GitHub, a revision is uniquely identified -// by its commit ID. +// file that specifies the Lambda function to be updated and one or more +// functions to validate deployment lifecycle events. For an Amazon ECS deployment, +// this is an AppSpec file that specifies the Amazon ECS task definition, +// container, and port where production traffic is rerouted. For an EC2/On-premises +// deployment, this is an archive file that contains source content—source +// code, webpages, executable files, and deployment scripts—along with an +// AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. +// For Amazon S3, a revision is uniquely identified by its Amazon S3 object +// key and its ETag, version, or both. For GitHub, a revision is uniquely +// identified by its commit ID. // // This guide also contains information to help you get details about the instances // in your deployments, to make on-premises instances available for AWS CodeDeploy -// deployments, and to get details about a Lambda function deployment. +// deployments, to get details about a Lambda function deployment, and to get +// details about Amazon ECS service deployments. // // AWS CodeDeploy Information Resources // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go index bdf5503f5..50cfb414f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go @@ -13,14 +13,14 @@ const ( // ErrCodeApplicationAlreadyExistsException for service response error code // "ApplicationAlreadyExistsException". // - // An application with the specified name already exists with the applicable - // IAM user or AWS account. + // An application with the specified name with the IAM user or AWS account already + // exists. ErrCodeApplicationAlreadyExistsException = "ApplicationAlreadyExistsException" // ErrCodeApplicationDoesNotExistException for service response error code // "ApplicationDoesNotExistException". // - // The application does not exist with the applicable IAM user or AWS account. + // The application does not exist with the IAM user or AWS account. ErrCodeApplicationDoesNotExistException = "ApplicationDoesNotExistException" // ErrCodeApplicationLimitExceededException for service response error code @@ -56,15 +56,14 @@ const ( // ErrCodeDeploymentConfigAlreadyExistsException for service response error code // "DeploymentConfigAlreadyExistsException". // - // A deployment configuration with the specified name already exists with the - // applicable IAM user or AWS account. + // A deployment configuration with the specified name with the IAM user or AWS + // account already exists . ErrCodeDeploymentConfigAlreadyExistsException = "DeploymentConfigAlreadyExistsException" // ErrCodeDeploymentConfigDoesNotExistException for service response error code // "DeploymentConfigDoesNotExistException". // - // The deployment configuration does not exist with the applicable IAM user - // or AWS account. + // The deployment configuration does not exist with the IAM user or AWS account. ErrCodeDeploymentConfigDoesNotExistException = "DeploymentConfigDoesNotExistException" // ErrCodeDeploymentConfigInUseException for service response error code @@ -88,21 +87,20 @@ const ( // ErrCodeDeploymentDoesNotExistException for service response error code // "DeploymentDoesNotExistException". // - // The deployment does not exist with the applicable IAM user or AWS account. + // The deployment with the IAM user or AWS account does not exist. ErrCodeDeploymentDoesNotExistException = "DeploymentDoesNotExistException" // ErrCodeDeploymentGroupAlreadyExistsException for service response error code // "DeploymentGroupAlreadyExistsException". // - // A deployment group with the specified name already exists with the applicable - // IAM user or AWS account. + // A deployment group with the specified name with the IAM user or AWS account + // already exists. ErrCodeDeploymentGroupAlreadyExistsException = "DeploymentGroupAlreadyExistsException" // ErrCodeDeploymentGroupDoesNotExistException for service response error code // "DeploymentGroupDoesNotExistException". // - // The named deployment group does not exist with the applicable IAM user or - // AWS account. + // The named deployment group with the IAM user or AWS account does not exist. ErrCodeDeploymentGroupDoesNotExistException = "DeploymentGroupDoesNotExistException" // ErrCodeDeploymentGroupLimitExceededException for service response error code @@ -172,7 +170,7 @@ const ( // "ECSServiceMappingLimitExceededException". // // The Amazon ECS service is associated with more than one deployment groups. - // An ECS service can only be associated with one deployment group. + // An Amazon ECS service can be associated with only one deployment group. ErrCodeECSServiceMappingLimitExceededException = "ECSServiceMappingLimitExceededException" // ErrCodeGitHubAccountTokenDoesNotExistException for service response error code @@ -259,11 +257,11 @@ const ( // // * The alarm object is null. // - // * The alarm name is empty or null or exceeds the 255 character limit. + // * The alarm name is empty or null or exceeds the limit of 255 characters. // // * Two alarms with the same name have been specified. // - // * The alarm configuration is enabled but the alarm list is empty. + // * The alarm configuration is enabled, but the alarm list is empty. ErrCodeInvalidAlarmConfigException = "InvalidAlarmConfigException" // ErrCodeInvalidApplicationNameException for service response error code @@ -276,7 +274,7 @@ const ( // "InvalidAutoRollbackConfigException". // // The automatic rollback configuration was specified in an invalid format. - // For example, automatic rollback is enabled but an invalid triggering event + // For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. ErrCodeInvalidAutoRollbackConfigException = "InvalidAutoRollbackConfigException" @@ -347,14 +345,14 @@ const ( // "InvalidDeploymentStyleException". // // An invalid deployment style was specified. Valid deployment types include - // "IN_PLACE" and "BLUE_GREEN". Valid deployment options include "WITH_TRAFFIC_CONTROL" - // and "WITHOUT_TRAFFIC_CONTROL". + // "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" + // and "WITHOUT_TRAFFIC_CONTROL." ErrCodeInvalidDeploymentStyleException = "InvalidDeploymentStyleException" // ErrCodeInvalidDeploymentTargetIdException for service response error code // "InvalidDeploymentTargetIdException". // - // The target ID provide was not valid. + // The target ID provided was not valid. ErrCodeInvalidDeploymentTargetIdException = "InvalidDeploymentTargetIdException" // ErrCodeInvalidDeploymentWaitTypeException for service response error code @@ -386,9 +384,9 @@ const ( // "InvalidFileExistsBehaviorException". // // An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy - // handles files or directories that already exist in a deployment target location + // handles files or directories that already exist in a deployment target location, // but weren't part of the previous successful deployment. Valid values include - // "DISALLOW", "OVERWRITE", and "RETAIN". + // "DISALLOW," "OVERWRITE," and "RETAIN." ErrCodeInvalidFileExistsBehaviorException = "InvalidFileExistsBehaviorException" // ErrCodeInvalidGitHubAccountTokenException for service response error code @@ -425,13 +423,13 @@ const ( // ErrCodeInvalidInputException for service response error code // "InvalidInputException". // - // The specified input was specified in an invalid format. + // The input was specified in an invalid format. ErrCodeInvalidInputException = "InvalidInputException" // ErrCodeInvalidInstanceNameException for service response error code // "InvalidInstanceNameException". // - // The specified on-premises instance name was specified in an invalid format. + // The on-premises instance name was specified in an invalid format. ErrCodeInvalidInstanceNameException = "InvalidInstanceNameException" // ErrCodeInvalidInstanceStatusException for service response error code @@ -516,7 +514,7 @@ const ( // // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate - // permissions to Auto Scaling. + // permissions to Amazon EC2 Auto Scaling. ErrCodeInvalidRoleException = "InvalidRoleException" // ErrCodeInvalidSortByException for service response error code @@ -535,13 +533,13 @@ const ( // ErrCodeInvalidTagException for service response error code // "InvalidTagException". // - // The specified tag was specified in an invalid format. + // The tag was specified in an invalid format. ErrCodeInvalidTagException = "InvalidTagException" // ErrCodeInvalidTagFilterException for service response error code // "InvalidTagFilterException". // - // The specified tag filter was specified in an invalid format. + // The tag filter was specified in an invalid format. ErrCodeInvalidTagFilterException = "InvalidTagFilterException" // ErrCodeInvalidTargetFilterNameException for service response error code @@ -631,7 +629,7 @@ const ( // ErrCodeRevisionDoesNotExistException for service response error code // "RevisionDoesNotExistException". // - // The named revision does not exist with the applicable IAM user or AWS account. + // The named revision does not exist with the IAM user or AWS account. ErrCodeRevisionDoesNotExistException = "RevisionDoesNotExistException" // ErrCodeRevisionRequiredException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 0b0cbb9f3..61c48ee21 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -9888,6 +9888,128 @@ func (c *CognitoIdentityProvider) UpdateUserPoolClientWithContext(ctx aws.Contex return out, req.Send() } +const opUpdateUserPoolDomain = "UpdateUserPoolDomain" + +// UpdateUserPoolDomainRequest generates a "aws/request.Request" representing the +// client's request for the UpdateUserPoolDomain operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateUserPoolDomain for more information on using the UpdateUserPoolDomain +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateUserPoolDomainRequest method. +// req, resp := client.UpdateUserPoolDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolDomain +func (c *CognitoIdentityProvider) UpdateUserPoolDomainRequest(input *UpdateUserPoolDomainInput) (req *request.Request, output *UpdateUserPoolDomainOutput) { + op := &request.Operation{ + Name: opUpdateUserPoolDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateUserPoolDomainInput{} + } + + output = &UpdateUserPoolDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateUserPoolDomain API operation for Amazon Cognito Identity Provider. +// +// Updates the Secure Sockets Layer (SSL) certificate for the custom domain +// for your user pool. +// +// You can use this operation to provide the Amazon Resource Name (ARN) of a +// new certificate to Amazon Cognito. You cannot use it to change the domain +// for a user pool. +// +// A custom domain is used to host the Amazon Cognito hosted UI, which provides +// sign-up and sign-in pages for your application. When you set up a custom +// domain, you provide a certificate that you manage with AWS Certificate Manager +// (ACM). When necessary, you can use this operation to change the certificate +// that you applied to your custom domain. +// +// Usually, this is unnecessary following routine certificate renewal with ACM. +// When you renew your existing certificate in ACM, the ARN for your certificate +// remains the same, and your custom domain uses the new certificate automatically. +// +// However, if you replace your existing certificate with a new one, ACM gives +// the new certificate a new ARN. To apply the new certificate to your custom +// domain, you must provide this ARN to Amazon Cognito. +// +// When you add your new certificate in ACM, you must choose US East (N. Virginia) +// as the AWS Region. +// +// After you submit your request, Amazon Cognito requires up to 1 hour to distribute +// your new certificate to your custom domain. +// +// For more information about adding a custom domain to your user pool, see +// Using Your Own Domain for the Hosted UI (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Cognito Identity Provider's +// API operation UpdateUserPoolDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// This exception is thrown when the Amazon Cognito service encounters an invalid +// parameter. +// +// * ErrCodeNotAuthorizedException "NotAuthorizedException" +// This exception is thrown when a user is not authorized. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when the Amazon Cognito service cannot find the +// requested resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// This exception is thrown when the user has made too many requests for a given +// operation. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// This exception is thrown when Amazon Cognito encounters an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolDomain +func (c *CognitoIdentityProvider) UpdateUserPoolDomain(input *UpdateUserPoolDomainInput) (*UpdateUserPoolDomainOutput, error) { + req, out := c.UpdateUserPoolDomainRequest(input) + return out, req.Send() +} + +// UpdateUserPoolDomainWithContext is the same as UpdateUserPoolDomain with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateUserPoolDomain for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CognitoIdentityProvider) UpdateUserPoolDomainWithContext(ctx aws.Context, input *UpdateUserPoolDomainInput, opts ...request.Option) (*UpdateUserPoolDomainOutput, error) { + req, out := c.UpdateUserPoolDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVerifySoftwareToken = "VerifySoftwareToken" // VerifySoftwareTokenRequest generates a "aws/request.Request" representing the @@ -14949,7 +15071,15 @@ type CreateUserPoolClientInput struct { // UserPoolId is a required field UserPoolId *string `min:"1" type:"string" required:"true"` - // The write attributes. + // The user pool attributes that the app client can write to. + // + // If your app client allows users to sign in through an identity provider, + // this array must include all attributes that are mapped to identity provider + // attributes. Amazon Cognito updates mapped attributes when users sign in to + // your application through an identity provider. If your app client lacks write + // access to a mapped attribute, Amazon Cognito throws an error when it attempts + // to update the attribute. For more information, see Specifying Identity Provider + // Attribute Mappings for Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html). WriteAttributes []*string `type:"list"` } @@ -15113,8 +15243,8 @@ type CreateUserPoolDomainInput struct { // The configuration for a custom domain that hosts the sign-up and sign-in // webpages for your application. // - // Provide this parameter only if you want to use own custom domain for your - // user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito + // Provide this parameter only if you want to use a custom domain for your user + // pool. Otherwise, you can exclude this parameter and use the Amazon Cognito // hosted domain instead. // // For more information about the hosted domain and custom domains, see Configuring @@ -20636,6 +20766,13 @@ type SchemaAttributeType struct { DeveloperOnlyAttribute *bool `type:"boolean"` // Specifies whether the value of the attribute can be changed. + // + // For any user pool attribute that's mapped to an identity provider attribute, + // you must set this parameter to true. Amazon Cognito updates mapped attributes + // when users sign in to your application through an identity provider. If an + // attribute is immutable, Amazon Cognito throws an error when it attempts to + // update the attribute. For more information, see Specifying Identity Provider + // Attribute Mappings for Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html). Mutable *bool `type:"boolean"` // A schema attribute of the name type. @@ -22721,6 +22858,117 @@ func (s *UpdateUserPoolClientOutput) SetUserPoolClient(v *UserPoolClientType) *U return s } +// The UpdateUserPoolDomain request input. +type UpdateUserPoolDomainInput struct { + _ struct{} `type:"structure"` + + // The configuration for a custom domain that hosts the sign-up and sign-in + // pages for your application. Use this object to specify an SSL certificate + // that is managed by ACM. + // + // CustomDomainConfig is a required field + CustomDomainConfig *CustomDomainConfigType `type:"structure" required:"true"` + + // The domain name for the custom domain that hosts the sign-up and sign-in + // pages for your application. For example: auth.example.com. + // + // This string can include only lowercase letters, numbers, and hyphens. Do + // not use a hyphen for the first or last character. Use periods to separate + // subdomain names. + // + // Domain is a required field + Domain *string `min:"1" type:"string" required:"true"` + + // The ID of the user pool that is associated with the custom domain that you + // are updating the certificate for. + // + // UserPoolId is a required field + UserPoolId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateUserPoolDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUserPoolDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateUserPoolDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateUserPoolDomainInput"} + if s.CustomDomainConfig == nil { + invalidParams.Add(request.NewErrParamRequired("CustomDomainConfig")) + } + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.UserPoolId == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolId")) + } + if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) + } + if s.CustomDomainConfig != nil { + if err := s.CustomDomainConfig.Validate(); err != nil { + invalidParams.AddNested("CustomDomainConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomDomainConfig sets the CustomDomainConfig field's value. +func (s *UpdateUserPoolDomainInput) SetCustomDomainConfig(v *CustomDomainConfigType) *UpdateUserPoolDomainInput { + s.CustomDomainConfig = v + return s +} + +// SetDomain sets the Domain field's value. +func (s *UpdateUserPoolDomainInput) SetDomain(v string) *UpdateUserPoolDomainInput { + s.Domain = &v + return s +} + +// SetUserPoolId sets the UserPoolId field's value. +func (s *UpdateUserPoolDomainInput) SetUserPoolId(v string) *UpdateUserPoolDomainInput { + s.UserPoolId = &v + return s +} + +// The UpdateUserPoolDomain response output. +type UpdateUserPoolDomainOutput struct { + _ struct{} `type:"structure"` + + // The Amazon CloudFront endpoint that Amazon Cognito set up when you added + // the custom domain to your user pool. + CloudFrontDomain *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateUserPoolDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUserPoolDomainOutput) GoString() string { + return s.String() +} + +// SetCloudFrontDomain sets the CloudFrontDomain field's value. +func (s *UpdateUserPoolDomainOutput) SetCloudFrontDomain(v string) *UpdateUserPoolDomainOutput { + s.CloudFrontDomain = &v + return s +} + // Represents the request to update the user pool. type UpdateUserPoolInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go new file mode 100644 index 000000000..a8e52b677 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/api.go @@ -0,0 +1,728 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package costandusagereportservice + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opDeleteReportDefinition = "DeleteReportDefinition" + +// DeleteReportDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteReportDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteReportDefinition for more information on using the DeleteReportDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteReportDefinitionRequest method. +// req, resp := client.DeleteReportDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition +func (c *CostandUsageReportService) DeleteReportDefinitionRequest(input *DeleteReportDefinitionInput) (req *request.Request, output *DeleteReportDefinitionOutput) { + op := &request.Operation{ + Name: opDeleteReportDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteReportDefinitionInput{} + } + + output = &DeleteReportDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteReportDefinition API operation for AWS Cost and Usage Report Service. +// +// Delete a specified report definition +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cost and Usage Report Service's +// API operation DeleteReportDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// This exception is thrown on a known dependency failure. +// +// * ErrCodeValidationException "ValidationException" +// This exception is thrown when providing an invalid input. eg. Put a report +// preference with an invalid report name, or Delete a report preference with +// an empty report name. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DeleteReportDefinition +func (c *CostandUsageReportService) DeleteReportDefinition(input *DeleteReportDefinitionInput) (*DeleteReportDefinitionOutput, error) { + req, out := c.DeleteReportDefinitionRequest(input) + return out, req.Send() +} + +// DeleteReportDefinitionWithContext is the same as DeleteReportDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteReportDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CostandUsageReportService) DeleteReportDefinitionWithContext(ctx aws.Context, input *DeleteReportDefinitionInput, opts ...request.Option) (*DeleteReportDefinitionOutput, error) { + req, out := c.DeleteReportDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeReportDefinitions = "DescribeReportDefinitions" + +// DescribeReportDefinitionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReportDefinitions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReportDefinitions for more information on using the DescribeReportDefinitions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReportDefinitionsRequest method. +// req, resp := client.DescribeReportDefinitionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions +func (c *CostandUsageReportService) DescribeReportDefinitionsRequest(input *DescribeReportDefinitionsInput) (req *request.Request, output *DescribeReportDefinitionsOutput) { + op := &request.Operation{ + Name: opDescribeReportDefinitions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReportDefinitionsInput{} + } + + output = &DescribeReportDefinitionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReportDefinitions API operation for AWS Cost and Usage Report Service. +// +// Describe a list of report definitions owned by the account +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cost and Usage Report Service's +// API operation DescribeReportDefinitions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// This exception is thrown on a known dependency failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/DescribeReportDefinitions +func (c *CostandUsageReportService) DescribeReportDefinitions(input *DescribeReportDefinitionsInput) (*DescribeReportDefinitionsOutput, error) { + req, out := c.DescribeReportDefinitionsRequest(input) + return out, req.Send() +} + +// DescribeReportDefinitionsWithContext is the same as DescribeReportDefinitions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReportDefinitions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CostandUsageReportService) DescribeReportDefinitionsWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, opts ...request.Option) (*DescribeReportDefinitionsOutput, error) { + req, out := c.DescribeReportDefinitionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReportDefinitionsPages iterates over the pages of a DescribeReportDefinitions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReportDefinitions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeReportDefinitions operation. +// pageNum := 0 +// err := client.DescribeReportDefinitionsPages(params, +// func(page *DescribeReportDefinitionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CostandUsageReportService) DescribeReportDefinitionsPages(input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool) error { + return c.DescribeReportDefinitionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReportDefinitionsPagesWithContext same as DescribeReportDefinitionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CostandUsageReportService) DescribeReportDefinitionsPagesWithContext(ctx aws.Context, input *DescribeReportDefinitionsInput, fn func(*DescribeReportDefinitionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReportDefinitionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReportDefinitionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeReportDefinitionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPutReportDefinition = "PutReportDefinition" + +// PutReportDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the PutReportDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutReportDefinition for more information on using the PutReportDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutReportDefinitionRequest method. +// req, resp := client.PutReportDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition +func (c *CostandUsageReportService) PutReportDefinitionRequest(input *PutReportDefinitionInput) (req *request.Request, output *PutReportDefinitionOutput) { + op := &request.Operation{ + Name: opPutReportDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutReportDefinitionInput{} + } + + output = &PutReportDefinitionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutReportDefinition API operation for AWS Cost and Usage Report Service. +// +// Create a new report definition +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Cost and Usage Report Service's +// API operation PutReportDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDuplicateReportNameException "DuplicateReportNameException" +// This exception is thrown when putting a report preference with a name that +// already exists. +// +// * ErrCodeReportLimitReachedException "ReportLimitReachedException" +// This exception is thrown when the number of report preference reaches max +// limit. The max number is 5. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// This exception is thrown on a known dependency failure. +// +// * ErrCodeValidationException "ValidationException" +// This exception is thrown when providing an invalid input. eg. Put a report +// preference with an invalid report name, or Delete a report preference with +// an empty report name. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06/PutReportDefinition +func (c *CostandUsageReportService) PutReportDefinition(input *PutReportDefinitionInput) (*PutReportDefinitionOutput, error) { + req, out := c.PutReportDefinitionRequest(input) + return out, req.Send() +} + +// PutReportDefinitionWithContext is the same as PutReportDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See PutReportDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CostandUsageReportService) PutReportDefinitionWithContext(ctx aws.Context, input *PutReportDefinitionInput, opts ...request.Option) (*PutReportDefinitionOutput, error) { + req, out := c.PutReportDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Request of DeleteReportDefinition +type DeleteReportDefinitionInput struct { + _ struct{} `type:"structure"` + + // Preferred name for a report, it has to be unique. Must starts with a number/letter, + // case sensitive. Limited to 256 characters. + ReportName *string `type:"string"` +} + +// String returns the string representation +func (s DeleteReportDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteReportDefinitionInput) GoString() string { + return s.String() +} + +// SetReportName sets the ReportName field's value. +func (s *DeleteReportDefinitionInput) SetReportName(v string) *DeleteReportDefinitionInput { + s.ReportName = &v + return s +} + +// Response of DeleteReportDefinition +type DeleteReportDefinitionOutput struct { + _ struct{} `type:"structure"` + + // A message indicates if the deletion is successful. + ResponseMessage *string `type:"string"` +} + +// String returns the string representation +func (s DeleteReportDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteReportDefinitionOutput) GoString() string { + return s.String() +} + +// SetResponseMessage sets the ResponseMessage field's value. +func (s *DeleteReportDefinitionOutput) SetResponseMessage(v string) *DeleteReportDefinitionOutput { + s.ResponseMessage = &v + return s +} + +// Request of DescribeReportDefinitions +type DescribeReportDefinitionsInput struct { + _ struct{} `type:"structure"` + + // The max number of results returned by the operation. + MaxResults *int64 `min:"5" type:"integer"` + + // A generic string. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeReportDefinitionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReportDefinitionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeReportDefinitionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeReportDefinitionsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReportDefinitionsInput) SetMaxResults(v int64) *DescribeReportDefinitionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReportDefinitionsInput) SetNextToken(v string) *DescribeReportDefinitionsInput { + s.NextToken = &v + return s +} + +// Response of DescribeReportDefinitions +type DescribeReportDefinitionsOutput struct { + _ struct{} `type:"structure"` + + // A generic string. + NextToken *string `type:"string"` + + // A list of report definitions. + ReportDefinitions []*ReportDefinition `type:"list"` +} + +// String returns the string representation +func (s DescribeReportDefinitionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReportDefinitionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReportDefinitionsOutput) SetNextToken(v string) *DescribeReportDefinitionsOutput { + s.NextToken = &v + return s +} + +// SetReportDefinitions sets the ReportDefinitions field's value. +func (s *DescribeReportDefinitionsOutput) SetReportDefinitions(v []*ReportDefinition) *DescribeReportDefinitionsOutput { + s.ReportDefinitions = v + return s +} + +// Request of PutReportDefinition +type PutReportDefinitionInput struct { + _ struct{} `type:"structure"` + + // The definition of AWS Cost and Usage Report. Customer can specify the report + // name, time unit, report format, compression format, S3 bucket and additional + // artifacts and schema elements in the definition. + // + // ReportDefinition is a required field + ReportDefinition *ReportDefinition `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutReportDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutReportDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutReportDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutReportDefinitionInput"} + if s.ReportDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("ReportDefinition")) + } + if s.ReportDefinition != nil { + if err := s.ReportDefinition.Validate(); err != nil { + invalidParams.AddNested("ReportDefinition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReportDefinition sets the ReportDefinition field's value. +func (s *PutReportDefinitionInput) SetReportDefinition(v *ReportDefinition) *PutReportDefinitionInput { + s.ReportDefinition = v + return s +} + +// Response of PutReportDefinition +type PutReportDefinitionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutReportDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutReportDefinitionOutput) GoString() string { + return s.String() +} + +// The definition of AWS Cost and Usage Report. Customer can specify the report +// name, time unit, report format, compression format, S3 bucket and additional +// artifacts and schema elements in the definition. +type ReportDefinition struct { + _ struct{} `type:"structure"` + + // A list of additional artifacts. + AdditionalArtifacts []*string `type:"list"` + + // A list of schema elements. + // + // AdditionalSchemaElements is a required field + AdditionalSchemaElements []*string `type:"list" required:"true"` + + // Preferred compression format for report. + // + // Compression is a required field + Compression *string `type:"string" required:"true" enum:"CompressionFormat"` + + // Preferred format for report. + // + // Format is a required field + Format *string `type:"string" required:"true" enum:"ReportFormat"` + + // Preferred name for a report, it has to be unique. Must starts with a number/letter, + // case sensitive. Limited to 256 characters. + // + // ReportName is a required field + ReportName *string `type:"string" required:"true"` + + // Name of customer S3 bucket. + // + // S3Bucket is a required field + S3Bucket *string `type:"string" required:"true"` + + // Preferred report path prefix. Limited to 256 characters. + // + // S3Prefix is a required field + S3Prefix *string `type:"string" required:"true"` + + // Region of customer S3 bucket. + // + // S3Region is a required field + S3Region *string `type:"string" required:"true" enum:"AWSRegion"` + + // The frequency on which report data are measured and displayed. + // + // TimeUnit is a required field + TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"` +} + +// String returns the string representation +func (s ReportDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReportDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReportDefinition"} + if s.AdditionalSchemaElements == nil { + invalidParams.Add(request.NewErrParamRequired("AdditionalSchemaElements")) + } + if s.Compression == nil { + invalidParams.Add(request.NewErrParamRequired("Compression")) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.ReportName == nil { + invalidParams.Add(request.NewErrParamRequired("ReportName")) + } + if s.S3Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("S3Bucket")) + } + if s.S3Prefix == nil { + invalidParams.Add(request.NewErrParamRequired("S3Prefix")) + } + if s.S3Region == nil { + invalidParams.Add(request.NewErrParamRequired("S3Region")) + } + if s.TimeUnit == nil { + invalidParams.Add(request.NewErrParamRequired("TimeUnit")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdditionalArtifacts sets the AdditionalArtifacts field's value. +func (s *ReportDefinition) SetAdditionalArtifacts(v []*string) *ReportDefinition { + s.AdditionalArtifacts = v + return s +} + +// SetAdditionalSchemaElements sets the AdditionalSchemaElements field's value. +func (s *ReportDefinition) SetAdditionalSchemaElements(v []*string) *ReportDefinition { + s.AdditionalSchemaElements = v + return s +} + +// SetCompression sets the Compression field's value. +func (s *ReportDefinition) SetCompression(v string) *ReportDefinition { + s.Compression = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ReportDefinition) SetFormat(v string) *ReportDefinition { + s.Format = &v + return s +} + +// SetReportName sets the ReportName field's value. +func (s *ReportDefinition) SetReportName(v string) *ReportDefinition { + s.ReportName = &v + return s +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *ReportDefinition) SetS3Bucket(v string) *ReportDefinition { + s.S3Bucket = &v + return s +} + +// SetS3Prefix sets the S3Prefix field's value. +func (s *ReportDefinition) SetS3Prefix(v string) *ReportDefinition { + s.S3Prefix = &v + return s +} + +// SetS3Region sets the S3Region field's value. +func (s *ReportDefinition) SetS3Region(v string) *ReportDefinition { + s.S3Region = &v + return s +} + +// SetTimeUnit sets the TimeUnit field's value. +func (s *ReportDefinition) SetTimeUnit(v string) *ReportDefinition { + s.TimeUnit = &v + return s +} + +// Region of customer S3 bucket. +const ( + // AWSRegionUsEast1 is a AWSRegion enum value + AWSRegionUsEast1 = "us-east-1" + + // AWSRegionUsWest1 is a AWSRegion enum value + AWSRegionUsWest1 = "us-west-1" + + // AWSRegionUsWest2 is a AWSRegion enum value + AWSRegionUsWest2 = "us-west-2" + + // AWSRegionEuCentral1 is a AWSRegion enum value + AWSRegionEuCentral1 = "eu-central-1" + + // AWSRegionEuWest1 is a AWSRegion enum value + AWSRegionEuWest1 = "eu-west-1" + + // AWSRegionApSoutheast1 is a AWSRegion enum value + AWSRegionApSoutheast1 = "ap-southeast-1" + + // AWSRegionApSoutheast2 is a AWSRegion enum value + AWSRegionApSoutheast2 = "ap-southeast-2" + + // AWSRegionApNortheast1 is a AWSRegion enum value + AWSRegionApNortheast1 = "ap-northeast-1" +) + +// Enable support for Redshift and/or QuickSight. +const ( + // AdditionalArtifactRedshift is a AdditionalArtifact enum value + AdditionalArtifactRedshift = "REDSHIFT" + + // AdditionalArtifactQuicksight is a AdditionalArtifact enum value + AdditionalArtifactQuicksight = "QUICKSIGHT" +) + +// Preferred compression format for report. +const ( + // CompressionFormatZip is a CompressionFormat enum value + CompressionFormatZip = "ZIP" + + // CompressionFormatGzip is a CompressionFormat enum value + CompressionFormatGzip = "GZIP" +) + +// Preferred format for report. +const ( + // ReportFormatTextOrcsv is a ReportFormat enum value + ReportFormatTextOrcsv = "textORcsv" +) + +// Preference of including Resource IDs. You can include additional details +// about individual resource IDs in your report. +const ( + // SchemaElementResources is a SchemaElement enum value + SchemaElementResources = "RESOURCES" +) + +// The frequency on which report data are measured and displayed. +const ( + // TimeUnitHourly is a TimeUnit enum value + TimeUnitHourly = "HOURLY" + + // TimeUnitDaily is a TimeUnit enum value + TimeUnitDaily = "DAILY" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go new file mode 100644 index 000000000..5a3a46098 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package costandusagereportservice provides the client and types for making API +// requests to AWS Cost and Usage Report Service. +// +// All public APIs for AWS Cost and Usage Report service +// +// See https://docs.aws.amazon.com/goto/WebAPI/cur-2017-01-06 for more information on this service. +// +// See costandusagereportservice package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/ +// +// Using the Client +// +// To contact AWS Cost and Usage Report Service with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Cost and Usage Report Service client CostandUsageReportService for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/costandusagereportservice/#New +package costandusagereportservice diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go new file mode 100644 index 000000000..11a8d5209 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/errors.go @@ -0,0 +1,34 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package costandusagereportservice + +const ( + + // ErrCodeDuplicateReportNameException for service response error code + // "DuplicateReportNameException". + // + // This exception is thrown when putting a report preference with a name that + // already exists. + ErrCodeDuplicateReportNameException = "DuplicateReportNameException" + + // ErrCodeInternalErrorException for service response error code + // "InternalErrorException". + // + // This exception is thrown on a known dependency failure. + ErrCodeInternalErrorException = "InternalErrorException" + + // ErrCodeReportLimitReachedException for service response error code + // "ReportLimitReachedException". + // + // This exception is thrown when the number of report preference reaches max + // limit. The max number is 5. + ErrCodeReportLimitReachedException = "ReportLimitReachedException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // This exception is thrown when providing an invalid input. eg. Put a report + // preference with an invalid report name, or Delete a report preference with + // an empty report name. + ErrCodeValidationException = "ValidationException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go new file mode 100644 index 000000000..39e3cedfe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/costandusagereportservice/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package costandusagereportservice + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// CostandUsageReportService provides the API operation methods for making requests to +// AWS Cost and Usage Report Service. See this package's package overview docs +// for details on the service. +// +// CostandUsageReportService methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type CostandUsageReportService struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "cur" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Cost and Usage Report Service" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the CostandUsageReportService client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a CostandUsageReportService client from just a session. +// svc := costandusagereportservice.New(mySession) +// +// // Create a CostandUsageReportService client with additional configuration +// svc := costandusagereportservice.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *CostandUsageReportService { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "cur" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CostandUsageReportService { + svc := &CostandUsageReportService{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-01-06", + JSONVersion: "1.1", + TargetPrefix: "AWSOrigamiServiceGatewayService", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a CostandUsageReportService operation and runs any +// custom request initialization. +func (c *CostandUsageReportService) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go index 225f2d58c..d034d3f65 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go @@ -512,10 +512,10 @@ func (c *DatabaseMigrationService) WaitUntilReplicationTaskStoppedWithContext(ct } // WaitUntilTestConnectionSucceeds uses the AWS Database Migration Service API operation -// TestConnection to wait for a condition to be met before returning. +// DescribeConnections to wait for a condition to be met before returning. // If the condition is not met within the max attempt window, an error will // be returned. -func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceeds(input *TestConnectionInput) error { +func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceeds(input *DescribeConnectionsInput) error { return c.WaitUntilTestConnectionSucceedsWithContext(aws.BackgroundContext(), input) } @@ -527,7 +527,7 @@ func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceeds(input *TestCo // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceedsWithContext(ctx aws.Context, input *TestConnectionInput, opts ...request.WaiterOption) error { +func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceedsWithContext(ctx aws.Context, input *DescribeConnectionsInput, opts ...request.WaiterOption) error { w := request.Waiter{ Name: "WaitUntilTestConnectionSucceeds", MaxAttempts: 60, @@ -535,23 +535,23 @@ func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceedsWithContext(ct Acceptors: []request.WaiterAcceptor{ { State: request.SuccessWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Connection.Status", + Matcher: request.PathAllWaiterMatch, Argument: "Connections[].Status", Expected: "successful", }, { State: request.FailureWaiterState, - Matcher: request.PathWaiterMatch, Argument: "Connection.Status", + Matcher: request.PathAnyWaiterMatch, Argument: "Connections[].Status", Expected: "failed", }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *TestConnectionInput + var inCpy *DescribeConnectionsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.TestConnectionRequest(inCpy) + req, _ := c.DescribeConnectionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go new file mode 100644 index 000000000..1dac23346 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/api.go @@ -0,0 +1,4663 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package datapipeline + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opActivatePipeline = "ActivatePipeline" + +// ActivatePipelineRequest generates a "aws/request.Request" representing the +// client's request for the ActivatePipeline operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ActivatePipeline for more information on using the ActivatePipeline +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ActivatePipelineRequest method. +// req, resp := client.ActivatePipelineRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ActivatePipeline +func (c *DataPipeline) ActivatePipelineRequest(input *ActivatePipelineInput) (req *request.Request, output *ActivatePipelineOutput) { + op := &request.Operation{ + Name: opActivatePipeline, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ActivatePipelineInput{} + } + + output = &ActivatePipelineOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ActivatePipeline API operation for AWS Data Pipeline. +// +// Validates the specified pipeline and starts processing pipeline tasks. If +// the pipeline does not pass validation, activation fails. +// +// If you need to pause the pipeline to investigate an issue with a component, +// such as a data source or script, call DeactivatePipeline. +// +// To activate a finished pipeline, modify the end date for the pipeline and +// then activate it. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation ActivatePipeline for usage and error information. +// +// Returned Error Codes: +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ActivatePipeline +func (c *DataPipeline) ActivatePipeline(input *ActivatePipelineInput) (*ActivatePipelineOutput, error) { + req, out := c.ActivatePipelineRequest(input) + return out, req.Send() +} + +// ActivatePipelineWithContext is the same as ActivatePipeline with the addition of +// the ability to pass a context and additional request options. +// +// See ActivatePipeline for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) ActivatePipelineWithContext(ctx aws.Context, input *ActivatePipelineInput, opts ...request.Option) (*ActivatePipelineOutput, error) { + req, out := c.ActivatePipelineRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddTags = "AddTags" + +// AddTagsRequest generates a "aws/request.Request" representing the +// client's request for the AddTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddTags for more information on using the AddTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddTagsRequest method. +// req, resp := client.AddTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/AddTags +func (c *DataPipeline) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { + op := &request.Operation{ + Name: opAddTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddTagsInput{} + } + + output = &AddTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddTags API operation for AWS Data Pipeline. +// +// Adds or modifies tags for the specified pipeline. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation AddTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/AddTags +func (c *DataPipeline) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { + req, out := c.AddTagsRequest(input) + return out, req.Send() +} + +// AddTagsWithContext is the same as AddTags with the addition of +// the ability to pass a context and additional request options. +// +// See AddTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { + req, out := c.AddTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePipeline = "CreatePipeline" + +// CreatePipelineRequest generates a "aws/request.Request" representing the +// client's request for the CreatePipeline operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePipeline for more information on using the CreatePipeline +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePipelineRequest method. +// req, resp := client.CreatePipelineRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/CreatePipeline +func (c *DataPipeline) CreatePipelineRequest(input *CreatePipelineInput) (req *request.Request, output *CreatePipelineOutput) { + op := &request.Operation{ + Name: opCreatePipeline, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePipelineInput{} + } + + output = &CreatePipelineOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePipeline API operation for AWS Data Pipeline. +// +// Creates a new, empty pipeline. Use PutPipelineDefinition to populate the +// pipeline. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation CreatePipeline for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/CreatePipeline +func (c *DataPipeline) CreatePipeline(input *CreatePipelineInput) (*CreatePipelineOutput, error) { + req, out := c.CreatePipelineRequest(input) + return out, req.Send() +} + +// CreatePipelineWithContext is the same as CreatePipeline with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePipeline for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) CreatePipelineWithContext(ctx aws.Context, input *CreatePipelineInput, opts ...request.Option) (*CreatePipelineOutput, error) { + req, out := c.CreatePipelineRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeactivatePipeline = "DeactivatePipeline" + +// DeactivatePipelineRequest generates a "aws/request.Request" representing the +// client's request for the DeactivatePipeline operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeactivatePipeline for more information on using the DeactivatePipeline +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeactivatePipelineRequest method. +// req, resp := client.DeactivatePipelineRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeactivatePipeline +func (c *DataPipeline) DeactivatePipelineRequest(input *DeactivatePipelineInput) (req *request.Request, output *DeactivatePipelineOutput) { + op := &request.Operation{ + Name: opDeactivatePipeline, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeactivatePipelineInput{} + } + + output = &DeactivatePipelineOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeactivatePipeline API operation for AWS Data Pipeline. +// +// Deactivates the specified running pipeline. The pipeline is set to the DEACTIVATING +// state until the deactivation process completes. +// +// To resume a deactivated pipeline, use ActivatePipeline. By default, the pipeline +// resumes from the last completed execution. Optionally, you can specify the +// date and time to resume the pipeline. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation DeactivatePipeline for usage and error information. +// +// Returned Error Codes: +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeactivatePipeline +func (c *DataPipeline) DeactivatePipeline(input *DeactivatePipelineInput) (*DeactivatePipelineOutput, error) { + req, out := c.DeactivatePipelineRequest(input) + return out, req.Send() +} + +// DeactivatePipelineWithContext is the same as DeactivatePipeline with the addition of +// the ability to pass a context and additional request options. +// +// See DeactivatePipeline for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) DeactivatePipelineWithContext(ctx aws.Context, input *DeactivatePipelineInput, opts ...request.Option) (*DeactivatePipelineOutput, error) { + req, out := c.DeactivatePipelineRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePipeline = "DeletePipeline" + +// DeletePipelineRequest generates a "aws/request.Request" representing the +// client's request for the DeletePipeline operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePipeline for more information on using the DeletePipeline +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePipelineRequest method. +// req, resp := client.DeletePipelineRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeletePipeline +func (c *DataPipeline) DeletePipelineRequest(input *DeletePipelineInput) (req *request.Request, output *DeletePipelineOutput) { + op := &request.Operation{ + Name: opDeletePipeline, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeletePipelineInput{} + } + + output = &DeletePipelineOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePipeline API operation for AWS Data Pipeline. +// +// Deletes a pipeline, its pipeline definition, and its run history. AWS Data +// Pipeline attempts to cancel instances associated with the pipeline that are +// currently being processed by task runners. +// +// Deleting a pipeline cannot be undone. You cannot query or restore a deleted +// pipeline. To temporarily pause a pipeline instead of deleting it, call SetStatus +// with the status set to PAUSE on individual components. Components that are +// paused by SetStatus can be resumed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation DeletePipeline for usage and error information. +// +// Returned Error Codes: +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DeletePipeline +func (c *DataPipeline) DeletePipeline(input *DeletePipelineInput) (*DeletePipelineOutput, error) { + req, out := c.DeletePipelineRequest(input) + return out, req.Send() +} + +// DeletePipelineWithContext is the same as DeletePipeline with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePipeline for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) DeletePipelineWithContext(ctx aws.Context, input *DeletePipelineInput, opts ...request.Option) (*DeletePipelineOutput, error) { + req, out := c.DeletePipelineRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeObjects = "DescribeObjects" + +// DescribeObjectsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeObjects operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeObjects for more information on using the DescribeObjects +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeObjectsRequest method. +// req, resp := client.DescribeObjectsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribeObjects +func (c *DataPipeline) DescribeObjectsRequest(input *DescribeObjectsInput) (req *request.Request, output *DescribeObjectsOutput) { + op := &request.Operation{ + Name: opDescribeObjects, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"marker"}, + OutputTokens: []string{"marker"}, + LimitToken: "", + TruncationToken: "hasMoreResults", + }, + } + + if input == nil { + input = &DescribeObjectsInput{} + } + + output = &DescribeObjectsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeObjects API operation for AWS Data Pipeline. +// +// Gets the object definitions for a set of objects associated with the pipeline. +// Object definitions are composed of a set of fields that define the properties +// of the object. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation DescribeObjects for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribeObjects +func (c *DataPipeline) DescribeObjects(input *DescribeObjectsInput) (*DescribeObjectsOutput, error) { + req, out := c.DescribeObjectsRequest(input) + return out, req.Send() +} + +// DescribeObjectsWithContext is the same as DescribeObjects with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeObjects for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) DescribeObjectsWithContext(ctx aws.Context, input *DescribeObjectsInput, opts ...request.Option) (*DescribeObjectsOutput, error) { + req, out := c.DescribeObjectsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeObjectsPages iterates over the pages of a DescribeObjects operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeObjects method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeObjects operation. +// pageNum := 0 +// err := client.DescribeObjectsPages(params, +// func(page *DescribeObjectsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataPipeline) DescribeObjectsPages(input *DescribeObjectsInput, fn func(*DescribeObjectsOutput, bool) bool) error { + return c.DescribeObjectsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeObjectsPagesWithContext same as DescribeObjectsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) DescribeObjectsPagesWithContext(ctx aws.Context, input *DescribeObjectsInput, fn func(*DescribeObjectsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeObjectsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeObjectsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeObjectsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribePipelines = "DescribePipelines" + +// DescribePipelinesRequest generates a "aws/request.Request" representing the +// client's request for the DescribePipelines operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribePipelines for more information on using the DescribePipelines +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribePipelinesRequest method. +// req, resp := client.DescribePipelinesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribePipelines +func (c *DataPipeline) DescribePipelinesRequest(input *DescribePipelinesInput) (req *request.Request, output *DescribePipelinesOutput) { + op := &request.Operation{ + Name: opDescribePipelines, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePipelinesInput{} + } + + output = &DescribePipelinesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePipelines API operation for AWS Data Pipeline. +// +// Retrieves metadata about one or more pipelines. The information retrieved +// includes the name of the pipeline, the pipeline identifier, its current state, +// and the user account that owns the pipeline. Using account credentials, you +// can retrieve metadata about pipelines that you or your IAM users have created. +// If you are using an IAM user account, you can retrieve metadata about only +// those pipelines for which you have read permissions. +// +// To retrieve the full pipeline definition instead of metadata about the pipeline, +// call GetPipelineDefinition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation DescribePipelines for usage and error information. +// +// Returned Error Codes: +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/DescribePipelines +func (c *DataPipeline) DescribePipelines(input *DescribePipelinesInput) (*DescribePipelinesOutput, error) { + req, out := c.DescribePipelinesRequest(input) + return out, req.Send() +} + +// DescribePipelinesWithContext is the same as DescribePipelines with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePipelines for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) DescribePipelinesWithContext(ctx aws.Context, input *DescribePipelinesInput, opts ...request.Option) (*DescribePipelinesOutput, error) { + req, out := c.DescribePipelinesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEvaluateExpression = "EvaluateExpression" + +// EvaluateExpressionRequest generates a "aws/request.Request" representing the +// client's request for the EvaluateExpression operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EvaluateExpression for more information on using the EvaluateExpression +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EvaluateExpressionRequest method. +// req, resp := client.EvaluateExpressionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/EvaluateExpression +func (c *DataPipeline) EvaluateExpressionRequest(input *EvaluateExpressionInput) (req *request.Request, output *EvaluateExpressionOutput) { + op := &request.Operation{ + Name: opEvaluateExpression, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EvaluateExpressionInput{} + } + + output = &EvaluateExpressionOutput{} + req = c.newRequest(op, input, output) + return +} + +// EvaluateExpression API operation for AWS Data Pipeline. +// +// Task runners call EvaluateExpression to evaluate a string in the context +// of the specified object. For example, a task runner can evaluate SQL queries +// stored in Amazon S3. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation EvaluateExpression for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeTaskNotFoundException "TaskNotFoundException" +// The specified task was not found. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/EvaluateExpression +func (c *DataPipeline) EvaluateExpression(input *EvaluateExpressionInput) (*EvaluateExpressionOutput, error) { + req, out := c.EvaluateExpressionRequest(input) + return out, req.Send() +} + +// EvaluateExpressionWithContext is the same as EvaluateExpression with the addition of +// the ability to pass a context and additional request options. +// +// See EvaluateExpression for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) EvaluateExpressionWithContext(ctx aws.Context, input *EvaluateExpressionInput, opts ...request.Option) (*EvaluateExpressionOutput, error) { + req, out := c.EvaluateExpressionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPipelineDefinition = "GetPipelineDefinition" + +// GetPipelineDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the GetPipelineDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetPipelineDefinition for more information on using the GetPipelineDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetPipelineDefinitionRequest method. +// req, resp := client.GetPipelineDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/GetPipelineDefinition +func (c *DataPipeline) GetPipelineDefinitionRequest(input *GetPipelineDefinitionInput) (req *request.Request, output *GetPipelineDefinitionOutput) { + op := &request.Operation{ + Name: opGetPipelineDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetPipelineDefinitionInput{} + } + + output = &GetPipelineDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPipelineDefinition API operation for AWS Data Pipeline. +// +// Gets the definition of the specified pipeline. You can call GetPipelineDefinition +// to retrieve the pipeline definition that you provided using PutPipelineDefinition. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation GetPipelineDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/GetPipelineDefinition +func (c *DataPipeline) GetPipelineDefinition(input *GetPipelineDefinitionInput) (*GetPipelineDefinitionOutput, error) { + req, out := c.GetPipelineDefinitionRequest(input) + return out, req.Send() +} + +// GetPipelineDefinitionWithContext is the same as GetPipelineDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See GetPipelineDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) GetPipelineDefinitionWithContext(ctx aws.Context, input *GetPipelineDefinitionInput, opts ...request.Option) (*GetPipelineDefinitionOutput, error) { + req, out := c.GetPipelineDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPipelines = "ListPipelines" + +// ListPipelinesRequest generates a "aws/request.Request" representing the +// client's request for the ListPipelines operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPipelines for more information on using the ListPipelines +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPipelinesRequest method. +// req, resp := client.ListPipelinesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ListPipelines +func (c *DataPipeline) ListPipelinesRequest(input *ListPipelinesInput) (req *request.Request, output *ListPipelinesOutput) { + op := &request.Operation{ + Name: opListPipelines, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"marker"}, + OutputTokens: []string{"marker"}, + LimitToken: "", + TruncationToken: "hasMoreResults", + }, + } + + if input == nil { + input = &ListPipelinesInput{} + } + + output = &ListPipelinesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPipelines API operation for AWS Data Pipeline. +// +// Lists the pipeline identifiers for all active pipelines that you have permission +// to access. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation ListPipelines for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ListPipelines +func (c *DataPipeline) ListPipelines(input *ListPipelinesInput) (*ListPipelinesOutput, error) { + req, out := c.ListPipelinesRequest(input) + return out, req.Send() +} + +// ListPipelinesWithContext is the same as ListPipelines with the addition of +// the ability to pass a context and additional request options. +// +// See ListPipelines for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) ListPipelinesWithContext(ctx aws.Context, input *ListPipelinesInput, opts ...request.Option) (*ListPipelinesOutput, error) { + req, out := c.ListPipelinesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPipelinesPages iterates over the pages of a ListPipelines operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPipelines method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPipelines operation. +// pageNum := 0 +// err := client.ListPipelinesPages(params, +// func(page *ListPipelinesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataPipeline) ListPipelinesPages(input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool) error { + return c.ListPipelinesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPipelinesPagesWithContext same as ListPipelinesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) ListPipelinesPagesWithContext(ctx aws.Context, input *ListPipelinesInput, fn func(*ListPipelinesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPipelinesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPipelinesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPipelinesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPollForTask = "PollForTask" + +// PollForTaskRequest generates a "aws/request.Request" representing the +// client's request for the PollForTask operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PollForTask for more information on using the PollForTask +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PollForTaskRequest method. +// req, resp := client.PollForTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PollForTask +func (c *DataPipeline) PollForTaskRequest(input *PollForTaskInput) (req *request.Request, output *PollForTaskOutput) { + op := &request.Operation{ + Name: opPollForTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PollForTaskInput{} + } + + output = &PollForTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// PollForTask API operation for AWS Data Pipeline. +// +// Task runners call PollForTask to receive a task to perform from AWS Data +// Pipeline. The task runner specifies which tasks it can perform by setting +// a value for the workerGroup parameter. The task returned can come from any +// of the pipelines that match the workerGroup value passed in by the task runner +// and that was launched using the IAM user credentials specified by the task +// runner. +// +// If tasks are ready in the work queue, PollForTask returns a response immediately. +// If no tasks are available in the queue, PollForTask uses long-polling and +// holds on to a poll connection for up to a 90 seconds, during which time the +// first newly scheduled task is handed to the task runner. To accomodate this, +// set the socket timeout in your task runner to 90 seconds. The task runner +// should not call PollForTask again on the same workerGroup until it receives +// a response, and this can take up to 90 seconds. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation PollForTask for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodeTaskNotFoundException "TaskNotFoundException" +// The specified task was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PollForTask +func (c *DataPipeline) PollForTask(input *PollForTaskInput) (*PollForTaskOutput, error) { + req, out := c.PollForTaskRequest(input) + return out, req.Send() +} + +// PollForTaskWithContext is the same as PollForTask with the addition of +// the ability to pass a context and additional request options. +// +// See PollForTask for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) PollForTaskWithContext(ctx aws.Context, input *PollForTaskInput, opts ...request.Option) (*PollForTaskOutput, error) { + req, out := c.PollForTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPipelineDefinition = "PutPipelineDefinition" + +// PutPipelineDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the PutPipelineDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPipelineDefinition for more information on using the PutPipelineDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPipelineDefinitionRequest method. +// req, resp := client.PutPipelineDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PutPipelineDefinition +func (c *DataPipeline) PutPipelineDefinitionRequest(input *PutPipelineDefinitionInput) (req *request.Request, output *PutPipelineDefinitionOutput) { + op := &request.Operation{ + Name: opPutPipelineDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutPipelineDefinitionInput{} + } + + output = &PutPipelineDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutPipelineDefinition API operation for AWS Data Pipeline. +// +// Adds tasks, schedules, and preconditions to the specified pipeline. You can +// use PutPipelineDefinition to populate a new pipeline. +// +// PutPipelineDefinition also validates the configuration as it adds it to the +// pipeline. Changes to the pipeline are saved unless one of the following three +// validation errors exists in the pipeline. +// +// An object is missing a name or identifier field. +// A string or reference field is empty. +// The number of objects in the pipeline exceeds the maximum allowed objects. +// +// The pipeline is in a FINISHED state. +// Pipeline object definitions are passed to the PutPipelineDefinition action +// and returned by the GetPipelineDefinition action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation PutPipelineDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/PutPipelineDefinition +func (c *DataPipeline) PutPipelineDefinition(input *PutPipelineDefinitionInput) (*PutPipelineDefinitionOutput, error) { + req, out := c.PutPipelineDefinitionRequest(input) + return out, req.Send() +} + +// PutPipelineDefinitionWithContext is the same as PutPipelineDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See PutPipelineDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) PutPipelineDefinitionWithContext(ctx aws.Context, input *PutPipelineDefinitionInput, opts ...request.Option) (*PutPipelineDefinitionOutput, error) { + req, out := c.PutPipelineDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opQueryObjects = "QueryObjects" + +// QueryObjectsRequest generates a "aws/request.Request" representing the +// client's request for the QueryObjects operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See QueryObjects for more information on using the QueryObjects +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the QueryObjectsRequest method. +// req, resp := client.QueryObjectsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/QueryObjects +func (c *DataPipeline) QueryObjectsRequest(input *QueryObjectsInput) (req *request.Request, output *QueryObjectsOutput) { + op := &request.Operation{ + Name: opQueryObjects, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"marker"}, + OutputTokens: []string{"marker"}, + LimitToken: "limit", + TruncationToken: "hasMoreResults", + }, + } + + if input == nil { + input = &QueryObjectsInput{} + } + + output = &QueryObjectsOutput{} + req = c.newRequest(op, input, output) + return +} + +// QueryObjects API operation for AWS Data Pipeline. +// +// Queries the specified pipeline for the names of objects that match the specified +// set of conditions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation QueryObjects for usage and error information. +// +// Returned Error Codes: +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/QueryObjects +func (c *DataPipeline) QueryObjects(input *QueryObjectsInput) (*QueryObjectsOutput, error) { + req, out := c.QueryObjectsRequest(input) + return out, req.Send() +} + +// QueryObjectsWithContext is the same as QueryObjects with the addition of +// the ability to pass a context and additional request options. +// +// See QueryObjects for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) QueryObjectsWithContext(ctx aws.Context, input *QueryObjectsInput, opts ...request.Option) (*QueryObjectsOutput, error) { + req, out := c.QueryObjectsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// QueryObjectsPages iterates over the pages of a QueryObjects operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See QueryObjects method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a QueryObjects operation. +// pageNum := 0 +// err := client.QueryObjectsPages(params, +// func(page *QueryObjectsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DataPipeline) QueryObjectsPages(input *QueryObjectsInput, fn func(*QueryObjectsOutput, bool) bool) error { + return c.QueryObjectsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// QueryObjectsPagesWithContext same as QueryObjectsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) QueryObjectsPagesWithContext(ctx aws.Context, input *QueryObjectsInput, fn func(*QueryObjectsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *QueryObjectsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.QueryObjectsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*QueryObjectsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opRemoveTags = "RemoveTags" + +// RemoveTagsRequest generates a "aws/request.Request" representing the +// client's request for the RemoveTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveTags for more information on using the RemoveTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveTagsRequest method. +// req, resp := client.RemoveTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/RemoveTags +func (c *DataPipeline) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { + op := &request.Operation{ + Name: opRemoveTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveTagsInput{} + } + + output = &RemoveTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveTags API operation for AWS Data Pipeline. +// +// Removes existing tags from the specified pipeline. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation RemoveTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/RemoveTags +func (c *DataPipeline) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { + req, out := c.RemoveTagsRequest(input) + return out, req.Send() +} + +// RemoveTagsWithContext is the same as RemoveTags with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { + req, out := c.RemoveTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opReportTaskProgress = "ReportTaskProgress" + +// ReportTaskProgressRequest generates a "aws/request.Request" representing the +// client's request for the ReportTaskProgress operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ReportTaskProgress for more information on using the ReportTaskProgress +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ReportTaskProgressRequest method. +// req, resp := client.ReportTaskProgressRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskProgress +func (c *DataPipeline) ReportTaskProgressRequest(input *ReportTaskProgressInput) (req *request.Request, output *ReportTaskProgressOutput) { + op := &request.Operation{ + Name: opReportTaskProgress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReportTaskProgressInput{} + } + + output = &ReportTaskProgressOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReportTaskProgress API operation for AWS Data Pipeline. +// +// Task runners call ReportTaskProgress when assigned a task to acknowledge +// that it has the task. If the web service does not receive this acknowledgement +// within 2 minutes, it assigns the task in a subsequent PollForTask call. After +// this initial acknowledgement, the task runner only needs to report progress +// every 15 minutes to maintain its ownership of the task. You can change this +// reporting time from 15 minutes by specifying a reportProgressTimeout field +// in your pipeline. +// +// If a task runner does not report its status after 5 minutes, AWS Data Pipeline +// assumes that the task runner is unable to process the task and reassigns +// the task in a subsequent response to PollForTask. Task runners should call +// ReportTaskProgress every 60 seconds. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation ReportTaskProgress for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodeTaskNotFoundException "TaskNotFoundException" +// The specified task was not found. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskProgress +func (c *DataPipeline) ReportTaskProgress(input *ReportTaskProgressInput) (*ReportTaskProgressOutput, error) { + req, out := c.ReportTaskProgressRequest(input) + return out, req.Send() +} + +// ReportTaskProgressWithContext is the same as ReportTaskProgress with the addition of +// the ability to pass a context and additional request options. +// +// See ReportTaskProgress for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) ReportTaskProgressWithContext(ctx aws.Context, input *ReportTaskProgressInput, opts ...request.Option) (*ReportTaskProgressOutput, error) { + req, out := c.ReportTaskProgressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opReportTaskRunnerHeartbeat = "ReportTaskRunnerHeartbeat" + +// ReportTaskRunnerHeartbeatRequest generates a "aws/request.Request" representing the +// client's request for the ReportTaskRunnerHeartbeat operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ReportTaskRunnerHeartbeat for more information on using the ReportTaskRunnerHeartbeat +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ReportTaskRunnerHeartbeatRequest method. +// req, resp := client.ReportTaskRunnerHeartbeatRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskRunnerHeartbeat +func (c *DataPipeline) ReportTaskRunnerHeartbeatRequest(input *ReportTaskRunnerHeartbeatInput) (req *request.Request, output *ReportTaskRunnerHeartbeatOutput) { + op := &request.Operation{ + Name: opReportTaskRunnerHeartbeat, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReportTaskRunnerHeartbeatInput{} + } + + output = &ReportTaskRunnerHeartbeatOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReportTaskRunnerHeartbeat API operation for AWS Data Pipeline. +// +// Task runners call ReportTaskRunnerHeartbeat every 15 minutes to indicate +// that they are operational. If the AWS Data Pipeline Task Runner is launched +// on a resource managed by AWS Data Pipeline, the web service can use this +// call to detect when the task runner application has failed and restart a +// new instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation ReportTaskRunnerHeartbeat for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ReportTaskRunnerHeartbeat +func (c *DataPipeline) ReportTaskRunnerHeartbeat(input *ReportTaskRunnerHeartbeatInput) (*ReportTaskRunnerHeartbeatOutput, error) { + req, out := c.ReportTaskRunnerHeartbeatRequest(input) + return out, req.Send() +} + +// ReportTaskRunnerHeartbeatWithContext is the same as ReportTaskRunnerHeartbeat with the addition of +// the ability to pass a context and additional request options. +// +// See ReportTaskRunnerHeartbeat for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) ReportTaskRunnerHeartbeatWithContext(ctx aws.Context, input *ReportTaskRunnerHeartbeatInput, opts ...request.Option) (*ReportTaskRunnerHeartbeatOutput, error) { + req, out := c.ReportTaskRunnerHeartbeatRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSetStatus = "SetStatus" + +// SetStatusRequest generates a "aws/request.Request" representing the +// client's request for the SetStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SetStatus for more information on using the SetStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SetStatusRequest method. +// req, resp := client.SetStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetStatus +func (c *DataPipeline) SetStatusRequest(input *SetStatusInput) (req *request.Request, output *SetStatusOutput) { + op := &request.Operation{ + Name: opSetStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SetStatusInput{} + } + + output = &SetStatusOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// SetStatus API operation for AWS Data Pipeline. +// +// Requests that the status of the specified physical or logical pipeline objects +// be updated in the specified pipeline. This update might not occur immediately, +// but is eventually consistent. The status that can be set depends on the type +// of object (for example, DataNode or Activity). You cannot perform this operation +// on FINISHED pipelines and attempting to do so returns InvalidRequestException. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation SetStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetStatus +func (c *DataPipeline) SetStatus(input *SetStatusInput) (*SetStatusOutput, error) { + req, out := c.SetStatusRequest(input) + return out, req.Send() +} + +// SetStatusWithContext is the same as SetStatus with the addition of +// the ability to pass a context and additional request options. +// +// See SetStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) SetStatusWithContext(ctx aws.Context, input *SetStatusInput, opts ...request.Option) (*SetStatusOutput, error) { + req, out := c.SetStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSetTaskStatus = "SetTaskStatus" + +// SetTaskStatusRequest generates a "aws/request.Request" representing the +// client's request for the SetTaskStatus operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SetTaskStatus for more information on using the SetTaskStatus +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SetTaskStatusRequest method. +// req, resp := client.SetTaskStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetTaskStatus +func (c *DataPipeline) SetTaskStatusRequest(input *SetTaskStatusInput) (req *request.Request, output *SetTaskStatusOutput) { + op := &request.Operation{ + Name: opSetTaskStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SetTaskStatusInput{} + } + + output = &SetTaskStatusOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// SetTaskStatus API operation for AWS Data Pipeline. +// +// Task runners call SetTaskStatus to notify AWS Data Pipeline that a task is +// completed and provide information about the final status. A task runner makes +// this call regardless of whether the task was sucessful. A task runner does +// not need to call SetTaskStatus for tasks that are canceled by the web service +// during a call to ReportTaskProgress. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation SetTaskStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeTaskNotFoundException "TaskNotFoundException" +// The specified task was not found. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/SetTaskStatus +func (c *DataPipeline) SetTaskStatus(input *SetTaskStatusInput) (*SetTaskStatusOutput, error) { + req, out := c.SetTaskStatusRequest(input) + return out, req.Send() +} + +// SetTaskStatusWithContext is the same as SetTaskStatus with the addition of +// the ability to pass a context and additional request options. +// +// See SetTaskStatus for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) SetTaskStatusWithContext(ctx aws.Context, input *SetTaskStatusInput, opts ...request.Option) (*SetTaskStatusOutput, error) { + req, out := c.SetTaskStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opValidatePipelineDefinition = "ValidatePipelineDefinition" + +// ValidatePipelineDefinitionRequest generates a "aws/request.Request" representing the +// client's request for the ValidatePipelineDefinition operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ValidatePipelineDefinition for more information on using the ValidatePipelineDefinition +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ValidatePipelineDefinitionRequest method. +// req, resp := client.ValidatePipelineDefinitionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ValidatePipelineDefinition +func (c *DataPipeline) ValidatePipelineDefinitionRequest(input *ValidatePipelineDefinitionInput) (req *request.Request, output *ValidatePipelineDefinitionOutput) { + op := &request.Operation{ + Name: opValidatePipelineDefinition, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ValidatePipelineDefinitionInput{} + } + + output = &ValidatePipelineDefinitionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ValidatePipelineDefinition API operation for AWS Data Pipeline. +// +// Validates the specified pipeline definition to ensure that it is well formed +// and can be run without error. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Data Pipeline's +// API operation ValidatePipelineDefinition for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceError "InternalServiceError" +// An internal service error occurred. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request was not valid. Verify that your request was properly formatted, +// that the signature was generated with the correct credentials, and that you +// haven't exceeded any of the service limits for your account. +// +// * ErrCodePipelineNotFoundException "PipelineNotFoundException" +// The specified pipeline was not found. Verify that you used the correct user +// and account identifiers. +// +// * ErrCodePipelineDeletedException "PipelineDeletedException" +// The specified pipeline has been deleted. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29/ValidatePipelineDefinition +func (c *DataPipeline) ValidatePipelineDefinition(input *ValidatePipelineDefinitionInput) (*ValidatePipelineDefinitionOutput, error) { + req, out := c.ValidatePipelineDefinitionRequest(input) + return out, req.Send() +} + +// ValidatePipelineDefinitionWithContext is the same as ValidatePipelineDefinition with the addition of +// the ability to pass a context and additional request options. +// +// See ValidatePipelineDefinition for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DataPipeline) ValidatePipelineDefinitionWithContext(ctx aws.Context, input *ValidatePipelineDefinitionInput, opts ...request.Option) (*ValidatePipelineDefinitionOutput, error) { + req, out := c.ValidatePipelineDefinitionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains the parameters for ActivatePipeline. +type ActivatePipelineInput struct { + _ struct{} `type:"structure"` + + // A list of parameter values to pass to the pipeline at activation. + ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The date and time to resume the pipeline. By default, the pipeline resumes + // from the last completed execution. + StartTimestamp *time.Time `locationName:"startTimestamp" type:"timestamp"` +} + +// String returns the string representation +func (s ActivatePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivatePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ActivatePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ActivatePipelineInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.ParameterValues != nil { + for i, v := range s.ParameterValues { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterValues", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameterValues sets the ParameterValues field's value. +func (s *ActivatePipelineInput) SetParameterValues(v []*ParameterValue) *ActivatePipelineInput { + s.ParameterValues = v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *ActivatePipelineInput) SetPipelineId(v string) *ActivatePipelineInput { + s.PipelineId = &v + return s +} + +// SetStartTimestamp sets the StartTimestamp field's value. +func (s *ActivatePipelineInput) SetStartTimestamp(v time.Time) *ActivatePipelineInput { + s.StartTimestamp = &v + return s +} + +// Contains the output of ActivatePipeline. +type ActivatePipelineOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ActivatePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivatePipelineOutput) GoString() string { + return s.String() +} + +// Contains the parameters for AddTags. +type AddTagsInput struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The tags to add, as key/value pairs. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s AddTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineId sets the PipelineId field's value. +func (s *AddTagsInput) SetPipelineId(v string) *AddTagsInput { + s.PipelineId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { + s.Tags = v + return s +} + +// Contains the output of AddTags. +type AddTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsOutput) GoString() string { + return s.String() +} + +// Contains the parameters for CreatePipeline. +type CreatePipelineInput struct { + _ struct{} `type:"structure"` + + // The description for the pipeline. + Description *string `locationName:"description" type:"string"` + + // The name for the pipeline. You can use the same name for multiple pipelines + // associated with your AWS account, because AWS Data Pipeline assigns each + // pipeline a unique pipeline identifier. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // A list of tags to associate with the pipeline at creation. Tags let you control + // access to pipelines. For more information, see Controlling User Access to + // Pipelines (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) + // in the AWS Data Pipeline Developer Guide. + Tags []*Tag `locationName:"tags" type:"list"` + + // A unique identifier. This identifier is not the same as the pipeline identifier + // assigned by AWS Data Pipeline. You are responsible for defining the format + // and ensuring the uniqueness of this identifier. You use this parameter to + // ensure idempotency during repeated calls to CreatePipeline. For example, + // if the first call to CreatePipeline does not succeed, you can pass in the + // same unique identifier and pipeline name combination on a subsequent call + // to CreatePipeline. CreatePipeline ensures that if a pipeline already exists + // with the same name and unique identifier, a new pipeline is not created. + // Instead, you'll receive the pipeline identifier from the previous attempt. + // The uniqueness of the name and unique identifier combination is scoped to + // the AWS account or IAM user credentials. + // + // UniqueId is a required field + UniqueId *string `locationName:"uniqueId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreatePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePipelineInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.UniqueId == nil { + invalidParams.Add(request.NewErrParamRequired("UniqueId")) + } + if s.UniqueId != nil && len(*s.UniqueId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UniqueId", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreatePipelineInput) SetDescription(v string) *CreatePipelineInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreatePipelineInput) SetName(v string) *CreatePipelineInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreatePipelineInput) SetTags(v []*Tag) *CreatePipelineInput { + s.Tags = v + return s +} + +// SetUniqueId sets the UniqueId field's value. +func (s *CreatePipelineInput) SetUniqueId(v string) *CreatePipelineInput { + s.UniqueId = &v + return s +} + +// Contains the output of CreatePipeline. +type CreatePipelineOutput struct { + _ struct{} `type:"structure"` + + // The ID that AWS Data Pipeline assigns the newly created pipeline. For example, + // df-06372391ZG65EXAMPLE. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreatePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePipelineOutput) GoString() string { + return s.String() +} + +// SetPipelineId sets the PipelineId field's value. +func (s *CreatePipelineOutput) SetPipelineId(v string) *CreatePipelineOutput { + s.PipelineId = &v + return s +} + +// Contains the parameters for DeactivatePipeline. +type DeactivatePipelineInput struct { + _ struct{} `type:"structure"` + + // Indicates whether to cancel any running objects. The default is true, which + // sets the state of any running objects to CANCELED. If this value is false, + // the pipeline is deactivated after all running objects finish. + CancelActive *bool `locationName:"cancelActive" type:"boolean"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeactivatePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeactivatePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeactivatePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeactivatePipelineInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCancelActive sets the CancelActive field's value. +func (s *DeactivatePipelineInput) SetCancelActive(v bool) *DeactivatePipelineInput { + s.CancelActive = &v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *DeactivatePipelineInput) SetPipelineId(v string) *DeactivatePipelineInput { + s.PipelineId = &v + return s +} + +// Contains the output of DeactivatePipeline. +type DeactivatePipelineOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeactivatePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeactivatePipelineOutput) GoString() string { + return s.String() +} + +// Contains the parameters for DeletePipeline. +type DeletePipelineInput struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePipelineInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePipelineInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePipelineInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePipelineInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineId sets the PipelineId field's value. +func (s *DeletePipelineInput) SetPipelineId(v string) *DeletePipelineInput { + s.PipelineId = &v + return s +} + +type DeletePipelineOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePipelineOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePipelineOutput) GoString() string { + return s.String() +} + +// Contains the parameters for DescribeObjects. +type DescribeObjectsInput struct { + _ struct{} `type:"structure"` + + // Indicates whether any expressions in the object should be evaluated when + // the object descriptions are returned. + EvaluateExpressions *bool `locationName:"evaluateExpressions" type:"boolean"` + + // The starting point for the results to be returned. For the first call, this + // value should be empty. As long as there are more results, continue to call + // DescribeObjects with the marker value from the previous call to retrieve + // the next set of results. + Marker *string `locationName:"marker" type:"string"` + + // The IDs of the pipeline objects that contain the definitions to be described. + // You can pass as many as 25 identifiers in a single call to DescribeObjects. + // + // ObjectIds is a required field + ObjectIds []*string `locationName:"objectIds" type:"list" required:"true"` + + // The ID of the pipeline that contains the object definitions. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeObjectsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeObjectsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeObjectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeObjectsInput"} + if s.ObjectIds == nil { + invalidParams.Add(request.NewErrParamRequired("ObjectIds")) + } + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEvaluateExpressions sets the EvaluateExpressions field's value. +func (s *DescribeObjectsInput) SetEvaluateExpressions(v bool) *DescribeObjectsInput { + s.EvaluateExpressions = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeObjectsInput) SetMarker(v string) *DescribeObjectsInput { + s.Marker = &v + return s +} + +// SetObjectIds sets the ObjectIds field's value. +func (s *DescribeObjectsInput) SetObjectIds(v []*string) *DescribeObjectsInput { + s.ObjectIds = v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *DescribeObjectsInput) SetPipelineId(v string) *DescribeObjectsInput { + s.PipelineId = &v + return s +} + +// Contains the output of DescribeObjects. +type DescribeObjectsOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there are more results to return. + HasMoreResults *bool `locationName:"hasMoreResults" type:"boolean"` + + // The starting point for the next page of results. To view the next page of + // results, call DescribeObjects again with this marker value. If the value + // is null, there are no more results. + Marker *string `locationName:"marker" type:"string"` + + // An array of object definitions. + // + // PipelineObjects is a required field + PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeObjectsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeObjectsOutput) GoString() string { + return s.String() +} + +// SetHasMoreResults sets the HasMoreResults field's value. +func (s *DescribeObjectsOutput) SetHasMoreResults(v bool) *DescribeObjectsOutput { + s.HasMoreResults = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeObjectsOutput) SetMarker(v string) *DescribeObjectsOutput { + s.Marker = &v + return s +} + +// SetPipelineObjects sets the PipelineObjects field's value. +func (s *DescribeObjectsOutput) SetPipelineObjects(v []*PipelineObject) *DescribeObjectsOutput { + s.PipelineObjects = v + return s +} + +// Contains the parameters for DescribePipelines. +type DescribePipelinesInput struct { + _ struct{} `type:"structure"` + + // The IDs of the pipelines to describe. You can pass as many as 25 identifiers + // in a single call. To obtain pipeline IDs, call ListPipelines. + // + // PipelineIds is a required field + PipelineIds []*string `locationName:"pipelineIds" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribePipelinesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePipelinesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePipelinesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePipelinesInput"} + if s.PipelineIds == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineIds sets the PipelineIds field's value. +func (s *DescribePipelinesInput) SetPipelineIds(v []*string) *DescribePipelinesInput { + s.PipelineIds = v + return s +} + +// Contains the output of DescribePipelines. +type DescribePipelinesOutput struct { + _ struct{} `type:"structure"` + + // An array of descriptions for the specified pipelines. + // + // PipelineDescriptionList is a required field + PipelineDescriptionList []*PipelineDescription `locationName:"pipelineDescriptionList" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribePipelinesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePipelinesOutput) GoString() string { + return s.String() +} + +// SetPipelineDescriptionList sets the PipelineDescriptionList field's value. +func (s *DescribePipelinesOutput) SetPipelineDescriptionList(v []*PipelineDescription) *DescribePipelinesOutput { + s.PipelineDescriptionList = v + return s +} + +// Contains the parameters for EvaluateExpression. +type EvaluateExpressionInput struct { + _ struct{} `type:"structure"` + + // The expression to evaluate. + // + // Expression is a required field + Expression *string `locationName:"expression" type:"string" required:"true"` + + // The ID of the object. + // + // ObjectId is a required field + ObjectId *string `locationName:"objectId" min:"1" type:"string" required:"true"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s EvaluateExpressionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EvaluateExpressionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EvaluateExpressionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EvaluateExpressionInput"} + if s.Expression == nil { + invalidParams.Add(request.NewErrParamRequired("Expression")) + } + if s.ObjectId == nil { + invalidParams.Add(request.NewErrParamRequired("ObjectId")) + } + if s.ObjectId != nil && len(*s.ObjectId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ObjectId", 1)) + } + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpression sets the Expression field's value. +func (s *EvaluateExpressionInput) SetExpression(v string) *EvaluateExpressionInput { + s.Expression = &v + return s +} + +// SetObjectId sets the ObjectId field's value. +func (s *EvaluateExpressionInput) SetObjectId(v string) *EvaluateExpressionInput { + s.ObjectId = &v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *EvaluateExpressionInput) SetPipelineId(v string) *EvaluateExpressionInput { + s.PipelineId = &v + return s +} + +// Contains the output of EvaluateExpression. +type EvaluateExpressionOutput struct { + _ struct{} `type:"structure"` + + // The evaluated expression. + // + // EvaluatedExpression is a required field + EvaluatedExpression *string `locationName:"evaluatedExpression" type:"string" required:"true"` +} + +// String returns the string representation +func (s EvaluateExpressionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EvaluateExpressionOutput) GoString() string { + return s.String() +} + +// SetEvaluatedExpression sets the EvaluatedExpression field's value. +func (s *EvaluateExpressionOutput) SetEvaluatedExpression(v string) *EvaluateExpressionOutput { + s.EvaluatedExpression = &v + return s +} + +// A key-value pair that describes a property of a pipeline object. The value +// is specified as either a string value (StringValue) or a reference to another +// object (RefValue) but not as both. +type Field struct { + _ struct{} `type:"structure"` + + // The field identifier. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // The field value, expressed as the identifier of another object. + RefValue *string `locationName:"refValue" min:"1" type:"string"` + + // The field value, expressed as a String. + StringValue *string `locationName:"stringValue" type:"string"` +} + +// String returns the string representation +func (s Field) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Field) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Field) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Field"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.RefValue != nil && len(*s.RefValue) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RefValue", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Field) SetKey(v string) *Field { + s.Key = &v + return s +} + +// SetRefValue sets the RefValue field's value. +func (s *Field) SetRefValue(v string) *Field { + s.RefValue = &v + return s +} + +// SetStringValue sets the StringValue field's value. +func (s *Field) SetStringValue(v string) *Field { + s.StringValue = &v + return s +} + +// Contains the parameters for GetPipelineDefinition. +type GetPipelineDefinitionInput struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The version of the pipeline definition to retrieve. Set this parameter to + // latest (default) to use the last definition saved to the pipeline or active + // to use the last definition that was activated. + Version *string `locationName:"version" type:"string"` +} + +// String returns the string representation +func (s GetPipelineDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPipelineDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPipelineDefinitionInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineId sets the PipelineId field's value. +func (s *GetPipelineDefinitionInput) SetPipelineId(v string) *GetPipelineDefinitionInput { + s.PipelineId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetPipelineDefinitionInput) SetVersion(v string) *GetPipelineDefinitionInput { + s.Version = &v + return s +} + +// Contains the output of GetPipelineDefinition. +type GetPipelineDefinitionOutput struct { + _ struct{} `type:"structure"` + + // The parameter objects used in the pipeline definition. + ParameterObjects []*ParameterObject `locationName:"parameterObjects" type:"list"` + + // The parameter values used in the pipeline definition. + ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` + + // The objects defined in the pipeline. + PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list"` +} + +// String returns the string representation +func (s GetPipelineDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPipelineDefinitionOutput) GoString() string { + return s.String() +} + +// SetParameterObjects sets the ParameterObjects field's value. +func (s *GetPipelineDefinitionOutput) SetParameterObjects(v []*ParameterObject) *GetPipelineDefinitionOutput { + s.ParameterObjects = v + return s +} + +// SetParameterValues sets the ParameterValues field's value. +func (s *GetPipelineDefinitionOutput) SetParameterValues(v []*ParameterValue) *GetPipelineDefinitionOutput { + s.ParameterValues = v + return s +} + +// SetPipelineObjects sets the PipelineObjects field's value. +func (s *GetPipelineDefinitionOutput) SetPipelineObjects(v []*PipelineObject) *GetPipelineDefinitionOutput { + s.PipelineObjects = v + return s +} + +// Identity information for the EC2 instance that is hosting the task runner. +// You can get this value by calling a metadata URI from the EC2 instance. For +// more information, see Instance Metadata (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html) +// in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves +// that your task runner is running on an EC2 instance, and ensures the proper +// AWS Data Pipeline service charges are applied to your pipeline. +type InstanceIdentity struct { + _ struct{} `type:"structure"` + + // A description of an EC2 instance that is generated when the instance is launched + // and exposed to the instance via the instance metadata service in the form + // of a JSON representation of an object. + Document *string `locationName:"document" type:"string"` + + // A signature which can be used to verify the accuracy and authenticity of + // the information provided in the instance identity document. + Signature *string `locationName:"signature" type:"string"` +} + +// String returns the string representation +func (s InstanceIdentity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceIdentity) GoString() string { + return s.String() +} + +// SetDocument sets the Document field's value. +func (s *InstanceIdentity) SetDocument(v string) *InstanceIdentity { + s.Document = &v + return s +} + +// SetSignature sets the Signature field's value. +func (s *InstanceIdentity) SetSignature(v string) *InstanceIdentity { + s.Signature = &v + return s +} + +// Contains the parameters for ListPipelines. +type ListPipelinesInput struct { + _ struct{} `type:"structure"` + + // The starting point for the results to be returned. For the first call, this + // value should be empty. As long as there are more results, continue to call + // ListPipelines with the marker value from the previous call to retrieve the + // next set of results. + Marker *string `locationName:"marker" type:"string"` +} + +// String returns the string representation +func (s ListPipelinesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPipelinesInput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *ListPipelinesInput) SetMarker(v string) *ListPipelinesInput { + s.Marker = &v + return s +} + +// Contains the output of ListPipelines. +type ListPipelinesOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there are more results that can be obtained by a subsequent + // call. + HasMoreResults *bool `locationName:"hasMoreResults" type:"boolean"` + + // The starting point for the next page of results. To view the next page of + // results, call ListPipelinesOutput again with this marker value. If the value + // is null, there are no more results. + Marker *string `locationName:"marker" type:"string"` + + // The pipeline identifiers. If you require additional information about the + // pipelines, you can use these identifiers to call DescribePipelines and GetPipelineDefinition. + // + // PipelineIdList is a required field + PipelineIdList []*PipelineIdName `locationName:"pipelineIdList" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListPipelinesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPipelinesOutput) GoString() string { + return s.String() +} + +// SetHasMoreResults sets the HasMoreResults field's value. +func (s *ListPipelinesOutput) SetHasMoreResults(v bool) *ListPipelinesOutput { + s.HasMoreResults = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListPipelinesOutput) SetMarker(v string) *ListPipelinesOutput { + s.Marker = &v + return s +} + +// SetPipelineIdList sets the PipelineIdList field's value. +func (s *ListPipelinesOutput) SetPipelineIdList(v []*PipelineIdName) *ListPipelinesOutput { + s.PipelineIdList = v + return s +} + +// Contains a logical operation for comparing the value of a field with a specified +// value. +type Operator struct { + _ struct{} `type:"structure"` + + // The logical operation to be performed: equal (EQ), equal reference (REF_EQ), + // less than or equal (LE), greater than or equal (GE), or between (BETWEEN). + // Equal reference (REF_EQ) can be used only with reference fields. The other + // comparison types can be used only with String fields. The comparison types + // you can use apply only to certain object fields, as detailed below. + // + // The comparison operators EQ and REF_EQ act on the following fields: + // + // * name + // * @sphere + // * parent + // * @componentParent + // * @instanceParent + // * @status + // * @scheduledStartTime + // * @scheduledEndTime + // * @actualStartTime + // * @actualEndTime + // The comparison operators GE, LE, and BETWEEN act on the following fields: + // + // * @scheduledStartTime + // * @scheduledEndTime + // * @actualStartTime + // * @actualEndTime + // Note that fields beginning with the at sign (@) are read-only and set by + // the web service. When you name fields, you should choose names containing + // only alpha-numeric values, as symbols may be reserved by AWS Data Pipeline. + // User-defined fields that you add to a pipeline should prefix their name with + // the string "my". + Type *string `locationName:"type" type:"string" enum:"OperatorType"` + + // The value that the actual field value will be compared with. + Values []*string `locationName:"values" type:"list"` +} + +// String returns the string representation +func (s Operator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Operator) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *Operator) SetType(v string) *Operator { + s.Type = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Operator) SetValues(v []*string) *Operator { + s.Values = v + return s +} + +// The attributes allowed or specified with a parameter object. +type ParameterAttribute struct { + _ struct{} `type:"structure"` + + // The field identifier. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // The field value, expressed as a String. + // + // StringValue is a required field + StringValue *string `locationName:"stringValue" type:"string" required:"true"` +} + +// String returns the string representation +func (s ParameterAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterAttribute) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParameterAttribute) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParameterAttribute"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.StringValue == nil { + invalidParams.Add(request.NewErrParamRequired("StringValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *ParameterAttribute) SetKey(v string) *ParameterAttribute { + s.Key = &v + return s +} + +// SetStringValue sets the StringValue field's value. +func (s *ParameterAttribute) SetStringValue(v string) *ParameterAttribute { + s.StringValue = &v + return s +} + +// Contains information about a parameter object. +type ParameterObject struct { + _ struct{} `type:"structure"` + + // The attributes of the parameter object. + // + // Attributes is a required field + Attributes []*ParameterAttribute `locationName:"attributes" type:"list" required:"true"` + + // The ID of the parameter object. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ParameterObject) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterObject) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParameterObject) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParameterObject"} + if s.Attributes == nil { + invalidParams.Add(request.NewErrParamRequired("Attributes")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Attributes != nil { + for i, v := range s.Attributes { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attributes", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributes sets the Attributes field's value. +func (s *ParameterObject) SetAttributes(v []*ParameterAttribute) *ParameterObject { + s.Attributes = v + return s +} + +// SetId sets the Id field's value. +func (s *ParameterObject) SetId(v string) *ParameterObject { + s.Id = &v + return s +} + +// A value or list of parameter values. +type ParameterValue struct { + _ struct{} `type:"structure"` + + // The ID of the parameter value. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` + + // The field value, expressed as a String. + // + // StringValue is a required field + StringValue *string `locationName:"stringValue" type:"string" required:"true"` +} + +// String returns the string representation +func (s ParameterValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterValue) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParameterValue) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParameterValue"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.StringValue == nil { + invalidParams.Add(request.NewErrParamRequired("StringValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *ParameterValue) SetId(v string) *ParameterValue { + s.Id = &v + return s +} + +// SetStringValue sets the StringValue field's value. +func (s *ParameterValue) SetStringValue(v string) *ParameterValue { + s.StringValue = &v + return s +} + +// Contains pipeline metadata. +type PipelineDescription struct { + _ struct{} `type:"structure"` + + // Description of the pipeline. + Description *string `locationName:"description" type:"string"` + + // A list of read-only fields that contain metadata about the pipeline: @userId, + // @accountId, and @pipelineState. + // + // Fields is a required field + Fields []*Field `locationName:"fields" type:"list" required:"true"` + + // The name of the pipeline. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The pipeline identifier that was assigned by AWS Data Pipeline. This is a + // string of the form df-297EG78HU43EEXAMPLE. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // A list of tags to associated with a pipeline. Tags let you control access + // to pipelines. For more information, see Controlling User Access to Pipelines + // (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) + // in the AWS Data Pipeline Developer Guide. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s PipelineDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineDescription) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *PipelineDescription) SetDescription(v string) *PipelineDescription { + s.Description = &v + return s +} + +// SetFields sets the Fields field's value. +func (s *PipelineDescription) SetFields(v []*Field) *PipelineDescription { + s.Fields = v + return s +} + +// SetName sets the Name field's value. +func (s *PipelineDescription) SetName(v string) *PipelineDescription { + s.Name = &v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *PipelineDescription) SetPipelineId(v string) *PipelineDescription { + s.PipelineId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *PipelineDescription) SetTags(v []*Tag) *PipelineDescription { + s.Tags = v + return s +} + +// Contains the name and identifier of a pipeline. +type PipelineIdName struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline that was assigned by AWS Data Pipeline. This is a + // string of the form df-297EG78HU43EEXAMPLE. + Id *string `locationName:"id" min:"1" type:"string"` + + // The name of the pipeline. + Name *string `locationName:"name" min:"1" type:"string"` +} + +// String returns the string representation +func (s PipelineIdName) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineIdName) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *PipelineIdName) SetId(v string) *PipelineIdName { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *PipelineIdName) SetName(v string) *PipelineIdName { + s.Name = &v + return s +} + +// Contains information about a pipeline object. This can be a logical, physical, +// or physical attempt pipeline object. The complete set of components of a +// pipeline defines the pipeline. +type PipelineObject struct { + _ struct{} `type:"structure"` + + // Key-value pairs that define the properties of the object. + // + // Fields is a required field + Fields []*Field `locationName:"fields" type:"list" required:"true"` + + // The ID of the object. + // + // Id is a required field + Id *string `locationName:"id" min:"1" type:"string" required:"true"` + + // The name of the object. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s PipelineObject) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineObject) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PipelineObject) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PipelineObject"} + if s.Fields == nil { + invalidParams.Add(request.NewErrParamRequired("Fields")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Fields != nil { + for i, v := range s.Fields { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Fields", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFields sets the Fields field's value. +func (s *PipelineObject) SetFields(v []*Field) *PipelineObject { + s.Fields = v + return s +} + +// SetId sets the Id field's value. +func (s *PipelineObject) SetId(v string) *PipelineObject { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *PipelineObject) SetName(v string) *PipelineObject { + s.Name = &v + return s +} + +// Contains the parameters for PollForTask. +type PollForTaskInput struct { + _ struct{} `type:"structure"` + + // The public DNS name of the calling task runner. + Hostname *string `locationName:"hostname" min:"1" type:"string"` + + // Identity information for the EC2 instance that is hosting the task runner. + // You can get this value from the instance using http://169.254.169.254/latest/meta-data/instance-id. + // For more information, see Instance Metadata (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html) + // in the Amazon Elastic Compute Cloud User Guide. Passing in this value proves + // that your task runner is running on an EC2 instance, and ensures the proper + // AWS Data Pipeline service charges are applied to your pipeline. + InstanceIdentity *InstanceIdentity `locationName:"instanceIdentity" type:"structure"` + + // The type of task the task runner is configured to accept and process. The + // worker group is set as a field on objects in the pipeline when they are created. + // You can only specify a single value for workerGroup in the call to PollForTask. + // There are no wildcard values permitted in workerGroup; the string must be + // an exact, case-sensitive, match. + // + // WorkerGroup is a required field + WorkerGroup *string `locationName:"workerGroup" type:"string" required:"true"` +} + +// String returns the string representation +func (s PollForTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PollForTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PollForTaskInput"} + if s.Hostname != nil && len(*s.Hostname) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Hostname", 1)) + } + if s.WorkerGroup == nil { + invalidParams.Add(request.NewErrParamRequired("WorkerGroup")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHostname sets the Hostname field's value. +func (s *PollForTaskInput) SetHostname(v string) *PollForTaskInput { + s.Hostname = &v + return s +} + +// SetInstanceIdentity sets the InstanceIdentity field's value. +func (s *PollForTaskInput) SetInstanceIdentity(v *InstanceIdentity) *PollForTaskInput { + s.InstanceIdentity = v + return s +} + +// SetWorkerGroup sets the WorkerGroup field's value. +func (s *PollForTaskInput) SetWorkerGroup(v string) *PollForTaskInput { + s.WorkerGroup = &v + return s +} + +// Contains the output of PollForTask. +type PollForTaskOutput struct { + _ struct{} `type:"structure"` + + // The information needed to complete the task that is being assigned to the + // task runner. One of the fields returned in this object is taskId, which contains + // an identifier for the task being assigned. The calling task runner uses taskId + // in subsequent calls to ReportTaskProgress and SetTaskStatus. + TaskObject *TaskObject `locationName:"taskObject" type:"structure"` +} + +// String returns the string representation +func (s PollForTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PollForTaskOutput) GoString() string { + return s.String() +} + +// SetTaskObject sets the TaskObject field's value. +func (s *PollForTaskOutput) SetTaskObject(v *TaskObject) *PollForTaskOutput { + s.TaskObject = v + return s +} + +// Contains the parameters for PutPipelineDefinition. +type PutPipelineDefinitionInput struct { + _ struct{} `type:"structure"` + + // The parameter objects used with the pipeline. + ParameterObjects []*ParameterObject `locationName:"parameterObjects" type:"list"` + + // The parameter values used with the pipeline. + ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The objects that define the pipeline. These objects overwrite the existing + // pipeline definition. + // + // PipelineObjects is a required field + PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list" required:"true"` +} + +// String returns the string representation +func (s PutPipelineDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPipelineDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPipelineDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPipelineDefinitionInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.PipelineObjects == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineObjects")) + } + if s.ParameterObjects != nil { + for i, v := range s.ParameterObjects { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterObjects", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ParameterValues != nil { + for i, v := range s.ParameterValues { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterValues", i), err.(request.ErrInvalidParams)) + } + } + } + if s.PipelineObjects != nil { + for i, v := range s.PipelineObjects { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PipelineObjects", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameterObjects sets the ParameterObjects field's value. +func (s *PutPipelineDefinitionInput) SetParameterObjects(v []*ParameterObject) *PutPipelineDefinitionInput { + s.ParameterObjects = v + return s +} + +// SetParameterValues sets the ParameterValues field's value. +func (s *PutPipelineDefinitionInput) SetParameterValues(v []*ParameterValue) *PutPipelineDefinitionInput { + s.ParameterValues = v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *PutPipelineDefinitionInput) SetPipelineId(v string) *PutPipelineDefinitionInput { + s.PipelineId = &v + return s +} + +// SetPipelineObjects sets the PipelineObjects field's value. +func (s *PutPipelineDefinitionInput) SetPipelineObjects(v []*PipelineObject) *PutPipelineDefinitionInput { + s.PipelineObjects = v + return s +} + +// Contains the output of PutPipelineDefinition. +type PutPipelineDefinitionOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there were validation errors, and the pipeline definition + // is stored but cannot be activated until you correct the pipeline and call + // PutPipelineDefinition to commit the corrected pipeline. + // + // Errored is a required field + Errored *bool `locationName:"errored" type:"boolean" required:"true"` + + // The validation errors that are associated with the objects defined in pipelineObjects. + ValidationErrors []*ValidationError `locationName:"validationErrors" type:"list"` + + // The validation warnings that are associated with the objects defined in pipelineObjects. + ValidationWarnings []*ValidationWarning `locationName:"validationWarnings" type:"list"` +} + +// String returns the string representation +func (s PutPipelineDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPipelineDefinitionOutput) GoString() string { + return s.String() +} + +// SetErrored sets the Errored field's value. +func (s *PutPipelineDefinitionOutput) SetErrored(v bool) *PutPipelineDefinitionOutput { + s.Errored = &v + return s +} + +// SetValidationErrors sets the ValidationErrors field's value. +func (s *PutPipelineDefinitionOutput) SetValidationErrors(v []*ValidationError) *PutPipelineDefinitionOutput { + s.ValidationErrors = v + return s +} + +// SetValidationWarnings sets the ValidationWarnings field's value. +func (s *PutPipelineDefinitionOutput) SetValidationWarnings(v []*ValidationWarning) *PutPipelineDefinitionOutput { + s.ValidationWarnings = v + return s +} + +// Defines the query to run against an object. +type Query struct { + _ struct{} `type:"structure"` + + // List of selectors that define the query. An object must satisfy all of the + // selectors to match the query. + Selectors []*Selector `locationName:"selectors" type:"list"` +} + +// String returns the string representation +func (s Query) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Query) GoString() string { + return s.String() +} + +// SetSelectors sets the Selectors field's value. +func (s *Query) SetSelectors(v []*Selector) *Query { + s.Selectors = v + return s +} + +// Contains the parameters for QueryObjects. +type QueryObjectsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of object names that QueryObjects will return in a single + // call. The default value is 100. + Limit *int64 `locationName:"limit" type:"integer"` + + // The starting point for the results to be returned. For the first call, this + // value should be empty. As long as there are more results, continue to call + // QueryObjects with the marker value from the previous call to retrieve the + // next set of results. + Marker *string `locationName:"marker" type:"string"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The query that defines the objects to be returned. The Query object can contain + // a maximum of ten selectors. The conditions in the query are limited to top-level + // String fields in the object. These filters can be applied to components, + // instances, and attempts. + Query *Query `locationName:"query" type:"structure"` + + // Indicates whether the query applies to components or instances. The possible + // values are: COMPONENT, INSTANCE, and ATTEMPT. + // + // Sphere is a required field + Sphere *string `locationName:"sphere" type:"string" required:"true"` +} + +// String returns the string representation +func (s QueryObjectsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryObjectsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *QueryObjectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "QueryObjectsInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.Sphere == nil { + invalidParams.Add(request.NewErrParamRequired("Sphere")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *QueryObjectsInput) SetLimit(v int64) *QueryObjectsInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *QueryObjectsInput) SetMarker(v string) *QueryObjectsInput { + s.Marker = &v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *QueryObjectsInput) SetPipelineId(v string) *QueryObjectsInput { + s.PipelineId = &v + return s +} + +// SetQuery sets the Query field's value. +func (s *QueryObjectsInput) SetQuery(v *Query) *QueryObjectsInput { + s.Query = v + return s +} + +// SetSphere sets the Sphere field's value. +func (s *QueryObjectsInput) SetSphere(v string) *QueryObjectsInput { + s.Sphere = &v + return s +} + +// Contains the output of QueryObjects. +type QueryObjectsOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there are more results that can be obtained by a subsequent + // call. + HasMoreResults *bool `locationName:"hasMoreResults" type:"boolean"` + + // The identifiers that match the query selectors. + Ids []*string `locationName:"ids" type:"list"` + + // The starting point for the next page of results. To view the next page of + // results, call QueryObjects again with this marker value. If the value is + // null, there are no more results. + Marker *string `locationName:"marker" type:"string"` +} + +// String returns the string representation +func (s QueryObjectsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryObjectsOutput) GoString() string { + return s.String() +} + +// SetHasMoreResults sets the HasMoreResults field's value. +func (s *QueryObjectsOutput) SetHasMoreResults(v bool) *QueryObjectsOutput { + s.HasMoreResults = &v + return s +} + +// SetIds sets the Ids field's value. +func (s *QueryObjectsOutput) SetIds(v []*string) *QueryObjectsOutput { + s.Ids = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *QueryObjectsOutput) SetMarker(v string) *QueryObjectsOutput { + s.Marker = &v + return s +} + +// Contains the parameters for RemoveTags. +type RemoveTagsInput struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The keys of the tags to remove. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s RemoveTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPipelineId sets the PipelineId field's value. +func (s *RemoveTagsInput) SetPipelineId(v string) *RemoveTagsInput { + s.PipelineId = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { + s.TagKeys = v + return s +} + +// Contains the output of RemoveTags. +type RemoveTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsOutput) GoString() string { + return s.String() +} + +// Contains the parameters for ReportTaskProgress. +type ReportTaskProgressInput struct { + _ struct{} `type:"structure"` + + // Key-value pairs that define the properties of the ReportTaskProgressInput + // object. + Fields []*Field `locationName:"fields" type:"list"` + + // The ID of the task assigned to the task runner. This value is provided in + // the response for PollForTask. + // + // TaskId is a required field + TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ReportTaskProgressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportTaskProgressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReportTaskProgressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReportTaskProgressInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + if s.Fields != nil { + for i, v := range s.Fields { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Fields", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFields sets the Fields field's value. +func (s *ReportTaskProgressInput) SetFields(v []*Field) *ReportTaskProgressInput { + s.Fields = v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *ReportTaskProgressInput) SetTaskId(v string) *ReportTaskProgressInput { + s.TaskId = &v + return s +} + +// Contains the output of ReportTaskProgress. +type ReportTaskProgressOutput struct { + _ struct{} `type:"structure"` + + // If true, the calling task runner should cancel processing of the task. The + // task runner does not need to call SetTaskStatus for canceled tasks. + // + // Canceled is a required field + Canceled *bool `locationName:"canceled" type:"boolean" required:"true"` +} + +// String returns the string representation +func (s ReportTaskProgressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportTaskProgressOutput) GoString() string { + return s.String() +} + +// SetCanceled sets the Canceled field's value. +func (s *ReportTaskProgressOutput) SetCanceled(v bool) *ReportTaskProgressOutput { + s.Canceled = &v + return s +} + +// Contains the parameters for ReportTaskRunnerHeartbeat. +type ReportTaskRunnerHeartbeatInput struct { + _ struct{} `type:"structure"` + + // The public DNS name of the task runner. + Hostname *string `locationName:"hostname" min:"1" type:"string"` + + // The ID of the task runner. This value should be unique across your AWS account. + // In the case of AWS Data Pipeline Task Runner launched on a resource managed + // by AWS Data Pipeline, the web service provides a unique identifier when it + // launches the application. If you have written a custom task runner, you should + // assign a unique identifier for the task runner. + // + // TaskrunnerId is a required field + TaskrunnerId *string `locationName:"taskrunnerId" min:"1" type:"string" required:"true"` + + // The type of task the task runner is configured to accept and process. The + // worker group is set as a field on objects in the pipeline when they are created. + // You can only specify a single value for workerGroup. There are no wildcard + // values permitted in workerGroup; the string must be an exact, case-sensitive, + // match. + WorkerGroup *string `locationName:"workerGroup" type:"string"` +} + +// String returns the string representation +func (s ReportTaskRunnerHeartbeatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportTaskRunnerHeartbeatInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReportTaskRunnerHeartbeatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReportTaskRunnerHeartbeatInput"} + if s.Hostname != nil && len(*s.Hostname) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Hostname", 1)) + } + if s.TaskrunnerId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskrunnerId")) + } + if s.TaskrunnerId != nil && len(*s.TaskrunnerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskrunnerId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHostname sets the Hostname field's value. +func (s *ReportTaskRunnerHeartbeatInput) SetHostname(v string) *ReportTaskRunnerHeartbeatInput { + s.Hostname = &v + return s +} + +// SetTaskrunnerId sets the TaskrunnerId field's value. +func (s *ReportTaskRunnerHeartbeatInput) SetTaskrunnerId(v string) *ReportTaskRunnerHeartbeatInput { + s.TaskrunnerId = &v + return s +} + +// SetWorkerGroup sets the WorkerGroup field's value. +func (s *ReportTaskRunnerHeartbeatInput) SetWorkerGroup(v string) *ReportTaskRunnerHeartbeatInput { + s.WorkerGroup = &v + return s +} + +// Contains the output of ReportTaskRunnerHeartbeat. +type ReportTaskRunnerHeartbeatOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether the calling task runner should terminate. + // + // Terminate is a required field + Terminate *bool `locationName:"terminate" type:"boolean" required:"true"` +} + +// String returns the string representation +func (s ReportTaskRunnerHeartbeatOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportTaskRunnerHeartbeatOutput) GoString() string { + return s.String() +} + +// SetTerminate sets the Terminate field's value. +func (s *ReportTaskRunnerHeartbeatOutput) SetTerminate(v bool) *ReportTaskRunnerHeartbeatOutput { + s.Terminate = &v + return s +} + +// A comparision that is used to determine whether a query should return this +// object. +type Selector struct { + _ struct{} `type:"structure"` + + // The name of the field that the operator will be applied to. The field name + // is the "key" portion of the field definition in the pipeline definition syntax + // that is used by the AWS Data Pipeline API. If the field is not set on the + // object, the condition fails. + FieldName *string `locationName:"fieldName" type:"string"` + + // Contains a logical operation for comparing the value of a field with a specified + // value. + Operator *Operator `locationName:"operator" type:"structure"` +} + +// String returns the string representation +func (s Selector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Selector) GoString() string { + return s.String() +} + +// SetFieldName sets the FieldName field's value. +func (s *Selector) SetFieldName(v string) *Selector { + s.FieldName = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *Selector) SetOperator(v *Operator) *Selector { + s.Operator = v + return s +} + +// Contains the parameters for SetStatus. +type SetStatusInput struct { + _ struct{} `type:"structure"` + + // The IDs of the objects. The corresponding objects can be either physical + // or components, but not a mix of both types. + // + // ObjectIds is a required field + ObjectIds []*string `locationName:"objectIds" type:"list" required:"true"` + + // The ID of the pipeline that contains the objects. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The status to be set on all the objects specified in objectIds. For components, + // use PAUSE or RESUME. For instances, use TRY_CANCEL, RERUN, or MARK_FINISHED. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true"` +} + +// String returns the string representation +func (s SetStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetStatusInput"} + if s.ObjectIds == nil { + invalidParams.Add(request.NewErrParamRequired("ObjectIds")) + } + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetObjectIds sets the ObjectIds field's value. +func (s *SetStatusInput) SetObjectIds(v []*string) *SetStatusInput { + s.ObjectIds = v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *SetStatusInput) SetPipelineId(v string) *SetStatusInput { + s.PipelineId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *SetStatusInput) SetStatus(v string) *SetStatusInput { + s.Status = &v + return s +} + +type SetStatusOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s SetStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetStatusOutput) GoString() string { + return s.String() +} + +// Contains the parameters for SetTaskStatus. +type SetTaskStatusInput struct { + _ struct{} `type:"structure"` + + // If an error occurred during the task, this value specifies the error code. + // This value is set on the physical attempt object. It is used to display error + // information to the user. It should not start with string "Service_" which + // is reserved by the system. + ErrorId *string `locationName:"errorId" type:"string"` + + // If an error occurred during the task, this value specifies a text description + // of the error. This value is set on the physical attempt object. It is used + // to display error information to the user. The web service does not parse + // this value. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // If an error occurred during the task, this value specifies the stack trace + // associated with the error. This value is set on the physical attempt object. + // It is used to display error information to the user. The web service does + // not parse this value. + ErrorStackTrace *string `locationName:"errorStackTrace" type:"string"` + + // The ID of the task assigned to the task runner. This value is provided in + // the response for PollForTask. + // + // TaskId is a required field + TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"` + + // If FINISHED, the task successfully completed. If FAILED, the task ended unsuccessfully. + // Preconditions use false. + // + // TaskStatus is a required field + TaskStatus *string `locationName:"taskStatus" type:"string" required:"true" enum:"TaskStatus"` +} + +// String returns the string representation +func (s SetTaskStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetTaskStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetTaskStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetTaskStatusInput"} + if s.TaskId == nil { + invalidParams.Add(request.NewErrParamRequired("TaskId")) + } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } + if s.TaskStatus == nil { + invalidParams.Add(request.NewErrParamRequired("TaskStatus")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetErrorId sets the ErrorId field's value. +func (s *SetTaskStatusInput) SetErrorId(v string) *SetTaskStatusInput { + s.ErrorId = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *SetTaskStatusInput) SetErrorMessage(v string) *SetTaskStatusInput { + s.ErrorMessage = &v + return s +} + +// SetErrorStackTrace sets the ErrorStackTrace field's value. +func (s *SetTaskStatusInput) SetErrorStackTrace(v string) *SetTaskStatusInput { + s.ErrorStackTrace = &v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *SetTaskStatusInput) SetTaskId(v string) *SetTaskStatusInput { + s.TaskId = &v + return s +} + +// SetTaskStatus sets the TaskStatus field's value. +func (s *SetTaskStatusInput) SetTaskStatus(v string) *SetTaskStatusInput { + s.TaskStatus = &v + return s +} + +// Contains the output of SetTaskStatus. +type SetTaskStatusOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s SetTaskStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetTaskStatusOutput) GoString() string { + return s.String() +} + +// Tags are key/value pairs defined by a user and associated with a pipeline +// to control access. AWS Data Pipeline allows you to associate ten tags per +// pipeline. For more information, see Controlling User Access to Pipelines +// (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) +// in the AWS Data Pipeline Developer Guide. +type Tag struct { + _ struct{} `type:"structure"` + + // The key name of a tag defined by a user. For more information, see Controlling + // User Access to Pipelines (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) + // in the AWS Data Pipeline Developer Guide. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // The optional value portion of a tag defined by a user. For more information, + // see Controlling User Access to Pipelines (http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html) + // in the AWS Data Pipeline Developer Guide. + // + // Value is a required field + Value *string `locationName:"value" type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// Contains information about a pipeline task that is assigned to a task runner. +type TaskObject struct { + _ struct{} `type:"structure"` + + // The ID of the pipeline task attempt object. AWS Data Pipeline uses this value + // to track how many times a task is attempted. + AttemptId *string `locationName:"attemptId" min:"1" type:"string"` + + // Connection information for the location where the task runner will publish + // the output of the task. + Objects map[string]*PipelineObject `locationName:"objects" type:"map"` + + // The ID of the pipeline that provided the task. + PipelineId *string `locationName:"pipelineId" min:"1" type:"string"` + + // An internal identifier for the task. This ID is passed to the SetTaskStatus + // and ReportTaskProgress actions. + TaskId *string `locationName:"taskId" min:"1" type:"string"` +} + +// String returns the string representation +func (s TaskObject) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskObject) GoString() string { + return s.String() +} + +// SetAttemptId sets the AttemptId field's value. +func (s *TaskObject) SetAttemptId(v string) *TaskObject { + s.AttemptId = &v + return s +} + +// SetObjects sets the Objects field's value. +func (s *TaskObject) SetObjects(v map[string]*PipelineObject) *TaskObject { + s.Objects = v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *TaskObject) SetPipelineId(v string) *TaskObject { + s.PipelineId = &v + return s +} + +// SetTaskId sets the TaskId field's value. +func (s *TaskObject) SetTaskId(v string) *TaskObject { + s.TaskId = &v + return s +} + +// Contains the parameters for ValidatePipelineDefinition. +type ValidatePipelineDefinitionInput struct { + _ struct{} `type:"structure"` + + // The parameter objects used with the pipeline. + ParameterObjects []*ParameterObject `locationName:"parameterObjects" type:"list"` + + // The parameter values used with the pipeline. + ParameterValues []*ParameterValue `locationName:"parameterValues" type:"list"` + + // The ID of the pipeline. + // + // PipelineId is a required field + PipelineId *string `locationName:"pipelineId" min:"1" type:"string" required:"true"` + + // The objects that define the pipeline changes to validate against the pipeline. + // + // PipelineObjects is a required field + PipelineObjects []*PipelineObject `locationName:"pipelineObjects" type:"list" required:"true"` +} + +// String returns the string representation +func (s ValidatePipelineDefinitionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidatePipelineDefinitionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ValidatePipelineDefinitionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ValidatePipelineDefinitionInput"} + if s.PipelineId == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineId")) + } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } + if s.PipelineObjects == nil { + invalidParams.Add(request.NewErrParamRequired("PipelineObjects")) + } + if s.ParameterObjects != nil { + for i, v := range s.ParameterObjects { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterObjects", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ParameterValues != nil { + for i, v := range s.ParameterValues { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterValues", i), err.(request.ErrInvalidParams)) + } + } + } + if s.PipelineObjects != nil { + for i, v := range s.PipelineObjects { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PipelineObjects", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameterObjects sets the ParameterObjects field's value. +func (s *ValidatePipelineDefinitionInput) SetParameterObjects(v []*ParameterObject) *ValidatePipelineDefinitionInput { + s.ParameterObjects = v + return s +} + +// SetParameterValues sets the ParameterValues field's value. +func (s *ValidatePipelineDefinitionInput) SetParameterValues(v []*ParameterValue) *ValidatePipelineDefinitionInput { + s.ParameterValues = v + return s +} + +// SetPipelineId sets the PipelineId field's value. +func (s *ValidatePipelineDefinitionInput) SetPipelineId(v string) *ValidatePipelineDefinitionInput { + s.PipelineId = &v + return s +} + +// SetPipelineObjects sets the PipelineObjects field's value. +func (s *ValidatePipelineDefinitionInput) SetPipelineObjects(v []*PipelineObject) *ValidatePipelineDefinitionInput { + s.PipelineObjects = v + return s +} + +// Contains the output of ValidatePipelineDefinition. +type ValidatePipelineDefinitionOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether there were validation errors. + // + // Errored is a required field + Errored *bool `locationName:"errored" type:"boolean" required:"true"` + + // Any validation errors that were found. + ValidationErrors []*ValidationError `locationName:"validationErrors" type:"list"` + + // Any validation warnings that were found. + ValidationWarnings []*ValidationWarning `locationName:"validationWarnings" type:"list"` +} + +// String returns the string representation +func (s ValidatePipelineDefinitionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidatePipelineDefinitionOutput) GoString() string { + return s.String() +} + +// SetErrored sets the Errored field's value. +func (s *ValidatePipelineDefinitionOutput) SetErrored(v bool) *ValidatePipelineDefinitionOutput { + s.Errored = &v + return s +} + +// SetValidationErrors sets the ValidationErrors field's value. +func (s *ValidatePipelineDefinitionOutput) SetValidationErrors(v []*ValidationError) *ValidatePipelineDefinitionOutput { + s.ValidationErrors = v + return s +} + +// SetValidationWarnings sets the ValidationWarnings field's value. +func (s *ValidatePipelineDefinitionOutput) SetValidationWarnings(v []*ValidationWarning) *ValidatePipelineDefinitionOutput { + s.ValidationWarnings = v + return s +} + +// Defines a validation error. Validation errors prevent pipeline activation. +// The set of validation errors that can be returned are defined by AWS Data +// Pipeline. +type ValidationError struct { + _ struct{} `type:"structure"` + + // A description of the validation error. + Errors []*string `locationName:"errors" type:"list"` + + // The identifier of the object that contains the validation error. + Id *string `locationName:"id" min:"1" type:"string"` +} + +// String returns the string representation +func (s ValidationError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationError) GoString() string { + return s.String() +} + +// SetErrors sets the Errors field's value. +func (s *ValidationError) SetErrors(v []*string) *ValidationError { + s.Errors = v + return s +} + +// SetId sets the Id field's value. +func (s *ValidationError) SetId(v string) *ValidationError { + s.Id = &v + return s +} + +// Defines a validation warning. Validation warnings do not prevent pipeline +// activation. The set of validation warnings that can be returned are defined +// by AWS Data Pipeline. +type ValidationWarning struct { + _ struct{} `type:"structure"` + + // The identifier of the object that contains the validation warning. + Id *string `locationName:"id" min:"1" type:"string"` + + // A description of the validation warning. + Warnings []*string `locationName:"warnings" type:"list"` +} + +// String returns the string representation +func (s ValidationWarning) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationWarning) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *ValidationWarning) SetId(v string) *ValidationWarning { + s.Id = &v + return s +} + +// SetWarnings sets the Warnings field's value. +func (s *ValidationWarning) SetWarnings(v []*string) *ValidationWarning { + s.Warnings = v + return s +} + +const ( + // OperatorTypeEq is a OperatorType enum value + OperatorTypeEq = "EQ" + + // OperatorTypeRefEq is a OperatorType enum value + OperatorTypeRefEq = "REF_EQ" + + // OperatorTypeLe is a OperatorType enum value + OperatorTypeLe = "LE" + + // OperatorTypeGe is a OperatorType enum value + OperatorTypeGe = "GE" + + // OperatorTypeBetween is a OperatorType enum value + OperatorTypeBetween = "BETWEEN" +) + +const ( + // TaskStatusFinished is a TaskStatus enum value + TaskStatusFinished = "FINISHED" + + // TaskStatusFailed is a TaskStatus enum value + TaskStatusFailed = "FAILED" + + // TaskStatusFalse is a TaskStatus enum value + TaskStatusFalse = "FALSE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go new file mode 100644 index 000000000..79ee00a1e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/doc.go @@ -0,0 +1,49 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package datapipeline provides the client and types for making API +// requests to AWS Data Pipeline. +// +// AWS Data Pipeline configures and manages a data-driven workflow called a +// pipeline. AWS Data Pipeline handles the details of scheduling and ensuring +// that data dependencies are met so that your application can focus on processing +// the data. +// +// AWS Data Pipeline provides a JAR implementation of a task runner called AWS +// Data Pipeline Task Runner. AWS Data Pipeline Task Runner provides logic for +// common data management scenarios, such as performing database queries and +// running data analysis using Amazon Elastic MapReduce (Amazon EMR). You can +// use AWS Data Pipeline Task Runner as your task runner, or you can write your +// own task runner to provide custom data management. +// +// AWS Data Pipeline implements two main sets of functionality. Use the first +// set to create a pipeline and define data sources, schedules, dependencies, +// and the transforms to be performed on the data. Use the second set in your +// task runner application to receive the next task ready for processing. The +// logic for performing the task, such as querying the data, running data analysis, +// or converting the data from one format to another, is contained within the +// task runner. The task runner performs the task assigned to it by the web +// service, reporting progress to the web service as it does so. When the task +// is done, the task runner reports the final success or failure of the task +// to the web service. +// +// See https://docs.aws.amazon.com/goto/WebAPI/datapipeline-2012-10-29 for more information on this service. +// +// See datapipeline package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/datapipeline/ +// +// Using the Client +// +// To contact AWS Data Pipeline with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Data Pipeline client DataPipeline for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/datapipeline/#New +package datapipeline diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go new file mode 100644 index 000000000..f60b7da9f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/errors.go @@ -0,0 +1,39 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package datapipeline + +const ( + + // ErrCodeInternalServiceError for service response error code + // "InternalServiceError". + // + // An internal service error occurred. + ErrCodeInternalServiceError = "InternalServiceError" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // The request was not valid. Verify that your request was properly formatted, + // that the signature was generated with the correct credentials, and that you + // haven't exceeded any of the service limits for your account. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodePipelineDeletedException for service response error code + // "PipelineDeletedException". + // + // The specified pipeline has been deleted. + ErrCodePipelineDeletedException = "PipelineDeletedException" + + // ErrCodePipelineNotFoundException for service response error code + // "PipelineNotFoundException". + // + // The specified pipeline was not found. Verify that you used the correct user + // and account identifiers. + ErrCodePipelineNotFoundException = "PipelineNotFoundException" + + // ErrCodeTaskNotFoundException for service response error code + // "TaskNotFoundException". + // + // The specified task was not found. + ErrCodeTaskNotFoundException = "TaskNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go new file mode 100644 index 000000000..ebd5c29b2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/datapipeline/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package datapipeline + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// DataPipeline provides the API operation methods for making requests to +// AWS Data Pipeline. See this package's package overview docs +// for details on the service. +// +// DataPipeline methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type DataPipeline struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "datapipeline" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Data Pipeline" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the DataPipeline client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a DataPipeline client from just a session. +// svc := datapipeline.New(mySession) +// +// // Create a DataPipeline client with additional configuration +// svc := datapipeline.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *DataPipeline { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DataPipeline { + svc := &DataPipeline{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2012-10-29", + JSONVersion: "1.1", + TargetPrefix: "DataPipeline", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a DataPipeline operation and runs any +// custom request initialization. +func (c *DataPipeline) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index fcda37568..318320461 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -6630,6 +6630,8 @@ type Artifact struct { // // * MESSAGE_LOG: The message log type. // + // * VIDEO_LOG: The video log type. + // // * RESULT_LOG: The result log type. // // * SERVICE_LOG: The service log type. @@ -6668,6 +6670,14 @@ type Artifact struct { // * APPLICATION_CRASH_REPORT: The application crash report output type. // // * XCTEST_LOG: The XCode test output type. + // + // * VIDEO: The Video output type. + // + // * CUSTOMER_ARTIFACT:The Customer Artifact output type. + // + // * CUSTOMER_ARTIFACT_LOG: The Customer Artifact Log output type. + // + // * TESTSPEC_OUTPUT: The Test Spec Output type. Type *string `locationName:"type" type:"string" enum:"ArtifactType"` // The pre-signed Amazon S3 URL that can be used with a corresponding GET request @@ -6845,6 +6855,16 @@ type CreateDevicePoolInput struct { // The device pool's description. Description *string `locationName:"description" type:"string"` + // The number of devices that Device Farm can add to your device pool. Device + // Farm adds devices that are available and that meet the criteria that you + // assign for the rules parameter. Depending on how many devices meet these + // constraints, your device pool might contain fewer devices than the value + // for this parameter. + // + // By specifying the maximum number of devices, you can control the costs that + // you incur by running tests. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` + // The device pool's name. // // Name is a required field @@ -6899,6 +6919,12 @@ func (s *CreateDevicePoolInput) SetDescription(v string) *CreateDevicePoolInput return s } +// SetMaxDevices sets the MaxDevices field's value. +func (s *CreateDevicePoolInput) SetMaxDevices(v int64) *CreateDevicePoolInput { + s.MaxDevices = &v + return s +} + // SetName sets the Name field's value. func (s *CreateDevicePoolInput) SetName(v string) *CreateDevicePoolInput { s.Name = &v @@ -7569,13 +7595,24 @@ type CreateUploadInput struct { // // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. // + // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // + // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload. + // upload for a web app. // // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // upload for a web app. // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload + // for a web app. + // + // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload + // for a web app. + // + // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for + // a web app. // // * CALABASH_TEST_PACKAGE: A Calabash test package upload. // @@ -7595,11 +7632,24 @@ type CreateUploadInput struct { // // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload + // for a web app. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload + // for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a + // web app. + // + // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a + // web app. + // + // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web + // app. // // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. // @@ -8307,7 +8357,8 @@ type Device struct { // The device's ARN. Arn *string `locationName:"arn" min:"32" type:"string"` - // Reflects how likely a device will be available for a test run. + // Reflects how likely a device will be available for a test run. It is currently + // available in the ListDevices and GetDevice API methods. Availability *string `locationName:"availability" type:"string" enum:"DeviceAvailability"` // The device's carrier. @@ -8518,11 +8569,11 @@ func (s *Device) SetResolution(v *Resolution) *Device { } // Represents a device filter used to select a set of devices to be included -// in a test run. This data structure is passed in as the "deviceSelectionConfiguration" +// in a test run. This data structure is passed in as the deviceSelectionConfiguration // parameter to ScheduleRun. For an example of the JSON request syntax, see // ScheduleRun. // -// It is also passed in as the "filters" parameter to ListDevices. For an example +// It is also passed in as the filters parameter to ListDevices. For an example // of the JSON request syntax, see ListDevices. type DeviceFilter struct { _ struct{} `type:"structure"` @@ -8530,53 +8581,71 @@ type DeviceFilter struct { // The aspect of a device such as platform or model used as the selection criteria // in a device filter. // - // Allowed values include: + // The supported operators for each attribute are provided in the following + // list. // - // * ARN: The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". + // ARNThe Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". // - // * PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". + // Supported operators: EQUALS, IN, NOT_IN // - // * OS_VERSION: The operating system version. For example, "10.3.2". + // PLATFORMThe device platform. Valid values are "ANDROID" or "IOS". // - // * MODEL: The device model. For example, "iPad 5th Gen". + // Supported operators: EQUALS // - // * AVAILABILITY: The current availability of the device. Valid values are - // "AVAILABLE", "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // OS_VERSIONThe operating system version. For example, "10.3.2". // - // * FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". + // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, + // LESS_THAN_OR_EQUALS, NOT_IN // - // * MANUFACTURER: The device manufacturer. For example, "Apple". + // MODELThe device model. For example, "iPad 5th Gen". // - // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. + // Supported operators: CONTAINS, EQUALS, IN, NOT_IN // - // * REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // AVAILABILITYThe current availability of the device. Valid values are "AVAILABLE", + // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". // - // * INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // Supported operators: EQUALS // - // * INSTANCE_LABELS: The label of the device instance. + // FORM_FACTORThe device form factor. Valid values are "PHONE" or "TABLET". // - // * FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". + // Supported operators: EQUALS + // + // MANUFACTURERThe device manufacturer. For example, "Apple". + // + // Supported operators: EQUALS, IN, NOT_IN + // + // REMOTE_ACCESS_ENABLEDWhether the device is enabled for remote access. Valid + // values are "TRUE" or "FALSE". + // + // Supported operators: EQUALS + // + // REMOTE_DEBUG_ENABLEDWhether the device is enabled for remote debugging. Valid + // values are "TRUE" or "FALSE". + // + // Supported operators: EQUALS + // + // INSTANCE_ARNThe Amazon Resource Name (ARN) of the device instance. + // + // Supported operators: EQUALS, IN, NOT_IN + // + // INSTANCE_LABELSThe label of the device instance. + // + // Supported operators: CONTAINS + // + // FLEET_TYPEThe fleet type. Valid values are "PUBLIC" or "PRIVATE". + // + // Supported operators: EQUALS Attribute *string `locationName:"attribute" type:"string" enum:"DeviceFilterAttribute"` - // The filter operator. - // - // * The EQUALS operator is available for every attribute except INSTANCE_LABELS. - // - // * The CONTAINS operator is available for the INSTANCE_LABELS and MODEL - // attributes. - // - // * The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, - // MANUFACTURER, and INSTANCE_ARN attributes. - // - // * The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS - // operators are also available for the OS_VERSION attribute. - Operator *string `locationName:"operator" type:"string" enum:"DeviceFilterOperator"` + // Specifies how Device Farm compares the filter's attribute to the value. For + // the operators that are supported by each attribute, see the attribute descriptions. + Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` // An array of one or more filter values used in a device filter. // // Operator Values // - // * The IN and NOT operators can take a values array that has more than + // * The IN and NOT_IN operators can take a values array that has more than // one element. // // * The other operators require an array with a single element. @@ -8747,6 +8816,16 @@ type DevicePool struct { // The device pool's description. Description *string `locationName:"description" type:"string"` + // The number of devices that Device Farm can add to your device pool. Device + // Farm adds devices that are available and that meet the criteria that you + // assign for the rules parameter. Depending on how many devices meet these + // constraints, your device pool might contain fewer devices than the value + // for this parameter. + // + // By specifying the maximum number of devices, you can control the costs that + // you incur by running tests. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` + // The device pool's name. Name *string `locationName:"name" type:"string"` @@ -8786,6 +8865,12 @@ func (s *DevicePool) SetDescription(v string) *DevicePool { return s } +// SetMaxDevices sets the MaxDevices field's value. +func (s *DevicePool) SetMaxDevices(v int64) *DevicePool { + s.MaxDevices = &v + return s +} + // SetName sets the Name field's value. func (s *DevicePool) SetName(v string) *DevicePool { s.Name = &v @@ -8855,8 +8940,10 @@ type DeviceSelectionConfiguration struct { // Used to dynamically select a set of devices for a test run. A filter is made // up of an attribute, an operator, and one or more values. // - // * Attribute: The aspect of a device such as platform or model used as - // the selection criteria in a device filter. + // * Attribute + // + // The aspect of a device such as platform or model used as the selection criteria + // in a device filter. // // Allowed values include: // @@ -8875,9 +8962,11 @@ type DeviceSelectionConfiguration struct { // // MANUFACTURER: The device manufacturer. For example, "Apple". // - // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. + // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid + // values are "TRUE" or "FALSE". // // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Valid values are "TRUE" or "FALSE". // // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. // @@ -8885,7 +8974,9 @@ type DeviceSelectionConfiguration struct { // // FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". // - // * Operator: The filter operator. + // * Operator + // + // The filter operator. // // The EQUALS operator is available for every attribute except INSTANCE_LABELS. // @@ -8897,14 +8988,27 @@ type DeviceSelectionConfiguration struct { // The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS // operators are also available for the OS_VERSION attribute. // - // * Values: An array of one or more filter values. + // * Values // - // The IN and NOT operators can take a values array that has more than one element. + // An array of one or more filter values. + // + // Operator Values + // + // The IN and NOT_IN operators can take a values array that has more than one + // element. // // The other operators require an array with a single element. // - // In a request, the AVAILABILITY attribute takes "AVAILABLE", "HIGHLY_AVAILABLE", - // "BUSY", or "TEMPORARY_NOT_AVAILABLE" as values. + // Attribute Values + // + // The PLATFORM attribute can be set to "ANDROID" or "IOS". + // + // The AVAILABILITY attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", + // "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // + // The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". + // + // The FLEET_TYPE attribute can be set to "PUBLIC" or "PRIVATE". // // Filters is a required field Filters []*DeviceFilter `locationName:"filters" type:"list" required:"true"` @@ -9273,11 +9377,19 @@ type GetDevicePoolCompatibilityInput struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -10502,11 +10614,19 @@ type Job struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby test type for web apps. // // * CALABASH: The Calabash type. // @@ -10957,9 +11077,11 @@ type ListDevicesInput struct { // // MANUFACTURER: The device manufacturer. For example, "Apple". // - // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. + // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid + // values are "TRUE" or "FALSE". // // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Valid values are "TRUE" or "FALSE". // // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. // @@ -10981,7 +11103,7 @@ type ListDevicesInput struct { // // * Values: An array of one or more filter values. // - // The IN and NOT operators can take a values array that has more than one element. + // The IN and NOT_IN operators take a values array that has one or more elements. // // The other operators require an array with a single element. // @@ -12235,13 +12357,24 @@ type ListUploadsInput struct { // // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. // + // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // + // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload. + // upload for a web app. // // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // upload for a web app. // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload + // for a web app. + // + // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload + // for a web app. + // + // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for + // a web app. // // * CALABASH_TEST_PACKAGE: A Calabash test package upload. // @@ -12261,11 +12394,24 @@ type ListUploadsInput struct { // // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload + // for a web app. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload + // for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a + // web app. + // + // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a + // web app. + // + // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web + // app. // // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. // @@ -13212,7 +13358,7 @@ type RemoteAccessSession struct { // The billing method of the remote access session. Possible values include // METERED or UNMETERED. For more information about metered devices, see AWS - // Device Farm terminology (http://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology)." + // Device Farm terminology (https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html#welcome-terminology)." BillingMethod *string `locationName:"billingMethod" type:"string" enum:"BillingMethod"` // Unique identifier of your client for the remote access session. Only returned @@ -13569,59 +13715,77 @@ func (s *Resolution) SetWidth(v int64) *Resolution { return s } -// Represents a condition for a device pool. It is passed in as the rules parameter -// to CreateDevicePool and UpdateDevicePool. +// Represents a condition for a device pool. type Rule struct { _ struct{} `type:"structure"` - // The rule's attribute. It is the aspect of a device such as platform or model - // used as selection criteria to create or update a device pool. + // The rule's stringified attribute. For example, specify the value as "\"abc\"". // - // Allowed values include: + // The supported operators for each attribute are provided in the following + // list. // - // * ARN: The Amazon Resource Name (ARN) of a device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". + // APPIUM_VERSIONThe Appium version for the test. // - // * PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". + // Supported operators: CONTAINS // - // * FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". + // ARNThe Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". // - // * MANUFACTURER: The device manufacturer. For example, "Apple". + // Supported operators: EQUALS, IN, NOT_IN // - // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. + // AVAILABILITYThe current availability of the device. Valid values are "AVAILABLE", + // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". // - // * REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Supported operators: EQUALS // - // * APPIUM_VERSION: The Appium version for the test. + // FLEET_TYPEThe fleet type. Valid values are "PUBLIC" or "PRIVATE". // - // * INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // Supported operators: EQUALS // - // * INSTANCE_LABELS: The label of the device instance. + // FORM_FACTORThe device form factor. Valid values are "PHONE" or "TABLET". // - // * FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". + // Supported operators: EQUALS, IN, NOT_IN + // + // INSTANCE_ARNThe Amazon Resource Name (ARN) of the device instance. + // + // Supported operators: IN, NOT_IN + // + // INSTANCE_LABELSThe label of the device instance. + // + // Supported operators: CONTAINS + // + // MANUFACTURERThe device manufacturer. For example, "Apple". + // + // Supported operators: EQUALS, IN, NOT_IN + // + // MODELThe device model, such as "Apple iPad Air 2" or "Google Pixel". + // + // Supported operators: CONTAINS, EQUALS, IN, NOT_IN + // + // OS_VERSIONThe operating system version. For example, "10.3.2". + // + // Supported operators: EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, IN, LESS_THAN, + // LESS_THAN_OR_EQUALS, NOT_IN + // + // PLATFORMThe device platform. Valid values are "ANDROID" or "IOS". + // + // Supported operators: EQUALS, IN, NOT_IN + // + // REMOTE_ACCESS_ENABLEDWhether the device is enabled for remote access. Valid + // values are "TRUE" or "FALSE". + // + // Supported operators: EQUALS + // + // REMOTE_DEBUG_ENABLEDWhether the device is enabled for remote debugging. Valid + // values are "TRUE" or "FALSE". + // + // Supported operators: EQUALS Attribute *string `locationName:"attribute" type:"string" enum:"DeviceAttribute"` - // The rule's operator. - // - // * EQUALS: The equals operator. - // - // * GREATER_THAN: The greater-than operator. - // - // * IN: The in operator. - // - // * LESS_THAN: The less-than operator. - // - // * NOT_IN: The not-in operator. - // - // * CONTAINS: The contains operator. + // Specifies how Device Farm compares the rule's attribute to the value. For + // the operators that are supported by each attribute, see the attribute descriptions. Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` // The rule's value. - // - // The value must be passed in as a string using escaped quotes. - // - // For example: - // - // "value": "\"ANDROID\"" Value *string `locationName:"value" type:"string"` } @@ -13815,11 +13979,19 @@ type Run struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -14250,14 +14422,12 @@ type ScheduleRunInput struct { Configuration *ScheduleRunConfiguration `locationName:"configuration" type:"structure"` // The ARN of the device pool for the run to be scheduled. - // - // Either devicePoolArn or deviceSelectionConfiguration are required in a request. DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` // The filter criteria used to dynamically select a set of devices for a test // run, as well as the maximum number of devices to be included in the run. // - // Either devicePoolArn or deviceSelectionConfiguration are required in a request. + // Either devicePoolArn or deviceSelectionConfiguration is required in a request. DeviceSelectionConfiguration *DeviceSelectionConfiguration `locationName:"deviceSelectionConfiguration" type:"structure"` // Specifies configuration information about a test run, such as the execution @@ -14426,10 +14596,10 @@ type ScheduleRunTest struct { // // For Appium tests (all types): // - // * appium_version: The Appium version. Currently supported values are "1.7.2", - // "1.7.1", "1.6.5", "latest", and "default". + // * appium_version: The Appium version. Currently supported values are "1.6.5" + // (and higher), "latest", and "default". // - // “latest” will run the latest Appium version supported by Device Farm (1.7.2). + // “latest” will run the latest Appium version supported by Device Farm (1.9.1). // // For “default”, Device Farm will choose a compatible version of Appium for // the device. The current behavior is to run 1.7.2 on Android devices and @@ -14511,11 +14681,19 @@ type ScheduleRunTest struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -14878,11 +15056,19 @@ type Suite struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -15060,11 +15246,19 @@ type Test struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -15318,9 +15512,32 @@ type UpdateDevicePoolInput struct { // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` + // Sets whether the maxDevices parameter applies to your device pool. If you + // set this parameter to true, the maxDevices parameter does not apply, and + // Device Farm does not limit the number of devices that it adds to your device + // pool. In this case, Device Farm adds all available devices that meet the + // criteria that are specified for the rules parameter. + // + // If you use this parameter in your request, you cannot use the maxDevices + // parameter in the same request. + ClearMaxDevices *bool `locationName:"clearMaxDevices" type:"boolean"` + // A description of the device pool you wish to update. Description *string `locationName:"description" type:"string"` + // The number of devices that Device Farm can add to your device pool. Device + // Farm adds devices that are available and that meet the criteria that you + // assign for the rules parameter. Depending on how many devices meet these + // constraints, your device pool might contain fewer devices than the value + // for this parameter. + // + // By specifying the maximum number of devices, you can control the costs that + // you incur by running tests. + // + // If you use this parameter in your request, you cannot use the clearMaxDevices + // parameter in the same request. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` + // A string representing the name of the device pool you wish to update. Name *string `locationName:"name" type:"string"` @@ -15362,12 +15579,24 @@ func (s *UpdateDevicePoolInput) SetArn(v string) *UpdateDevicePoolInput { return s } +// SetClearMaxDevices sets the ClearMaxDevices field's value. +func (s *UpdateDevicePoolInput) SetClearMaxDevices(v bool) *UpdateDevicePoolInput { + s.ClearMaxDevices = &v + return s +} + // SetDescription sets the Description field's value. func (s *UpdateDevicePoolInput) SetDescription(v string) *UpdateDevicePoolInput { s.Description = &v return s } +// SetMaxDevices sets the MaxDevices field's value. +func (s *UpdateDevicePoolInput) SetMaxDevices(v int64) *UpdateDevicePoolInput { + s.MaxDevices = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateDevicePoolInput) SetName(v string) *UpdateDevicePoolInput { s.Name = &v @@ -16032,13 +16261,24 @@ type Upload struct { // // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. // + // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // + // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload. + // upload for web apps. // // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // upload for web apps. // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload + // for web apps. + // + // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload + // for web apps. + // + // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for + // web apps. // // * CALABASH_TEST_PACKAGE: A Calabash test package upload. // @@ -16058,11 +16298,24 @@ type Upload struct { // // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload + // for a web app. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload + // for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a + // web app. + // + // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a + // web app. + // + // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web + // app. // // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. // @@ -16347,6 +16600,15 @@ const ( // DeviceAttributeFleetType is a DeviceAttribute enum value DeviceAttributeFleetType = "FLEET_TYPE" + + // DeviceAttributeOsVersion is a DeviceAttribute enum value + DeviceAttributeOsVersion = "OS_VERSION" + + // DeviceAttributeModel is a DeviceAttribute enum value + DeviceAttributeModel = "MODEL" + + // DeviceAttributeAvailability is a DeviceAttribute enum value + DeviceAttributeAvailability = "AVAILABILITY" ) const ( @@ -16401,32 +16663,6 @@ const ( DeviceFilterAttributeFleetType = "FLEET_TYPE" ) -const ( - // DeviceFilterOperatorEquals is a DeviceFilterOperator enum value - DeviceFilterOperatorEquals = "EQUALS" - - // DeviceFilterOperatorLessThan is a DeviceFilterOperator enum value - DeviceFilterOperatorLessThan = "LESS_THAN" - - // DeviceFilterOperatorLessThanOrEquals is a DeviceFilterOperator enum value - DeviceFilterOperatorLessThanOrEquals = "LESS_THAN_OR_EQUALS" - - // DeviceFilterOperatorGreaterThan is a DeviceFilterOperator enum value - DeviceFilterOperatorGreaterThan = "GREATER_THAN" - - // DeviceFilterOperatorGreaterThanOrEquals is a DeviceFilterOperator enum value - DeviceFilterOperatorGreaterThanOrEquals = "GREATER_THAN_OR_EQUALS" - - // DeviceFilterOperatorIn is a DeviceFilterOperator enum value - DeviceFilterOperatorIn = "IN" - - // DeviceFilterOperatorNotIn is a DeviceFilterOperator enum value - DeviceFilterOperatorNotIn = "NOT_IN" - - // DeviceFilterOperatorContains is a DeviceFilterOperator enum value - DeviceFilterOperatorContains = "CONTAINS" -) - const ( // DeviceFormFactorPhone is a DeviceFormFactor enum value DeviceFormFactorPhone = "PHONE" @@ -16572,9 +16808,15 @@ const ( // RuleOperatorLessThan is a RuleOperator enum value RuleOperatorLessThan = "LESS_THAN" + // RuleOperatorLessThanOrEquals is a RuleOperator enum value + RuleOperatorLessThanOrEquals = "LESS_THAN_OR_EQUALS" + // RuleOperatorGreaterThan is a RuleOperator enum value RuleOperatorGreaterThan = "GREATER_THAN" + // RuleOperatorGreaterThanOrEquals is a RuleOperator enum value + RuleOperatorGreaterThanOrEquals = "GREATER_THAN_OR_EQUALS" + // RuleOperatorIn is a RuleOperator enum value RuleOperatorIn = "IN" @@ -16657,6 +16899,12 @@ const ( // TestTypeAppiumPython is a TestType enum value TestTypeAppiumPython = "APPIUM_PYTHON" + // TestTypeAppiumNode is a TestType enum value + TestTypeAppiumNode = "APPIUM_NODE" + + // TestTypeAppiumRuby is a TestType enum value + TestTypeAppiumRuby = "APPIUM_RUBY" + // TestTypeAppiumWebJavaJunit is a TestType enum value TestTypeAppiumWebJavaJunit = "APPIUM_WEB_JAVA_JUNIT" @@ -16666,6 +16914,12 @@ const ( // TestTypeAppiumWebPython is a TestType enum value TestTypeAppiumWebPython = "APPIUM_WEB_PYTHON" + // TestTypeAppiumWebNode is a TestType enum value + TestTypeAppiumWebNode = "APPIUM_WEB_NODE" + + // TestTypeAppiumWebRuby is a TestType enum value + TestTypeAppiumWebRuby = "APPIUM_WEB_RUBY" + // TestTypeCalabash is a TestType enum value TestTypeCalabash = "CALABASH" @@ -16735,6 +16989,12 @@ const ( // UploadTypeAppiumPythonTestPackage is a UploadType enum value UploadTypeAppiumPythonTestPackage = "APPIUM_PYTHON_TEST_PACKAGE" + // UploadTypeAppiumNodeTestPackage is a UploadType enum value + UploadTypeAppiumNodeTestPackage = "APPIUM_NODE_TEST_PACKAGE" + + // UploadTypeAppiumRubyTestPackage is a UploadType enum value + UploadTypeAppiumRubyTestPackage = "APPIUM_RUBY_TEST_PACKAGE" + // UploadTypeAppiumWebJavaJunitTestPackage is a UploadType enum value UploadTypeAppiumWebJavaJunitTestPackage = "APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE" @@ -16744,6 +17004,12 @@ const ( // UploadTypeAppiumWebPythonTestPackage is a UploadType enum value UploadTypeAppiumWebPythonTestPackage = "APPIUM_WEB_PYTHON_TEST_PACKAGE" + // UploadTypeAppiumWebNodeTestPackage is a UploadType enum value + UploadTypeAppiumWebNodeTestPackage = "APPIUM_WEB_NODE_TEST_PACKAGE" + + // UploadTypeAppiumWebRubyTestPackage is a UploadType enum value + UploadTypeAppiumWebRubyTestPackage = "APPIUM_WEB_RUBY_TEST_PACKAGE" + // UploadTypeCalabashTestPackage is a UploadType enum value UploadTypeCalabashTestPackage = "CALABASH_TEST_PACKAGE" @@ -16771,6 +17037,12 @@ const ( // UploadTypeAppiumPythonTestSpec is a UploadType enum value UploadTypeAppiumPythonTestSpec = "APPIUM_PYTHON_TEST_SPEC" + // UploadTypeAppiumNodeTestSpec is a UploadType enum value + UploadTypeAppiumNodeTestSpec = "APPIUM_NODE_TEST_SPEC" + + // UploadTypeAppiumRubyTestSpec is a UploadType enum value + UploadTypeAppiumRubyTestSpec = "APPIUM_RUBY_TEST_SPEC" + // UploadTypeAppiumWebJavaJunitTestSpec is a UploadType enum value UploadTypeAppiumWebJavaJunitTestSpec = "APPIUM_WEB_JAVA_JUNIT_TEST_SPEC" @@ -16780,6 +17052,12 @@ const ( // UploadTypeAppiumWebPythonTestSpec is a UploadType enum value UploadTypeAppiumWebPythonTestSpec = "APPIUM_WEB_PYTHON_TEST_SPEC" + // UploadTypeAppiumWebNodeTestSpec is a UploadType enum value + UploadTypeAppiumWebNodeTestSpec = "APPIUM_WEB_NODE_TEST_SPEC" + + // UploadTypeAppiumWebRubyTestSpec is a UploadType enum value + UploadTypeAppiumWebRubyTestSpec = "APPIUM_WEB_RUBY_TEST_SPEC" + // UploadTypeInstrumentationTestSpec is a UploadType enum value UploadTypeInstrumentationTestSpec = "INSTRUMENTATION_TEST_SPEC" diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go new file mode 100644 index 000000000..471a189f1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/docdb/api.go @@ -0,0 +1,10980 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package docdb + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/query" +) + +const opAddTagsToResource = "AddTagsToResource" + +// AddTagsToResourceRequest generates a "aws/request.Request" representing the +// client's request for the AddTagsToResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddTagsToResource for more information on using the AddTagsToResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddTagsToResourceRequest method. +// req, resp := client.AddTagsToResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/AddTagsToResource +func (c *DocDB) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput) { + op := &request.Operation{ + Name: opAddTagsToResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddTagsToResourceInput{} + } + + output = &AddTagsToResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddTagsToResource API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Adds metadata tags to an Amazon DocumentDB resource. You can use these tags +// with cost allocation reporting to track costs that are associated with Amazon +// DocumentDB resources. or in a Condition statement in an AWS Identity and +// Access Management (IAM) policy for Amazon DocumentDB. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation AddTagsToResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/AddTagsToResource +func (c *DocDB) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error) { + req, out := c.AddTagsToResourceRequest(input) + return out, req.Send() +} + +// AddTagsToResourceWithContext is the same as AddTagsToResource with the addition of +// the ability to pass a context and additional request options. +// +// See AddTagsToResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error) { + req, out := c.AddTagsToResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" + +// ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the +// client's request for the ApplyPendingMaintenanceAction operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ApplyPendingMaintenanceAction for more information on using the ApplyPendingMaintenanceAction +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ApplyPendingMaintenanceActionRequest method. +// req, resp := client.ApplyPendingMaintenanceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ApplyPendingMaintenanceAction +func (c *DocDB) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanceActionInput) (req *request.Request, output *ApplyPendingMaintenanceActionOutput) { + op := &request.Operation{ + Name: opApplyPendingMaintenanceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ApplyPendingMaintenanceActionInput{} + } + + output = &ApplyPendingMaintenanceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ApplyPendingMaintenanceAction API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Applies a pending maintenance action to a resource (for example, to a DB +// instance). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ApplyPendingMaintenanceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" +// The specified resource ID was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ApplyPendingMaintenanceAction +func (c *DocDB) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { + req, out := c.ApplyPendingMaintenanceActionRequest(input) + return out, req.Send() +} + +// ApplyPendingMaintenanceActionWithContext is the same as ApplyPendingMaintenanceAction with the addition of +// the ability to pass a context and additional request options. +// +// See ApplyPendingMaintenanceAction for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ApplyPendingMaintenanceActionWithContext(ctx aws.Context, input *ApplyPendingMaintenanceActionInput, opts ...request.Option) (*ApplyPendingMaintenanceActionOutput, error) { + req, out := c.ApplyPendingMaintenanceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" + +// CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CopyDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CopyDBClusterParameterGroup for more information on using the CopyDBClusterParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CopyDBClusterParameterGroupRequest method. +// req, resp := client.CopyDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterParameterGroup +func (c *DocDB) CopyDBClusterParameterGroupRequest(input *CopyDBClusterParameterGroupInput) (req *request.Request, output *CopyDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opCopyDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyDBClusterParameterGroupInput{} + } + + output = &CopyDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Copies the specified DB cluster parameter group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CopyDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" +// This request would cause you to exceed the allowed number of DB parameter +// groups. +// +// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" +// A DB parameter group with the same name already exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterParameterGroup +func (c *DocDB) CopyDBClusterParameterGroup(input *CopyDBClusterParameterGroupInput) (*CopyDBClusterParameterGroupOutput, error) { + req, out := c.CopyDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// CopyDBClusterParameterGroupWithContext is the same as CopyDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CopyDBClusterParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CopyDBClusterParameterGroupWithContext(ctx aws.Context, input *CopyDBClusterParameterGroupInput, opts ...request.Option) (*CopyDBClusterParameterGroupOutput, error) { + req, out := c.CopyDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" + +// CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CopyDBClusterSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CopyDBClusterSnapshot for more information on using the CopyDBClusterSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CopyDBClusterSnapshotRequest method. +// req, resp := client.CopyDBClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterSnapshot +func (c *DocDB) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (req *request.Request, output *CopyDBClusterSnapshotOutput) { + op := &request.Operation{ + Name: opCopyDBClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyDBClusterSnapshotInput{} + } + + output = &CopyDBClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyDBClusterSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Copies a snapshot of a DB cluster. +// +// To copy a DB cluster snapshot from a shared manual DB cluster snapshot, SourceDBClusterSnapshotIdentifier +// must be the Amazon Resource Name (ARN) of the shared DB cluster snapshot. +// +// To cancel the copy operation after it is in progress, delete the target DB +// cluster snapshot identified by TargetDBClusterSnapshotIdentifier while that +// DB cluster snapshot is in the copying status. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CopyDBClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" +// You already have a DB cluster snapshot with the given identifier. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// The request would cause you to exceed the allowed number of DB snapshots. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// An error occurred when accessing an AWS KMS key. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterSnapshot +func (c *DocDB) CopyDBClusterSnapshot(input *CopyDBClusterSnapshotInput) (*CopyDBClusterSnapshotOutput, error) { + req, out := c.CopyDBClusterSnapshotRequest(input) + return out, req.Send() +} + +// CopyDBClusterSnapshotWithContext is the same as CopyDBClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CopyDBClusterSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CopyDBClusterSnapshotWithContext(ctx aws.Context, input *CopyDBClusterSnapshotInput, opts ...request.Option) (*CopyDBClusterSnapshotOutput, error) { + req, out := c.CopyDBClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBCluster = "CreateDBCluster" + +// CreateDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDBCluster for more information on using the CreateDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDBClusterRequest method. +// req, resp := client.CreateDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBCluster +func (c *DocDB) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request.Request, output *CreateDBClusterOutput) { + op := &request.Operation{ + Name: opCreateDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterInput{} + } + + output = &CreateDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Creates a new Amazon DocumentDB DB cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CreateDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// You already have a DB cluster with the given identifier. +// +// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" +// There is not enough storage available for the current action. You might be +// able to resolve this error by updating your subnet group to use different +// Availability Zones that have more storage available. +// +// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" +// The DB cluster can't be created because you have reached the maximum allowed +// quota of DB clusters. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The DB subnet group doesn't cover all Availability Zones after it is created +// because of changes that were made. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" +// The DB subnet group can't be deleted because it's in use. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance isn't in the available state. +// +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter +// group. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// An error occurred when accessing an AWS KMS key. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBCluster +func (c *DocDB) CreateDBCluster(input *CreateDBClusterInput) (*CreateDBClusterOutput, error) { + req, out := c.CreateDBClusterRequest(input) + return out, req.Send() +} + +// CreateDBClusterWithContext is the same as CreateDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CreateDBClusterWithContext(ctx aws.Context, input *CreateDBClusterInput, opts ...request.Option) (*CreateDBClusterOutput, error) { + req, out := c.CreateDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" + +// CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDBClusterParameterGroup for more information on using the CreateDBClusterParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDBClusterParameterGroupRequest method. +// req, resp := client.CreateDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterParameterGroup +func (c *DocDB) CreateDBClusterParameterGroupRequest(input *CreateDBClusterParameterGroupInput) (req *request.Request, output *CreateDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opCreateDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterParameterGroupInput{} + } + + output = &CreateDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Creates a new DB cluster parameter group. +// +// Parameters in a DB cluster parameter group apply to all of the instances +// in a DB cluster. +// +// A DB cluster parameter group is initially created with the default parameters +// for the database engine used by instances in the DB cluster. To provide custom +// values for any of the parameters, you must modify the group after you create +// it. After you create a DB cluster parameter group, you must associate it +// with your DB cluster. For the new DB cluster parameter group and associated +// settings to take effect, you must then reboot the DB instances in the DB +// cluster without failover. +// +// After you create a DB cluster parameter group, you should wait at least 5 +// minutes before creating your first DB cluster that uses that DB cluster parameter +// group as the default parameter group. This allows Amazon DocumentDB to fully +// complete the create action before the DB cluster parameter group is used +// as the default for a new DB cluster. This step is especially important for +// parameters that are critical when creating the default database for a DB +// cluster, such as the character set for the default database defined by the +// character_set_database parameter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CreateDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupQuotaExceededFault "DBParameterGroupQuotaExceeded" +// This request would cause you to exceed the allowed number of DB parameter +// groups. +// +// * ErrCodeDBParameterGroupAlreadyExistsFault "DBParameterGroupAlreadyExists" +// A DB parameter group with the same name already exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterParameterGroup +func (c *DocDB) CreateDBClusterParameterGroup(input *CreateDBClusterParameterGroupInput) (*CreateDBClusterParameterGroupOutput, error) { + req, out := c.CreateDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// CreateDBClusterParameterGroupWithContext is the same as CreateDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBClusterParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CreateDBClusterParameterGroupWithContext(ctx aws.Context, input *CreateDBClusterParameterGroupInput, opts ...request.Option) (*CreateDBClusterParameterGroupOutput, error) { + req, out := c.CreateDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" + +// CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBClusterSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDBClusterSnapshot for more information on using the CreateDBClusterSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDBClusterSnapshotRequest method. +// req, resp := client.CreateDBClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterSnapshot +func (c *DocDB) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput) (req *request.Request, output *CreateDBClusterSnapshotOutput) { + op := &request.Operation{ + Name: opCreateDBClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterSnapshotInput{} + } + + output = &CreateDBClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBClusterSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Creates a snapshot of a DB cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CreateDBClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" +// You already have a DB cluster snapshot with the given identifier. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// The request would cause you to exceed the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterSnapshot +func (c *DocDB) CreateDBClusterSnapshot(input *CreateDBClusterSnapshotInput) (*CreateDBClusterSnapshotOutput, error) { + req, out := c.CreateDBClusterSnapshotRequest(input) + return out, req.Send() +} + +// CreateDBClusterSnapshotWithContext is the same as CreateDBClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBClusterSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CreateDBClusterSnapshotWithContext(ctx aws.Context, input *CreateDBClusterSnapshotInput, opts ...request.Option) (*CreateDBClusterSnapshotOutput, error) { + req, out := c.CreateDBClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBInstance = "CreateDBInstance" + +// CreateDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDBInstance for more information on using the CreateDBInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDBInstanceRequest method. +// req, resp := client.CreateDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBInstance +func (c *DocDB) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *request.Request, output *CreateDBInstanceOutput) { + op := &request.Operation{ + Name: opCreateDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBInstanceInput{} + } + + output = &CreateDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Creates a new DB instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CreateDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" +// You already have a DB instance with the given identifier. +// +// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" +// The specified DB instance class isn't available in the specified Availability +// Zone. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" +// DBSecurityGroupName doesn't refer to an existing DB security group. +// +// * ErrCodeInstanceQuotaExceededFault "InstanceQuotaExceeded" +// The request would cause you to exceed the allowed number of DB instances. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The DB subnet group doesn't cover all Availability Zones after it is created +// because of changes that were made. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" +// Storage of the specified StorageType can't be associated with the DB instance. +// +// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" +// The specified CIDR IP or Amazon EC2 security group isn't authorized for the +// specified DB security group. +// +// Amazon DocumentDB also might not be authorized to perform necessary actions +// on your behalf using IAM. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// An error occurred when accessing an AWS KMS key. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBInstance +func (c *DocDB) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { + req, out := c.CreateDBInstanceRequest(input) + return out, req.Send() +} + +// CreateDBInstanceWithContext is the same as CreateDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CreateDBInstanceWithContext(ctx aws.Context, input *CreateDBInstanceInput, opts ...request.Option) (*CreateDBInstanceOutput, error) { + req, out := c.CreateDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateDBSubnetGroup = "CreateDBSubnetGroup" + +// CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateDBSubnetGroup for more information on using the CreateDBSubnetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateDBSubnetGroupRequest method. +// req, resp := client.CreateDBSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBSubnetGroup +func (c *DocDB) CreateDBSubnetGroupRequest(input *CreateDBSubnetGroupInput) (req *request.Request, output *CreateDBSubnetGroupOutput) { + op := &request.Operation{ + Name: opCreateDBSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBSubnetGroupInput{} + } + + output = &CreateDBSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBSubnetGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Creates a new DB subnet group. DB subnet groups must contain at least one +// subnet in at least two Availability Zones in the AWS Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation CreateDBSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBSubnetGroupAlreadyExistsFault "DBSubnetGroupAlreadyExists" +// DBSubnetGroupName is already being used by an existing DB subnet group. +// +// * ErrCodeDBSubnetGroupQuotaExceededFault "DBSubnetGroupQuotaExceeded" +// The request would cause you to exceed the allowed number of DB subnet groups. +// +// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" +// The request would cause you to exceed the allowed number of subnets in a +// DB subnet group. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBSubnetGroup +func (c *DocDB) CreateDBSubnetGroup(input *CreateDBSubnetGroupInput) (*CreateDBSubnetGroupOutput, error) { + req, out := c.CreateDBSubnetGroupRequest(input) + return out, req.Send() +} + +// CreateDBSubnetGroupWithContext is the same as CreateDBSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBSubnetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) CreateDBSubnetGroupWithContext(ctx aws.Context, input *CreateDBSubnetGroupInput, opts ...request.Option) (*CreateDBSubnetGroupOutput, error) { + req, out := c.CreateDBSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBCluster = "DeleteDBCluster" + +// DeleteDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDBCluster for more information on using the DeleteDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDBClusterRequest method. +// req, resp := client.DeleteDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBCluster +func (c *DocDB) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request.Request, output *DeleteDBClusterOutput) { + op := &request.Operation{ + Name: opDeleteDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterInput{} + } + + output = &DeleteDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Deletes a previously provisioned DB cluster. When you delete a DB cluster, +// all automated backups for that DB cluster are deleted and can't be recovered. +// Manual DB cluster snapshots of the specified DB cluster are not deleted. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DeleteDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" +// You already have a DB cluster snapshot with the given identifier. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// The request would cause you to exceed the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBCluster +func (c *DocDB) DeleteDBCluster(input *DeleteDBClusterInput) (*DeleteDBClusterOutput, error) { + req, out := c.DeleteDBClusterRequest(input) + return out, req.Send() +} + +// DeleteDBClusterWithContext is the same as DeleteDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DeleteDBClusterWithContext(ctx aws.Context, input *DeleteDBClusterInput, opts ...request.Option) (*DeleteDBClusterOutput, error) { + req, out := c.DeleteDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" + +// DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDBClusterParameterGroup for more information on using the DeleteDBClusterParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDBClusterParameterGroupRequest method. +// req, resp := client.DeleteDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterParameterGroup +func (c *DocDB) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParameterGroupInput) (req *request.Request, output *DeleteDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opDeleteDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterParameterGroupInput{} + } + + output = &DeleteDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Deletes a specified DB cluster parameter group. The DB cluster parameter +// group to be deleted can't be associated with any DB clusters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DeleteDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use, or it is in a state that is not valid. +// If you are trying to delete the parameter group, you can't delete it when +// the parameter group is in this state. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterParameterGroup +func (c *DocDB) DeleteDBClusterParameterGroup(input *DeleteDBClusterParameterGroupInput) (*DeleteDBClusterParameterGroupOutput, error) { + req, out := c.DeleteDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// DeleteDBClusterParameterGroupWithContext is the same as DeleteDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBClusterParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DeleteDBClusterParameterGroupWithContext(ctx aws.Context, input *DeleteDBClusterParameterGroupInput, opts ...request.Option) (*DeleteDBClusterParameterGroupOutput, error) { + req, out := c.DeleteDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" + +// DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBClusterSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDBClusterSnapshot for more information on using the DeleteDBClusterSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDBClusterSnapshotRequest method. +// req, resp := client.DeleteDBClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterSnapshot +func (c *DocDB) DeleteDBClusterSnapshotRequest(input *DeleteDBClusterSnapshotInput) (req *request.Request, output *DeleteDBClusterSnapshotOutput) { + op := &request.Operation{ + Name: opDeleteDBClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterSnapshotInput{} + } + + output = &DeleteDBClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBClusterSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Deletes a DB cluster snapshot. If the snapshot is being copied, the copy +// operation is terminated. +// +// The DB cluster snapshot must be in the available state to be deleted. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DeleteDBClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBClusterSnapshot +func (c *DocDB) DeleteDBClusterSnapshot(input *DeleteDBClusterSnapshotInput) (*DeleteDBClusterSnapshotOutput, error) { + req, out := c.DeleteDBClusterSnapshotRequest(input) + return out, req.Send() +} + +// DeleteDBClusterSnapshotWithContext is the same as DeleteDBClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBClusterSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DeleteDBClusterSnapshotWithContext(ctx aws.Context, input *DeleteDBClusterSnapshotInput, opts ...request.Option) (*DeleteDBClusterSnapshotOutput, error) { + req, out := c.DeleteDBClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBInstance = "DeleteDBInstance" + +// DeleteDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDBInstance for more information on using the DeleteDBInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDBInstanceRequest method. +// req, resp := client.DeleteDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBInstance +func (c *DocDB) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *request.Request, output *DeleteDBInstanceOutput) { + op := &request.Operation{ + Name: opDeleteDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBInstanceInput{} + } + + output = &DeleteDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Deletes a previously provisioned DB instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DeleteDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance isn't in the available state. +// +// * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" +// DBSnapshotIdentifier is already being used by an existing snapshot. +// +// * ErrCodeSnapshotQuotaExceededFault "SnapshotQuotaExceeded" +// The request would cause you to exceed the allowed number of DB snapshots. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBInstance +func (c *DocDB) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { + req, out := c.DeleteDBInstanceRequest(input) + return out, req.Send() +} + +// DeleteDBInstanceWithContext is the same as DeleteDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DeleteDBInstanceWithContext(ctx aws.Context, input *DeleteDBInstanceInput, opts ...request.Option) (*DeleteDBInstanceOutput, error) { + req, out := c.DeleteDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" + +// DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteDBSubnetGroup for more information on using the DeleteDBSubnetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteDBSubnetGroupRequest method. +// req, resp := client.DeleteDBSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBSubnetGroup +func (c *DocDB) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req *request.Request, output *DeleteDBSubnetGroupOutput) { + op := &request.Operation{ + Name: opDeleteDBSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBSubnetGroupInput{} + } + + output = &DeleteDBSubnetGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDBSubnetGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Deletes a DB subnet group. +// +// The specified database subnet group must not be associated with any DB instances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DeleteDBSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" +// The DB subnet group can't be deleted because it's in use. +// +// * ErrCodeInvalidDBSubnetStateFault "InvalidDBSubnetStateFault" +// The DB subnet isn't in the available state. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DeleteDBSubnetGroup +func (c *DocDB) DeleteDBSubnetGroup(input *DeleteDBSubnetGroupInput) (*DeleteDBSubnetGroupOutput, error) { + req, out := c.DeleteDBSubnetGroupRequest(input) + return out, req.Send() +} + +// DeleteDBSubnetGroupWithContext is the same as DeleteDBSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBSubnetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DeleteDBSubnetGroupWithContext(ctx aws.Context, input *DeleteDBSubnetGroupInput, opts ...request.Option) (*DeleteDBSubnetGroupOutput, error) { + req, out := c.DeleteDBSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" + +// DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterParameterGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBClusterParameterGroups for more information on using the DescribeDBClusterParameterGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBClusterParameterGroupsRequest method. +// req, resp := client.DescribeDBClusterParameterGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameterGroups +func (c *DocDB) DescribeDBClusterParameterGroupsRequest(input *DescribeDBClusterParameterGroupsInput) (req *request.Request, output *DescribeDBClusterParameterGroupsOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterParameterGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterParameterGroupsInput{} + } + + output = &DescribeDBClusterParameterGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterParameterGroups API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns a list of DBClusterParameterGroup descriptions. If a DBClusterParameterGroupName +// parameter is specified, the list contains only the description of the specified +// DB cluster parameter group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBClusterParameterGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameterGroups +func (c *DocDB) DescribeDBClusterParameterGroups(input *DescribeDBClusterParameterGroupsInput) (*DescribeDBClusterParameterGroupsOutput, error) { + req, out := c.DescribeDBClusterParameterGroupsRequest(input) + return out, req.Send() +} + +// DescribeDBClusterParameterGroupsWithContext is the same as DescribeDBClusterParameterGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterParameterGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBClusterParameterGroupsWithContext(ctx aws.Context, input *DescribeDBClusterParameterGroupsInput, opts ...request.Option) (*DescribeDBClusterParameterGroupsOutput, error) { + req, out := c.DescribeDBClusterParameterGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterParameters = "DescribeDBClusterParameters" + +// DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBClusterParameters for more information on using the DescribeDBClusterParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBClusterParametersRequest method. +// req, resp := client.DescribeDBClusterParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameters +func (c *DocDB) DescribeDBClusterParametersRequest(input *DescribeDBClusterParametersInput) (req *request.Request, output *DescribeDBClusterParametersOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterParametersInput{} + } + + output = &DescribeDBClusterParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterParameters API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns the detailed parameter list for a particular DB cluster parameter +// group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBClusterParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterParameters +func (c *DocDB) DescribeDBClusterParameters(input *DescribeDBClusterParametersInput) (*DescribeDBClusterParametersOutput, error) { + req, out := c.DescribeDBClusterParametersRequest(input) + return out, req.Send() +} + +// DescribeDBClusterParametersWithContext is the same as DescribeDBClusterParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBClusterParametersWithContext(ctx aws.Context, input *DescribeDBClusterParametersInput, opts ...request.Option) (*DescribeDBClusterParametersOutput, error) { + req, out := c.DescribeDBClusterParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttributes" + +// DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBClusterSnapshotAttributes for more information on using the DescribeDBClusterSnapshotAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBClusterSnapshotAttributesRequest method. +// req, resp := client.DescribeDBClusterSnapshotAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshotAttributes +func (c *DocDB) DescribeDBClusterSnapshotAttributesRequest(input *DescribeDBClusterSnapshotAttributesInput) (req *request.Request, output *DescribeDBClusterSnapshotAttributesOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterSnapshotAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterSnapshotAttributesInput{} + } + + output = &DescribeDBClusterSnapshotAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterSnapshotAttributes API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns a list of DB cluster snapshot attribute names and values for a manual +// DB cluster snapshot. +// +// When you share snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes +// returns the restore attribute and a list of IDs for the AWS accounts that +// are authorized to copy or restore the manual DB cluster snapshot. If all +// is included in the list of values for the restore attribute, then the manual +// DB cluster snapshot is public and can be copied or restored by all AWS accounts. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBClusterSnapshotAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshotAttributes +func (c *DocDB) DescribeDBClusterSnapshotAttributes(input *DescribeDBClusterSnapshotAttributesInput) (*DescribeDBClusterSnapshotAttributesOutput, error) { + req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) + return out, req.Send() +} + +// DescribeDBClusterSnapshotAttributesWithContext is the same as DescribeDBClusterSnapshotAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterSnapshotAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBClusterSnapshotAttributesWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotAttributesInput, opts ...request.Option) (*DescribeDBClusterSnapshotAttributesOutput, error) { + req, out := c.DescribeDBClusterSnapshotAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" + +// DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterSnapshots operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBClusterSnapshots for more information on using the DescribeDBClusterSnapshots +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBClusterSnapshotsRequest method. +// req, resp := client.DescribeDBClusterSnapshotsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshots +func (c *DocDB) DescribeDBClusterSnapshotsRequest(input *DescribeDBClusterSnapshotsInput) (req *request.Request, output *DescribeDBClusterSnapshotsOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterSnapshotsInput{} + } + + output = &DescribeDBClusterSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterSnapshots API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns information about DB cluster snapshots. This API operation supports +// pagination. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBClusterSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusterSnapshots +func (c *DocDB) DescribeDBClusterSnapshots(input *DescribeDBClusterSnapshotsInput) (*DescribeDBClusterSnapshotsOutput, error) { + req, out := c.DescribeDBClusterSnapshotsRequest(input) + return out, req.Send() +} + +// DescribeDBClusterSnapshotsWithContext is the same as DescribeDBClusterSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterSnapshots for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBClusterSnapshotsWithContext(ctx aws.Context, input *DescribeDBClusterSnapshotsInput, opts ...request.Option) (*DescribeDBClusterSnapshotsOutput, error) { + req, out := c.DescribeDBClusterSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDBClusters = "DescribeDBClusters" + +// DescribeDBClustersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBClusters for more information on using the DescribeDBClusters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBClustersRequest method. +// req, resp := client.DescribeDBClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusters +func (c *DocDB) DescribeDBClustersRequest(input *DescribeDBClustersInput) (req *request.Request, output *DescribeDBClustersOutput) { + op := &request.Operation{ + Name: opDescribeDBClusters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBClustersInput{} + } + + output = &DescribeDBClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusters API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns information about provisioned Amazon DocumentDB DB clusters. This +// API operation supports pagination. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBClusters +func (c *DocDB) DescribeDBClusters(input *DescribeDBClustersInput) (*DescribeDBClustersOutput, error) { + req, out := c.DescribeDBClustersRequest(input) + return out, req.Send() +} + +// DescribeDBClustersWithContext is the same as DescribeDBClusters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBClustersWithContext(ctx aws.Context, input *DescribeDBClustersInput, opts ...request.Option) (*DescribeDBClustersOutput, error) { + req, out := c.DescribeDBClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBClustersPages iterates over the pages of a DescribeDBClusters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBClusters method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDBClusters operation. +// pageNum := 0 +// err := client.DescribeDBClustersPages(params, +// func(page *DescribeDBClustersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DocDB) DescribeDBClustersPages(input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool) error { + return c.DescribeDBClustersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBClustersPagesWithContext same as DescribeDBClustersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBClustersPagesWithContext(ctx aws.Context, input *DescribeDBClustersInput, fn func(*DescribeDBClustersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBClustersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBClustersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBClustersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBEngineVersions = "DescribeDBEngineVersions" + +// DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBEngineVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBEngineVersions for more information on using the DescribeDBEngineVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBEngineVersionsRequest method. +// req, resp := client.DescribeDBEngineVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBEngineVersions +func (c *DocDB) DescribeDBEngineVersionsRequest(input *DescribeDBEngineVersionsInput) (req *request.Request, output *DescribeDBEngineVersionsOutput) { + op := &request.Operation{ + Name: opDescribeDBEngineVersions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBEngineVersionsInput{} + } + + output = &DescribeDBEngineVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBEngineVersions API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns a list of the available DB engines. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBEngineVersions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBEngineVersions +func (c *DocDB) DescribeDBEngineVersions(input *DescribeDBEngineVersionsInput) (*DescribeDBEngineVersionsOutput, error) { + req, out := c.DescribeDBEngineVersionsRequest(input) + return out, req.Send() +} + +// DescribeDBEngineVersionsWithContext is the same as DescribeDBEngineVersions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBEngineVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBEngineVersionsWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, opts ...request.Option) (*DescribeDBEngineVersionsOutput, error) { + req, out := c.DescribeDBEngineVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBEngineVersionsPages iterates over the pages of a DescribeDBEngineVersions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBEngineVersions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDBEngineVersions operation. +// pageNum := 0 +// err := client.DescribeDBEngineVersionsPages(params, +// func(page *DescribeDBEngineVersionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DocDB) DescribeDBEngineVersionsPages(input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool) error { + return c.DescribeDBEngineVersionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBEngineVersionsPagesWithContext same as DescribeDBEngineVersionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *DescribeDBEngineVersionsInput, fn func(*DescribeDBEngineVersionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBEngineVersionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBEngineVersionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBEngineVersionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBInstances = "DescribeDBInstances" + +// DescribeDBInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBInstances for more information on using the DescribeDBInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBInstancesRequest method. +// req, resp := client.DescribeDBInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBInstances +func (c *DocDB) DescribeDBInstancesRequest(input *DescribeDBInstancesInput) (req *request.Request, output *DescribeDBInstancesOutput) { + op := &request.Operation{ + Name: opDescribeDBInstances, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBInstancesInput{} + } + + output = &DescribeDBInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBInstances API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns information about provisioned Amazon DocumentDB instances. This API +// supports pagination. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBInstances for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBInstances +func (c *DocDB) DescribeDBInstances(input *DescribeDBInstancesInput) (*DescribeDBInstancesOutput, error) { + req, out := c.DescribeDBInstancesRequest(input) + return out, req.Send() +} + +// DescribeDBInstancesWithContext is the same as DescribeDBInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBInstances for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBInstancesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.Option) (*DescribeDBInstancesOutput, error) { + req, out := c.DescribeDBInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBInstancesPages iterates over the pages of a DescribeDBInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBInstances method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDBInstances operation. +// pageNum := 0 +// err := client.DescribeDBInstancesPages(params, +// func(page *DescribeDBInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DocDB) DescribeDBInstancesPages(input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool) error { + return c.DescribeDBInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBInstancesPagesWithContext same as DescribeDBInstancesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBInstancesPagesWithContext(ctx aws.Context, input *DescribeDBInstancesInput, fn func(*DescribeDBInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBInstancesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" + +// DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBSubnetGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDBSubnetGroups for more information on using the DescribeDBSubnetGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDBSubnetGroupsRequest method. +// req, resp := client.DescribeDBSubnetGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBSubnetGroups +func (c *DocDB) DescribeDBSubnetGroupsRequest(input *DescribeDBSubnetGroupsInput) (req *request.Request, output *DescribeDBSubnetGroupsOutput) { + op := &request.Operation{ + Name: opDescribeDBSubnetGroups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBSubnetGroupsInput{} + } + + output = &DescribeDBSubnetGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBSubnetGroups API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns a list of DBSubnetGroup descriptions. If a DBSubnetGroupName is specified, +// the list will contain only the descriptions of the specified DBSubnetGroup. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeDBSubnetGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeDBSubnetGroups +func (c *DocDB) DescribeDBSubnetGroups(input *DescribeDBSubnetGroupsInput) (*DescribeDBSubnetGroupsOutput, error) { + req, out := c.DescribeDBSubnetGroupsRequest(input) + return out, req.Send() +} + +// DescribeDBSubnetGroupsWithContext is the same as DescribeDBSubnetGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBSubnetGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBSubnetGroupsWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, opts ...request.Option) (*DescribeDBSubnetGroupsOutput, error) { + req, out := c.DescribeDBSubnetGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBSubnetGroupsPages iterates over the pages of a DescribeDBSubnetGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBSubnetGroups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeDBSubnetGroups operation. +// pageNum := 0 +// err := client.DescribeDBSubnetGroupsPages(params, +// func(page *DescribeDBSubnetGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DocDB) DescribeDBSubnetGroupsPages(input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool) error { + return c.DescribeDBSubnetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBSubnetGroupsPagesWithContext same as DescribeDBSubnetGroupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeDBSubnetGroupsPagesWithContext(ctx aws.Context, input *DescribeDBSubnetGroupsInput, fn func(*DescribeDBSubnetGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBSubnetGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBSubnetGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBSubnetGroupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterParameters" + +// DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEngineDefaultClusterParameters for more information on using the DescribeEngineDefaultClusterParameters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEngineDefaultClusterParametersRequest method. +// req, resp := client.DescribeEngineDefaultClusterParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEngineDefaultClusterParameters +func (c *DocDB) DescribeEngineDefaultClusterParametersRequest(input *DescribeEngineDefaultClusterParametersInput) (req *request.Request, output *DescribeEngineDefaultClusterParametersOutput) { + op := &request.Operation{ + Name: opDescribeEngineDefaultClusterParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEngineDefaultClusterParametersInput{} + } + + output = &DescribeEngineDefaultClusterParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEngineDefaultClusterParameters API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns the default engine and system parameter information for the cluster +// database engine. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeEngineDefaultClusterParameters for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEngineDefaultClusterParameters +func (c *DocDB) DescribeEngineDefaultClusterParameters(input *DescribeEngineDefaultClusterParametersInput) (*DescribeEngineDefaultClusterParametersOutput, error) { + req, out := c.DescribeEngineDefaultClusterParametersRequest(input) + return out, req.Send() +} + +// DescribeEngineDefaultClusterParametersWithContext is the same as DescribeEngineDefaultClusterParameters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEngineDefaultClusterParameters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeEngineDefaultClusterParametersWithContext(ctx aws.Context, input *DescribeEngineDefaultClusterParametersInput, opts ...request.Option) (*DescribeEngineDefaultClusterParametersOutput, error) { + req, out := c.DescribeEngineDefaultClusterParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEventCategories = "DescribeEventCategories" + +// DescribeEventCategoriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEventCategories operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEventCategories for more information on using the DescribeEventCategories +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventCategoriesRequest method. +// req, resp := client.DescribeEventCategoriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEventCategories +func (c *DocDB) DescribeEventCategoriesRequest(input *DescribeEventCategoriesInput) (req *request.Request, output *DescribeEventCategoriesOutput) { + op := &request.Operation{ + Name: opDescribeEventCategories, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEventCategoriesInput{} + } + + output = &DescribeEventCategoriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEventCategories API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Displays a list of categories for all event source types, or, if specified, +// for a specified source type. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeEventCategories for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEventCategories +func (c *DocDB) DescribeEventCategories(input *DescribeEventCategoriesInput) (*DescribeEventCategoriesOutput, error) { + req, out := c.DescribeEventCategoriesRequest(input) + return out, req.Send() +} + +// DescribeEventCategoriesWithContext is the same as DescribeEventCategories with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEventCategories for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeEventCategoriesWithContext(ctx aws.Context, input *DescribeEventCategoriesInput, opts ...request.Option) (*DescribeEventCategoriesOutput, error) { + req, out := c.DescribeEventCategoriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEvents = "DescribeEvents" + +// DescribeEventsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEvents operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEvents for more information on using the DescribeEvents +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEventsRequest method. +// req, resp := client.DescribeEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEvents +func (c *DocDB) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { + op := &request.Operation{ + Name: opDescribeEvents, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeEventsInput{} + } + + output = &DescribeEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEvents API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns events related to DB instances, DB security groups, DB snapshots, +// and DB parameter groups for the past 14 days. You can obtain events specific +// to a particular DB instance, DB security group, DB snapshot, or DB parameter +// group by providing the name as a parameter. By default, the events of the +// past hour are returned. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeEvents for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeEvents +func (c *DocDB) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { + req, out := c.DescribeEventsRequest(input) + return out, req.Send() +} + +// DescribeEventsWithContext is the same as DescribeEvents with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEvents for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { + req, out := c.DescribeEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeEventsPages iterates over the pages of a DescribeEvents operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEvents method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeEvents operation. +// pageNum := 0 +// err := client.DescribeEventsPages(params, +// func(page *DescribeEventsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DocDB) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { + return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeEventsPagesWithContext same as DescribeEventsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEventsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEventsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions" + +// DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeOrderableDBInstanceOptions for more information on using the DescribeOrderableDBInstanceOptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeOrderableDBInstanceOptionsRequest method. +// req, resp := client.DescribeOrderableDBInstanceOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeOrderableDBInstanceOptions +func (c *DocDB) DescribeOrderableDBInstanceOptionsRequest(input *DescribeOrderableDBInstanceOptionsInput) (req *request.Request, output *DescribeOrderableDBInstanceOptionsOutput) { + op := &request.Operation{ + Name: opDescribeOrderableDBInstanceOptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeOrderableDBInstanceOptionsInput{} + } + + output = &DescribeOrderableDBInstanceOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOrderableDBInstanceOptions API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns a list of orderable DB instance options for the specified engine. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribeOrderableDBInstanceOptions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribeOrderableDBInstanceOptions +func (c *DocDB) DescribeOrderableDBInstanceOptions(input *DescribeOrderableDBInstanceOptionsInput) (*DescribeOrderableDBInstanceOptionsOutput, error) { + req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) + return out, req.Send() +} + +// DescribeOrderableDBInstanceOptionsWithContext is the same as DescribeOrderableDBInstanceOptions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOrderableDBInstanceOptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeOrderableDBInstanceOptionsWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, opts ...request.Option) (*DescribeOrderableDBInstanceOptionsOutput, error) { + req, out := c.DescribeOrderableDBInstanceOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeOrderableDBInstanceOptionsPages iterates over the pages of a DescribeOrderableDBInstanceOptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeOrderableDBInstanceOptions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeOrderableDBInstanceOptions operation. +// pageNum := 0 +// err := client.DescribeOrderableDBInstanceOptionsPages(params, +// func(page *DescribeOrderableDBInstanceOptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *DocDB) DescribeOrderableDBInstanceOptionsPages(input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool) error { + return c.DescribeOrderableDBInstanceOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeOrderableDBInstanceOptionsPagesWithContext same as DescribeOrderableDBInstanceOptionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribeOrderableDBInstanceOptionsPagesWithContext(ctx aws.Context, input *DescribeOrderableDBInstanceOptionsInput, fn func(*DescribeOrderableDBInstanceOptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeOrderableDBInstanceOptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeOrderableDBInstanceOptionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeOrderableDBInstanceOptionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" + +// DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribePendingMaintenanceActions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribePendingMaintenanceActions for more information on using the DescribePendingMaintenanceActions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribePendingMaintenanceActionsRequest method. +// req, resp := client.DescribePendingMaintenanceActionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribePendingMaintenanceActions +func (c *DocDB) DescribePendingMaintenanceActionsRequest(input *DescribePendingMaintenanceActionsInput) (req *request.Request, output *DescribePendingMaintenanceActionsOutput) { + op := &request.Operation{ + Name: opDescribePendingMaintenanceActions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePendingMaintenanceActionsInput{} + } + + output = &DescribePendingMaintenanceActionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePendingMaintenanceActions API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Returns a list of resources (for example, DB instances) that have at least +// one pending maintenance action. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation DescribePendingMaintenanceActions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" +// The specified resource ID was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/DescribePendingMaintenanceActions +func (c *DocDB) DescribePendingMaintenanceActions(input *DescribePendingMaintenanceActionsInput) (*DescribePendingMaintenanceActionsOutput, error) { + req, out := c.DescribePendingMaintenanceActionsRequest(input) + return out, req.Send() +} + +// DescribePendingMaintenanceActionsWithContext is the same as DescribePendingMaintenanceActions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePendingMaintenanceActions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) DescribePendingMaintenanceActionsWithContext(ctx aws.Context, input *DescribePendingMaintenanceActionsInput, opts ...request.Option) (*DescribePendingMaintenanceActionsOutput, error) { + req, out := c.DescribePendingMaintenanceActionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opFailoverDBCluster = "FailoverDBCluster" + +// FailoverDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the FailoverDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See FailoverDBCluster for more information on using the FailoverDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the FailoverDBClusterRequest method. +// req, resp := client.FailoverDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/FailoverDBCluster +func (c *DocDB) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *request.Request, output *FailoverDBClusterOutput) { + op := &request.Operation{ + Name: opFailoverDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &FailoverDBClusterInput{} + } + + output = &FailoverDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// FailoverDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Forces a failover for a DB cluster. +// +// A failover for a DB cluster promotes one of the Amazon DocumentDB replicas +// (read-only instances) in the DB cluster to be the primary instance (the cluster +// writer). +// +// If the primary instance fails, Amazon DocumentDB automatically fails over +// to an Amazon DocumentDB replica, if one exists. You can force a failover +// when you want to simulate a failure of a primary instance for testing. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation FailoverDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance isn't in the available state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/FailoverDBCluster +func (c *DocDB) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { + req, out := c.FailoverDBClusterRequest(input) + return out, req.Send() +} + +// FailoverDBClusterWithContext is the same as FailoverDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See FailoverDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) FailoverDBClusterWithContext(ctx aws.Context, input *FailoverDBClusterInput, opts ...request.Option) (*FailoverDBClusterOutput, error) { + req, out := c.FailoverDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ListTagsForResource +func (c *DocDB) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Lists all tags on an Amazon DocumentDB resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ListTagsForResource +func (c *DocDB) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBCluster = "ModifyDBCluster" + +// ModifyDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyDBCluster for more information on using the ModifyDBCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyDBClusterRequest method. +// req, resp := client.ModifyDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBCluster +func (c *DocDB) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request.Request, output *ModifyDBClusterOutput) { + op := &request.Operation{ + Name: opModifyDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterInput{} + } + + output = &ModifyDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBCluster API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Modifies a setting for an Amazon DocumentDB DB cluster. You can change one +// or more database configuration parameters by specifying these parameters +// and the new values in the request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ModifyDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The DB subnet group doesn't cover all Availability Zones after it is created +// because of changes that were made. +// +// * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" +// The DB subnet group can't be deleted because it's in use. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" +// DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter +// group. +// +// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" +// The state of the DB security group doesn't allow deletion. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance isn't in the available state. +// +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// You already have a DB cluster with the given identifier. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBCluster +func (c *DocDB) ModifyDBCluster(input *ModifyDBClusterInput) (*ModifyDBClusterOutput, error) { + req, out := c.ModifyDBClusterRequest(input) + return out, req.Send() +} + +// ModifyDBClusterWithContext is the same as ModifyDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ModifyDBClusterWithContext(ctx aws.Context, input *ModifyDBClusterInput, opts ...request.Option) (*ModifyDBClusterOutput, error) { + req, out := c.ModifyDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" + +// ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyDBClusterParameterGroup for more information on using the ModifyDBClusterParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyDBClusterParameterGroupRequest method. +// req, resp := client.ModifyDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterParameterGroup +func (c *DocDB) ModifyDBClusterParameterGroupRequest(input *ModifyDBClusterParameterGroupInput) (req *request.Request, output *ModifyDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opModifyDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterParameterGroupInput{} + } + + output = &ModifyDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Modifies the parameters of a DB cluster parameter group. To modify more than +// one parameter, submit a list of the following: ParameterName, ParameterValue, +// and ApplyMethod. A maximum of 20 parameters can be modified in a single request. +// +// Changes to dynamic parameters are applied immediately. Changes to static +// parameters require a reboot or maintenance window before the change can take +// effect. +// +// After you create a DB cluster parameter group, you should wait at least 5 +// minutes before creating your first DB cluster that uses that DB cluster parameter +// group as the default parameter group. This allows Amazon DocumentDB to fully +// complete the create action before the parameter group is used as the default +// for a new DB cluster. This step is especially important for parameters that +// are critical when creating the default database for a DB cluster, such as +// the character set for the default database defined by the character_set_database +// parameter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ModifyDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use, or it is in a state that is not valid. +// If you are trying to delete the parameter group, you can't delete it when +// the parameter group is in this state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterParameterGroup +func (c *DocDB) ModifyDBClusterParameterGroup(input *ModifyDBClusterParameterGroupInput) (*ModifyDBClusterParameterGroupOutput, error) { + req, out := c.ModifyDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// ModifyDBClusterParameterGroupWithContext is the same as ModifyDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBClusterParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ModifyDBClusterParameterGroupWithContext(ctx aws.Context, input *ModifyDBClusterParameterGroupInput, opts ...request.Option) (*ModifyDBClusterParameterGroupOutput, error) { + req, out := c.ModifyDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" + +// ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyDBClusterSnapshotAttribute for more information on using the ModifyDBClusterSnapshotAttribute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyDBClusterSnapshotAttributeRequest method. +// req, resp := client.ModifyDBClusterSnapshotAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterSnapshotAttribute +func (c *DocDB) ModifyDBClusterSnapshotAttributeRequest(input *ModifyDBClusterSnapshotAttributeInput) (req *request.Request, output *ModifyDBClusterSnapshotAttributeOutput) { + op := &request.Operation{ + Name: opModifyDBClusterSnapshotAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterSnapshotAttributeInput{} + } + + output = &ModifyDBClusterSnapshotAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBClusterSnapshotAttribute API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Adds an attribute and values to, or removes an attribute and values from, +// a manual DB cluster snapshot. +// +// To share a manual DB cluster snapshot with other AWS accounts, specify restore +// as the AttributeName, and use the ValuesToAdd parameter to add a list of +// IDs of the AWS accounts that are authorized to restore the manual DB cluster +// snapshot. Use the value all to make the manual DB cluster snapshot public, +// which means that it can be copied or restored by all AWS accounts. Do not +// add the all value for any manual DB cluster snapshots that contain private +// information that you don't want available to all AWS accounts. If a manual +// DB cluster snapshot is encrypted, it can be shared, but only by specifying +// a list of authorized AWS account IDs for the ValuesToAdd parameter. You can't +// use all as a value for that parameter in this case. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ModifyDBClusterSnapshotAttribute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// * ErrCodeSharedSnapshotQuotaExceededFault "SharedSnapshotQuotaExceeded" +// You have exceeded the maximum number of accounts that you can share a manual +// DB snapshot with. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBClusterSnapshotAttribute +func (c *DocDB) ModifyDBClusterSnapshotAttribute(input *ModifyDBClusterSnapshotAttributeInput) (*ModifyDBClusterSnapshotAttributeOutput, error) { + req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) + return out, req.Send() +} + +// ModifyDBClusterSnapshotAttributeWithContext is the same as ModifyDBClusterSnapshotAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBClusterSnapshotAttribute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ModifyDBClusterSnapshotAttributeWithContext(ctx aws.Context, input *ModifyDBClusterSnapshotAttributeInput, opts ...request.Option) (*ModifyDBClusterSnapshotAttributeOutput, error) { + req, out := c.ModifyDBClusterSnapshotAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBInstance = "ModifyDBInstance" + +// ModifyDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyDBInstance for more information on using the ModifyDBInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyDBInstanceRequest method. +// req, resp := client.ModifyDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBInstance +func (c *DocDB) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *request.Request, output *ModifyDBInstanceOutput) { + op := &request.Operation{ + Name: opModifyDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBInstanceInput{} + } + + output = &ModifyDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Modifies settings for a DB instance. You can change one or more database +// configuration parameters by specifying these parameters and the new values +// in the request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ModifyDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance isn't in the available state. +// +// * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" +// The state of the DB security group doesn't allow deletion. +// +// * ErrCodeDBInstanceAlreadyExistsFault "DBInstanceAlreadyExists" +// You already have a DB instance with the given identifier. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBSecurityGroupNotFoundFault "DBSecurityGroupNotFound" +// DBSecurityGroupName doesn't refer to an existing DB security group. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" +// The specified DB instance class isn't available in the specified Availability +// Zone. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The DB subnet group doesn't cover all Availability Zones after it is created +// because of changes that were made. +// +// * ErrCodeDBUpgradeDependencyFailureFault "DBUpgradeDependencyFailure" +// The DB upgrade failed because a resource that the DB depends on can't be +// modified. +// +// * ErrCodeStorageTypeNotSupportedFault "StorageTypeNotSupported" +// Storage of the specified StorageType can't be associated with the DB instance. +// +// * ErrCodeAuthorizationNotFoundFault "AuthorizationNotFound" +// The specified CIDR IP or Amazon EC2 security group isn't authorized for the +// specified DB security group. +// +// Amazon DocumentDB also might not be authorized to perform necessary actions +// on your behalf using IAM. +// +// * ErrCodeCertificateNotFoundFault "CertificateNotFound" +// CertificateIdentifier doesn't refer to an existing certificate. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBInstance +func (c *DocDB) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { + req, out := c.ModifyDBInstanceRequest(input) + return out, req.Send() +} + +// ModifyDBInstanceWithContext is the same as ModifyDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ModifyDBInstanceWithContext(ctx aws.Context, input *ModifyDBInstanceInput, opts ...request.Option) (*ModifyDBInstanceOutput, error) { + req, out := c.ModifyDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" + +// ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBSubnetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyDBSubnetGroup for more information on using the ModifyDBSubnetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyDBSubnetGroupRequest method. +// req, resp := client.ModifyDBSubnetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBSubnetGroup +func (c *DocDB) ModifyDBSubnetGroupRequest(input *ModifyDBSubnetGroupInput) (req *request.Request, output *ModifyDBSubnetGroupOutput) { + op := &request.Operation{ + Name: opModifyDBSubnetGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBSubnetGroupInput{} + } + + output = &ModifyDBSubnetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBSubnetGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Modifies an existing DB subnet group. DB subnet groups must contain at least +// one subnet in at least two Availability Zones in the AWS Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ModifyDBSubnetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeDBSubnetQuotaExceededFault "DBSubnetQuotaExceededFault" +// The request would cause you to exceed the allowed number of subnets in a +// DB subnet group. +// +// * ErrCodeSubnetAlreadyInUse "SubnetAlreadyInUse" +// The DB subnet is already in use in the Availability Zone. +// +// * ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs "DBSubnetGroupDoesNotCoverEnoughAZs" +// Subnets in the DB subnet group should cover at least two Availability Zones +// unless there is only one Availability Zone. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ModifyDBSubnetGroup +func (c *DocDB) ModifyDBSubnetGroup(input *ModifyDBSubnetGroupInput) (*ModifyDBSubnetGroupOutput, error) { + req, out := c.ModifyDBSubnetGroupRequest(input) + return out, req.Send() +} + +// ModifyDBSubnetGroupWithContext is the same as ModifyDBSubnetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBSubnetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ModifyDBSubnetGroupWithContext(ctx aws.Context, input *ModifyDBSubnetGroupInput, opts ...request.Option) (*ModifyDBSubnetGroupOutput, error) { + req, out := c.ModifyDBSubnetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootDBInstance = "RebootDBInstance" + +// RebootDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the RebootDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RebootDBInstance for more information on using the RebootDBInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RebootDBInstanceRequest method. +// req, resp := client.RebootDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RebootDBInstance +func (c *DocDB) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *request.Request, output *RebootDBInstanceOutput) { + op := &request.Operation{ + Name: opRebootDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootDBInstanceInput{} + } + + output = &RebootDBInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootDBInstance API operation for Amazon DocumentDB with MongoDB compatibility. +// +// You might need to reboot your DB instance, usually for maintenance reasons. +// For example, if you make certain changes, or if you change the DB cluster +// parameter group that is associated with the DB instance, you must reboot +// the instance for the changes to take effect. +// +// Rebooting a DB instance restarts the database engine service. Rebooting a +// DB instance results in a momentary outage, during which the DB instance status +// is set to rebooting. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation RebootDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The specified DB instance isn't in the available state. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RebootDBInstance +func (c *DocDB) RebootDBInstance(input *RebootDBInstanceInput) (*RebootDBInstanceOutput, error) { + req, out := c.RebootDBInstanceRequest(input) + return out, req.Send() +} + +// RebootDBInstanceWithContext is the same as RebootDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See RebootDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstanceInput, opts ...request.Option) (*RebootDBInstanceOutput, error) { + req, out := c.RebootDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveTagsFromResource = "RemoveTagsFromResource" + +// RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the +// client's request for the RemoveTagsFromResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveTagsFromResource for more information on using the RemoveTagsFromResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveTagsFromResourceRequest method. +// req, resp := client.RemoveTagsFromResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RemoveTagsFromResource +func (c *DocDB) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput) { + op := &request.Operation{ + Name: opRemoveTagsFromResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveTagsFromResourceInput{} + } + + output = &RemoveTagsFromResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveTagsFromResource API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Removes metadata tags from an Amazon DocumentDB resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation RemoveTagsFromResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RemoveTagsFromResource +func (c *DocDB) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error) { + req, out := c.RemoveTagsFromResourceRequest(input) + return out, req.Send() +} + +// RemoveTagsFromResourceWithContext is the same as RemoveTagsFromResource with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveTagsFromResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error) { + req, out := c.RemoveTagsFromResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" + +// ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ResetDBClusterParameterGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ResetDBClusterParameterGroup for more information on using the ResetDBClusterParameterGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ResetDBClusterParameterGroupRequest method. +// req, resp := client.ResetDBClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ResetDBClusterParameterGroup +func (c *DocDB) ResetDBClusterParameterGroupRequest(input *ResetDBClusterParameterGroupInput) (req *request.Request, output *ResetDBClusterParameterGroupOutput) { + op := &request.Operation{ + Name: opResetDBClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetDBClusterParameterGroupInput{} + } + + output = &ResetDBClusterParameterGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetDBClusterParameterGroup API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Modifies the parameters of a DB cluster parameter group to the default value. +// To reset specific parameters, submit a list of the following: ParameterName +// and ApplyMethod. To reset the entire DB cluster parameter group, specify +// the DBClusterParameterGroupName and ResetAllParameters parameters. +// +// When you reset the entire group, dynamic parameters are updated immediately +// and static parameters are set to pending-reboot to take effect on the next +// DB instance reboot. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation ResetDBClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBParameterGroupStateFault "InvalidDBParameterGroupState" +// The DB parameter group is in use, or it is in a state that is not valid. +// If you are trying to delete the parameter group, you can't delete it when +// the parameter group is in this state. +// +// * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" +// DBParameterGroupName doesn't refer to an existing DB parameter group. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/ResetDBClusterParameterGroup +func (c *DocDB) ResetDBClusterParameterGroup(input *ResetDBClusterParameterGroupInput) (*ResetDBClusterParameterGroupOutput, error) { + req, out := c.ResetDBClusterParameterGroupRequest(input) + return out, req.Send() +} + +// ResetDBClusterParameterGroupWithContext is the same as ResetDBClusterParameterGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ResetDBClusterParameterGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) ResetDBClusterParameterGroupWithContext(ctx aws.Context, input *ResetDBClusterParameterGroupInput, opts ...request.Option) (*ResetDBClusterParameterGroupOutput, error) { + req, out := c.ResetDBClusterParameterGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" + +// RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the RestoreDBClusterFromSnapshot operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RestoreDBClusterFromSnapshot for more information on using the RestoreDBClusterFromSnapshot +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RestoreDBClusterFromSnapshotRequest method. +// req, resp := client.RestoreDBClusterFromSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterFromSnapshot +func (c *DocDB) RestoreDBClusterFromSnapshotRequest(input *RestoreDBClusterFromSnapshotInput) (req *request.Request, output *RestoreDBClusterFromSnapshotOutput) { + op := &request.Operation{ + Name: opRestoreDBClusterFromSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreDBClusterFromSnapshotInput{} + } + + output = &RestoreDBClusterFromSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreDBClusterFromSnapshot API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Creates a new DB cluster from a DB snapshot or DB cluster snapshot. +// +// If a DB snapshot is specified, the target DB cluster is created from the +// source DB snapshot with a default configuration and default security group. +// +// If a DB cluster snapshot is specified, the target DB cluster is created from +// the source DB cluster restore point with the same configuration as the original +// source DB cluster, except that the new DB cluster is created with the default +// security group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation RestoreDBClusterFromSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// You already have a DB cluster with the given identifier. +// +// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" +// The DB cluster can't be created because you have reached the maximum allowed +// quota of DB clusters. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeDBSnapshotNotFoundFault "DBSnapshotNotFound" +// DBSnapshotIdentifier doesn't refer to an existing DB snapshot. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" +// The DB cluster doesn't have enough capacity for the current operation. +// +// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" +// There is not enough storage available for the current action. You might be +// able to resolve this error by updating your subnet group to use different +// Availability Zones that have more storage available. +// +// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" +// The state of the DB snapshot doesn't allow deletion. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The DB subnet group doesn't cover all Availability Zones after it is created +// because of changes that were made. +// +// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" +// You cannot restore from a virtual private cloud (VPC) backup to a non-VPC +// DB instance. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// An error occurred when accessing an AWS KMS key. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterFromSnapshot +func (c *DocDB) RestoreDBClusterFromSnapshot(input *RestoreDBClusterFromSnapshotInput) (*RestoreDBClusterFromSnapshotOutput, error) { + req, out := c.RestoreDBClusterFromSnapshotRequest(input) + return out, req.Send() +} + +// RestoreDBClusterFromSnapshotWithContext is the same as RestoreDBClusterFromSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreDBClusterFromSnapshot for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) RestoreDBClusterFromSnapshotWithContext(ctx aws.Context, input *RestoreDBClusterFromSnapshotInput, opts ...request.Option) (*RestoreDBClusterFromSnapshotOutput, error) { + req, out := c.RestoreDBClusterFromSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" + +// RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the +// client's request for the RestoreDBClusterToPointInTime operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RestoreDBClusterToPointInTime for more information on using the RestoreDBClusterToPointInTime +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RestoreDBClusterToPointInTimeRequest method. +// req, resp := client.RestoreDBClusterToPointInTimeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterToPointInTime +func (c *DocDB) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPointInTimeInput) (req *request.Request, output *RestoreDBClusterToPointInTimeOutput) { + op := &request.Operation{ + Name: opRestoreDBClusterToPointInTime, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreDBClusterToPointInTimeInput{} + } + + output = &RestoreDBClusterToPointInTimeOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreDBClusterToPointInTime API operation for Amazon DocumentDB with MongoDB compatibility. +// +// Restores a DB cluster to an arbitrary point in time. Users can restore to +// any point in time before LatestRestorableTime for up to BackupRetentionPeriod +// days. The target DB cluster is created from the source DB cluster with the +// same configuration as the original DB cluster, except that the new DB cluster +// is created with the default DB security group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon DocumentDB with MongoDB compatibility's +// API operation RestoreDBClusterToPointInTime for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" +// You already have a DB cluster with the given identifier. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeDBClusterQuotaExceededFault "DBClusterQuotaExceededFault" +// The DB cluster can't be created because you have reached the maximum allowed +// quota of DB clusters. +// +// * ErrCodeDBClusterSnapshotNotFoundFault "DBClusterSnapshotNotFoundFault" +// DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. +// +// * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" +// DBSubnetGroupName doesn't refer to an existing DB subnet group. +// +// * ErrCodeInsufficientDBClusterCapacityFault "InsufficientDBClusterCapacityFault" +// The DB cluster doesn't have enough capacity for the current operation. +// +// * ErrCodeInsufficientStorageClusterCapacityFault "InsufficientStorageClusterCapacity" +// There is not enough storage available for the current action. You might be +// able to resolve this error by updating your subnet group to use different +// Availability Zones that have more storage available. +// +// * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" +// The provided value isn't a valid DB cluster snapshot state. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The DB cluster isn't in a valid state. +// +// * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" +// The state of the DB snapshot doesn't allow deletion. +// +// * ErrCodeInvalidRestoreFault "InvalidRestoreFault" +// You cannot restore from a virtual private cloud (VPC) backup to a non-VPC +// DB instance. +// +// * ErrCodeInvalidSubnet "InvalidSubnet" +// The requested subnet is not valid, or multiple subnets were requested that +// are not all in a common virtual private cloud (VPC). +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The DB subnet group doesn't cover all Availability Zones after it is created +// because of changes that were made. +// +// * ErrCodeKMSKeyNotAccessibleFault "KMSKeyNotAccessibleFault" +// An error occurred when accessing an AWS KMS key. +// +// * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" +// The request would cause you to exceed the allowed amount of storage available +// across all DB instances. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/RestoreDBClusterToPointInTime +func (c *DocDB) RestoreDBClusterToPointInTime(input *RestoreDBClusterToPointInTimeInput) (*RestoreDBClusterToPointInTimeOutput, error) { + req, out := c.RestoreDBClusterToPointInTimeRequest(input) + return out, req.Send() +} + +// RestoreDBClusterToPointInTimeWithContext is the same as RestoreDBClusterToPointInTime with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreDBClusterToPointInTime for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) RestoreDBClusterToPointInTimeWithContext(ctx aws.Context, input *RestoreDBClusterToPointInTimeInput, opts ...request.Option) (*RestoreDBClusterToPointInTimeOutput, error) { + req, out := c.RestoreDBClusterToPointInTimeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Represents the input to AddTagsToResource. +type AddTagsToResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon DocumentDB resource that the tags are added to. This value is + // an Amazon Resource Name (ARN). + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // The tags to be assigned to the Amazon DocumentDB resource. + // + // Tags is a required field + Tags []*Tag `locationNameList:"Tag" type:"list" required:"true"` +} + +// String returns the string representation +func (s AddTagsToResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsToResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsToResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsToResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *AddTagsToResourceInput) SetResourceName(v string) *AddTagsToResourceInput { + s.ResourceName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsToResourceInput) SetTags(v []*Tag) *AddTagsToResourceInput { + s.Tags = v + return s +} + +type AddTagsToResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddTagsToResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsToResourceOutput) GoString() string { + return s.String() +} + +// Represents the input to ApplyPendingMaintenanceAction. +type ApplyPendingMaintenanceActionInput struct { + _ struct{} `type:"structure"` + + // The pending maintenance action to apply to this resource. + // + // Valid values: system-update, db-upgrade + // + // ApplyAction is a required field + ApplyAction *string `type:"string" required:"true"` + + // A value that specifies the type of opt-in request or undoes an opt-in request. + // An opt-in request of type immediate can't be undone. + // + // Valid values: + // + // * immediate - Apply the maintenance action immediately. + // + // * next-maintenance - Apply the maintenance action during the next maintenance + // window for the resource. + // + // * undo-opt-in - Cancel any existing next-maintenance opt-in requests. + // + // OptInType is a required field + OptInType *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the resource that the pending maintenance + // action applies to. + // + // ResourceIdentifier is a required field + ResourceIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ApplyPendingMaintenanceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplyPendingMaintenanceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplyPendingMaintenanceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplyPendingMaintenanceActionInput"} + if s.ApplyAction == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyAction")) + } + if s.OptInType == nil { + invalidParams.Add(request.NewErrParamRequired("OptInType")) + } + if s.ResourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyAction sets the ApplyAction field's value. +func (s *ApplyPendingMaintenanceActionInput) SetApplyAction(v string) *ApplyPendingMaintenanceActionInput { + s.ApplyAction = &v + return s +} + +// SetOptInType sets the OptInType field's value. +func (s *ApplyPendingMaintenanceActionInput) SetOptInType(v string) *ApplyPendingMaintenanceActionInput { + s.OptInType = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *ApplyPendingMaintenanceActionInput) SetResourceIdentifier(v string) *ApplyPendingMaintenanceActionInput { + s.ResourceIdentifier = &v + return s +} + +type ApplyPendingMaintenanceActionOutput struct { + _ struct{} `type:"structure"` + + // Represents the output of ApplyPendingMaintenanceAction. + ResourcePendingMaintenanceActions *ResourcePendingMaintenanceActions `type:"structure"` +} + +// String returns the string representation +func (s ApplyPendingMaintenanceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplyPendingMaintenanceActionOutput) GoString() string { + return s.String() +} + +// SetResourcePendingMaintenanceActions sets the ResourcePendingMaintenanceActions field's value. +func (s *ApplyPendingMaintenanceActionOutput) SetResourcePendingMaintenanceActions(v *ResourcePendingMaintenanceActions) *ApplyPendingMaintenanceActionOutput { + s.ResourcePendingMaintenanceActions = v + return s +} + +// Information about an Availability Zone. +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The name of the Availability Zone. + Name *string `type:"string"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { + s.Name = &v + return s +} + +// The configuration setting for the log types to be enabled for export to Amazon +// CloudWatch Logs for a specific DB instance or DB cluster. +// +// The EnableLogTypes and DisableLogTypes arrays determine which logs are exported +// (or not exported) to CloudWatch Logs. The values within these arrays depend +// on the DB engine that is being used. +type CloudwatchLogsExportConfiguration struct { + _ struct{} `type:"structure"` + + // The list of log types to disable. + DisableLogTypes []*string `type:"list"` + + // The list of log types to enable. + EnableLogTypes []*string `type:"list"` +} + +// String returns the string representation +func (s CloudwatchLogsExportConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudwatchLogsExportConfiguration) GoString() string { + return s.String() +} + +// SetDisableLogTypes sets the DisableLogTypes field's value. +func (s *CloudwatchLogsExportConfiguration) SetDisableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { + s.DisableLogTypes = v + return s +} + +// SetEnableLogTypes sets the EnableLogTypes field's value. +func (s *CloudwatchLogsExportConfiguration) SetEnableLogTypes(v []*string) *CloudwatchLogsExportConfiguration { + s.EnableLogTypes = v + return s +} + +// Represents the input to CopyDBClusterParameterGroup. +type CopyDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The identifier or Amazon Resource Name (ARN) for the source DB cluster parameter + // group. + // + // Constraints: + // + // * Must specify a valid DB cluster parameter group. + // + // * If the source DB cluster parameter group is in the same AWS Region as + // the copy, specify a valid DB parameter group identifier; for example, + // my-db-cluster-param-group, or a valid ARN. + // + // * If the source DB parameter group is in a different AWS Region than the + // copy, specify a valid DB cluster parameter group ARN; for example, arn:aws:rds:us-east-1:123456789012:cluster-pg:custom-cluster-group1. + // + // SourceDBClusterParameterGroupIdentifier is a required field + SourceDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` + + // The tags that are to be assigned to the parameter group. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A description for the copied DB cluster parameter group. + // + // TargetDBClusterParameterGroupDescription is a required field + TargetDBClusterParameterGroupDescription *string `type:"string" required:"true"` + + // The identifier for the copied DB cluster parameter group. + // + // Constraints: + // + // * Cannot be null, empty, or blank. + // + // * Must contain from 1 to 255 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster-param-group1 + // + // TargetDBClusterParameterGroupIdentifier is a required field + TargetDBClusterParameterGroupIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterParameterGroupInput"} + if s.SourceDBClusterParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier")) + } + if s.TargetDBClusterParameterGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupDescription")) + } + if s.TargetDBClusterParameterGroupIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceDBClusterParameterGroupIdentifier sets the SourceDBClusterParameterGroupIdentifier field's value. +func (s *CopyDBClusterParameterGroupInput) SetSourceDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { + s.SourceDBClusterParameterGroupIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CopyDBClusterParameterGroupInput) SetTags(v []*Tag) *CopyDBClusterParameterGroupInput { + s.Tags = v + return s +} + +// SetTargetDBClusterParameterGroupDescription sets the TargetDBClusterParameterGroupDescription field's value. +func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupDescription(v string) *CopyDBClusterParameterGroupInput { + s.TargetDBClusterParameterGroupDescription = &v + return s +} + +// SetTargetDBClusterParameterGroupIdentifier sets the TargetDBClusterParameterGroupIdentifier field's value. +func (s *CopyDBClusterParameterGroupInput) SetTargetDBClusterParameterGroupIdentifier(v string) *CopyDBClusterParameterGroupInput { + s.TargetDBClusterParameterGroupIdentifier = &v + return s +} + +type CopyDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster parameter group. + DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CopyDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. +func (s *CopyDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CopyDBClusterParameterGroupOutput { + s.DBClusterParameterGroup = v + return s +} + +// Represents the input to CopyDBClusterSnapshot. +type CopyDBClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // Set to true to copy all tags from the source DB cluster snapshot to the target + // DB cluster snapshot, and otherwise false. The default is false. + CopyTags *bool `type:"boolean"` + + // The AWS KMS key ID for an encrypted DB cluster snapshot. The AWS KMS key + // ID is the Amazon Resource Name (ARN), AWS KMS key identifier, or the AWS + // KMS key alias for the AWS KMS encryption key. + // + // If you copy an encrypted DB cluster snapshot from your AWS account, you can + // specify a value for KmsKeyId to encrypt the copy with a new AWS KMS encryption + // key. If you don't specify a value for KmsKeyId, then the copy of the DB cluster + // snapshot is encrypted with the same AWS KMS key as the source DB cluster + // snapshot. + // + // If you copy an encrypted DB cluster snapshot that is shared from another + // AWS account, then you must specify a value for KmsKeyId. + // + // To copy an encrypted DB cluster snapshot to another AWS Region, set KmsKeyId + // to the AWS KMS key ID that you want to use to encrypt the copy of the DB + // cluster snapshot in the destination Region. AWS KMS encryption keys are specific + // to the AWS Region that they are created in, and you can't use encryption + // keys from one Region in another Region. + // + // If you copy an unencrypted DB cluster snapshot and specify a value for the + // KmsKeyId parameter, an error is returned. + KmsKeyId *string `type:"string"` + + // The URL that contains a Signature Version 4 signed request for the CopyDBClusterSnapshot + // API action in the AWS Region that contains the source DB cluster snapshot + // to copy. You must use the PreSignedUrl parameter when copying an encrypted + // DB cluster snapshot from another AWS Region. + // + // The presigned URL must be a valid request for the CopyDBSClusterSnapshot + // API action that can be executed in the source AWS Region that contains the + // encrypted DB cluster snapshot to be copied. The presigned URL request must + // contain the following parameter values: + // + // * KmsKeyId - The AWS KMS key identifier for the key to use to encrypt + // the copy of the DB cluster snapshot in the destination AWS Region. This + // is the same identifier for both the CopyDBClusterSnapshot action that + // is called in the destination AWS Region, and the action contained in the + // presigned URL. + // + // * DestinationRegion - The name of the AWS Region that the DB cluster snapshot + // will be created in. + // + // * SourceDBClusterSnapshotIdentifier - The DB cluster snapshot identifier + // for the encrypted DB cluster snapshot to be copied. This identifier must + // be in the Amazon Resource Name (ARN) format for the source AWS Region. + // For example, if you are copying an encrypted DB cluster snapshot from + // the us-west-2 AWS Region, then your SourceDBClusterSnapshotIdentifier + // looks like the following example: arn:aws:rds:us-west-2:123456789012:cluster-snapshot:my-cluster-snapshot-20161115. + PreSignedUrl *string `type:"string"` + + // The identifier of the DB cluster snapshot to copy. This parameter is not + // case sensitive. + // + // You can't copy an encrypted, shared DB cluster snapshot from one AWS Region + // to another. + // + // Constraints: + // + // * Must specify a valid system snapshot in the "available" state. + // + // * If the source snapshot is in the same AWS Region as the copy, specify + // a valid DB snapshot identifier. + // + // * If the source snapshot is in a different AWS Region than the copy, specify + // a valid DB cluster snapshot ARN. + // + // Example: my-cluster-snapshot1 + // + // SourceDBClusterSnapshotIdentifier is a required field + SourceDBClusterSnapshotIdentifier *string `type:"string" required:"true"` + + // The tags to be assigned to the DB cluster snapshot. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // The identifier of the new DB cluster snapshot to create from the source DB + // cluster snapshot. This parameter is not case sensitive. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster-snapshot2 + // + // TargetDBClusterSnapshotIdentifier is a required field + TargetDBClusterSnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyDBClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyDBClusterSnapshotInput"} + if s.SourceDBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) + } + if s.TargetDBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCopyTags sets the CopyTags field's value. +func (s *CopyDBClusterSnapshotInput) SetCopyTags(v bool) *CopyDBClusterSnapshotInput { + s.CopyTags = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CopyDBClusterSnapshotInput) SetKmsKeyId(v string) *CopyDBClusterSnapshotInput { + s.KmsKeyId = &v + return s +} + +// SetPreSignedUrl sets the PreSignedUrl field's value. +func (s *CopyDBClusterSnapshotInput) SetPreSignedUrl(v string) *CopyDBClusterSnapshotInput { + s.PreSignedUrl = &v + return s +} + +// SetSourceDBClusterSnapshotIdentifier sets the SourceDBClusterSnapshotIdentifier field's value. +func (s *CopyDBClusterSnapshotInput) SetSourceDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { + s.SourceDBClusterSnapshotIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CopyDBClusterSnapshotInput) SetTags(v []*Tag) *CopyDBClusterSnapshotInput { + s.Tags = v + return s +} + +// SetTargetDBClusterSnapshotIdentifier sets the TargetDBClusterSnapshotIdentifier field's value. +func (s *CopyDBClusterSnapshotInput) SetTargetDBClusterSnapshotIdentifier(v string) *CopyDBClusterSnapshotInput { + s.TargetDBClusterSnapshotIdentifier = &v + return s +} + +type CopyDBClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster snapshot. + DBClusterSnapshot *DBClusterSnapshot `type:"structure"` +} + +// String returns the string representation +func (s CopyDBClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyDBClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. +func (s *CopyDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CopyDBClusterSnapshotOutput { + s.DBClusterSnapshot = v + return s +} + +// Represents the input to CreateDBCluster. +type CreateDBClusterInput struct { + _ struct{} `type:"structure"` + + // A list of Amazon EC2 Availability Zones that instances in the DB cluster + // can be created in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // The number of days for which automated backups are retained. You must specify + // a minimum value of 1. + // + // Default: 1 + // + // Constraints: + // + // * Must be a value from 1 to 35. + BackupRetentionPeriod *int64 `type:"integer"` + + // The DB cluster identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB cluster parameter group to associate with this DB cluster. + DBClusterParameterGroupName *string `type:"string"` + + // A DB subnet group to associate with this DB cluster. + // + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` + + // A list of log types that need to be enabled for exporting to Amazon CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + + // The name of the database engine to be used for this DB cluster. + // + // Valid values: docdb + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The version number of the database engine to use. + EngineVersion *string `type:"string"` + + // The AWS KMS key identifier for an encrypted DB cluster. + // + // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS + // KMS encryption key. If you are creating a DB cluster using the same AWS account + // that owns the AWS KMS encryption key that is used to encrypt the new DB cluster, + // you can use the AWS KMS key alias instead of the ARN for the AWS KMS encryption + // key. + // + // If an encryption key is not specified in KmsKeyId: + // + // * If ReplicationSourceIdentifier identifies an encrypted source, then + // Amazon DocumentDB uses the encryption key that is used to encrypt the + // source. Otherwise, Amazon DocumentDB uses your default encryption key. + // + // + // * If the StorageEncrypted parameter is true and ReplicationSourceIdentifier + // is not specified, Amazon DocumentDB uses your default encryption key. + // + // AWS KMS creates the default encryption key for your AWS account. Your AWS + // account has a different default encryption key for each AWS Region. + // + // If you create a replica of an encrypted DB cluster in another AWS Region, + // you must set KmsKeyId to a KMS key ID that is valid in the destination AWS + // Region. This key is used to encrypt the replica in that AWS Region. + KmsKeyId *string `type:"string"` + + // The password for the master database user. This password can contain any + // printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain from 8 to 41 characters. + MasterUserPassword *string `type:"string"` + + // The name of the master user for the DB cluster. + // + // Constraints: + // + // * Must be from 1 to 16 letters or numbers. + // + // * The first character must be a letter. + // + // * Cannot be a reserved word for the chosen database engine. + MasterUsername *string `type:"string"` + + // The port number on which the instances in the DB cluster accept connections. + Port *int64 `type:"integer"` + + // The daily time range during which automated backups are created if automated + // backups are enabled using the BackupRetentionPeriod parameter. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region. + // + // Constraints: + // + // * Must be in the format hh24:mi-hh24:mi. + // + // * Must be in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `type:"string"` + + // The weekly time range during which system maintenance can occur, in Universal + // Coordinated Time (UTC). + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun + // + // Constraints: Minimum 30-minute window. + PreferredMaintenanceWindow *string `type:"string"` + + // Specifies whether the DB cluster is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // The tags to be assigned to the DB cluster. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A list of EC2 VPC security groups to associate with this DB cluster. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *CreateDBClusterInput) SetAvailabilityZones(v []*string) *CreateDBClusterInput { + s.AvailabilityZones = v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *CreateDBClusterInput) SetBackupRetentionPeriod(v int64) *CreateDBClusterInput { + s.BackupRetentionPeriod = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBClusterInput) SetDBClusterIdentifier(v string) *CreateDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *CreateDBClusterInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *CreateDBClusterInput) SetDBSubnetGroupName(v string) *CreateDBClusterInput { + s.DBSubnetGroupName = &v + return s +} + +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *CreateDBClusterInput) SetEnableCloudwatchLogsExports(v []*string) *CreateDBClusterInput { + s.EnableCloudwatchLogsExports = v + return s +} + +// SetEngine sets the Engine field's value. +func (s *CreateDBClusterInput) SetEngine(v string) *CreateDBClusterInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput { + s.EngineVersion = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateDBClusterInput) SetKmsKeyId(v string) *CreateDBClusterInput { + s.KmsKeyId = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *CreateDBClusterInput) SetMasterUserPassword(v string) *CreateDBClusterInput { + s.MasterUserPassword = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *CreateDBClusterInput) SetMasterUsername(v string) *CreateDBClusterInput { + s.MasterUsername = &v + return s +} + +// SetPort sets the Port field's value. +func (s *CreateDBClusterInput) SetPort(v int64) *CreateDBClusterInput { + s.Port = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *CreateDBClusterInput) SetPreferredBackupWindow(v string) *CreateDBClusterInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateDBClusterInput) SetPreferredMaintenanceWindow(v string) *CreateDBClusterInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *CreateDBClusterInput) SetStorageEncrypted(v bool) *CreateDBClusterInput { + s.StorageEncrypted = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBClusterInput) SetTags(v []*Tag) *CreateDBClusterInput { + s.Tags = v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClusterInput { + s.VpcSecurityGroupIds = v + return s +} + +type CreateDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s CreateDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *CreateDBClusterOutput) SetDBCluster(v *DBCluster) *CreateDBClusterOutput { + s.DBCluster = v + return s +} + +// Represents the input of CreateDBClusterParameterGroup. +type CreateDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group. + // + // Constraints: + // + // * Must match the name of an existing DBClusterParameterGroup. + // + // This value is stored as a lowercase string. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // The DB cluster parameter group family name. + // + // DBParameterGroupFamily is a required field + DBParameterGroupFamily *string `type:"string" required:"true"` + + // The description for the DB cluster parameter group. + // + // Description is a required field + Description *string `type:"string" required:"true"` + + // The tags to be assigned to the DB cluster parameter group. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *CreateDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *CreateDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *CreateDBClusterParameterGroupInput) SetDBParameterGroupFamily(v string) *CreateDBClusterParameterGroupInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateDBClusterParameterGroupInput) SetDescription(v string) *CreateDBClusterParameterGroupInput { + s.Description = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBClusterParameterGroupInput) SetTags(v []*Tag) *CreateDBClusterParameterGroupInput { + s.Tags = v + return s +} + +type CreateDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster parameter group. + DBClusterParameterGroup *DBClusterParameterGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. +func (s *CreateDBClusterParameterGroupOutput) SetDBClusterParameterGroup(v *DBClusterParameterGroup) *CreateDBClusterParameterGroupOutput { + s.DBClusterParameterGroup = v + return s +} + +// Represents the input of CreateDBClusterSnapshot. +type CreateDBClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // The identifier of the DB cluster to create a snapshot for. This parameter + // is not case sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // Example: my-cluster + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The identifier of the DB cluster snapshot. This parameter is stored as a + // lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster-snapshot1 + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` + + // The tags to be assigned to the DB cluster snapshot. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterSnapshotInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBClusterSnapshotInput) SetDBClusterIdentifier(v string) *CreateDBClusterSnapshotInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *CreateDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *CreateDBClusterSnapshotInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBClusterSnapshotInput) SetTags(v []*Tag) *CreateDBClusterSnapshotInput { + s.Tags = v + return s +} + +type CreateDBClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster snapshot. + DBClusterSnapshot *DBClusterSnapshot `type:"structure"` +} + +// String returns the string representation +func (s CreateDBClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. +func (s *CreateDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *CreateDBClusterSnapshotOutput { + s.DBClusterSnapshot = v + return s +} + +// Represents the input to CreateDBInstance. +type CreateDBInstanceInput struct { + _ struct{} `type:"structure"` + + // Indicates that minor engine upgrades are applied automatically to the DB + // instance during the maintenance window. + // + // Default: true + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // The Amazon EC2 Availability Zone that the DB instance is created in. + // + // Default: A random, system-chosen Availability Zone in the endpoint's AWS + // Region. + // + // Example: us-east-1d + // + // Constraint: The AvailabilityZone parameter can't be specified if the MultiAZ + // parameter is set to true. The specified Availability Zone must be in the + // same AWS Region as the current endpoint. + AvailabilityZone *string `type:"string"` + + // The identifier of the DB cluster that the instance will belong to. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The compute and memory capacity of the DB instance; for example, db.m4.large. + // + // DBInstanceClass is a required field + DBInstanceClass *string `type:"string" required:"true"` + + // The DB instance identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: mydbinstance + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The name of the database engine to be used for this instance. + // + // Valid value: docdb + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The time range each week during which system maintenance can occur, in Universal + // Coordinated Time (UTC). + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun + // + // Constraints: Minimum 30-minute window. + PreferredMaintenanceWindow *string `type:"string"` + + // A value that specifies the order in which an Amazon DocumentDB replica is + // promoted to the primary instance after a failure of the existing primary + // instance. + // + // Default: 1 + // + // Valid values: 0-15 + PromotionTier *int64 `type:"integer"` + + // The tags to be assigned to the DB instance. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBInstanceInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.DBInstanceClass == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceClass")) + } + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *CreateDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *CreateDBInstanceInput { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDBInstanceInput) SetAvailabilityZone(v string) *CreateDBInstanceInput { + s.AvailabilityZone = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBInstanceInput) SetDBClusterIdentifier(v string) *CreateDBInstanceInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *CreateDBInstanceInput) SetDBInstanceClass(v string) *CreateDBInstanceInput { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *CreateDBInstanceInput) SetDBInstanceIdentifier(v string) *CreateDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *CreateDBInstanceInput) SetEngine(v string) *CreateDBInstanceInput { + s.Engine = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateDBInstanceInput) SetPreferredMaintenanceWindow(v string) *CreateDBInstanceInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *CreateDBInstanceInput) SetPromotionTier(v int64) *CreateDBInstanceInput { + s.PromotionTier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBInstanceInput) SetTags(v []*Tag) *CreateDBInstanceInput { + s.Tags = v + return s +} + +type CreateDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB instance. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s CreateDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *CreateDBInstanceOutput) SetDBInstance(v *DBInstance) *CreateDBInstanceOutput { + s.DBInstance = v + return s +} + +// Represents the input to CreateDBSubnetGroup. +type CreateDBSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The description for the DB subnet group. + // + // DBSubnetGroupDescription is a required field + DBSubnetGroupDescription *string `type:"string" required:"true"` + + // The name for the DB subnet group. This value is stored as a lowercase string. + // + // Constraints: Must contain no more than 255 letters, numbers, periods, underscores, + // spaces, or hyphens. Must not be default. + // + // Example: mySubnetgroup + // + // DBSubnetGroupName is a required field + DBSubnetGroupName *string `type:"string" required:"true"` + + // The Amazon EC2 subnet IDs for the DB subnet group. + // + // SubnetIds is a required field + SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` + + // The tags to be assigned to the DB subnet group. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateDBSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBSubnetGroupInput"} + if s.DBSubnetGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupDescription")) + } + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. +func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *CreateDBSubnetGroupInput { + s.DBSubnetGroupDescription = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *CreateDBSubnetGroupInput) SetDBSubnetGroupName(v string) *CreateDBSubnetGroupInput { + s.DBSubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateDBSubnetGroupInput) SetSubnetIds(v []*string) *CreateDBSubnetGroupInput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDBSubnetGroupInput) SetTags(v []*Tag) *CreateDBSubnetGroupInput { + s.Tags = v + return s +} + +type CreateDBSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB subnet group. + DBSubnetGroup *DBSubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateDBSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *CreateDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *CreateDBSubnetGroupOutput { + s.DBSubnetGroup = v + return s +} + +// Detailed information about a DB cluster. +type DBCluster struct { + _ struct{} `type:"structure"` + + // Provides a list of the AWS Identity and Access Management (IAM) roles that + // are associated with the DB cluster. IAM roles that are associated with a + // DB cluster grant permission for the DB cluster to access other AWS services + // on your behalf. + AssociatedRoles []*DBClusterRole `locationNameList:"DBClusterRole" type:"list"` + + // Provides the list of Amazon EC2 Availability Zones that instances in the + // DB cluster can be created in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // Specifies the number of days for which automatic DB snapshots are retained. + BackupRetentionPeriod *int64 `type:"integer"` + + // Specifies the time when the DB cluster was created, in Universal Coordinated + // Time (UTC). + ClusterCreateTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) for the DB cluster. + DBClusterArn *string `type:"string"` + + // Contains a user-supplied DB cluster identifier. This identifier is the unique + // key that identifies a DB cluster. + DBClusterIdentifier *string `type:"string"` + + // Provides the list of instances that make up the DB cluster. + DBClusterMembers []*DBClusterMember `locationNameList:"DBClusterMember" type:"list"` + + // Specifies the name of the DB cluster parameter group for the DB cluster. + DBClusterParameterGroup *string `type:"string"` + + // Specifies information on the subnet group that is associated with the DB + // cluster, including the name, description, and subnets in the subnet group. + DBSubnetGroup *string `type:"string"` + + // The AWS Region-unique, immutable identifier for the DB cluster. This identifier + // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB + // cluster is accessed. + DbClusterResourceId *string `type:"string"` + + // The earliest time to which a database can be restored with point-in-time + // restore. + EarliestRestorableTime *time.Time `type:"timestamp"` + + // A list of log types that this DB cluster is configured to export to Amazon + // CloudWatch Logs. + EnabledCloudwatchLogsExports []*string `type:"list"` + + // Specifies the connection endpoint for the primary instance of the DB cluster. + Endpoint *string `type:"string"` + + // Provides the name of the database engine to be used for this DB cluster. + Engine *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. + HostedZoneId *string `type:"string"` + + // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted + // DB cluster. + KmsKeyId *string `type:"string"` + + // Specifies the latest time to which a database can be restored with point-in-time + // restore. + LatestRestorableTime *time.Time `type:"timestamp"` + + // Contains the master user name for the DB cluster. + MasterUsername *string `type:"string"` + + // Specifies whether the DB cluster has instances in multiple Availability Zones. + MultiAZ *bool `type:"boolean"` + + // Specifies the progress of the operation as a percentage. + PercentProgress *string `type:"string"` + + // Specifies the port that the database engine is listening on. + Port *int64 `type:"integer"` + + // Specifies the daily time range during which automated backups are created + // if automated backups are enabled, as determined by the BackupRetentionPeriod. + PreferredBackupWindow *string `type:"string"` + + // Specifies the weekly time range during which system maintenance can occur, + // in Universal Coordinated Time (UTC). + PreferredMaintenanceWindow *string `type:"string"` + + // The reader endpoint for the DB cluster. The reader endpoint for a DB cluster + // load balances connections across the Amazon DocumentDB replicas that are + // available in a DB cluster. As clients request new connections to the reader + // endpoint, Amazon DocumentDB distributes the connection requests among the + // Amazon DocumentDB replicas in the DB cluster. This functionality can help + // balance your read workload across multiple Amazon DocumentDB replicas in + // your DB cluster. + // + // If a failover occurs, and the Amazon DocumentDB replica that you are connected + // to is promoted to be the primary instance, your connection is dropped. To + // continue sending your read workload to other Amazon DocumentDB replicas in + // the cluster, you can then reconnect to the reader endpoint. + ReaderEndpoint *string `type:"string"` + + // Specifies the current state of this DB cluster. + Status *string `type:"string"` + + // Specifies whether the DB cluster is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // Provides a list of virtual private cloud (VPC) security groups that the DB + // cluster belongs to. + VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` +} + +// String returns the string representation +func (s DBCluster) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBCluster) GoString() string { + return s.String() +} + +// SetAssociatedRoles sets the AssociatedRoles field's value. +func (s *DBCluster) SetAssociatedRoles(v []*DBClusterRole) *DBCluster { + s.AssociatedRoles = v + return s +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *DBCluster) SetAvailabilityZones(v []*string) *DBCluster { + s.AvailabilityZones = v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *DBCluster) SetBackupRetentionPeriod(v int64) *DBCluster { + s.BackupRetentionPeriod = &v + return s +} + +// SetClusterCreateTime sets the ClusterCreateTime field's value. +func (s *DBCluster) SetClusterCreateTime(v time.Time) *DBCluster { + s.ClusterCreateTime = &v + return s +} + +// SetDBClusterArn sets the DBClusterArn field's value. +func (s *DBCluster) SetDBClusterArn(v string) *DBCluster { + s.DBClusterArn = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBCluster) SetDBClusterIdentifier(v string) *DBCluster { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterMembers sets the DBClusterMembers field's value. +func (s *DBCluster) SetDBClusterMembers(v []*DBClusterMember) *DBCluster { + s.DBClusterMembers = v + return s +} + +// SetDBClusterParameterGroup sets the DBClusterParameterGroup field's value. +func (s *DBCluster) SetDBClusterParameterGroup(v string) *DBCluster { + s.DBClusterParameterGroup = &v + return s +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *DBCluster) SetDBSubnetGroup(v string) *DBCluster { + s.DBSubnetGroup = &v + return s +} + +// SetDbClusterResourceId sets the DbClusterResourceId field's value. +func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { + s.DbClusterResourceId = &v + return s +} + +// SetEarliestRestorableTime sets the EarliestRestorableTime field's value. +func (s *DBCluster) SetEarliestRestorableTime(v time.Time) *DBCluster { + s.EarliestRestorableTime = &v + return s +} + +// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. +func (s *DBCluster) SetEnabledCloudwatchLogsExports(v []*string) *DBCluster { + s.EnabledCloudwatchLogsExports = v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *DBCluster) SetEndpoint(v string) *DBCluster { + s.Endpoint = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBCluster) SetEngine(v string) *DBCluster { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBCluster) SetEngineVersion(v string) *DBCluster { + s.EngineVersion = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *DBCluster) SetHostedZoneId(v string) *DBCluster { + s.HostedZoneId = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBCluster) SetKmsKeyId(v string) *DBCluster { + s.KmsKeyId = &v + return s +} + +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *DBCluster) SetLatestRestorableTime(v time.Time) *DBCluster { + s.LatestRestorableTime = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *DBCluster) SetMasterUsername(v string) *DBCluster { + s.MasterUsername = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *DBCluster) SetMultiAZ(v bool) *DBCluster { + s.MultiAZ = &v + return s +} + +// SetPercentProgress sets the PercentProgress field's value. +func (s *DBCluster) SetPercentProgress(v string) *DBCluster { + s.PercentProgress = &v + return s +} + +// SetPort sets the Port field's value. +func (s *DBCluster) SetPort(v int64) *DBCluster { + s.Port = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *DBCluster) SetPreferredBackupWindow(v string) *DBCluster { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *DBCluster) SetPreferredMaintenanceWindow(v string) *DBCluster { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetReaderEndpoint sets the ReaderEndpoint field's value. +func (s *DBCluster) SetReaderEndpoint(v string) *DBCluster { + s.ReaderEndpoint = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBCluster) SetStatus(v string) *DBCluster { + s.Status = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *DBCluster) SetStorageEncrypted(v bool) *DBCluster { + s.StorageEncrypted = &v + return s +} + +// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. +func (s *DBCluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBCluster { + s.VpcSecurityGroups = v + return s +} + +// Contains information about an instance that is part of a DB cluster. +type DBClusterMember struct { + _ struct{} `type:"structure"` + + // Specifies the status of the DB cluster parameter group for this member of + // the DB cluster. + DBClusterParameterGroupStatus *string `type:"string"` + + // Specifies the instance identifier for this member of the DB cluster. + DBInstanceIdentifier *string `type:"string"` + + // A value that is true if the cluster member is the primary instance for the + // DB cluster and false otherwise. + IsClusterWriter *bool `type:"boolean"` + + // A value that specifies the order in which an Amazon DocumentDB replica is + // promoted to the primary instance after a failure of the existing primary + // instance. + PromotionTier *int64 `type:"integer"` +} + +// String returns the string representation +func (s DBClusterMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterMember) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupStatus sets the DBClusterParameterGroupStatus field's value. +func (s *DBClusterMember) SetDBClusterParameterGroupStatus(v string) *DBClusterMember { + s.DBClusterParameterGroupStatus = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DBClusterMember) SetDBInstanceIdentifier(v string) *DBClusterMember { + s.DBInstanceIdentifier = &v + return s +} + +// SetIsClusterWriter sets the IsClusterWriter field's value. +func (s *DBClusterMember) SetIsClusterWriter(v bool) *DBClusterMember { + s.IsClusterWriter = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *DBClusterMember) SetPromotionTier(v int64) *DBClusterMember { + s.PromotionTier = &v + return s +} + +// Detailed information about a DB cluster parameter group. +type DBClusterParameterGroup struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the DB cluster parameter group. + DBClusterParameterGroupArn *string `type:"string"` + + // Provides the name of the DB cluster parameter group. + DBClusterParameterGroupName *string `type:"string"` + + // Provides the name of the DB parameter group family that this DB cluster parameter + // group is compatible with. + DBParameterGroupFamily *string `type:"string"` + + // Provides the customer-specified description for this DB cluster parameter + // group. + Description *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterParameterGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterParameterGroup) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupArn sets the DBClusterParameterGroupArn field's value. +func (s *DBClusterParameterGroup) SetDBClusterParameterGroupArn(v string) *DBClusterParameterGroup { + s.DBClusterParameterGroupArn = &v + return s +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DBClusterParameterGroup) SetDBClusterParameterGroupName(v string) *DBClusterParameterGroup { + s.DBClusterParameterGroupName = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DBClusterParameterGroup) SetDBParameterGroupFamily(v string) *DBClusterParameterGroup { + s.DBParameterGroupFamily = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DBClusterParameterGroup) SetDescription(v string) *DBClusterParameterGroup { + s.Description = &v + return s +} + +// Describes an AWS Identity and Access Management (IAM) role that is associated +// with a DB cluster. +type DBClusterRole struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the IAM role that is associated with the + // DB cluster. + RoleArn *string `type:"string"` + + // Describes the state of association between the IAM role and the DB cluster. + // The Status property returns one of the following values: + // + // * ACTIVE - The IAM role ARN is associated with the DB cluster and can + // be used to access other AWS services on your behalf. + // + // * PENDING - The IAM role ARN is being associated with the DB cluster. + // + // * INVALID - The IAM role ARN is associated with the DB cluster, but the + // DB cluster cannot assume the IAM role to access other AWS services on + // your behalf. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterRole) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterRole) GoString() string { + return s.String() +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DBClusterRole) SetRoleArn(v string) *DBClusterRole { + s.RoleArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBClusterRole) SetStatus(v string) *DBClusterRole { + s.Status = &v + return s +} + +// Detailed information about a DB cluster snapshot. +type DBClusterSnapshot struct { + _ struct{} `type:"structure"` + + // Provides the list of Amazon EC2 Availability Zones that instances in the + // DB cluster snapshot can be restored in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // Specifies the time when the DB cluster was created, in Universal Coordinated + // Time (UTC). + ClusterCreateTime *time.Time `type:"timestamp"` + + // Specifies the DB cluster identifier of the DB cluster that this DB cluster + // snapshot was created from. + DBClusterIdentifier *string `type:"string"` + + // The Amazon Resource Name (ARN) for the DB cluster snapshot. + DBClusterSnapshotArn *string `type:"string"` + + // Specifies the identifier for the DB cluster snapshot. + DBClusterSnapshotIdentifier *string `type:"string"` + + // Specifies the name of the database engine. + Engine *string `type:"string"` + + // Provides the version of the database engine for this DB cluster snapshot. + EngineVersion *string `type:"string"` + + // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted + // DB cluster snapshot. + KmsKeyId *string `type:"string"` + + // Provides the master user name for the DB cluster snapshot. + MasterUsername *string `type:"string"` + + // Specifies the percentage of the estimated data that has been transferred. + PercentProgress *int64 `type:"integer"` + + // Specifies the port that the DB cluster was listening on at the time of the + // snapshot. + Port *int64 `type:"integer"` + + // Provides the time when the snapshot was taken, in UTC. + SnapshotCreateTime *time.Time `type:"timestamp"` + + // Provides the type of the DB cluster snapshot. + SnapshotType *string `type:"string"` + + // If the DB cluster snapshot was copied from a source DB cluster snapshot, + // the ARN for the source DB cluster snapshot; otherwise, a null value. + SourceDBClusterSnapshotArn *string `type:"string"` + + // Specifies the status of this DB cluster snapshot. + Status *string `type:"string"` + + // Specifies whether the DB cluster snapshot is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // Provides the virtual private cloud (VPC) ID that is associated with the DB + // cluster snapshot. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterSnapshot) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterSnapshot) GoString() string { + return s.String() +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *DBClusterSnapshot) SetAvailabilityZones(v []*string) *DBClusterSnapshot { + s.AvailabilityZones = v + return s +} + +// SetClusterCreateTime sets the ClusterCreateTime field's value. +func (s *DBClusterSnapshot) SetClusterCreateTime(v time.Time) *DBClusterSnapshot { + s.ClusterCreateTime = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBClusterSnapshot) SetDBClusterIdentifier(v string) *DBClusterSnapshot { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterSnapshotArn sets the DBClusterSnapshotArn field's value. +func (s *DBClusterSnapshot) SetDBClusterSnapshotArn(v string) *DBClusterSnapshot { + s.DBClusterSnapshotArn = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DBClusterSnapshot) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshot { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBClusterSnapshot) SetEngine(v string) *DBClusterSnapshot { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBClusterSnapshot) SetEngineVersion(v string) *DBClusterSnapshot { + s.EngineVersion = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBClusterSnapshot) SetKmsKeyId(v string) *DBClusterSnapshot { + s.KmsKeyId = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *DBClusterSnapshot) SetMasterUsername(v string) *DBClusterSnapshot { + s.MasterUsername = &v + return s +} + +// SetPercentProgress sets the PercentProgress field's value. +func (s *DBClusterSnapshot) SetPercentProgress(v int64) *DBClusterSnapshot { + s.PercentProgress = &v + return s +} + +// SetPort sets the Port field's value. +func (s *DBClusterSnapshot) SetPort(v int64) *DBClusterSnapshot { + s.Port = &v + return s +} + +// SetSnapshotCreateTime sets the SnapshotCreateTime field's value. +func (s *DBClusterSnapshot) SetSnapshotCreateTime(v time.Time) *DBClusterSnapshot { + s.SnapshotCreateTime = &v + return s +} + +// SetSnapshotType sets the SnapshotType field's value. +func (s *DBClusterSnapshot) SetSnapshotType(v string) *DBClusterSnapshot { + s.SnapshotType = &v + return s +} + +// SetSourceDBClusterSnapshotArn sets the SourceDBClusterSnapshotArn field's value. +func (s *DBClusterSnapshot) SetSourceDBClusterSnapshotArn(v string) *DBClusterSnapshot { + s.SourceDBClusterSnapshotArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBClusterSnapshot) SetStatus(v string) *DBClusterSnapshot { + s.Status = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *DBClusterSnapshot) SetStorageEncrypted(v bool) *DBClusterSnapshot { + s.StorageEncrypted = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DBClusterSnapshot) SetVpcId(v string) *DBClusterSnapshot { + s.VpcId = &v + return s +} + +// Contains the name and values of a manual DB cluster snapshot attribute. +// +// Manual DB cluster snapshot attributes are used to authorize other AWS accounts +// to restore a manual DB cluster snapshot. +type DBClusterSnapshotAttribute struct { + _ struct{} `type:"structure"` + + // The name of the manual DB cluster snapshot attribute. + // + // The attribute named restore refers to the list of AWS accounts that have + // permission to copy or restore the manual DB cluster snapshot. + AttributeName *string `type:"string"` + + // The values for the manual DB cluster snapshot attribute. + // + // If the AttributeName field is set to restore, then this element returns a + // list of IDs of the AWS accounts that are authorized to copy or restore the + // manual DB cluster snapshot. If a value of all is in the list, then the manual + // DB cluster snapshot is public and available for any AWS account to copy or + // restore. + AttributeValues []*string `locationNameList:"AttributeValue" type:"list"` +} + +// String returns the string representation +func (s DBClusterSnapshotAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterSnapshotAttribute) GoString() string { + return s.String() +} + +// SetAttributeName sets the AttributeName field's value. +func (s *DBClusterSnapshotAttribute) SetAttributeName(v string) *DBClusterSnapshotAttribute { + s.AttributeName = &v + return s +} + +// SetAttributeValues sets the AttributeValues field's value. +func (s *DBClusterSnapshotAttribute) SetAttributeValues(v []*string) *DBClusterSnapshotAttribute { + s.AttributeValues = v + return s +} + +// Detailed information about the attributes that are associated with a DB cluster +// snapshot. +type DBClusterSnapshotAttributesResult struct { + _ struct{} `type:"structure"` + + // The list of attributes and values for the DB cluster snapshot. + DBClusterSnapshotAttributes []*DBClusterSnapshotAttribute `locationNameList:"DBClusterSnapshotAttribute" type:"list"` + + // The identifier of the DB cluster snapshot that the attributes apply to. + DBClusterSnapshotIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterSnapshotAttributesResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterSnapshotAttributesResult) GoString() string { + return s.String() +} + +// SetDBClusterSnapshotAttributes sets the DBClusterSnapshotAttributes field's value. +func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotAttributes(v []*DBClusterSnapshotAttribute) *DBClusterSnapshotAttributesResult { + s.DBClusterSnapshotAttributes = v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DBClusterSnapshotAttributesResult) SetDBClusterSnapshotIdentifier(v string) *DBClusterSnapshotAttributesResult { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// Detailed information about a DB engine version. +type DBEngineVersion struct { + _ struct{} `type:"structure"` + + // The description of the database engine. + DBEngineDescription *string `type:"string"` + + // The description of the database engine version. + DBEngineVersionDescription *string `type:"string"` + + // The name of the DB parameter group family for the database engine. + DBParameterGroupFamily *string `type:"string"` + + // The name of the database engine. + Engine *string `type:"string"` + + // The version number of the database engine. + EngineVersion *string `type:"string"` + + // The types of logs that the database engine has available for export to Amazon + // CloudWatch Logs. + ExportableLogTypes []*string `type:"list"` + + // A value that indicates whether the engine version supports exporting the + // log types specified by ExportableLogTypes to CloudWatch Logs. + SupportsLogExportsToCloudwatchLogs *bool `type:"boolean"` + + // A list of engine versions that this database engine version can be upgraded + // to. + ValidUpgradeTarget []*UpgradeTarget `locationNameList:"UpgradeTarget" type:"list"` +} + +// String returns the string representation +func (s DBEngineVersion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBEngineVersion) GoString() string { + return s.String() +} + +// SetDBEngineDescription sets the DBEngineDescription field's value. +func (s *DBEngineVersion) SetDBEngineDescription(v string) *DBEngineVersion { + s.DBEngineDescription = &v + return s +} + +// SetDBEngineVersionDescription sets the DBEngineVersionDescription field's value. +func (s *DBEngineVersion) SetDBEngineVersionDescription(v string) *DBEngineVersion { + s.DBEngineVersionDescription = &v + return s +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DBEngineVersion) SetDBParameterGroupFamily(v string) *DBEngineVersion { + s.DBParameterGroupFamily = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBEngineVersion) SetEngine(v string) *DBEngineVersion { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBEngineVersion) SetEngineVersion(v string) *DBEngineVersion { + s.EngineVersion = &v + return s +} + +// SetExportableLogTypes sets the ExportableLogTypes field's value. +func (s *DBEngineVersion) SetExportableLogTypes(v []*string) *DBEngineVersion { + s.ExportableLogTypes = v + return s +} + +// SetSupportsLogExportsToCloudwatchLogs sets the SupportsLogExportsToCloudwatchLogs field's value. +func (s *DBEngineVersion) SetSupportsLogExportsToCloudwatchLogs(v bool) *DBEngineVersion { + s.SupportsLogExportsToCloudwatchLogs = &v + return s +} + +// SetValidUpgradeTarget sets the ValidUpgradeTarget field's value. +func (s *DBEngineVersion) SetValidUpgradeTarget(v []*UpgradeTarget) *DBEngineVersion { + s.ValidUpgradeTarget = v + return s +} + +// Detailed information about a DB instance. +type DBInstance struct { + _ struct{} `type:"structure"` + + // Indicates that minor version patches are applied automatically. + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // Specifies the name of the Availability Zone that the DB instance is located + // in. + AvailabilityZone *string `type:"string"` + + // Specifies the number of days for which automatic DB snapshots are retained. + BackupRetentionPeriod *int64 `type:"integer"` + + // Contains the name of the DB cluster that the DB instance is a member of if + // the DB instance is a member of a DB cluster. + DBClusterIdentifier *string `type:"string"` + + // The Amazon Resource Name (ARN) for the DB instance. + DBInstanceArn *string `type:"string"` + + // Contains the name of the compute and memory capacity class of the DB instance. + DBInstanceClass *string `type:"string"` + + // Contains a user-provided database identifier. This identifier is the unique + // key that identifies a DB instance. + DBInstanceIdentifier *string `type:"string"` + + // Specifies the current state of this database. + DBInstanceStatus *string `type:"string"` + + // Specifies information on the subnet group that is associated with the DB + // instance, including the name, description, and subnets in the subnet group. + DBSubnetGroup *DBSubnetGroup `type:"structure"` + + // The AWS Region-unique, immutable identifier for the DB instance. This identifier + // is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB + // instance is accessed. + DbiResourceId *string `type:"string"` + + // A list of log types that this DB instance is configured to export to Amazon + // CloudWatch Logs. + EnabledCloudwatchLogsExports []*string `type:"list"` + + // Specifies the connection endpoint. + Endpoint *Endpoint `type:"structure"` + + // Provides the name of the database engine to be used for this DB instance. + Engine *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // Provides the date and time that the DB instance was created. + InstanceCreateTime *time.Time `type:"timestamp"` + + // If StorageEncrypted is true, the AWS KMS key identifier for the encrypted + // DB instance. + KmsKeyId *string `type:"string"` + + // Specifies the latest time to which a database can be restored with point-in-time + // restore. + LatestRestorableTime *time.Time `type:"timestamp"` + + // Specifies that changes to the DB instance are pending. This element is included + // only when changes are pending. Specific changes are identified by subelements. + PendingModifiedValues *PendingModifiedValues `type:"structure"` + + // Specifies the daily time range during which automated backups are created + // if automated backups are enabled, as determined by the BackupRetentionPeriod. + PreferredBackupWindow *string `type:"string"` + + // Specifies the weekly time range during which system maintenance can occur, + // in Universal Coordinated Time (UTC). + PreferredMaintenanceWindow *string `type:"string"` + + // A value that specifies the order in which an Amazon DocumentDB replica is + // promoted to the primary instance after a failure of the existing primary + // instance. + PromotionTier *int64 `type:"integer"` + + // Specifies the availability options for the DB instance. A value of true specifies + // an internet-facing instance with a publicly resolvable DNS name, which resolves + // to a public IP address. A value of false specifies an internal instance with + // a DNS name that resolves to a private IP address. + PubliclyAccessible *bool `type:"boolean"` + + // The status of a read replica. If the instance is not a read replica, this + // is blank. + StatusInfos []*DBInstanceStatusInfo `locationNameList:"DBInstanceStatusInfo" type:"list"` + + // Specifies whether the DB instance is encrypted. + StorageEncrypted *bool `type:"boolean"` + + // Provides a list of VPC security group elements that the DB instance belongs + // to. + VpcSecurityGroups []*VpcSecurityGroupMembership `locationNameList:"VpcSecurityGroupMembership" type:"list"` +} + +// String returns the string representation +func (s DBInstance) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstance) GoString() string { + return s.String() +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *DBInstance) SetAutoMinorVersionUpgrade(v bool) *DBInstance { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *DBInstance) SetAvailabilityZone(v string) *DBInstance { + s.AvailabilityZone = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *DBInstance) SetBackupRetentionPeriod(v int64) *DBInstance { + s.BackupRetentionPeriod = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBInstance) SetDBClusterIdentifier(v string) *DBInstance { + s.DBClusterIdentifier = &v + return s +} + +// SetDBInstanceArn sets the DBInstanceArn field's value. +func (s *DBInstance) SetDBInstanceArn(v string) *DBInstance { + s.DBInstanceArn = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *DBInstance) SetDBInstanceClass(v string) *DBInstance { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DBInstance) SetDBInstanceIdentifier(v string) *DBInstance { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBInstanceStatus sets the DBInstanceStatus field's value. +func (s *DBInstance) SetDBInstanceStatus(v string) *DBInstance { + s.DBInstanceStatus = &v + return s +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *DBInstance) SetDBSubnetGroup(v *DBSubnetGroup) *DBInstance { + s.DBSubnetGroup = v + return s +} + +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { + s.DbiResourceId = &v + return s +} + +// SetEnabledCloudwatchLogsExports sets the EnabledCloudwatchLogsExports field's value. +func (s *DBInstance) SetEnabledCloudwatchLogsExports(v []*string) *DBInstance { + s.EnabledCloudwatchLogsExports = v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *DBInstance) SetEndpoint(v *Endpoint) *DBInstance { + s.Endpoint = v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBInstance) SetEngine(v string) *DBInstance { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBInstance) SetEngineVersion(v string) *DBInstance { + s.EngineVersion = &v + return s +} + +// SetInstanceCreateTime sets the InstanceCreateTime field's value. +func (s *DBInstance) SetInstanceCreateTime(v time.Time) *DBInstance { + s.InstanceCreateTime = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBInstance) SetKmsKeyId(v string) *DBInstance { + s.KmsKeyId = &v + return s +} + +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *DBInstance) SetLatestRestorableTime(v time.Time) *DBInstance { + s.LatestRestorableTime = &v + return s +} + +// SetPendingModifiedValues sets the PendingModifiedValues field's value. +func (s *DBInstance) SetPendingModifiedValues(v *PendingModifiedValues) *DBInstance { + s.PendingModifiedValues = v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *DBInstance) SetPreferredBackupWindow(v string) *DBInstance { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *DBInstance) SetPreferredMaintenanceWindow(v string) *DBInstance { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *DBInstance) SetPromotionTier(v int64) *DBInstance { + s.PromotionTier = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *DBInstance) SetPubliclyAccessible(v bool) *DBInstance { + s.PubliclyAccessible = &v + return s +} + +// SetStatusInfos sets the StatusInfos field's value. +func (s *DBInstance) SetStatusInfos(v []*DBInstanceStatusInfo) *DBInstance { + s.StatusInfos = v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *DBInstance) SetStorageEncrypted(v bool) *DBInstance { + s.StorageEncrypted = &v + return s +} + +// SetVpcSecurityGroups sets the VpcSecurityGroups field's value. +func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBInstance { + s.VpcSecurityGroups = v + return s +} + +// Provides a list of status information for a DB instance. +type DBInstanceStatusInfo struct { + _ struct{} `type:"structure"` + + // Details of the error if there is an error for the instance. If the instance + // is not in an error state, this value is blank. + Message *string `type:"string"` + + // A Boolean value that is true if the instance is operating normally, or false + // if the instance is in an error state. + Normal *bool `type:"boolean"` + + // Status of the DB instance. For a StatusType of read replica, the values can + // be replicating, error, stopped, or terminated. + Status *string `type:"string"` + + // This value is currently "read replication." + StatusType *string `type:"string"` +} + +// String returns the string representation +func (s DBInstanceStatusInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstanceStatusInfo) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { + s.Message = &v + return s +} + +// SetNormal sets the Normal field's value. +func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { + s.Normal = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { + s.Status = &v + return s +} + +// SetStatusType sets the StatusType field's value. +func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { + s.StatusType = &v + return s +} + +// Detailed information about a DB subnet group. +type DBSubnetGroup struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Identifier (ARN) for the DB subnet group. + DBSubnetGroupArn *string `type:"string"` + + // Provides the description of the DB subnet group. + DBSubnetGroupDescription *string `type:"string"` + + // The name of the DB subnet group. + DBSubnetGroupName *string `type:"string"` + + // Provides the status of the DB subnet group. + SubnetGroupStatus *string `type:"string"` + + // Detailed information about one or more subnets within a DB subnet group. + Subnets []*Subnet `locationNameList:"Subnet" type:"list"` + + // Provides the virtual private cloud (VPC) ID of the DB subnet group. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s DBSubnetGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBSubnetGroup) GoString() string { + return s.String() +} + +// SetDBSubnetGroupArn sets the DBSubnetGroupArn field's value. +func (s *DBSubnetGroup) SetDBSubnetGroupArn(v string) *DBSubnetGroup { + s.DBSubnetGroupArn = &v + return s +} + +// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. +func (s *DBSubnetGroup) SetDBSubnetGroupDescription(v string) *DBSubnetGroup { + s.DBSubnetGroupDescription = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *DBSubnetGroup) SetDBSubnetGroupName(v string) *DBSubnetGroup { + s.DBSubnetGroupName = &v + return s +} + +// SetSubnetGroupStatus sets the SubnetGroupStatus field's value. +func (s *DBSubnetGroup) SetSubnetGroupStatus(v string) *DBSubnetGroup { + s.SubnetGroupStatus = &v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *DBSubnetGroup) SetSubnets(v []*Subnet) *DBSubnetGroup { + s.Subnets = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DBSubnetGroup) SetVpcId(v string) *DBSubnetGroup { + s.VpcId = &v + return s +} + +// Represents the input to DeleteDBCluster. +type DeleteDBClusterInput struct { + _ struct{} `type:"structure"` + + // The DB cluster identifier for the DB cluster to be deleted. This parameter + // isn't case sensitive. + // + // Constraints: + // + // * Must match an existing DBClusterIdentifier. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The DB cluster snapshot identifier of the new DB cluster snapshot created + // when SkipFinalSnapshot is set to false. + // + // Specifying this parameter and also setting the SkipFinalShapshot parameter + // to true results in an error. + // + // Constraints: + // + // * Must be from 1 to 255 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + FinalDBSnapshotIdentifier *string `type:"string"` + + // Determines whether a final DB cluster snapshot is created before the DB cluster + // is deleted. If true is specified, no DB cluster snapshot is created. If false + // is specified, a DB cluster snapshot is created before the DB cluster is deleted. + // + // If SkipFinalSnapshot is false, you must specify a FinalDBSnapshotIdentifier + // parameter. + // + // Default: false + SkipFinalSnapshot *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DeleteDBClusterInput) SetDBClusterIdentifier(v string) *DeleteDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. +func (s *DeleteDBClusterInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBClusterInput { + s.FinalDBSnapshotIdentifier = &v + return s +} + +// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. +func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInput { + s.SkipFinalSnapshot = &v + return s +} + +type DeleteDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *DeleteDBClusterOutput) SetDBCluster(v *DBCluster) *DeleteDBClusterOutput { + s.DBCluster = v + return s +} + +// Represents the input to DeleteDBClusterParameterGroup. +type DeleteDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group. + // + // Constraints: + // + // * Must be the name of an existing DB cluster parameter group. + // + // * You can't delete a default DB cluster parameter group. + // + // * Cannot be associated with any DB clusters. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DeleteDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *DeleteDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +type DeleteDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// Represents the input to DeleteDBClusterSnapshot. +type DeleteDBClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // The identifier of the DB cluster snapshot to delete. + // + // Constraints: Must be the name of an existing DB cluster snapshot in the available + // state. + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterSnapshotInput"} + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DeleteDBClusterSnapshotInput) SetDBClusterSnapshotIdentifier(v string) *DeleteDBClusterSnapshotInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +type DeleteDBClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster snapshot. + DBClusterSnapshot *DBClusterSnapshot `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshot sets the DBClusterSnapshot field's value. +func (s *DeleteDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapshot) *DeleteDBClusterSnapshotOutput { + s.DBClusterSnapshot = v + return s +} + +// Represents the input to DeleteDBInstance. +type DeleteDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The DB instance identifier for the DB instance to be deleted. This parameter + // isn't case sensitive. + // + // Constraints: + // + // * Must match the name of an existing DB instance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DeleteDBInstanceInput) SetDBInstanceIdentifier(v string) *DeleteDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +type DeleteDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB instance. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *DeleteDBInstanceOutput) SetDBInstance(v *DBInstance) *DeleteDBInstanceOutput { + s.DBInstance = v + return s +} + +// Represents the input to DeleteDBSubnetGroup. +type DeleteDBSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the database subnet group to delete. + // + // You can't delete the default subnet group. + // + // Constraints: + // + // Must match the name of an existing DBSubnetGroup. Must not be default. + // + // Example: mySubnetgroup + // + // DBSubnetGroupName is a required field + DBSubnetGroupName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBSubnetGroupInput"} + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *DeleteDBSubnetGroupInput) SetDBSubnetGroupName(v string) *DeleteDBSubnetGroupInput { + s.DBSubnetGroupName = &v + return s +} + +type DeleteDBSubnetGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBSubnetGroupOutput) GoString() string { + return s.String() +} + +// Represents the input to DescribeDBClusterParameterGroups. +type DescribeDBClusterParameterGroupsInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB cluster parameter group to return details for. + // + // Constraints: + // + // * If provided, must match the name of an existing DBClusterParameterGroup. + DBClusterParameterGroupName *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClusterParameterGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParameterGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterParameterGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParameterGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParameterGroupsInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetFilters(v []*Filter) *DescribeDBClusterParameterGroupsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetMarker(v string) *DescribeDBClusterParameterGroupsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterParameterGroupsInput) SetMaxRecords(v int64) *DescribeDBClusterParameterGroupsInput { + s.MaxRecords = &v + return s +} + +// Represents the output of DBClusterParameterGroups. +type DescribeDBClusterParameterGroupsOutput struct { + _ struct{} `type:"structure"` + + // A list of DB cluster parameter groups. + DBClusterParameterGroups []*DBClusterParameterGroup `locationNameList:"DBClusterParameterGroup" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterParameterGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParameterGroupsOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroups sets the DBClusterParameterGroups field's value. +func (s *DescribeDBClusterParameterGroupsOutput) SetDBClusterParameterGroups(v []*DBClusterParameterGroup) *DescribeDBClusterParameterGroupsOutput { + s.DBClusterParameterGroups = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParameterGroupsOutput) SetMarker(v string) *DescribeDBClusterParameterGroupsOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeDBClusterParameters. +type DescribeDBClusterParametersInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB cluster parameter group to return parameter details + // for. + // + // Constraints: + // + // * If provided, must match the name of an existing DBClusterParameterGroup. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // A value that indicates to return only parameters for a specific source. Parameter + // sources can be engine, service, or customer. + Source *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterParametersInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *DescribeDBClusterParametersInput) SetDBClusterParameterGroupName(v string) *DescribeDBClusterParametersInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterParametersInput) SetFilters(v []*Filter) *DescribeDBClusterParametersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParametersInput) SetMarker(v string) *DescribeDBClusterParametersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterParametersInput) SetMaxRecords(v int64) *DescribeDBClusterParametersInput { + s.MaxRecords = &v + return s +} + +// SetSource sets the Source field's value. +func (s *DescribeDBClusterParametersInput) SetSource(v string) *DescribeDBClusterParametersInput { + s.Source = &v + return s +} + +// Represents the output of DBClusterParameterGroup. +type DescribeDBClusterParametersOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // Provides a list of parameters for the DB cluster parameter group. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` +} + +// String returns the string representation +func (s DescribeDBClusterParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterParametersOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterParametersOutput) SetMarker(v string) *DescribeDBClusterParametersOutput { + s.Marker = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *DescribeDBClusterParametersOutput) SetParameters(v []*Parameter) *DescribeDBClusterParametersOutput { + s.Parameters = v + return s +} + +// Represents the input to DescribeDBClusterSnapshotAttributes. +type DescribeDBClusterSnapshotAttributesInput struct { + _ struct{} `type:"structure"` + + // The identifier for the DB cluster snapshot to describe the attributes for. + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterSnapshotAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotAttributesInput"} + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DescribeDBClusterSnapshotAttributesInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotAttributesInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +type DescribeDBClusterSnapshotAttributesOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the attributes that are associated with a DB cluster + // snapshot. + DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotAttributesOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. +func (s *DescribeDBClusterSnapshotAttributesOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *DescribeDBClusterSnapshotAttributesOutput { + s.DBClusterSnapshotAttributesResult = v + return s +} + +// Represents the input to DescribeDBClusterSnapshots. +type DescribeDBClusterSnapshotsInput struct { + _ struct{} `type:"structure"` + + // The ID of the DB cluster to retrieve the list of DB cluster snapshots for. + // This parameter can't be used with the DBClusterSnapshotIdentifier parameter. + // This parameter is not case sensitive. + // + // Constraints: + // + // * If provided, must match the identifier of an existing DBCluster. + DBClusterIdentifier *string `type:"string"` + + // A specific DB cluster snapshot identifier to describe. This parameter can't + // be used with the DBClusterIdentifier parameter. This value is stored as a + // lowercase string. + // + // Constraints: + // + // * If provided, must match the identifier of an existing DBClusterSnapshot. + // + // * If this identifier is for an automated snapshot, the SnapshotType parameter + // must also be specified. + DBClusterSnapshotIdentifier *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // Set to true to include manual DB cluster snapshots that are public and can + // be copied or restored by any AWS account, and otherwise false. The default + // is false. + IncludePublic *bool `type:"boolean"` + + // Set to true to include shared manual DB cluster snapshots from other AWS + // accounts that this AWS account has been given permission to copy or restore, + // and otherwise false. The default is false. + IncludeShared *bool `type:"boolean"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The type of DB cluster snapshots to be returned. You can specify one of the + // following values: + // + // * automated - Return all DB cluster snapshots that Amazon DocumentDB has + // automatically created for your AWS account. + // + // * manual - Return all DB cluster snapshots that you have manually created + // for your AWS account. + // + // * shared - Return all manual DB cluster snapshots that have been shared + // to your AWS account. + // + // * public - Return all DB cluster snapshots that have been marked as public. + // + // If you don't specify a SnapshotType value, then both automated and manual + // DB cluster snapshots are returned. You can include shared DB cluster snapshots + // with these results by setting the IncludeShared parameter to true. You can + // include public DB cluster snapshots with these results by setting the IncludePublic + // parameter to true. + // + // The IncludeShared and IncludePublic parameters don't apply for SnapshotType + // values of manual or automated. The IncludePublic parameter doesn't apply + // when SnapshotType is set to shared. The IncludeShared parameter doesn't apply + // when SnapshotType is set to public. + SnapshotType *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterSnapshotsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClusterSnapshotsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterSnapshotsInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *DescribeDBClusterSnapshotsInput) SetDBClusterSnapshotIdentifier(v string) *DescribeDBClusterSnapshotsInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterSnapshotsInput) SetFilters(v []*Filter) *DescribeDBClusterSnapshotsInput { + s.Filters = v + return s +} + +// SetIncludePublic sets the IncludePublic field's value. +func (s *DescribeDBClusterSnapshotsInput) SetIncludePublic(v bool) *DescribeDBClusterSnapshotsInput { + s.IncludePublic = &v + return s +} + +// SetIncludeShared sets the IncludeShared field's value. +func (s *DescribeDBClusterSnapshotsInput) SetIncludeShared(v bool) *DescribeDBClusterSnapshotsInput { + s.IncludeShared = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterSnapshotsInput) SetMarker(v string) *DescribeDBClusterSnapshotsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterSnapshotsInput) SetMaxRecords(v int64) *DescribeDBClusterSnapshotsInput { + s.MaxRecords = &v + return s +} + +// SetSnapshotType sets the SnapshotType field's value. +func (s *DescribeDBClusterSnapshotsInput) SetSnapshotType(v string) *DescribeDBClusterSnapshotsInput { + s.SnapshotType = &v + return s +} + +// Represents the output of DescribeDBClusterSnapshots. +type DescribeDBClusterSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // Provides a list of DB cluster snapshots. + DBClusterSnapshots []*DBClusterSnapshot `locationNameList:"DBClusterSnapshot" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterSnapshotsOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshots sets the DBClusterSnapshots field's value. +func (s *DescribeDBClusterSnapshotsOutput) SetDBClusterSnapshots(v []*DBClusterSnapshot) *DescribeDBClusterSnapshotsOutput { + s.DBClusterSnapshots = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterSnapshotsOutput) SetMarker(v string) *DescribeDBClusterSnapshotsOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeDBClusters. +type DescribeDBClustersInput struct { + _ struct{} `type:"structure"` + + // The user-provided DB cluster identifier. If this parameter is specified, + // information from only the specific DB cluster is returned. This parameter + // isn't case sensitive. + // + // Constraints: + // + // * If provided, must match an existing DBClusterIdentifier. + DBClusterIdentifier *string `type:"string"` + + // A filter that specifies one or more DB clusters to describe. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list only includes information about + // the DB clusters identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClustersInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClustersInput) SetDBClusterIdentifier(v string) *DescribeDBClustersInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClustersInput) SetFilters(v []*Filter) *DescribeDBClustersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClustersInput) SetMarker(v string) *DescribeDBClustersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClustersInput) SetMaxRecords(v int64) *DescribeDBClustersInput { + s.MaxRecords = &v + return s +} + +// Represents the output of DescribeDBClusters. +type DescribeDBClustersOutput struct { + _ struct{} `type:"structure"` + + // A list of DB clusters. + DBClusters []*DBCluster `locationNameList:"DBCluster" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClustersOutput) GoString() string { + return s.String() +} + +// SetDBClusters sets the DBClusters field's value. +func (s *DescribeDBClustersOutput) SetDBClusters(v []*DBCluster) *DescribeDBClustersOutput { + s.DBClusters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClustersOutput) SetMarker(v string) *DescribeDBClustersOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeDBEngineVersions. +type DescribeDBEngineVersionsInput struct { + _ struct{} `type:"structure"` + + // The name of a specific DB parameter group family to return details for. + // + // Constraints: + // + // * If provided, must match an existing DBParameterGroupFamily. + DBParameterGroupFamily *string `type:"string"` + + // Indicates that only the default version of the specified engine or engine + // and major version combination is returned. + DefaultOnly *bool `type:"boolean"` + + // The database engine to return. + Engine *string `type:"string"` + + // The database engine version to return. + // + // Example: 5.1.49 + EngineVersion *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // If this parameter is specified and the requested engine supports the CharacterSetName + // parameter for CreateDBInstance, the response includes a list of supported + // character sets for each engine version. + ListSupportedCharacterSets *bool `type:"boolean"` + + // If this parameter is specified and the requested engine supports the TimeZone + // parameter for CreateDBInstance, the response includes a list of supported + // time zones for each engine version. + ListSupportedTimezones *bool `type:"boolean"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBEngineVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBEngineVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBEngineVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBEngineVersionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DescribeDBEngineVersionsInput) SetDBParameterGroupFamily(v string) *DescribeDBEngineVersionsInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetDefaultOnly sets the DefaultOnly field's value. +func (s *DescribeDBEngineVersionsInput) SetDefaultOnly(v bool) *DescribeDBEngineVersionsInput { + s.DefaultOnly = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DescribeDBEngineVersionsInput) SetEngine(v string) *DescribeDBEngineVersionsInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DescribeDBEngineVersionsInput) SetEngineVersion(v string) *DescribeDBEngineVersionsInput { + s.EngineVersion = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBEngineVersionsInput) SetFilters(v []*Filter) *DescribeDBEngineVersionsInput { + s.Filters = v + return s +} + +// SetListSupportedCharacterSets sets the ListSupportedCharacterSets field's value. +func (s *DescribeDBEngineVersionsInput) SetListSupportedCharacterSets(v bool) *DescribeDBEngineVersionsInput { + s.ListSupportedCharacterSets = &v + return s +} + +// SetListSupportedTimezones sets the ListSupportedTimezones field's value. +func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { + s.ListSupportedTimezones = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { + s.MaxRecords = &v + return s +} + +// Represents the output of DescribeDBEngineVersions. +type DescribeDBEngineVersionsOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about one or more DB engine versions. + DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBEngineVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBEngineVersionsOutput) GoString() string { + return s.String() +} + +// SetDBEngineVersions sets the DBEngineVersions field's value. +func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { + s.DBEngineVersions = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeDBInstances. +type DescribeDBInstancesInput struct { + _ struct{} `type:"structure"` + + // The user-provided instance identifier. If this parameter is specified, information + // from only the specific DB instance is returned. This parameter isn't case + // sensitive. + // + // Constraints: + // + // * If provided, must match the identifier of an existing DBInstance. + DBInstanceIdentifier *string `type:"string"` + + // A filter that specifies one or more DB instances to describe. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list includes only the information + // about the DB instances that are associated with the DB clusters that are + // identified by these ARNs. + // + // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. + // The results list includes only the information about the DB instances + // that are identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstancesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DescribeDBInstancesInput) SetDBInstanceIdentifier(v string) *DescribeDBInstancesInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBInstancesInput) SetFilters(v []*Filter) *DescribeDBInstancesInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBInstancesInput) SetMarker(v string) *DescribeDBInstancesInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBInstancesInput) SetMaxRecords(v int64) *DescribeDBInstancesInput { + s.MaxRecords = &v + return s +} + +// Represents the output of DescribeDBInstances. +type DescribeDBInstancesOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about one or more DB instances. + DBInstances []*DBInstance `locationNameList:"DBInstance" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBInstancesOutput) GoString() string { + return s.String() +} + +// SetDBInstances sets the DBInstances field's value. +func (s *DescribeDBInstancesOutput) SetDBInstances(v []*DBInstance) *DescribeDBInstancesOutput { + s.DBInstances = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBInstancesOutput) SetMarker(v string) *DescribeDBInstancesOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeDBSubnetGroups. +type DescribeDBSubnetGroupsInput struct { + _ struct{} `type:"structure"` + + // The name of the DB subnet group to return details for. + DBSubnetGroupName *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBSubnetGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBSubnetGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBSubnetGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBSubnetGroupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *DescribeDBSubnetGroupsInput) SetDBSubnetGroupName(v string) *DescribeDBSubnetGroupsInput { + s.DBSubnetGroupName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBSubnetGroupsInput) SetFilters(v []*Filter) *DescribeDBSubnetGroupsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBSubnetGroupsInput) SetMarker(v string) *DescribeDBSubnetGroupsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBSubnetGroupsInput) SetMaxRecords(v int64) *DescribeDBSubnetGroupsInput { + s.MaxRecords = &v + return s +} + +// Represents the output of DescribeDBSubnetGroups. +type DescribeDBSubnetGroupsOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about one or more DB subnet groups. + DBSubnetGroups []*DBSubnetGroup `locationNameList:"DBSubnetGroup" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBSubnetGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBSubnetGroupsOutput) GoString() string { + return s.String() +} + +// SetDBSubnetGroups sets the DBSubnetGroups field's value. +func (s *DescribeDBSubnetGroupsOutput) SetDBSubnetGroups(v []*DBSubnetGroup) *DescribeDBSubnetGroupsOutput { + s.DBSubnetGroups = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBSubnetGroupsOutput) SetMarker(v string) *DescribeDBSubnetGroupsOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeEngineDefaultClusterParameters. +type DescribeEngineDefaultClusterParametersInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group family to return the engine parameter + // information for. + // + // DBParameterGroupFamily is a required field + DBParameterGroupFamily *string `type:"string" required:"true"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeEngineDefaultClusterParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEngineDefaultClusterParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEngineDefaultClusterParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEngineDefaultClusterParametersInput"} + if s.DBParameterGroupFamily == nil { + invalidParams.Add(request.NewErrParamRequired("DBParameterGroupFamily")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetDBParameterGroupFamily(v string) *DescribeEngineDefaultClusterParametersInput { + s.DBParameterGroupFamily = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetFilters(v []*Filter) *DescribeEngineDefaultClusterParametersInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetMarker(v string) *DescribeEngineDefaultClusterParametersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEngineDefaultClusterParametersInput) SetMaxRecords(v int64) *DescribeEngineDefaultClusterParametersInput { + s.MaxRecords = &v + return s +} + +type DescribeEngineDefaultClusterParametersOutput struct { + _ struct{} `type:"structure"` + + // Contains the result of a successful invocation of the DescribeEngineDefaultClusterParameters + // operation. + EngineDefaults *EngineDefaults `type:"structure"` +} + +// String returns the string representation +func (s DescribeEngineDefaultClusterParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEngineDefaultClusterParametersOutput) GoString() string { + return s.String() +} + +// SetEngineDefaults sets the EngineDefaults field's value. +func (s *DescribeEngineDefaultClusterParametersOutput) SetEngineDefaults(v *EngineDefaults) *DescribeEngineDefaultClusterParametersOutput { + s.EngineDefaults = v + return s +} + +// Represents the input to DescribeEventCategories. +type DescribeEventCategoriesInput struct { + _ struct{} `type:"structure"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The type of source that is generating the events. + // + // Valid values: db-instance, db-parameter-group, db-security-group, db-snapshot + SourceType *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventCategoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventCategoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventCategoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventCategoriesInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEventCategoriesInput) SetFilters(v []*Filter) *DescribeEventCategoriesInput { + s.Filters = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *DescribeEventCategoriesInput) SetSourceType(v string) *DescribeEventCategoriesInput { + s.SourceType = &v + return s +} + +// Represents the output of DescribeEventCategories. +type DescribeEventCategoriesOutput struct { + _ struct{} `type:"structure"` + + // A list of event category maps. + EventCategoriesMapList []*EventCategoriesMap `locationNameList:"EventCategoriesMap" type:"list"` +} + +// String returns the string representation +func (s DescribeEventCategoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventCategoriesOutput) GoString() string { + return s.String() +} + +// SetEventCategoriesMapList sets the EventCategoriesMapList field's value. +func (s *DescribeEventCategoriesOutput) SetEventCategoriesMapList(v []*EventCategoriesMap) *DescribeEventCategoriesOutput { + s.EventCategoriesMapList = v + return s +} + +// Represents the input to DescribeEvents. +type DescribeEventsInput struct { + _ struct{} `type:"structure"` + + // The number of minutes to retrieve events for. + // + // Default: 60 + Duration *int64 `type:"integer"` + + // The end of the time interval for which to retrieve events, specified in ISO + // 8601 format. + // + // Example: 2009-07-08T18:00Z + EndTime *time.Time `type:"timestamp"` + + // A list of event categories that trigger notifications for an event notification + // subscription. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The identifier of the event source for which events are returned. If not + // specified, then all sources are included in the response. + // + // Constraints: + // + // * If SourceIdentifier is provided, SourceType must also be provided. + // + // * If the source type is DBInstance, a DBInstanceIdentifier must be provided. + // + // * If the source type is DBSecurityGroup, a DBSecurityGroupName must be + // provided. + // + // * If the source type is DBParameterGroup, a DBParameterGroupName must + // be provided. + // + // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be provided. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + SourceIdentifier *string `type:"string"` + + // The event source to retrieve events for. If no value is specified, all events + // are returned. + SourceType *string `type:"string" enum:"SourceType"` + + // The beginning of the time interval to retrieve events for, specified in ISO + // 8601 format. + // + // Example: 2009-07-08T18:00Z + StartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s DescribeEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDuration sets the Duration field's value. +func (s *DescribeEventsInput) SetDuration(v int64) *DescribeEventsInput { + s.Duration = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *DescribeEventsInput) SetEndTime(v time.Time) *DescribeEventsInput { + s.EndTime = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *DescribeEventsInput) SetEventCategories(v []*string) *DescribeEventsInput { + s.EventCategories = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeEventsInput) SetFilters(v []*Filter) *DescribeEventsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEventsInput) SetMarker(v string) *DescribeEventsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeEventsInput) SetMaxRecords(v int64) *DescribeEventsInput { + s.MaxRecords = &v + return s +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *DescribeEventsInput) SetSourceIdentifier(v string) *DescribeEventsInput { + s.SourceIdentifier = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *DescribeEventsInput) SetSourceType(v string) *DescribeEventsInput { + s.SourceType = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeEventsInput) SetStartTime(v time.Time) *DescribeEventsInput { + s.StartTime = &v + return s +} + +// Represents the output of DescribeEvents. +type DescribeEventsOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about one or more events. + Events []*Event `locationNameList:"Event" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEventsOutput) GoString() string { + return s.String() +} + +// SetEvents sets the Events field's value. +func (s *DescribeEventsOutput) SetEvents(v []*Event) *DescribeEventsOutput { + s.Events = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { + s.Marker = &v + return s +} + +// Represents the input to DescribeOrderableDBInstanceOptions. +type DescribeOrderableDBInstanceOptionsInput struct { + _ struct{} `type:"structure"` + + // The DB instance class filter value. Specify this parameter to show only the + // available offerings that match the specified DB instance class. + DBInstanceClass *string `type:"string"` + + // The name of the engine to retrieve DB instance options for. + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The engine version filter value. Specify this parameter to show only the + // available offerings that match the specified engine version. + EngineVersion *string `type:"string"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The license model filter value. Specify this parameter to show only the available + // offerings that match the specified license model. + LicenseModel *string `type:"string"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The virtual private cloud (VPC) filter value. Specify this parameter to show + // only the available VPC or non-VPC offerings. + Vpc *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeOrderableDBInstanceOptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOrderableDBInstanceOptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOrderableDBInstanceOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOrderableDBInstanceOptionsInput"} + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetDBInstanceClass(v string) *DescribeOrderableDBInstanceOptionsInput { + s.DBInstanceClass = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetEngine(v string) *DescribeOrderableDBInstanceOptionsInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetEngineVersion(v string) *DescribeOrderableDBInstanceOptionsInput { + s.EngineVersion = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetFilters(v []*Filter) *DescribeOrderableDBInstanceOptionsInput { + s.Filters = v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetLicenseModel(v string) *DescribeOrderableDBInstanceOptionsInput { + s.LicenseModel = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetMaxRecords(v int64) *DescribeOrderableDBInstanceOptionsInput { + s.MaxRecords = &v + return s +} + +// SetVpc sets the Vpc field's value. +func (s *DescribeOrderableDBInstanceOptionsInput) SetVpc(v bool) *DescribeOrderableDBInstanceOptionsInput { + s.Vpc = &v + return s +} + +// Represents the output of DescribeOrderableDBInstanceOptions. +type DescribeOrderableDBInstanceOptionsOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The options that are available for a particular orderable DB instance. + OrderableDBInstanceOptions []*OrderableDBInstanceOption `locationNameList:"OrderableDBInstanceOption" type:"list"` +} + +// String returns the string representation +func (s DescribeOrderableDBInstanceOptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOrderableDBInstanceOptionsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeOrderableDBInstanceOptionsOutput) SetMarker(v string) *DescribeOrderableDBInstanceOptionsOutput { + s.Marker = &v + return s +} + +// SetOrderableDBInstanceOptions sets the OrderableDBInstanceOptions field's value. +func (s *DescribeOrderableDBInstanceOptionsOutput) SetOrderableDBInstanceOptions(v []*OrderableDBInstanceOption) *DescribeOrderableDBInstanceOptionsOutput { + s.OrderableDBInstanceOptions = v + return s +} + +// Represents the input to DescribePendingMaintenanceActions. +type DescribePendingMaintenanceActionsInput struct { + _ struct{} `type:"structure"` + + // A filter that specifies one or more resources to return pending maintenance + // actions for. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list includes only pending maintenance + // actions for the DB clusters identified by these ARNs. + // + // * db-instance-id - Accepts DB instance identifiers and DB instance ARNs. + // The results list includes only pending maintenance actions for the DB + // instances identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` + + // The ARN of a resource to return pending maintenance actions for. + ResourceIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s DescribePendingMaintenanceActionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePendingMaintenanceActionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePendingMaintenanceActionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePendingMaintenanceActionsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribePendingMaintenanceActionsInput) SetFilters(v []*Filter) *DescribePendingMaintenanceActionsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribePendingMaintenanceActionsInput) SetMarker(v string) *DescribePendingMaintenanceActionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribePendingMaintenanceActionsInput) SetMaxRecords(v int64) *DescribePendingMaintenanceActionsInput { + s.MaxRecords = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *DescribePendingMaintenanceActionsInput) SetResourceIdentifier(v string) *DescribePendingMaintenanceActionsInput { + s.ResourceIdentifier = &v + return s +} + +// Represents the output of DescribePendingMaintenanceActions. +type DescribePendingMaintenanceActionsOutput struct { + _ struct{} `type:"structure"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maintenance actions to be applied. + PendingMaintenanceActions []*ResourcePendingMaintenanceActions `locationNameList:"ResourcePendingMaintenanceActions" type:"list"` +} + +// String returns the string representation +func (s DescribePendingMaintenanceActionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePendingMaintenanceActionsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribePendingMaintenanceActionsOutput) SetMarker(v string) *DescribePendingMaintenanceActionsOutput { + s.Marker = &v + return s +} + +// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. +func (s *DescribePendingMaintenanceActionsOutput) SetPendingMaintenanceActions(v []*ResourcePendingMaintenanceActions) *DescribePendingMaintenanceActionsOutput { + s.PendingMaintenanceActions = v + return s +} + +// Network information for accessing a DB cluster or DB instance. Client programs +// must specify a valid endpoint to access these Amazon DocumentDB resources. +type Endpoint struct { + _ struct{} `type:"structure"` + + // Specifies the DNS address of the DB instance. + Address *string `type:"string"` + + // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. + HostedZoneId *string `type:"string"` + + // Specifies the port that the database engine is listening on. + Port *int64 `type:"integer"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *Endpoint) SetAddress(v string) *Endpoint { + s.Address = &v + return s +} + +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *Endpoint) SetHostedZoneId(v string) *Endpoint { + s.HostedZoneId = &v + return s +} + +// SetPort sets the Port field's value. +func (s *Endpoint) SetPort(v int64) *Endpoint { + s.Port = &v + return s +} + +// Contains the result of a successful invocation of the DescribeEngineDefaultClusterParameters +// operation. +type EngineDefaults struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group family to return the engine parameter + // information for. + DBParameterGroupFamily *string `type:"string"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` + + // The parameters of a particular DB cluster parameter group family. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` +} + +// String returns the string representation +func (s EngineDefaults) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EngineDefaults) GoString() string { + return s.String() +} + +// SetDBParameterGroupFamily sets the DBParameterGroupFamily field's value. +func (s *EngineDefaults) SetDBParameterGroupFamily(v string) *EngineDefaults { + s.DBParameterGroupFamily = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *EngineDefaults) SetMarker(v string) *EngineDefaults { + s.Marker = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *EngineDefaults) SetParameters(v []*Parameter) *EngineDefaults { + s.Parameters = v + return s +} + +// Detailed information about an event. +type Event struct { + _ struct{} `type:"structure"` + + // Specifies the date and time of the event. + Date *time.Time `type:"timestamp"` + + // Specifies the category for the event. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // Provides the text of this event. + Message *string `type:"string"` + + // The Amazon Resource Name (ARN) for the event. + SourceArn *string `type:"string"` + + // Provides the identifier for the source of the event. + SourceIdentifier *string `type:"string"` + + // Specifies the source type for this event. + SourceType *string `type:"string" enum:"SourceType"` +} + +// String returns the string representation +func (s Event) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Event) GoString() string { + return s.String() +} + +// SetDate sets the Date field's value. +func (s *Event) SetDate(v time.Time) *Event { + s.Date = &v + return s +} + +// SetEventCategories sets the EventCategories field's value. +func (s *Event) SetEventCategories(v []*string) *Event { + s.EventCategories = v + return s +} + +// SetMessage sets the Message field's value. +func (s *Event) SetMessage(v string) *Event { + s.Message = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *Event) SetSourceArn(v string) *Event { + s.SourceArn = &v + return s +} + +// SetSourceIdentifier sets the SourceIdentifier field's value. +func (s *Event) SetSourceIdentifier(v string) *Event { + s.SourceIdentifier = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *Event) SetSourceType(v string) *Event { + s.SourceType = &v + return s +} + +// An event source type, accompanied by one or more event category names. +type EventCategoriesMap struct { + _ struct{} `type:"structure"` + + // The event categories for the specified source type. + EventCategories []*string `locationNameList:"EventCategory" type:"list"` + + // The source type that the returned categories belong to. + SourceType *string `type:"string"` +} + +// String returns the string representation +func (s EventCategoriesMap) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventCategoriesMap) GoString() string { + return s.String() +} + +// SetEventCategories sets the EventCategories field's value. +func (s *EventCategoriesMap) SetEventCategories(v []*string) *EventCategoriesMap { + s.EventCategories = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *EventCategoriesMap) SetSourceType(v string) *EventCategoriesMap { + s.SourceType = &v + return s +} + +// Represents the input to FailoverDBCluster. +type FailoverDBClusterInput struct { + _ struct{} `type:"structure"` + + // A DB cluster identifier to force a failover for. This parameter is not case + // sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + DBClusterIdentifier *string `type:"string"` + + // The name of the instance to promote to the primary instance. + // + // You must specify the instance identifier for an Amazon DocumentDB replica + // in the DB cluster. For example, mydbcluster-replica1. + TargetDBInstanceIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s FailoverDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailoverDBClusterInput) GoString() string { + return s.String() +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *FailoverDBClusterInput) SetDBClusterIdentifier(v string) *FailoverDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetTargetDBInstanceIdentifier sets the TargetDBInstanceIdentifier field's value. +func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *FailoverDBClusterInput { + s.TargetDBInstanceIdentifier = &v + return s +} + +type FailoverDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s FailoverDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailoverDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterOutput { + s.DBCluster = v + return s +} + +// A named set of filter values, used to return a more specific list of results. +// You can use a filter to match a set of resources by specific criteria, such +// as IDs. +// +// Wildcards are not supported in filters. +type Filter struct { + _ struct{} `type:"structure"` + + // The name of the filter. Filter names are case sensitive. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // One or more filter values. Filter values are case sensitive. + // + // Values is a required field + Values []*string `locationNameList:"Value" type:"list" required:"true"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v + return s +} + +// Represents the input to ListTagsForResource. +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // This parameter is not currently supported. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The Amazon DocumentDB resource with tags to be listed. This value is an Amazon + // Resource Name (ARN). + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListTagsForResourceInput) SetFilters(v []*Filter) *ListTagsForResourceInput { + s.Filters = v + return s +} + +// SetResourceName sets the ResourceName field's value. +func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput { + s.ResourceName = &v + return s +} + +// Represents the output of ListTagsForResource. +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // A list of one or more tags. + TagList []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTagList sets the TagList field's value. +func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { + s.TagList = v + return s +} + +// Represents the input to ModifyDBCluster. +type ModifyDBClusterInput struct { + _ struct{} `type:"structure"` + + // A value that specifies whether the changes in this request and any pending + // changes are asynchronously applied as soon as possible, regardless of the + // PreferredMaintenanceWindow setting for the DB cluster. If this parameter + // is set to false, changes to the DB cluster are applied during the next maintenance + // window. + // + // The ApplyImmediately parameter affects only the NewDBClusterIdentifier and + // MasterUserPassword values. If you set this parameter value to false, the + // changes to the NewDBClusterIdentifier and MasterUserPassword values are applied + // during the next maintenance window. All other changes are applied immediately, + // regardless of the value of the ApplyImmediately parameter. + // + // Default: false + ApplyImmediately *bool `type:"boolean"` + + // The number of days for which automated backups are retained. You must specify + // a minimum value of 1. + // + // Default: 1 + // + // Constraints: + // + // * Must be a value from 1 to 35. + BackupRetentionPeriod *int64 `type:"integer"` + + // The configuration setting for the log types to be enabled for export to Amazon + // CloudWatch Logs for a specific DB instance or DB cluster. The EnableLogTypes + // and DisableLogTypes arrays determine which logs are exported (or not exported) + // to CloudWatch Logs. + CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` + + // The DB cluster identifier for the cluster that is being modified. This parameter + // is not case sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB cluster parameter group to use for the DB cluster. + DBClusterParameterGroupName *string `type:"string"` + + // The version number of the database engine to which you want to upgrade. Changing + // this parameter results in an outage. The change is applied during the next + // maintenance window unless the ApplyImmediately parameter is set to true. + EngineVersion *string `type:"string"` + + // The new password for the master database user. This password can contain + // any printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain from 8 to 41 characters. + MasterUserPassword *string `type:"string"` + + // The new DB cluster identifier for the DB cluster when renaming a DB cluster. + // This value is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster2 + NewDBClusterIdentifier *string `type:"string"` + + // The port number on which the DB cluster accepts connections. + // + // Constraints: Must be a value from 1150 to 65535. + // + // Default: The same port as the original DB cluster. + Port *int64 `type:"integer"` + + // The daily time range during which automated backups are created if automated + // backups are enabled, using the BackupRetentionPeriod parameter. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region. + // + // Constraints: + // + // * Must be in the format hh24:mi-hh24:mi. + // + // * Must be in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `type:"string"` + + // The weekly time range during which system maintenance can occur, in Universal + // Coordinated Time (UTC). + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun + // + // Constraints: Minimum 30-minute window. + PreferredMaintenanceWindow *string `type:"string"` + + // A list of virtual private cloud (VPC) security groups that the DB cluster + // will belong to. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s ModifyDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *ModifyDBClusterInput) SetApplyImmediately(v bool) *ModifyDBClusterInput { + s.ApplyImmediately = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *ModifyDBClusterInput) SetBackupRetentionPeriod(v int64) *ModifyDBClusterInput { + s.BackupRetentionPeriod = &v + return s +} + +// SetCloudwatchLogsExportConfiguration sets the CloudwatchLogsExportConfiguration field's value. +func (s *ModifyDBClusterInput) SetCloudwatchLogsExportConfiguration(v *CloudwatchLogsExportConfiguration) *ModifyDBClusterInput { + s.CloudwatchLogsExportConfiguration = v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *ModifyDBClusterInput) SetDBClusterIdentifier(v string) *ModifyDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *ModifyDBClusterInput) SetEngineVersion(v string) *ModifyDBClusterInput { + s.EngineVersion = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *ModifyDBClusterInput) SetMasterUserPassword(v string) *ModifyDBClusterInput { + s.MasterUserPassword = &v + return s +} + +// SetNewDBClusterIdentifier sets the NewDBClusterIdentifier field's value. +func (s *ModifyDBClusterInput) SetNewDBClusterIdentifier(v string) *ModifyDBClusterInput { + s.NewDBClusterIdentifier = &v + return s +} + +// SetPort sets the Port field's value. +func (s *ModifyDBClusterInput) SetPort(v int64) *ModifyDBClusterInput { + s.Port = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *ModifyDBClusterInput) SetPreferredBackupWindow(v string) *ModifyDBClusterInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *ModifyDBClusterInput) SetPreferredMaintenanceWindow(v string) *ModifyDBClusterInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClusterInput { + s.VpcSecurityGroupIds = v + return s +} + +type ModifyDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *ModifyDBClusterOutput) SetDBCluster(v *DBCluster) *ModifyDBClusterOutput { + s.DBCluster = v + return s +} + +// Represents the input to ModifyDBClusterParameterGroup. +type ModifyDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group to modify. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // A list of parameters in the DB cluster parameter group to modify. + // + // Parameters is a required field + Parameters []*Parameter `locationNameList:"Parameter" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifyDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ModifyDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *ModifyDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ModifyDBClusterParameterGroupInput { + s.Parameters = v + return s +} + +// Contains the name of a DB cluster parameter group. +type ModifyDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // The name of a DB cluster parameter group. + // + // Constraints: + // + // * Must be from 1 to 255 letters or numbers. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // This value is stored as a lowercase string. + DBClusterParameterGroupName *string `type:"string"` +} + +// String returns the string representation +func (s ModifyDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ModifyDBClusterParameterGroupOutput) SetDBClusterParameterGroupName(v string) *ModifyDBClusterParameterGroupOutput { + s.DBClusterParameterGroupName = &v + return s +} + +// Represents the input to ModifyDBClusterSnapshotAttribute. +type ModifyDBClusterSnapshotAttributeInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster snapshot attribute to modify. + // + // To manage authorization for other AWS accounts to copy or restore a manual + // DB cluster snapshot, set this value to restore. + // + // AttributeName is a required field + AttributeName *string `type:"string" required:"true"` + + // The identifier for the DB cluster snapshot to modify the attributes for. + // + // DBClusterSnapshotIdentifier is a required field + DBClusterSnapshotIdentifier *string `type:"string" required:"true"` + + // A list of DB cluster snapshot attributes to add to the attribute specified + // by AttributeName. + // + // To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, + // set this list to include one or more AWS account IDs. To make the manual + // DB cluster snapshot restorable by any AWS account, set it to all. Do not + // add the all value for any manual DB cluster snapshots that contain private + // information that you don't want to be available to all AWS accounts. + ValuesToAdd []*string `locationNameList:"AttributeValue" type:"list"` + + // A list of DB cluster snapshot attributes to remove from the attribute specified + // by AttributeName. + // + // To remove authorization for other AWS accounts to copy or restore a manual + // DB cluster snapshot, set this list to include one or more AWS account identifiers. + // To remove authorization for any AWS account to copy or restore the DB cluster + // snapshot, set it to all . If you specify all, an AWS account whose account + // ID is explicitly added to the restore attribute can still copy or restore + // a manual DB cluster snapshot. + ValuesToRemove []*string `locationNameList:"AttributeValue" type:"list"` +} + +// String returns the string representation +func (s ModifyDBClusterSnapshotAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterSnapshotAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterSnapshotAttributeInput"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.DBClusterSnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterSnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeName sets the AttributeName field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetAttributeName(v string) *ModifyDBClusterSnapshotAttributeInput { + s.AttributeName = &v + return s +} + +// SetDBClusterSnapshotIdentifier sets the DBClusterSnapshotIdentifier field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetDBClusterSnapshotIdentifier(v string) *ModifyDBClusterSnapshotAttributeInput { + s.DBClusterSnapshotIdentifier = &v + return s +} + +// SetValuesToAdd sets the ValuesToAdd field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToAdd(v []*string) *ModifyDBClusterSnapshotAttributeInput { + s.ValuesToAdd = v + return s +} + +// SetValuesToRemove sets the ValuesToRemove field's value. +func (s *ModifyDBClusterSnapshotAttributeInput) SetValuesToRemove(v []*string) *ModifyDBClusterSnapshotAttributeInput { + s.ValuesToRemove = v + return s +} + +type ModifyDBClusterSnapshotAttributeOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the attributes that are associated with a DB cluster + // snapshot. + DBClusterSnapshotAttributesResult *DBClusterSnapshotAttributesResult `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBClusterSnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterSnapshotAttributeOutput) GoString() string { + return s.String() +} + +// SetDBClusterSnapshotAttributesResult sets the DBClusterSnapshotAttributesResult field's value. +func (s *ModifyDBClusterSnapshotAttributeOutput) SetDBClusterSnapshotAttributesResult(v *DBClusterSnapshotAttributesResult) *ModifyDBClusterSnapshotAttributeOutput { + s.DBClusterSnapshotAttributesResult = v + return s +} + +// Represents the input to ModifyDBInstance. +type ModifyDBInstanceInput struct { + _ struct{} `type:"structure"` + + // Specifies whether the modifications in this request and any pending modifications + // are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow + // setting for the DB instance. + // + // If this parameter is set to false, changes to the DB instance are applied + // during the next maintenance window. Some parameter changes can cause an outage + // and are applied on the next reboot. + // + // Default: false + ApplyImmediately *bool `type:"boolean"` + + // Indicates that minor version upgrades are applied automatically to the DB + // instance during the maintenance window. Changing this parameter doesn't result + // in an outage except in the following case, and the change is asynchronously + // applied as soon as possible. An outage results if this parameter is set to + // true during the maintenance window, and a newer minor version is available, + // and Amazon DocumentDB has enabled automatic patching for that engine version. + AutoMinorVersionUpgrade *bool `type:"boolean"` + + // The new compute and memory capacity of the DB instance; for example, db.m4.large. + // Not all DB instance classes are available in all AWS Regions. + // + // If you modify the DB instance class, an outage occurs during the change. + // The change is applied during the next maintenance window, unless ApplyImmediately + // is specified as true for this request. + // + // Default: Uses existing setting. + DBInstanceClass *string `type:"string"` + + // The DB instance identifier. This value is stored as a lowercase string. + // + // Constraints: + // + // * Must match the identifier of an existing DBInstance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The new DB instance identifier for the DB instance when renaming a DB instance. + // When you change the DB instance identifier, an instance reboot occurs immediately + // if you set Apply Immediately to true. It occurs during the next maintenance + // window if you set Apply Immediately to false. This value is stored as a lowercase + // string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: mydbinstance + NewDBInstanceIdentifier *string `type:"string"` + + // The weekly time range (in UTC) during which system maintenance can occur, + // which might result in an outage. Changing this parameter doesn't result in + // an outage except in the following situation, and the change is asynchronously + // applied as soon as possible. If there are pending actions that cause a reboot, + // and the maintenance window is changed to include the current time, changing + // this parameter causes a reboot of the DB instance. If you are moving this + // window to the current time, there must be at least 30 minutes between the + // current time and end of the window to ensure that pending changes are applied. + // + // Default: Uses existing setting. + // + // Format: ddd:hh24:mi-ddd:hh24:mi + // + // Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun + // + // Constraints: Must be at least 30 minutes. + PreferredMaintenanceWindow *string `type:"string"` + + // A value that specifies the order in which an Amazon DocumentDB replica is + // promoted to the primary instance after a failure of the existing primary + // instance. + // + // Default: 1 + // + // Valid values: 0-15 + PromotionTier *int64 `type:"integer"` +} + +// String returns the string representation +func (s ModifyDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *ModifyDBInstanceInput) SetApplyImmediately(v bool) *ModifyDBInstanceInput { + s.ApplyImmediately = &v + return s +} + +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *ModifyDBInstanceInput) SetAutoMinorVersionUpgrade(v bool) *ModifyDBInstanceInput { + s.AutoMinorVersionUpgrade = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *ModifyDBInstanceInput) SetDBInstanceClass(v string) *ModifyDBInstanceInput { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *ModifyDBInstanceInput) SetDBInstanceIdentifier(v string) *ModifyDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetNewDBInstanceIdentifier sets the NewDBInstanceIdentifier field's value. +func (s *ModifyDBInstanceInput) SetNewDBInstanceIdentifier(v string) *ModifyDBInstanceInput { + s.NewDBInstanceIdentifier = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *ModifyDBInstanceInput) SetPreferredMaintenanceWindow(v string) *ModifyDBInstanceInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPromotionTier sets the PromotionTier field's value. +func (s *ModifyDBInstanceInput) SetPromotionTier(v int64) *ModifyDBInstanceInput { + s.PromotionTier = &v + return s +} + +type ModifyDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB instance. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *ModifyDBInstanceOutput) SetDBInstance(v *DBInstance) *ModifyDBInstanceOutput { + s.DBInstance = v + return s +} + +// Represents the input to ModifyDBSubnetGroup. +type ModifyDBSubnetGroupInput struct { + _ struct{} `type:"structure"` + + // The description for the DB subnet group. + DBSubnetGroupDescription *string `type:"string"` + + // The name for the DB subnet group. This value is stored as a lowercase string. + // You can't modify the default subnet group. + // + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. + // + // Example: mySubnetgroup + // + // DBSubnetGroupName is a required field + DBSubnetGroupName *string `type:"string" required:"true"` + + // The Amazon EC2 subnet IDs for the DB subnet group. + // + // SubnetIds is a required field + SubnetIds []*string `locationNameList:"SubnetIdentifier" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifyDBSubnetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBSubnetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBSubnetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBSubnetGroupInput"} + if s.DBSubnetGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBSubnetGroupName")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBSubnetGroupDescription sets the DBSubnetGroupDescription field's value. +func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupDescription(v string) *ModifyDBSubnetGroupInput { + s.DBSubnetGroupDescription = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *ModifyDBSubnetGroupInput) SetDBSubnetGroupName(v string) *ModifyDBSubnetGroupInput { + s.DBSubnetGroupName = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *ModifyDBSubnetGroupInput) SetSubnetIds(v []*string) *ModifyDBSubnetGroupInput { + s.SubnetIds = v + return s +} + +type ModifyDBSubnetGroupOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB subnet group. + DBSubnetGroup *DBSubnetGroup `type:"structure"` +} + +// String returns the string representation +func (s ModifyDBSubnetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBSubnetGroupOutput) GoString() string { + return s.String() +} + +// SetDBSubnetGroup sets the DBSubnetGroup field's value. +func (s *ModifyDBSubnetGroupOutput) SetDBSubnetGroup(v *DBSubnetGroup) *ModifyDBSubnetGroupOutput { + s.DBSubnetGroup = v + return s +} + +// The options that are available for a DB instance. +type OrderableDBInstanceOption struct { + _ struct{} `type:"structure"` + + // A list of Availability Zones for a DB instance. + AvailabilityZones []*AvailabilityZone `locationNameList:"AvailabilityZone" type:"list"` + + // The DB instance class for a DB instance. + DBInstanceClass *string `type:"string"` + + // The engine type of a DB instance. + Engine *string `type:"string"` + + // The engine version of a DB instance. + EngineVersion *string `type:"string"` + + // The license model for a DB instance. + LicenseModel *string `type:"string"` + + // Indicates whether a DB instance is in a virtual private cloud (VPC). + Vpc *bool `type:"boolean"` +} + +// String returns the string representation +func (s OrderableDBInstanceOption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrderableDBInstanceOption) GoString() string { + return s.String() +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *OrderableDBInstanceOption) SetAvailabilityZones(v []*AvailabilityZone) *OrderableDBInstanceOption { + s.AvailabilityZones = v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *OrderableDBInstanceOption) SetDBInstanceClass(v string) *OrderableDBInstanceOption { + s.DBInstanceClass = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *OrderableDBInstanceOption) SetEngine(v string) *OrderableDBInstanceOption { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *OrderableDBInstanceOption) SetEngineVersion(v string) *OrderableDBInstanceOption { + s.EngineVersion = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *OrderableDBInstanceOption) SetLicenseModel(v string) *OrderableDBInstanceOption { + s.LicenseModel = &v + return s +} + +// SetVpc sets the Vpc field's value. +func (s *OrderableDBInstanceOption) SetVpc(v bool) *OrderableDBInstanceOption { + s.Vpc = &v + return s +} + +// Detailed information about an individual parameter. +type Parameter struct { + _ struct{} `type:"structure"` + + // Specifies the valid range of values for the parameter. + AllowedValues *string `type:"string"` + + // Indicates when to apply parameter updates. + ApplyMethod *string `type:"string" enum:"ApplyMethod"` + + // Specifies the engine-specific parameters type. + ApplyType *string `type:"string"` + + // Specifies the valid data type for the parameter. + DataType *string `type:"string"` + + // Provides a description of the parameter. + Description *string `type:"string"` + + // Indicates whether (true) or not (false) the parameter can be modified. Some + // parameters have security or operational implications that prevent them from + // being changed. + IsModifiable *bool `type:"boolean"` + + // The earliest engine version to which the parameter can apply. + MinimumEngineVersion *string `type:"string"` + + // Specifies the name of the parameter. + ParameterName *string `type:"string"` + + // Specifies the value of the parameter. + ParameterValue *string `type:"string"` + + // Indicates the source of the parameter value. + Source *string `type:"string"` +} + +// String returns the string representation +func (s Parameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Parameter) GoString() string { + return s.String() +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *Parameter) SetAllowedValues(v string) *Parameter { + s.AllowedValues = &v + return s +} + +// SetApplyMethod sets the ApplyMethod field's value. +func (s *Parameter) SetApplyMethod(v string) *Parameter { + s.ApplyMethod = &v + return s +} + +// SetApplyType sets the ApplyType field's value. +func (s *Parameter) SetApplyType(v string) *Parameter { + s.ApplyType = &v + return s +} + +// SetDataType sets the DataType field's value. +func (s *Parameter) SetDataType(v string) *Parameter { + s.DataType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Parameter) SetDescription(v string) *Parameter { + s.Description = &v + return s +} + +// SetIsModifiable sets the IsModifiable field's value. +func (s *Parameter) SetIsModifiable(v bool) *Parameter { + s.IsModifiable = &v + return s +} + +// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. +func (s *Parameter) SetMinimumEngineVersion(v string) *Parameter { + s.MinimumEngineVersion = &v + return s +} + +// SetParameterName sets the ParameterName field's value. +func (s *Parameter) SetParameterName(v string) *Parameter { + s.ParameterName = &v + return s +} + +// SetParameterValue sets the ParameterValue field's value. +func (s *Parameter) SetParameterValue(v string) *Parameter { + s.ParameterValue = &v + return s +} + +// SetSource sets the Source field's value. +func (s *Parameter) SetSource(v string) *Parameter { + s.Source = &v + return s +} + +// A list of the log types whose configuration is still pending. These log types +// are in the process of being activated or deactivated. +type PendingCloudwatchLogsExports struct { + _ struct{} `type:"structure"` + + // Log types that are in the process of being enabled. After they are enabled, + // these log types are exported to Amazon CloudWatch Logs. + LogTypesToDisable []*string `type:"list"` + + // Log types that are in the process of being deactivated. After they are deactivated, + // these log types aren't exported to CloudWatch Logs. + LogTypesToEnable []*string `type:"list"` +} + +// String returns the string representation +func (s PendingCloudwatchLogsExports) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingCloudwatchLogsExports) GoString() string { + return s.String() +} + +// SetLogTypesToDisable sets the LogTypesToDisable field's value. +func (s *PendingCloudwatchLogsExports) SetLogTypesToDisable(v []*string) *PendingCloudwatchLogsExports { + s.LogTypesToDisable = v + return s +} + +// SetLogTypesToEnable sets the LogTypesToEnable field's value. +func (s *PendingCloudwatchLogsExports) SetLogTypesToEnable(v []*string) *PendingCloudwatchLogsExports { + s.LogTypesToEnable = v + return s +} + +// Provides information about a pending maintenance action for a resource. +type PendingMaintenanceAction struct { + _ struct{} `type:"structure"` + + // The type of pending maintenance action that is available for the resource. + Action *string `type:"string"` + + // The date of the maintenance window when the action is applied. The maintenance + // action is applied to the resource during its first maintenance window after + // this date. If this date is specified, any next-maintenance opt-in requests + // are ignored. + AutoAppliedAfterDate *time.Time `type:"timestamp"` + + // The effective date when the pending maintenance action is applied to the + // resource. + CurrentApplyDate *time.Time `type:"timestamp"` + + // A description providing more detail about the maintenance action. + Description *string `type:"string"` + + // The date when the maintenance action is automatically applied. The maintenance + // action is applied to the resource on this date regardless of the maintenance + // window for the resource. If this date is specified, any immediate opt-in + // requests are ignored. + ForcedApplyDate *time.Time `type:"timestamp"` + + // Indicates the type of opt-in request that has been received for the resource. + OptInStatus *string `type:"string"` +} + +// String returns the string representation +func (s PendingMaintenanceAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingMaintenanceAction) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { + s.Action = &v + return s +} + +// SetAutoAppliedAfterDate sets the AutoAppliedAfterDate field's value. +func (s *PendingMaintenanceAction) SetAutoAppliedAfterDate(v time.Time) *PendingMaintenanceAction { + s.AutoAppliedAfterDate = &v + return s +} + +// SetCurrentApplyDate sets the CurrentApplyDate field's value. +func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { + s.CurrentApplyDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { + s.Description = &v + return s +} + +// SetForcedApplyDate sets the ForcedApplyDate field's value. +func (s *PendingMaintenanceAction) SetForcedApplyDate(v time.Time) *PendingMaintenanceAction { + s.ForcedApplyDate = &v + return s +} + +// SetOptInStatus sets the OptInStatus field's value. +func (s *PendingMaintenanceAction) SetOptInStatus(v string) *PendingMaintenanceAction { + s.OptInStatus = &v + return s +} + +// One or more modified settings for a DB instance. These modified settings +// have been requested, but haven't been applied yet. +type PendingModifiedValues struct { + _ struct{} `type:"structure"` + + // Contains the new AllocatedStorage size for the DB instance that will be applied + // or is currently being applied. + AllocatedStorage *int64 `type:"integer"` + + // Specifies the pending number of days for which automated backups are retained. + BackupRetentionPeriod *int64 `type:"integer"` + + // Specifies the identifier of the certificate authority (CA) certificate for + // the DB instance. + CACertificateIdentifier *string `type:"string"` + + // Contains the new DBInstanceClass for the DB instance that will be applied + // or is currently being applied. + DBInstanceClass *string `type:"string"` + + // Contains the new DBInstanceIdentifier for the DB instance that will be applied + // or is currently being applied. + DBInstanceIdentifier *string `type:"string"` + + // The new DB subnet group for the DB instance. + DBSubnetGroupName *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // Specifies the new Provisioned IOPS value for the DB instance that will be + // applied or is currently being applied. + Iops *int64 `type:"integer"` + + // The license model for the DB instance. + // + // Valid values: license-included, bring-your-own-license, general-public-license + LicenseModel *string `type:"string"` + + // Contains the pending or currently in-progress change of the master credentials + // for the DB instance. + MasterUserPassword *string `type:"string"` + + // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. + MultiAZ *bool `type:"boolean"` + + // A list of the log types whose configuration is still pending. These log types + // are in the process of being activated or deactivated. + PendingCloudwatchLogsExports *PendingCloudwatchLogsExports `type:"structure"` + + // Specifies the pending port for the DB instance. + Port *int64 `type:"integer"` + + // Specifies the storage type to be associated with the DB instance. + StorageType *string `type:"string"` +} + +// String returns the string representation +func (s PendingModifiedValues) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PendingModifiedValues) GoString() string { + return s.String() +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *PendingModifiedValues) SetAllocatedStorage(v int64) *PendingModifiedValues { + s.AllocatedStorage = &v + return s +} + +// SetBackupRetentionPeriod sets the BackupRetentionPeriod field's value. +func (s *PendingModifiedValues) SetBackupRetentionPeriod(v int64) *PendingModifiedValues { + s.BackupRetentionPeriod = &v + return s +} + +// SetCACertificateIdentifier sets the CACertificateIdentifier field's value. +func (s *PendingModifiedValues) SetCACertificateIdentifier(v string) *PendingModifiedValues { + s.CACertificateIdentifier = &v + return s +} + +// SetDBInstanceClass sets the DBInstanceClass field's value. +func (s *PendingModifiedValues) SetDBInstanceClass(v string) *PendingModifiedValues { + s.DBInstanceClass = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *PendingModifiedValues) SetDBInstanceIdentifier(v string) *PendingModifiedValues { + s.DBInstanceIdentifier = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *PendingModifiedValues) SetDBSubnetGroupName(v string) *PendingModifiedValues { + s.DBSubnetGroupName = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *PendingModifiedValues) SetEngineVersion(v string) *PendingModifiedValues { + s.EngineVersion = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *PendingModifiedValues) SetIops(v int64) *PendingModifiedValues { + s.Iops = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *PendingModifiedValues) SetLicenseModel(v string) *PendingModifiedValues { + s.LicenseModel = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *PendingModifiedValues) SetMasterUserPassword(v string) *PendingModifiedValues { + s.MasterUserPassword = &v + return s +} + +// SetMultiAZ sets the MultiAZ field's value. +func (s *PendingModifiedValues) SetMultiAZ(v bool) *PendingModifiedValues { + s.MultiAZ = &v + return s +} + +// SetPendingCloudwatchLogsExports sets the PendingCloudwatchLogsExports field's value. +func (s *PendingModifiedValues) SetPendingCloudwatchLogsExports(v *PendingCloudwatchLogsExports) *PendingModifiedValues { + s.PendingCloudwatchLogsExports = v + return s +} + +// SetPort sets the Port field's value. +func (s *PendingModifiedValues) SetPort(v int64) *PendingModifiedValues { + s.Port = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *PendingModifiedValues) SetStorageType(v string) *PendingModifiedValues { + s.StorageType = &v + return s +} + +// Represents the input to RebootDBInstance. +type RebootDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The DB instance identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must match the identifier of an existing DBInstance. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // When true, the reboot is conducted through a Multi-AZ failover. + // + // Constraint: You can't specify true if the instance is not configured for + // Multi-AZ. + ForceFailover *bool `type:"boolean"` +} + +// String returns the string representation +func (s RebootDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *RebootDBInstanceInput) SetDBInstanceIdentifier(v string) *RebootDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetForceFailover sets the ForceFailover field's value. +func (s *RebootDBInstanceInput) SetForceFailover(v bool) *RebootDBInstanceInput { + s.ForceFailover = &v + return s +} + +type RebootDBInstanceOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB instance. + DBInstance *DBInstance `type:"structure"` +} + +// String returns the string representation +func (s RebootDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootDBInstanceOutput) GoString() string { + return s.String() +} + +// SetDBInstance sets the DBInstance field's value. +func (s *RebootDBInstanceOutput) SetDBInstance(v *DBInstance) *RebootDBInstanceOutput { + s.DBInstance = v + return s +} + +// Represents the input to RemoveTagsFromResource. +type RemoveTagsFromResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon DocumentDB resource that the tags are removed from. This value + // is an Amazon Resource Name (ARN). + // + // ResourceName is a required field + ResourceName *string `type:"string" required:"true"` + + // The tag key (name) of the tag to be removed. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s RemoveTagsFromResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsFromResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveTagsFromResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *RemoveTagsFromResourceInput) SetResourceName(v string) *RemoveTagsFromResourceInput { + s.ResourceName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *RemoveTagsFromResourceInput) SetTagKeys(v []*string) *RemoveTagsFromResourceInput { + s.TagKeys = v + return s +} + +type RemoveTagsFromResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveTagsFromResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveTagsFromResourceOutput) GoString() string { + return s.String() +} + +// Represents the input to ResetDBClusterParameterGroup. +type ResetDBClusterParameterGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the DB cluster parameter group to reset. + // + // DBClusterParameterGroupName is a required field + DBClusterParameterGroupName *string `type:"string" required:"true"` + + // A list of parameter names in the DB cluster parameter group to reset to the + // default values. You can't use this parameter if the ResetAllParameters parameter + // is set to true. + Parameters []*Parameter `locationNameList:"Parameter" type:"list"` + + // A value that is set to true to reset all parameters in the DB cluster parameter + // group to their default values, and false otherwise. You can't use this parameter + // if there is a list of parameter names specified for the Parameters parameter. + ResetAllParameters *bool `type:"boolean"` +} + +// String returns the string representation +func (s ResetDBClusterParameterGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDBClusterParameterGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetDBClusterParameterGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetDBClusterParameterGroupInput"} + if s.DBClusterParameterGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterParameterGroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ResetDBClusterParameterGroupInput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupInput { + s.DBClusterParameterGroupName = &v + return s +} + +// SetParameters sets the Parameters field's value. +func (s *ResetDBClusterParameterGroupInput) SetParameters(v []*Parameter) *ResetDBClusterParameterGroupInput { + s.Parameters = v + return s +} + +// SetResetAllParameters sets the ResetAllParameters field's value. +func (s *ResetDBClusterParameterGroupInput) SetResetAllParameters(v bool) *ResetDBClusterParameterGroupInput { + s.ResetAllParameters = &v + return s +} + +// Contains the name of a DB cluster parameter group. +type ResetDBClusterParameterGroupOutput struct { + _ struct{} `type:"structure"` + + // The name of a DB cluster parameter group. + // + // Constraints: + // + // * Must be from 1 to 255 letters or numbers. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // This value is stored as a lowercase string. + DBClusterParameterGroupName *string `type:"string"` +} + +// String returns the string representation +func (s ResetDBClusterParameterGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetDBClusterParameterGroupOutput) GoString() string { + return s.String() +} + +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *ResetDBClusterParameterGroupOutput) SetDBClusterParameterGroupName(v string) *ResetDBClusterParameterGroupOutput { + s.DBClusterParameterGroupName = &v + return s +} + +// Represents the output of ApplyPendingMaintenanceAction. +type ResourcePendingMaintenanceActions struct { + _ struct{} `type:"structure"` + + // A list that provides details about the pending maintenance actions for the + // resource. + PendingMaintenanceActionDetails []*PendingMaintenanceAction `locationNameList:"PendingMaintenanceAction" type:"list"` + + // The Amazon Resource Name (ARN) of the resource that has pending maintenance + // actions. + ResourceIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s ResourcePendingMaintenanceActions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourcePendingMaintenanceActions) GoString() string { + return s.String() +} + +// SetPendingMaintenanceActionDetails sets the PendingMaintenanceActionDetails field's value. +func (s *ResourcePendingMaintenanceActions) SetPendingMaintenanceActionDetails(v []*PendingMaintenanceAction) *ResourcePendingMaintenanceActions { + s.PendingMaintenanceActionDetails = v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *ResourcePendingMaintenanceActions) SetResourceIdentifier(v string) *ResourcePendingMaintenanceActions { + s.ResourceIdentifier = &v + return s +} + +// Represents the input to RestoreDBClusterFromSnapshot. +type RestoreDBClusterFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // Provides the list of Amazon EC2 Availability Zones that instances in the + // restored DB cluster can be created in. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // The name of the DB cluster to create from the DB snapshot or DB cluster snapshot. + // This parameter isn't case sensitive. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // Example: my-snapshot-id + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB subnet group to use for the new DB cluster. + // + // Constraints: If provided, must match the name of an existing DBSubnetGroup. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` + + // A list of log types that must be enabled for exporting to Amazon CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + + // The database engine to use for the new DB cluster. + // + // Default: The same as source. + // + // Constraint: Must be compatible with the engine of the source. + // + // Engine is a required field + Engine *string `type:"string" required:"true"` + + // The version of the database engine to use for the new DB cluster. + EngineVersion *string `type:"string"` + + // The AWS KMS key identifier to use when restoring an encrypted DB cluster + // from a DB snapshot or DB cluster snapshot. + // + // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS + // KMS encryption key. If you are restoring a DB cluster with the same AWS account + // that owns the AWS KMS encryption key used to encrypt the new DB cluster, + // then you can use the AWS KMS key alias instead of the ARN for the AWS KMS + // encryption key. + // + // If you do not specify a value for the KmsKeyId parameter, then the following + // occurs: + // + // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, + // then the restored DB cluster is encrypted using the AWS KMS key that was + // used to encrypt the DB snapshot or the DB cluster snapshot. + // + // * If the DB snapshot or the DB cluster snapshot in SnapshotIdentifier + // is not encrypted, then the restored DB cluster is not encrypted. + KmsKeyId *string `type:"string"` + + // The port number on which the new DB cluster accepts connections. + // + // Constraints: Must be a value from 1150 to 65535. + // + // Default: The same port as the original DB cluster. + Port *int64 `type:"integer"` + + // The identifier for the DB snapshot or DB cluster snapshot to restore from. + // + // You can use either the name or the Amazon Resource Name (ARN) to specify + // a DB cluster snapshot. However, you can use only the ARN to specify a DB + // snapshot. + // + // Constraints: + // + // * Must match the identifier of an existing snapshot. + // + // SnapshotIdentifier is a required field + SnapshotIdentifier *string `type:"string" required:"true"` + + // The tags to be assigned to the restored DB cluster. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A list of virtual private cloud (VPC) security groups that the new DB cluster + // will belong to. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s RestoreDBClusterFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBClusterFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterFromSnapshotInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.Engine == nil { + invalidParams.Add(request.NewErrParamRequired("Engine")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetAvailabilityZones(v []*string) *RestoreDBClusterFromSnapshotInput { + s.AvailabilityZones = v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *RestoreDBClusterFromSnapshotInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { + s.DBSubnetGroupName = &v + return s +} + +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromSnapshotInput { + s.EnableCloudwatchLogsExports = v + return s +} + +// SetEngine sets the Engine field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEngine(v string) *RestoreDBClusterFromSnapshotInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetEngineVersion(v string) *RestoreDBClusterFromSnapshotInput { + s.EngineVersion = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetKmsKeyId(v string) *RestoreDBClusterFromSnapshotInput { + s.KmsKeyId = &v + return s +} + +// SetPort sets the Port field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetPort(v int64) *RestoreDBClusterFromSnapshotInput { + s.Port = &v + return s +} + +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetSnapshotIdentifier(v string) *RestoreDBClusterFromSnapshotInput { + s.SnapshotIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetTags(v []*Tag) *RestoreDBClusterFromSnapshotInput { + s.Tags = v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterFromSnapshotInput { + s.VpcSecurityGroupIds = v + return s +} + +type RestoreDBClusterFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s RestoreDBClusterFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *RestoreDBClusterFromSnapshotOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterFromSnapshotOutput { + s.DBCluster = v + return s +} + +// Represents the input to RestoreDBClusterToPointInTime. +type RestoreDBClusterToPointInTimeInput struct { + _ struct{} `type:"structure"` + + // The name of the new DB cluster to be created. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * The first character must be a letter. + // + // * Cannot end with a hyphen or contain two consecutive hyphens. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The DB subnet group name to use for the new DB cluster. + // + // Constraints: If provided, must match the name of an existing DBSubnetGroup. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` + + // A list of log types that must be enabled for exporting to Amazon CloudWatch + // Logs. + EnableCloudwatchLogsExports []*string `type:"list"` + + // The AWS KMS key identifier to use when restoring an encrypted DB cluster + // from an encrypted DB cluster. + // + // The AWS KMS key identifier is the Amazon Resource Name (ARN) for the AWS + // KMS encryption key. If you are restoring a DB cluster with the same AWS account + // that owns the AWS KMS encryption key used to encrypt the new DB cluster, + // then you can use the AWS KMS key alias instead of the ARN for the AWS KMS + // encryption key. + // + // You can restore to a new DB cluster and encrypt the new DB cluster with an + // AWS KMS key that is different from the AWS KMS key used to encrypt the source + // DB cluster. The new DB cluster is encrypted with the AWS KMS key identified + // by the KmsKeyId parameter. + // + // If you do not specify a value for the KmsKeyId parameter, then the following + // occurs: + // + // * If the DB cluster is encrypted, then the restored DB cluster is encrypted + // using the AWS KMS key that was used to encrypt the source DB cluster. + // + // * If the DB cluster is not encrypted, then the restored DB cluster is + // not encrypted. + // + // If DBClusterIdentifier refers to a DB cluster that is not encrypted, then + // the restore request is rejected. + KmsKeyId *string `type:"string"` + + // The port number on which the new DB cluster accepts connections. + // + // Constraints: Must be a value from 1150 to 65535. + // + // Default: The default port for the engine. + Port *int64 `type:"integer"` + + // The date and time to restore the DB cluster to. + // + // Valid values: A time in Universal Coordinated Time (UTC) format. + // + // Constraints: + // + // * Must be before the latest restorable time for the DB instance. + // + // * Must be specified if the UseLatestRestorableTime parameter is not provided. + // + // * Cannot be specified if the UseLatestRestorableTime parameter is true. + // + // * Cannot be specified if the RestoreType parameter is copy-on-write. + // + // Example: 2015-03-07T23:45:00Z + RestoreToTime *time.Time `type:"timestamp"` + + // The identifier of the source DB cluster from which to restore. + // + // Constraints: + // + // * Must match the identifier of an existing DBCluster. + // + // SourceDBClusterIdentifier is a required field + SourceDBClusterIdentifier *string `type:"string" required:"true"` + + // The tags to be assigned to the restored DB cluster. + Tags []*Tag `locationNameList:"Tag" type:"list"` + + // A value that is set to true to restore the DB cluster to the latest restorable + // backup time, and false otherwise. + // + // Default: false + // + // Constraints: Cannot be specified if the RestoreToTime parameter is provided. + UseLatestRestorableTime *bool `type:"boolean"` + + // A list of VPC security groups that the new DB cluster belongs to. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` +} + +// String returns the string representation +func (s RestoreDBClusterToPointInTimeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterToPointInTimeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreDBClusterToPointInTimeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreDBClusterToPointInTimeInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.SourceDBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SourceDBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { + s.DBClusterIdentifier = &v + return s +} + +// SetDBSubnetGroupName sets the DBSubnetGroupName field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { + s.DBSubnetGroupName = &v + return s +} + +// SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterToPointInTimeInput { + s.EnableCloudwatchLogsExports = v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetKmsKeyId(v string) *RestoreDBClusterToPointInTimeInput { + s.KmsKeyId = &v + return s +} + +// SetPort sets the Port field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetPort(v int64) *RestoreDBClusterToPointInTimeInput { + s.Port = &v + return s +} + +// SetRestoreToTime sets the RestoreToTime field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetRestoreToTime(v time.Time) *RestoreDBClusterToPointInTimeInput { + s.RestoreToTime = &v + return s +} + +// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetSourceDBClusterIdentifier(v string) *RestoreDBClusterToPointInTimeInput { + s.SourceDBClusterIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetTags(v []*Tag) *RestoreDBClusterToPointInTimeInput { + s.Tags = v + return s +} + +// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetUseLatestRestorableTime(v bool) *RestoreDBClusterToPointInTimeInput { + s.UseLatestRestorableTime = &v + return s +} + +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBClusterToPointInTimeInput { + s.VpcSecurityGroupIds = v + return s +} + +type RestoreDBClusterToPointInTimeOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about a DB cluster. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s RestoreDBClusterToPointInTimeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreDBClusterToPointInTimeOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *RestoreDBClusterToPointInTimeOutput) SetDBCluster(v *DBCluster) *RestoreDBClusterToPointInTimeOutput { + s.DBCluster = v + return s +} + +// Detailed information about a subnet. +type Subnet struct { + _ struct{} `type:"structure"` + + // Specifies the Availability Zone for the subnet. + SubnetAvailabilityZone *AvailabilityZone `type:"structure"` + + // Specifies the identifier of the subnet. + SubnetIdentifier *string `type:"string"` + + // Specifies the status of the subnet. + SubnetStatus *string `type:"string"` +} + +// String returns the string representation +func (s Subnet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Subnet) GoString() string { + return s.String() +} + +// SetSubnetAvailabilityZone sets the SubnetAvailabilityZone field's value. +func (s *Subnet) SetSubnetAvailabilityZone(v *AvailabilityZone) *Subnet { + s.SubnetAvailabilityZone = v + return s +} + +// SetSubnetIdentifier sets the SubnetIdentifier field's value. +func (s *Subnet) SetSubnetIdentifier(v string) *Subnet { + s.SubnetIdentifier = &v + return s +} + +// SetSubnetStatus sets the SubnetStatus field's value. +func (s *Subnet) SetSubnetStatus(v string) *Subnet { + s.SubnetStatus = &v + return s +} + +// Metadata assigned to an Amazon DocumentDB resource consisting of a key-value +// pair. +type Tag struct { + _ struct{} `type:"structure"` + + // The required name of the tag. The string value can be from 1 to 128 Unicode + // characters in length and can't be prefixed with "aws:" or "rds:". The string + // can contain only the set of Unicode letters, digits, white space, '_', '.', + // '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). + Key *string `type:"string"` + + // The optional value of the tag. The string value can be from 1 to 256 Unicode + // characters in length and can't be prefixed with "aws:" or "rds:". The string + // can contain only the set of Unicode letters, digits, white space, '_', '.', + // '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// The version of the database engine that a DB instance can be upgraded to. +type UpgradeTarget struct { + _ struct{} `type:"structure"` + + // A value that indicates whether the target version is applied to any source + // DB instances that have AutoMinorVersionUpgrade set to true. + AutoUpgrade *bool `type:"boolean"` + + // The version of the database engine that a DB instance can be upgraded to. + Description *string `type:"string"` + + // The name of the upgrade target database engine. + Engine *string `type:"string"` + + // The version number of the upgrade target database engine. + EngineVersion *string `type:"string"` + + // A value that indicates whether a database engine is upgraded to a major version. + IsMajorVersionUpgrade *bool `type:"boolean"` +} + +// String returns the string representation +func (s UpgradeTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpgradeTarget) GoString() string { + return s.String() +} + +// SetAutoUpgrade sets the AutoUpgrade field's value. +func (s *UpgradeTarget) SetAutoUpgrade(v bool) *UpgradeTarget { + s.AutoUpgrade = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpgradeTarget) SetDescription(v string) *UpgradeTarget { + s.Description = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *UpgradeTarget) SetEngine(v string) *UpgradeTarget { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *UpgradeTarget) SetEngineVersion(v string) *UpgradeTarget { + s.EngineVersion = &v + return s +} + +// SetIsMajorVersionUpgrade sets the IsMajorVersionUpgrade field's value. +func (s *UpgradeTarget) SetIsMajorVersionUpgrade(v bool) *UpgradeTarget { + s.IsMajorVersionUpgrade = &v + return s +} + +// Used as a response element for queries on virtual private cloud (VPC) security +// group membership. +type VpcSecurityGroupMembership struct { + _ struct{} `type:"structure"` + + // The status of the VPC security group. + Status *string `type:"string"` + + // The name of the VPC security group. + VpcSecurityGroupId *string `type:"string"` +} + +// String returns the string representation +func (s VpcSecurityGroupMembership) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcSecurityGroupMembership) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *VpcSecurityGroupMembership) SetStatus(v string) *VpcSecurityGroupMembership { + s.Status = &v + return s +} + +// SetVpcSecurityGroupId sets the VpcSecurityGroupId field's value. +func (s *VpcSecurityGroupMembership) SetVpcSecurityGroupId(v string) *VpcSecurityGroupMembership { + s.VpcSecurityGroupId = &v + return s +} + +const ( + // ApplyMethodImmediate is a ApplyMethod enum value + ApplyMethodImmediate = "immediate" + + // ApplyMethodPendingReboot is a ApplyMethod enum value + ApplyMethodPendingReboot = "pending-reboot" +) + +const ( + // SourceTypeDbInstance is a SourceType enum value + SourceTypeDbInstance = "db-instance" + + // SourceTypeDbParameterGroup is a SourceType enum value + SourceTypeDbParameterGroup = "db-parameter-group" + + // SourceTypeDbSecurityGroup is a SourceType enum value + SourceTypeDbSecurityGroup = "db-security-group" + + // SourceTypeDbSnapshot is a SourceType enum value + SourceTypeDbSnapshot = "db-snapshot" + + // SourceTypeDbCluster is a SourceType enum value + SourceTypeDbCluster = "db-cluster" + + // SourceTypeDbClusterSnapshot is a SourceType enum value + SourceTypeDbClusterSnapshot = "db-cluster-snapshot" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go new file mode 100644 index 000000000..18ca7f9d4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/docdb/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package docdb provides the client and types for making API +// requests to Amazon DocumentDB with MongoDB compatibility. +// +// Amazon DocumentDB API documentation +// +// See https://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31 for more information on this service. +// +// See docdb package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/docdb/ +// +// Using the Client +// +// To contact Amazon DocumentDB with MongoDB compatibility with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon DocumentDB with MongoDB compatibility client DocDB for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/docdb/#New +package docdb diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go new file mode 100644 index 000000000..cbce0b232 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/docdb/errors.go @@ -0,0 +1,290 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package docdb + +const ( + + // ErrCodeAuthorizationNotFoundFault for service response error code + // "AuthorizationNotFound". + // + // The specified CIDR IP or Amazon EC2 security group isn't authorized for the + // specified DB security group. + // + // Amazon DocumentDB also might not be authorized to perform necessary actions + // on your behalf using IAM. + ErrCodeAuthorizationNotFoundFault = "AuthorizationNotFound" + + // ErrCodeCertificateNotFoundFault for service response error code + // "CertificateNotFound". + // + // CertificateIdentifier doesn't refer to an existing certificate. + ErrCodeCertificateNotFoundFault = "CertificateNotFound" + + // ErrCodeDBClusterAlreadyExistsFault for service response error code + // "DBClusterAlreadyExistsFault". + // + // You already have a DB cluster with the given identifier. + ErrCodeDBClusterAlreadyExistsFault = "DBClusterAlreadyExistsFault" + + // ErrCodeDBClusterNotFoundFault for service response error code + // "DBClusterNotFoundFault". + // + // DBClusterIdentifier doesn't refer to an existing DB cluster. + ErrCodeDBClusterNotFoundFault = "DBClusterNotFoundFault" + + // ErrCodeDBClusterParameterGroupNotFoundFault for service response error code + // "DBClusterParameterGroupNotFound". + // + // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter + // group. + ErrCodeDBClusterParameterGroupNotFoundFault = "DBClusterParameterGroupNotFound" + + // ErrCodeDBClusterQuotaExceededFault for service response error code + // "DBClusterQuotaExceededFault". + // + // The DB cluster can't be created because you have reached the maximum allowed + // quota of DB clusters. + ErrCodeDBClusterQuotaExceededFault = "DBClusterQuotaExceededFault" + + // ErrCodeDBClusterSnapshotAlreadyExistsFault for service response error code + // "DBClusterSnapshotAlreadyExistsFault". + // + // You already have a DB cluster snapshot with the given identifier. + ErrCodeDBClusterSnapshotAlreadyExistsFault = "DBClusterSnapshotAlreadyExistsFault" + + // ErrCodeDBClusterSnapshotNotFoundFault for service response error code + // "DBClusterSnapshotNotFoundFault". + // + // DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. + ErrCodeDBClusterSnapshotNotFoundFault = "DBClusterSnapshotNotFoundFault" + + // ErrCodeDBInstanceAlreadyExistsFault for service response error code + // "DBInstanceAlreadyExists". + // + // You already have a DB instance with the given identifier. + ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" + + // ErrCodeDBInstanceNotFoundFault for service response error code + // "DBInstanceNotFound". + // + // DBInstanceIdentifier doesn't refer to an existing DB instance. + ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" + + // ErrCodeDBParameterGroupAlreadyExistsFault for service response error code + // "DBParameterGroupAlreadyExists". + // + // A DB parameter group with the same name already exists. + ErrCodeDBParameterGroupAlreadyExistsFault = "DBParameterGroupAlreadyExists" + + // ErrCodeDBParameterGroupNotFoundFault for service response error code + // "DBParameterGroupNotFound". + // + // DBParameterGroupName doesn't refer to an existing DB parameter group. + ErrCodeDBParameterGroupNotFoundFault = "DBParameterGroupNotFound" + + // ErrCodeDBParameterGroupQuotaExceededFault for service response error code + // "DBParameterGroupQuotaExceeded". + // + // This request would cause you to exceed the allowed number of DB parameter + // groups. + ErrCodeDBParameterGroupQuotaExceededFault = "DBParameterGroupQuotaExceeded" + + // ErrCodeDBSecurityGroupNotFoundFault for service response error code + // "DBSecurityGroupNotFound". + // + // DBSecurityGroupName doesn't refer to an existing DB security group. + ErrCodeDBSecurityGroupNotFoundFault = "DBSecurityGroupNotFound" + + // ErrCodeDBSnapshotAlreadyExistsFault for service response error code + // "DBSnapshotAlreadyExists". + // + // DBSnapshotIdentifier is already being used by an existing snapshot. + ErrCodeDBSnapshotAlreadyExistsFault = "DBSnapshotAlreadyExists" + + // ErrCodeDBSnapshotNotFoundFault for service response error code + // "DBSnapshotNotFound". + // + // DBSnapshotIdentifier doesn't refer to an existing DB snapshot. + ErrCodeDBSnapshotNotFoundFault = "DBSnapshotNotFound" + + // ErrCodeDBSubnetGroupAlreadyExistsFault for service response error code + // "DBSubnetGroupAlreadyExists". + // + // DBSubnetGroupName is already being used by an existing DB subnet group. + ErrCodeDBSubnetGroupAlreadyExistsFault = "DBSubnetGroupAlreadyExists" + + // ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs for service response error code + // "DBSubnetGroupDoesNotCoverEnoughAZs". + // + // Subnets in the DB subnet group should cover at least two Availability Zones + // unless there is only one Availability Zone. + ErrCodeDBSubnetGroupDoesNotCoverEnoughAZs = "DBSubnetGroupDoesNotCoverEnoughAZs" + + // ErrCodeDBSubnetGroupNotFoundFault for service response error code + // "DBSubnetGroupNotFoundFault". + // + // DBSubnetGroupName doesn't refer to an existing DB subnet group. + ErrCodeDBSubnetGroupNotFoundFault = "DBSubnetGroupNotFoundFault" + + // ErrCodeDBSubnetGroupQuotaExceededFault for service response error code + // "DBSubnetGroupQuotaExceeded". + // + // The request would cause you to exceed the allowed number of DB subnet groups. + ErrCodeDBSubnetGroupQuotaExceededFault = "DBSubnetGroupQuotaExceeded" + + // ErrCodeDBSubnetQuotaExceededFault for service response error code + // "DBSubnetQuotaExceededFault". + // + // The request would cause you to exceed the allowed number of subnets in a + // DB subnet group. + ErrCodeDBSubnetQuotaExceededFault = "DBSubnetQuotaExceededFault" + + // ErrCodeDBUpgradeDependencyFailureFault for service response error code + // "DBUpgradeDependencyFailure". + // + // The DB upgrade failed because a resource that the DB depends on can't be + // modified. + ErrCodeDBUpgradeDependencyFailureFault = "DBUpgradeDependencyFailure" + + // ErrCodeInstanceQuotaExceededFault for service response error code + // "InstanceQuotaExceeded". + // + // The request would cause you to exceed the allowed number of DB instances. + ErrCodeInstanceQuotaExceededFault = "InstanceQuotaExceeded" + + // ErrCodeInsufficientDBClusterCapacityFault for service response error code + // "InsufficientDBClusterCapacityFault". + // + // The DB cluster doesn't have enough capacity for the current operation. + ErrCodeInsufficientDBClusterCapacityFault = "InsufficientDBClusterCapacityFault" + + // ErrCodeInsufficientDBInstanceCapacityFault for service response error code + // "InsufficientDBInstanceCapacity". + // + // The specified DB instance class isn't available in the specified Availability + // Zone. + ErrCodeInsufficientDBInstanceCapacityFault = "InsufficientDBInstanceCapacity" + + // ErrCodeInsufficientStorageClusterCapacityFault for service response error code + // "InsufficientStorageClusterCapacity". + // + // There is not enough storage available for the current action. You might be + // able to resolve this error by updating your subnet group to use different + // Availability Zones that have more storage available. + ErrCodeInsufficientStorageClusterCapacityFault = "InsufficientStorageClusterCapacity" + + // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code + // "InvalidDBClusterSnapshotStateFault". + // + // The provided value isn't a valid DB cluster snapshot state. + ErrCodeInvalidDBClusterSnapshotStateFault = "InvalidDBClusterSnapshotStateFault" + + // ErrCodeInvalidDBClusterStateFault for service response error code + // "InvalidDBClusterStateFault". + // + // The DB cluster isn't in a valid state. + ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" + + // ErrCodeInvalidDBInstanceStateFault for service response error code + // "InvalidDBInstanceState". + // + // The specified DB instance isn't in the available state. + ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" + + // ErrCodeInvalidDBParameterGroupStateFault for service response error code + // "InvalidDBParameterGroupState". + // + // The DB parameter group is in use, or it is in a state that is not valid. + // If you are trying to delete the parameter group, you can't delete it when + // the parameter group is in this state. + ErrCodeInvalidDBParameterGroupStateFault = "InvalidDBParameterGroupState" + + // ErrCodeInvalidDBSecurityGroupStateFault for service response error code + // "InvalidDBSecurityGroupState". + // + // The state of the DB security group doesn't allow deletion. + ErrCodeInvalidDBSecurityGroupStateFault = "InvalidDBSecurityGroupState" + + // ErrCodeInvalidDBSnapshotStateFault for service response error code + // "InvalidDBSnapshotState". + // + // The state of the DB snapshot doesn't allow deletion. + ErrCodeInvalidDBSnapshotStateFault = "InvalidDBSnapshotState" + + // ErrCodeInvalidDBSubnetGroupStateFault for service response error code + // "InvalidDBSubnetGroupStateFault". + // + // The DB subnet group can't be deleted because it's in use. + ErrCodeInvalidDBSubnetGroupStateFault = "InvalidDBSubnetGroupStateFault" + + // ErrCodeInvalidDBSubnetStateFault for service response error code + // "InvalidDBSubnetStateFault". + // + // The DB subnet isn't in the available state. + ErrCodeInvalidDBSubnetStateFault = "InvalidDBSubnetStateFault" + + // ErrCodeInvalidRestoreFault for service response error code + // "InvalidRestoreFault". + // + // You cannot restore from a virtual private cloud (VPC) backup to a non-VPC + // DB instance. + ErrCodeInvalidRestoreFault = "InvalidRestoreFault" + + // ErrCodeInvalidSubnet for service response error code + // "InvalidSubnet". + // + // The requested subnet is not valid, or multiple subnets were requested that + // are not all in a common virtual private cloud (VPC). + ErrCodeInvalidSubnet = "InvalidSubnet" + + // ErrCodeInvalidVPCNetworkStateFault for service response error code + // "InvalidVPCNetworkStateFault". + // + // The DB subnet group doesn't cover all Availability Zones after it is created + // because of changes that were made. + ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" + + // ErrCodeKMSKeyNotAccessibleFault for service response error code + // "KMSKeyNotAccessibleFault". + // + // An error occurred when accessing an AWS KMS key. + ErrCodeKMSKeyNotAccessibleFault = "KMSKeyNotAccessibleFault" + + // ErrCodeResourceNotFoundFault for service response error code + // "ResourceNotFoundFault". + // + // The specified resource ID was not found. + ErrCodeResourceNotFoundFault = "ResourceNotFoundFault" + + // ErrCodeSharedSnapshotQuotaExceededFault for service response error code + // "SharedSnapshotQuotaExceeded". + // + // You have exceeded the maximum number of accounts that you can share a manual + // DB snapshot with. + ErrCodeSharedSnapshotQuotaExceededFault = "SharedSnapshotQuotaExceeded" + + // ErrCodeSnapshotQuotaExceededFault for service response error code + // "SnapshotQuotaExceeded". + // + // The request would cause you to exceed the allowed number of DB snapshots. + ErrCodeSnapshotQuotaExceededFault = "SnapshotQuotaExceeded" + + // ErrCodeStorageQuotaExceededFault for service response error code + // "StorageQuotaExceeded". + // + // The request would cause you to exceed the allowed amount of storage available + // across all DB instances. + ErrCodeStorageQuotaExceededFault = "StorageQuotaExceeded" + + // ErrCodeStorageTypeNotSupportedFault for service response error code + // "StorageTypeNotSupported". + // + // Storage of the specified StorageType can't be associated with the DB instance. + ErrCodeStorageTypeNotSupportedFault = "StorageTypeNotSupported" + + // ErrCodeSubnetAlreadyInUse for service response error code + // "SubnetAlreadyInUse". + // + // The DB subnet is already in use in the Availability Zone. + ErrCodeSubnetAlreadyInUse = "SubnetAlreadyInUse" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/service.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/service.go new file mode 100644 index 000000000..cd0f3d91d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/docdb/service.go @@ -0,0 +1,98 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package docdb + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/query" +) + +// DocDB provides the API operation methods for making requests to +// Amazon DocumentDB with MongoDB compatibility. See this package's package overview docs +// for details on the service. +// +// DocDB methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type DocDB struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "DocDB" // Name of service. + EndpointsID = "rds" // ID to lookup a service endpoint with. + ServiceID = "DocDB" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the DocDB client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a DocDB client from just a session. +// svc := docdb.New(mySession) +// +// // Create a DocDB client with additional configuration +// svc := docdb.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *DocDB { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "rds" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DocDB { + svc := &DocDB{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2014-10-31", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(query.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a DocDB operation and runs any +// custom request initialization. +func (c *DocDB) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go new file mode 100644 index 000000000..f1b1f2b86 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/docdb/waiters.go @@ -0,0 +1,152 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package docdb + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilDBInstanceAvailable uses the Amazon DocDB API operation +// DescribeDBInstances to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DocDB) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error { + return c.WaitUntilDBInstanceAvailableWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilDBInstanceAvailableWithContext is an extended version of WaitUntilDBInstanceAvailable. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) WaitUntilDBInstanceAvailableWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilDBInstanceAvailable", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "available", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "deleted", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "deleting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "incompatible-restore", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "incompatible-parameters", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeDBInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilDBInstanceDeleted uses the Amazon DocDB API operation +// DescribeDBInstances to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DocDB) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error { + return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilDBInstanceDeletedWithContext is an extended version of WaitUntilDBInstanceDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *DocDB) WaitUntilDBInstanceDeletedWithContext(ctx aws.Context, input *DescribeDBInstancesInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilDBInstanceDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "deleted", + }, + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "DBInstanceNotFound", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "creating", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "modifying", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "rebooting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "DBInstances[].DBInstanceStatus", + Expected: "resetting-master-credentials", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeDBInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index bdd0505ea..727a81812 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -1534,6 +1534,8 @@ func (c *DynamoDB) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req // DescribeEndpoints API operation for Amazon DynamoDB. // +// Returns the regional endpoint information. +// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -3924,29 +3926,46 @@ func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *r // * ErrCodeTransactionCanceledException "TransactionCanceledException" // The entire transaction request was rejected. // -// DynamoDB will reject the entire TransactWriteItems request if any of the -// following is true: +// DynamoDB rejects a TransactWriteItems request under the following circumstances: // -// * A table in the TransactWriteItems request does not exist. +// * A condition in one of the condition expressions is not met. // -// * A table in the TransactWriteItems request is on a different account +// * A table in the TransactWriteItems request is in a different account // or region. // -// * Operations contain item schema violations. +// * More than one action in the TransactWriteItems operation targets the +// same item. // -// * More than one write operation (UpdateItem, PutItem, DeleteItem) operates -// on the same item. +// * There is insufficient provisioned capacity for the transaction to be +// completed. // -// * More than one check operation operates on the same item. +// * An item size becomes too large (larger than 400 KB), or a local secondary +// index (LSI) becomes too large, or a similar validation error occurs because +// of changes made by the transaction. // -// * The number of operations sent in the TransactWriteItems request is -// 0 or greater than 10. +// * There is a user error, such as an invalid data format. // -// * A TransactWriteItems request exceeds the maximum 4 MB request size. +// DynamoDB rejects a TransactGetItems request under the following circumstances: // +// * There is an ongoing TransactGetItems operation that conflicts with a +// concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. +// In this case the TransactGetItems operation fails with a TransactionCanceledException. // -// * Any operation in the TransactWriteItems request would cause an item -// to become larger than 400KB. +// * A table in the TransactGetItems request is in a different account or +// region. +// +// * There is insufficient provisioned capacity for the transaction to be +// completed. +// +// * There is a user error, such as an invalid data format. +// +// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" +// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry +// requests that receive this exception. Your request is eventually successful, +// unless your retry queue is too large to finish. Reduce the frequency of requests +// and use exponential backoff. For more information, go to Error Retries and +// Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) +// in the Amazon DynamoDB Developer Guide. // // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. @@ -4106,29 +4125,38 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re // * ErrCodeTransactionCanceledException "TransactionCanceledException" // The entire transaction request was rejected. // -// DynamoDB will reject the entire TransactWriteItems request if any of the -// following is true: +// DynamoDB rejects a TransactWriteItems request under the following circumstances: // -// * A table in the TransactWriteItems request does not exist. +// * A condition in one of the condition expressions is not met. // -// * A table in the TransactWriteItems request is on a different account +// * A table in the TransactWriteItems request is in a different account // or region. // -// * Operations contain item schema violations. +// * More than one action in the TransactWriteItems operation targets the +// same item. // -// * More than one write operation (UpdateItem, PutItem, DeleteItem) operates -// on the same item. +// * There is insufficient provisioned capacity for the transaction to be +// completed. // -// * More than one check operation operates on the same item. +// * An item size becomes too large (larger than 400 KB), or a local secondary +// index (LSI) becomes too large, or a similar validation error occurs because +// of changes made by the transaction. // -// * The number of operations sent in the TransactWriteItems request is -// 0 or greater than 10. +// * There is a user error, such as an invalid data format. // -// * A TransactWriteItems request exceeds the maximum 4 MB request size. +// DynamoDB rejects a TransactGetItems request under the following circumstances: // +// * There is an ongoing TransactGetItems operation that conflicts with a +// concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. +// In this case the TransactGetItems operation fails with a TransactionCanceledException. // -// * Any operation in the TransactWriteItems request would cause an item -// to become larger than 400KB. +// * A table in the TransactGetItems request is in a different account or +// region. +// +// * There is insufficient provisioned capacity for the transaction to be +// completed. +// +// * There is a user error, such as an invalid data format. // // * ErrCodeTransactionInProgressException "TransactionInProgressException" // The transaction with the given request token is already in progress. @@ -4137,6 +4165,14 @@ func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (re // DynamoDB rejected the request because you retried a request with a different // payload but with an idempotent token that was already used. // +// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" +// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry +// requests that receive this exception. Your request is eventually successful, +// unless your retry queue is too large to finish. Reduce the frequency of requests +// and use exponential backoff. For more information, go to Error Retries and +// Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) +// in the Amazon DynamoDB Developer Guide. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -5178,7 +5214,7 @@ type AttributeValue struct { // An attribute of type List. For example: // - // "L": ["Cookies", "Coffee", 3.14159] + // "L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N", "3.14159"}] L []*AttributeValue `type:"list"` // An attribute of type Map. For example: @@ -5871,6 +5907,8 @@ type BackupDetails struct { // no additional cost). System backups allow you to restore the deleted table // to the state it was in just before the point of deletion. // + // * AWS_BACKUP - On-demand backup created by you from AWS Backup service. + // // BackupType is a required field BackupType *string `type:"string" required:"true" enum:"BackupType"` } @@ -5958,6 +5996,8 @@ type BackupSummary struct { // a SYSTEM backup is automatically created and is retained for 35 days (at // no additional cost). System backups allow you to restore the deleted table // to the state it was in just before the point of deletion. + // + // * AWS_BACKUP - On-demand backup created by you from AWS Backup service. BackupType *string `type:"string" enum:"BackupType"` // ARN associated with the table. @@ -7231,8 +7271,8 @@ type CreateTableInput struct { // using PAY_PER_REQUEST for unpredictable workloads. BillingMode *string `type:"string" enum:"BillingMode"` - // One or more global secondary indexes (the maximum is five) to be created - // on the table. Each global secondary index in the array includes the following: + // One or more global secondary indexes (the maximum is 20) to be created on + // the table. Each global secondary index in the array includes the following: // // * IndexName - The name of the global secondary index. Must be unique only // for this table. @@ -7256,7 +7296,7 @@ type CreateTableInput struct { // NonKeyAttributes - A list of one or more non-key attribute names that are // projected into the secondary index. The total count of attributes provided // in NonKeyAttributes, summed across all of the secondary indexes, must - // not exceed 20. If you project the same attribute into two different indexes, + // not exceed 100. If you project the same attribute into two different indexes, // this counts as two distinct attributes when determining the total. // // * ProvisionedThroughput - The provisioned throughput settings for the @@ -7300,10 +7340,10 @@ type CreateTableInput struct { // KeySchema is a required field KeySchema []*KeySchemaElement `min:"1" type:"list" required:"true"` - // One or more local secondary indexes (the maximum is five) to be created on - // the table. Each index is scoped to a given partition key value. There is - // a 10 GB size limit per partition key value; otherwise, the size of a local - // secondary index is unconstrained. + // One or more local secondary indexes (the maximum is 5) to be created on the + // table. Each index is scoped to a given partition key value. There is a 10 + // GB size limit per partition key value; otherwise, the size of a local secondary + // index is unconstrained. // // Each local secondary index in the array includes the following: // @@ -7330,7 +7370,7 @@ type CreateTableInput struct { // NonKeyAttributes - A list of one or more non-key attribute names that are // projected into the secondary index. The total count of attributes provided // in NonKeyAttributes, summed across all of the secondary indexes, must - // not exceed 20. If you project the same attribute into two different indexes, + // not exceed 100. If you project the same attribute into two different indexes, // this counts as two distinct attributes when determining the total. LocalSecondaryIndexes []*LocalSecondaryIndex `type:"list"` @@ -8315,6 +8355,8 @@ func (s DescribeEndpointsInput) GoString() string { type DescribeEndpointsOutput struct { _ struct{} `type:"structure"` + // List of endpoints. + // // Endpoints is a required field Endpoints []*Endpoint `type:"list" required:"true"` } @@ -8674,12 +8716,17 @@ func (s *DescribeTimeToLiveOutput) SetTimeToLiveDescription(v *TimeToLiveDescrip return s } +// An endpoint information details. type Endpoint struct { _ struct{} `type:"structure"` + // IP address of the endpoint. + // // Address is a required field Address *string `type:"string" required:"true"` + // Endpoint cache time to live (TTL) value. + // // CachePeriodInMinutes is a required field CachePeriodInMinutes *int64 `type:"long" required:"true"` } @@ -14285,7 +14332,7 @@ type TransactWriteItemsInput struct { // If you submit a request with the same client token but a change in other // parameters within the 10 minute idempotency window, DynamoDB returns an IdempotentParameterMismatch // exception. - ClientRequestToken *string `type:"string" idempotencyToken:"true"` + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` // Determines the level of detail about provisioned throughput consumption that // is returned in the response: @@ -14332,6 +14379,9 @@ func (s TransactWriteItemsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *TransactWriteItemsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TransactWriteItemsInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } if s.TransactItems == nil { invalidParams.Add(request.NewErrParamRequired("TransactItems")) } @@ -15718,6 +15768,9 @@ const ( // BackupTypeSystem is a BackupType enum value BackupTypeSystem = "SYSTEM" + + // BackupTypeAwsBackup is a BackupType enum value + BackupTypeAwsBackup = "AWS_BACKUP" ) const ( @@ -15727,6 +15780,9 @@ const ( // BackupTypeFilterSystem is a BackupTypeFilter enum value BackupTypeFilterSystem = "SYSTEM" + // BackupTypeFilterAwsBackup is a BackupTypeFilter enum value + BackupTypeFilterAwsBackup = "AWS_BACKUP" + // BackupTypeFilterAll is a BackupTypeFilter enum value BackupTypeFilterAll = "ALL" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go index 175647742..1841f7b9a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go @@ -166,29 +166,38 @@ const ( // // The entire transaction request was rejected. // - // DynamoDB will reject the entire TransactWriteItems request if any of the - // following is true: + // DynamoDB rejects a TransactWriteItems request under the following circumstances: // - // * A table in the TransactWriteItems request does not exist. + // * A condition in one of the condition expressions is not met. // - // * A table in the TransactWriteItems request is on a different account + // * A table in the TransactWriteItems request is in a different account // or region. // - // * Operations contain item schema violations. + // * More than one action in the TransactWriteItems operation targets the + // same item. // - // * More than one write operation (UpdateItem, PutItem, DeleteItem) operates - // on the same item. + // * There is insufficient provisioned capacity for the transaction to be + // completed. // - // * More than one check operation operates on the same item. + // * An item size becomes too large (larger than 400 KB), or a local secondary + // index (LSI) becomes too large, or a similar validation error occurs because + // of changes made by the transaction. // - // * The number of operations sent in the TransactWriteItems request is - // 0 or greater than 10. + // * There is a user error, such as an invalid data format. // - // * A TransactWriteItems request exceeds the maximum 4 MB request size. + // DynamoDB rejects a TransactGetItems request under the following circumstances: // + // * There is an ongoing TransactGetItems operation that conflicts with a + // concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. + // In this case the TransactGetItems operation fails with a TransactionCanceledException. // - // * Any operation in the TransactWriteItems request would cause an item - // to become larger than 400KB. + // * A table in the TransactGetItems request is in a different account or + // region. + // + // * There is insufficient provisioned capacity for the transaction to be + // completed. + // + // * There is a user error, such as an invalid data format. ErrCodeTransactionCanceledException = "TransactionCanceledException" // ErrCodeTransactionConflictException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 0431f377c..8ccb729e5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -582,6 +582,82 @@ func (c *EC2) AllocateHostsWithContext(ctx aws.Context, input *AllocateHostsInpu return out, req.Send() } +const opApplySecurityGroupsToClientVpnTargetNetwork = "ApplySecurityGroupsToClientVpnTargetNetwork" + +// ApplySecurityGroupsToClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the +// client's request for the ApplySecurityGroupsToClientVpnTargetNetwork operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ApplySecurityGroupsToClientVpnTargetNetwork for more information on using the ApplySecurityGroupsToClientVpnTargetNetwork +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ApplySecurityGroupsToClientVpnTargetNetworkRequest method. +// req, resp := client.ApplySecurityGroupsToClientVpnTargetNetworkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork +func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetworkRequest(input *ApplySecurityGroupsToClientVpnTargetNetworkInput) (req *request.Request, output *ApplySecurityGroupsToClientVpnTargetNetworkOutput) { + op := &request.Operation{ + Name: opApplySecurityGroupsToClientVpnTargetNetwork, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ApplySecurityGroupsToClientVpnTargetNetworkInput{} + } + + output = &ApplySecurityGroupsToClientVpnTargetNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// ApplySecurityGroupsToClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. +// +// Applies a security group to the association between the target network and +// the Client VPN endpoint. This action replaces the existing security groups +// with the specified security groups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ApplySecurityGroupsToClientVpnTargetNetwork for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork +func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetwork(input *ApplySecurityGroupsToClientVpnTargetNetworkInput) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { + req, out := c.ApplySecurityGroupsToClientVpnTargetNetworkRequest(input) + return out, req.Send() +} + +// ApplySecurityGroupsToClientVpnTargetNetworkWithContext is the same as ApplySecurityGroupsToClientVpnTargetNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See ApplySecurityGroupsToClientVpnTargetNetwork for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetworkWithContext(ctx aws.Context, input *ApplySecurityGroupsToClientVpnTargetNetworkInput, opts ...request.Option) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { + req, out := c.ApplySecurityGroupsToClientVpnTargetNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssignIpv6Addresses = "AssignIpv6Addresses" // AssignIpv6AddressesRequest generates a "aws/request.Request" representing the @@ -853,6 +929,84 @@ func (c *EC2) AssociateAddressWithContext(ctx aws.Context, input *AssociateAddre return out, req.Send() } +const opAssociateClientVpnTargetNetwork = "AssociateClientVpnTargetNetwork" + +// AssociateClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the +// client's request for the AssociateClientVpnTargetNetwork operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateClientVpnTargetNetwork for more information on using the AssociateClientVpnTargetNetwork +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateClientVpnTargetNetworkRequest method. +// req, resp := client.AssociateClientVpnTargetNetworkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateClientVpnTargetNetwork +func (c *EC2) AssociateClientVpnTargetNetworkRequest(input *AssociateClientVpnTargetNetworkInput) (req *request.Request, output *AssociateClientVpnTargetNetworkOutput) { + op := &request.Operation{ + Name: opAssociateClientVpnTargetNetwork, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateClientVpnTargetNetworkInput{} + } + + output = &AssociateClientVpnTargetNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. +// +// Associates a target network with a Client VPN endpoint. A target network +// is a subnet in a VPC. You can associate multiple subnets from the same VPC +// with a Client VPN endpoint. You can associate only one subnet in each Availability +// Zone. We recommend that you associate at least two subnets to provide Availability +// Zone redundancy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation AssociateClientVpnTargetNetwork for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateClientVpnTargetNetwork +func (c *EC2) AssociateClientVpnTargetNetwork(input *AssociateClientVpnTargetNetworkInput) (*AssociateClientVpnTargetNetworkOutput, error) { + req, out := c.AssociateClientVpnTargetNetworkRequest(input) + return out, req.Send() +} + +// AssociateClientVpnTargetNetworkWithContext is the same as AssociateClientVpnTargetNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateClientVpnTargetNetwork for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) AssociateClientVpnTargetNetworkWithContext(ctx aws.Context, input *AssociateClientVpnTargetNetworkInput, opts ...request.Option) (*AssociateClientVpnTargetNetworkOutput, error) { + req, out := c.AssociateClientVpnTargetNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateDhcpOptions = "AssociateDhcpOptions" // AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the @@ -1741,6 +1895,83 @@ func (c *EC2) AttachVpnGatewayWithContext(ctx aws.Context, input *AttachVpnGatew return out, req.Send() } +const opAuthorizeClientVpnIngress = "AuthorizeClientVpnIngress" + +// AuthorizeClientVpnIngressRequest generates a "aws/request.Request" representing the +// client's request for the AuthorizeClientVpnIngress operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AuthorizeClientVpnIngress for more information on using the AuthorizeClientVpnIngress +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AuthorizeClientVpnIngressRequest method. +// req, resp := client.AuthorizeClientVpnIngressRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeClientVpnIngress +func (c *EC2) AuthorizeClientVpnIngressRequest(input *AuthorizeClientVpnIngressInput) (req *request.Request, output *AuthorizeClientVpnIngressOutput) { + op := &request.Operation{ + Name: opAuthorizeClientVpnIngress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AuthorizeClientVpnIngressInput{} + } + + output = &AuthorizeClientVpnIngressOutput{} + req = c.newRequest(op, input, output) + return +} + +// AuthorizeClientVpnIngress API operation for Amazon Elastic Compute Cloud. +// +// Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization +// rules act as firewall rules that grant access to networks. You must configure +// ingress authorization rules to enable clients to access resources in AWS +// or on-premises networks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation AuthorizeClientVpnIngress for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeClientVpnIngress +func (c *EC2) AuthorizeClientVpnIngress(input *AuthorizeClientVpnIngressInput) (*AuthorizeClientVpnIngressOutput, error) { + req, out := c.AuthorizeClientVpnIngressRequest(input) + return out, req.Send() +} + +// AuthorizeClientVpnIngressWithContext is the same as AuthorizeClientVpnIngress with the addition of +// the ability to pass a context and additional request options. +// +// See AuthorizeClientVpnIngress for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) AuthorizeClientVpnIngressWithContext(ctx aws.Context, input *AuthorizeClientVpnIngressInput, opts ...request.Option) (*AuthorizeClientVpnIngressOutput, error) { + req, out := c.AuthorizeClientVpnIngressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress" // AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the @@ -3056,6 +3287,159 @@ func (c *EC2) CreateCapacityReservationWithContext(ctx aws.Context, input *Creat return out, req.Send() } +const opCreateClientVpnEndpoint = "CreateClientVpnEndpoint" + +// CreateClientVpnEndpointRequest generates a "aws/request.Request" representing the +// client's request for the CreateClientVpnEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateClientVpnEndpoint for more information on using the CreateClientVpnEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateClientVpnEndpointRequest method. +// req, resp := client.CreateClientVpnEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnEndpoint +func (c *EC2) CreateClientVpnEndpointRequest(input *CreateClientVpnEndpointInput) (req *request.Request, output *CreateClientVpnEndpointOutput) { + op := &request.Operation{ + Name: opCreateClientVpnEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClientVpnEndpointInput{} + } + + output = &CreateClientVpnEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. +// +// Creates a Client VPN endpoint. A Client VPN endpoint is the resource you +// create and configure to enable and manage client VPN sessions. It is the +// destination endpoint at which all client VPN sessions are terminated. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateClientVpnEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnEndpoint +func (c *EC2) CreateClientVpnEndpoint(input *CreateClientVpnEndpointInput) (*CreateClientVpnEndpointOutput, error) { + req, out := c.CreateClientVpnEndpointRequest(input) + return out, req.Send() +} + +// CreateClientVpnEndpointWithContext is the same as CreateClientVpnEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateClientVpnEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateClientVpnEndpointWithContext(ctx aws.Context, input *CreateClientVpnEndpointInput, opts ...request.Option) (*CreateClientVpnEndpointOutput, error) { + req, out := c.CreateClientVpnEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateClientVpnRoute = "CreateClientVpnRoute" + +// CreateClientVpnRouteRequest generates a "aws/request.Request" representing the +// client's request for the CreateClientVpnRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateClientVpnRoute for more information on using the CreateClientVpnRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateClientVpnRouteRequest method. +// req, resp := client.CreateClientVpnRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnRoute +func (c *EC2) CreateClientVpnRouteRequest(input *CreateClientVpnRouteInput) (req *request.Request, output *CreateClientVpnRouteOutput) { + op := &request.Operation{ + Name: opCreateClientVpnRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClientVpnRouteInput{} + } + + output = &CreateClientVpnRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateClientVpnRoute API operation for Amazon Elastic Compute Cloud. +// +// Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint +// has a route table that describes the available destination network routes. +// Each route in the route table specifies the path for traffic to specific resources +// or networks. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateClientVpnRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnRoute +func (c *EC2) CreateClientVpnRoute(input *CreateClientVpnRouteInput) (*CreateClientVpnRouteOutput, error) { + req, out := c.CreateClientVpnRouteRequest(input) + return out, req.Send() +} + +// CreateClientVpnRouteWithContext is the same as CreateClientVpnRoute with the addition of +// the ability to pass a context and additional request options. +// +// See CreateClientVpnRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) CreateClientVpnRouteWithContext(ctx aws.Context, input *CreateClientVpnRouteInput, opts ...request.Option) (*CreateClientVpnRouteOutput, error) { + req, out := c.CreateClientVpnRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateCustomerGateway = "CreateCustomerGateway" // CreateCustomerGatewayRequest generates a "aws/request.Request" representing the @@ -4692,7 +5076,10 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req // // A cluster placement group is a logical grouping of instances within a single // Availability Zone that benefit from low network latency, high network throughput. -// A spread placement group places instances on distinct hardware. +// A spread placement group places instances on distinct hardware. A partition +// placement group places groups of instances in different partitions, where +// instances in one partition do not share the same hardware with instances +// in another partition. // // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -6559,6 +6946,159 @@ func (c *EC2) CreateVpnGatewayWithContext(ctx aws.Context, input *CreateVpnGatew return out, req.Send() } +const opDeleteClientVpnEndpoint = "DeleteClientVpnEndpoint" + +// DeleteClientVpnEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteClientVpnEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteClientVpnEndpoint for more information on using the DeleteClientVpnEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteClientVpnEndpointRequest method. +// req, resp := client.DeleteClientVpnEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnEndpoint +func (c *EC2) DeleteClientVpnEndpointRequest(input *DeleteClientVpnEndpointInput) (req *request.Request, output *DeleteClientVpnEndpointOutput) { + op := &request.Operation{ + Name: opDeleteClientVpnEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClientVpnEndpointInput{} + } + + output = &DeleteClientVpnEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Client VPN endpoint. You must disassociate all target +// networks before you can delete a Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteClientVpnEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnEndpoint +func (c *EC2) DeleteClientVpnEndpoint(input *DeleteClientVpnEndpointInput) (*DeleteClientVpnEndpointOutput, error) { + req, out := c.DeleteClientVpnEndpointRequest(input) + return out, req.Send() +} + +// DeleteClientVpnEndpointWithContext is the same as DeleteClientVpnEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteClientVpnEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteClientVpnEndpointWithContext(ctx aws.Context, input *DeleteClientVpnEndpointInput, opts ...request.Option) (*DeleteClientVpnEndpointOutput, error) { + req, out := c.DeleteClientVpnEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteClientVpnRoute = "DeleteClientVpnRoute" + +// DeleteClientVpnRouteRequest generates a "aws/request.Request" representing the +// client's request for the DeleteClientVpnRoute operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteClientVpnRoute for more information on using the DeleteClientVpnRoute +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteClientVpnRouteRequest method. +// req, resp := client.DeleteClientVpnRouteRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnRoute +func (c *EC2) DeleteClientVpnRouteRequest(input *DeleteClientVpnRouteInput) (req *request.Request, output *DeleteClientVpnRouteOutput) { + op := &request.Operation{ + Name: opDeleteClientVpnRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClientVpnRouteInput{} + } + + output = &DeleteClientVpnRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteClientVpnRoute API operation for Amazon Elastic Compute Cloud. +// +// Deletes a route from a Client VPN endpoint. You can only delete routes that +// you manually added using the CreateClientVpnRoute action. You cannot delete +// routes that were automatically added when associating a subnet. To remove +// routes that have been automatically added, disassociate the target subnet +// from the Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteClientVpnRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnRoute +func (c *EC2) DeleteClientVpnRoute(input *DeleteClientVpnRouteInput) (*DeleteClientVpnRouteOutput, error) { + req, out := c.DeleteClientVpnRouteRequest(input) + return out, req.Send() +} + +// DeleteClientVpnRouteWithContext is the same as DeleteClientVpnRoute with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteClientVpnRoute for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DeleteClientVpnRouteWithContext(ctx aws.Context, input *DeleteClientVpnRouteInput, opts ...request.Option) (*DeleteClientVpnRouteOutput, error) { + req, out := c.DeleteClientVpnRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCustomerGateway = "DeleteCustomerGateway" // DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the @@ -10141,6 +10681,377 @@ func (c *EC2) DescribeClassicLinkInstancesWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDescribeClientVpnAuthorizationRules = "DescribeClientVpnAuthorizationRules" + +// DescribeClientVpnAuthorizationRulesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnAuthorizationRules operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClientVpnAuthorizationRules for more information on using the DescribeClientVpnAuthorizationRules +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClientVpnAuthorizationRulesRequest method. +// req, resp := client.DescribeClientVpnAuthorizationRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnAuthorizationRules +func (c *EC2) DescribeClientVpnAuthorizationRulesRequest(input *DescribeClientVpnAuthorizationRulesInput) (req *request.Request, output *DescribeClientVpnAuthorizationRulesOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnAuthorizationRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnAuthorizationRulesInput{} + } + + output = &DescribeClientVpnAuthorizationRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnAuthorizationRules API operation for Amazon Elastic Compute Cloud. +// +// Describes the authorization rules for a specified Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeClientVpnAuthorizationRules for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnAuthorizationRules +func (c *EC2) DescribeClientVpnAuthorizationRules(input *DescribeClientVpnAuthorizationRulesInput) (*DescribeClientVpnAuthorizationRulesOutput, error) { + req, out := c.DescribeClientVpnAuthorizationRulesRequest(input) + return out, req.Send() +} + +// DescribeClientVpnAuthorizationRulesWithContext is the same as DescribeClientVpnAuthorizationRules with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnAuthorizationRules for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeClientVpnAuthorizationRulesWithContext(ctx aws.Context, input *DescribeClientVpnAuthorizationRulesInput, opts ...request.Option) (*DescribeClientVpnAuthorizationRulesOutput, error) { + req, out := c.DescribeClientVpnAuthorizationRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnConnections = "DescribeClientVpnConnections" + +// DescribeClientVpnConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnConnections operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClientVpnConnections for more information on using the DescribeClientVpnConnections +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClientVpnConnectionsRequest method. +// req, resp := client.DescribeClientVpnConnectionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnConnections +func (c *EC2) DescribeClientVpnConnectionsRequest(input *DescribeClientVpnConnectionsInput) (req *request.Request, output *DescribeClientVpnConnectionsOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnConnectionsInput{} + } + + output = &DescribeClientVpnConnectionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnConnections API operation for Amazon Elastic Compute Cloud. +// +// Describes active client connections and connections that have been terminated +// within the last 60 minutes for the specified Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeClientVpnConnections for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnConnections +func (c *EC2) DescribeClientVpnConnections(input *DescribeClientVpnConnectionsInput) (*DescribeClientVpnConnectionsOutput, error) { + req, out := c.DescribeClientVpnConnectionsRequest(input) + return out, req.Send() +} + +// DescribeClientVpnConnectionsWithContext is the same as DescribeClientVpnConnections with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnConnections for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeClientVpnConnectionsWithContext(ctx aws.Context, input *DescribeClientVpnConnectionsInput, opts ...request.Option) (*DescribeClientVpnConnectionsOutput, error) { + req, out := c.DescribeClientVpnConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnEndpoints = "DescribeClientVpnEndpoints" + +// DescribeClientVpnEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClientVpnEndpoints for more information on using the DescribeClientVpnEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClientVpnEndpointsRequest method. +// req, resp := client.DescribeClientVpnEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnEndpoints +func (c *EC2) DescribeClientVpnEndpointsRequest(input *DescribeClientVpnEndpointsInput) (req *request.Request, output *DescribeClientVpnEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnEndpointsInput{} + } + + output = &DescribeClientVpnEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnEndpoints API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more Client VPN endpoints in the account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeClientVpnEndpoints for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnEndpoints +func (c *EC2) DescribeClientVpnEndpoints(input *DescribeClientVpnEndpointsInput) (*DescribeClientVpnEndpointsOutput, error) { + req, out := c.DescribeClientVpnEndpointsRequest(input) + return out, req.Send() +} + +// DescribeClientVpnEndpointsWithContext is the same as DescribeClientVpnEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeClientVpnEndpointsWithContext(ctx aws.Context, input *DescribeClientVpnEndpointsInput, opts ...request.Option) (*DescribeClientVpnEndpointsOutput, error) { + req, out := c.DescribeClientVpnEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnRoutes = "DescribeClientVpnRoutes" + +// DescribeClientVpnRoutesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnRoutes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClientVpnRoutes for more information on using the DescribeClientVpnRoutes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClientVpnRoutesRequest method. +// req, resp := client.DescribeClientVpnRoutesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnRoutes +func (c *EC2) DescribeClientVpnRoutesRequest(input *DescribeClientVpnRoutesInput) (req *request.Request, output *DescribeClientVpnRoutesOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnRoutes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnRoutesInput{} + } + + output = &DescribeClientVpnRoutesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnRoutes API operation for Amazon Elastic Compute Cloud. +// +// Describes the routes for the specified Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeClientVpnRoutes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnRoutes +func (c *EC2) DescribeClientVpnRoutes(input *DescribeClientVpnRoutesInput) (*DescribeClientVpnRoutesOutput, error) { + req, out := c.DescribeClientVpnRoutesRequest(input) + return out, req.Send() +} + +// DescribeClientVpnRoutesWithContext is the same as DescribeClientVpnRoutes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnRoutes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeClientVpnRoutesWithContext(ctx aws.Context, input *DescribeClientVpnRoutesInput, opts ...request.Option) (*DescribeClientVpnRoutesOutput, error) { + req, out := c.DescribeClientVpnRoutesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnTargetNetworks = "DescribeClientVpnTargetNetworks" + +// DescribeClientVpnTargetNetworksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnTargetNetworks operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeClientVpnTargetNetworks for more information on using the DescribeClientVpnTargetNetworks +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClientVpnTargetNetworksRequest method. +// req, resp := client.DescribeClientVpnTargetNetworksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnTargetNetworks +func (c *EC2) DescribeClientVpnTargetNetworksRequest(input *DescribeClientVpnTargetNetworksInput) (req *request.Request, output *DescribeClientVpnTargetNetworksOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnTargetNetworks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnTargetNetworksInput{} + } + + output = &DescribeClientVpnTargetNetworksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnTargetNetworks API operation for Amazon Elastic Compute Cloud. +// +// Describes the target networks associated with the specified Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeClientVpnTargetNetworks for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnTargetNetworks +func (c *EC2) DescribeClientVpnTargetNetworks(input *DescribeClientVpnTargetNetworksInput) (*DescribeClientVpnTargetNetworksOutput, error) { + req, out := c.DescribeClientVpnTargetNetworksRequest(input) + return out, req.Send() +} + +// DescribeClientVpnTargetNetworksWithContext is the same as DescribeClientVpnTargetNetworks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnTargetNetworks for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DescribeClientVpnTargetNetworksWithContext(ctx aws.Context, input *DescribeClientVpnTargetNetworksInput, opts ...request.Option) (*DescribeClientVpnTargetNetworksOutput, error) { + req, out := c.DescribeClientVpnTargetNetworksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeConversionTasks = "DescribeConversionTasks" // DescribeConversionTasksRequest generates a "aws/request.Request" representing the @@ -11093,7 +12004,7 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva // Describes the Dedicated Host reservations that are available to purchase. // // The results describe all the Dedicated Host reservation offerings, including -// offerings that may not match the instance family and region of your Dedicated +// offerings that may not match the instance family and Region of your Dedicated // Hosts. When purchasing an offering, ensure that the instance family and Region // of the offering matches that of the Dedicated Hosts with which it is to be // associated. For more information about supported instance types, see Dedicated @@ -11248,7 +12159,7 @@ func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Requ // // Describes one or more of your Dedicated Hosts. // -// The results describe only the Dedicated Hosts in the region you're currently +// The results describe only the Dedicated Hosts in the Region you're currently // using. All listed instances consume capacity on your Dedicated Host. Dedicated // Hosts that have recently been released are listed with the state released. // @@ -15189,6 +16100,13 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // instance. Alternatively, you can use DescribeInstances with a filter to look // for instances where the instance lifecycle is spot. // +// We recommend that you set MaxResults to a value between 5 and 1000 to limit +// the number of results returned. This paginates the output, which makes the +// list more manageable and returns the results faster. If the list of results +// exceeds your MaxResults value, then that number of results is returned along +// with a NextToken value that can be passed to a subsequent DescribeSpotInstanceRequests +// request to retrieve the remaining results. +// // Spot Instance requests are deleted four hours after they are canceled and // their instances are terminated. // @@ -18180,6 +19098,90 @@ func (c *EC2) DisassociateAddressWithContext(ctx aws.Context, input *Disassociat return out, req.Send() } +const opDisassociateClientVpnTargetNetwork = "DisassociateClientVpnTargetNetwork" + +// DisassociateClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateClientVpnTargetNetwork operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateClientVpnTargetNetwork for more information on using the DisassociateClientVpnTargetNetwork +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateClientVpnTargetNetworkRequest method. +// req, resp := client.DisassociateClientVpnTargetNetworkRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateClientVpnTargetNetwork +func (c *EC2) DisassociateClientVpnTargetNetworkRequest(input *DisassociateClientVpnTargetNetworkInput) (req *request.Request, output *DisassociateClientVpnTargetNetworkOutput) { + op := &request.Operation{ + Name: opDisassociateClientVpnTargetNetwork, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateClientVpnTargetNetworkInput{} + } + + output = &DisassociateClientVpnTargetNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. +// +// Disassociates a target network from the specified Client VPN endpoint. When +// you disassociate the last target network from a Client VPN, the following +// happens: +// +// * The route that was automatically added for the VPC is deleted +// +// * All active client connections are terminated +// +// * New client connections are disallowed +// +// * The Client VPN endpoint's status changes to pending-associate +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DisassociateClientVpnTargetNetwork for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateClientVpnTargetNetwork +func (c *EC2) DisassociateClientVpnTargetNetwork(input *DisassociateClientVpnTargetNetworkInput) (*DisassociateClientVpnTargetNetworkOutput, error) { + req, out := c.DisassociateClientVpnTargetNetworkRequest(input) + return out, req.Send() +} + +// DisassociateClientVpnTargetNetworkWithContext is the same as DisassociateClientVpnTargetNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateClientVpnTargetNetwork for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) DisassociateClientVpnTargetNetworkWithContext(ctx aws.Context, input *DisassociateClientVpnTargetNetworkInput, opts ...request.Option) (*DisassociateClientVpnTargetNetworkOutput, error) { + req, out := c.DisassociateClientVpnTargetNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile" // DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the @@ -18953,6 +19955,158 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input * return out, req.Send() } +const opExportClientVpnClientCertificateRevocationList = "ExportClientVpnClientCertificateRevocationList" + +// ExportClientVpnClientCertificateRevocationListRequest generates a "aws/request.Request" representing the +// client's request for the ExportClientVpnClientCertificateRevocationList operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ExportClientVpnClientCertificateRevocationList for more information on using the ExportClientVpnClientCertificateRevocationList +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ExportClientVpnClientCertificateRevocationListRequest method. +// req, resp := client.ExportClientVpnClientCertificateRevocationListRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientCertificateRevocationList +func (c *EC2) ExportClientVpnClientCertificateRevocationListRequest(input *ExportClientVpnClientCertificateRevocationListInput) (req *request.Request, output *ExportClientVpnClientCertificateRevocationListOutput) { + op := &request.Operation{ + Name: opExportClientVpnClientCertificateRevocationList, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportClientVpnClientCertificateRevocationListInput{} + } + + output = &ExportClientVpnClientCertificateRevocationListOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportClientVpnClientCertificateRevocationList API operation for Amazon Elastic Compute Cloud. +// +// Downloads the client certificate revocation list for the specified Client +// VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ExportClientVpnClientCertificateRevocationList for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientCertificateRevocationList +func (c *EC2) ExportClientVpnClientCertificateRevocationList(input *ExportClientVpnClientCertificateRevocationListInput) (*ExportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ExportClientVpnClientCertificateRevocationListRequest(input) + return out, req.Send() +} + +// ExportClientVpnClientCertificateRevocationListWithContext is the same as ExportClientVpnClientCertificateRevocationList with the addition of +// the ability to pass a context and additional request options. +// +// See ExportClientVpnClientCertificateRevocationList for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ExportClientVpnClientCertificateRevocationListWithContext(ctx aws.Context, input *ExportClientVpnClientCertificateRevocationListInput, opts ...request.Option) (*ExportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ExportClientVpnClientCertificateRevocationListRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opExportClientVpnClientConfiguration = "ExportClientVpnClientConfiguration" + +// ExportClientVpnClientConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the ExportClientVpnClientConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ExportClientVpnClientConfiguration for more information on using the ExportClientVpnClientConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ExportClientVpnClientConfigurationRequest method. +// req, resp := client.ExportClientVpnClientConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientConfiguration +func (c *EC2) ExportClientVpnClientConfigurationRequest(input *ExportClientVpnClientConfigurationInput) (req *request.Request, output *ExportClientVpnClientConfigurationOutput) { + op := &request.Operation{ + Name: opExportClientVpnClientConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportClientVpnClientConfigurationInput{} + } + + output = &ExportClientVpnClientConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportClientVpnClientConfiguration API operation for Amazon Elastic Compute Cloud. +// +// Downloads the contents of the Client VPN endpoint configuration file for +// the specified Client VPN endpoint. The Client VPN endpoint configuration +// file includes the Client VPN endpoint and certificate information clients +// need to establish a connection with the Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ExportClientVpnClientConfiguration for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientConfiguration +func (c *EC2) ExportClientVpnClientConfiguration(input *ExportClientVpnClientConfigurationInput) (*ExportClientVpnClientConfigurationOutput, error) { + req, out := c.ExportClientVpnClientConfigurationRequest(input) + return out, req.Send() +} + +// ExportClientVpnClientConfigurationWithContext is the same as ExportClientVpnClientConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See ExportClientVpnClientConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ExportClientVpnClientConfigurationWithContext(ctx aws.Context, input *ExportClientVpnClientConfigurationInput, opts ...request.Option) (*ExportClientVpnClientConfigurationOutput, error) { + req, out := c.ExportClientVpnClientConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opExportTransitGatewayRoutes = "ExportTransitGatewayRoutes" // ExportTransitGatewayRoutesRequest generates a "aws/request.Request" representing the @@ -19742,6 +20896,84 @@ func (c *EC2) GetTransitGatewayRouteTablePropagationsWithContext(ctx aws.Context return out, req.Send() } +const opImportClientVpnClientCertificateRevocationList = "ImportClientVpnClientCertificateRevocationList" + +// ImportClientVpnClientCertificateRevocationListRequest generates a "aws/request.Request" representing the +// client's request for the ImportClientVpnClientCertificateRevocationList operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ImportClientVpnClientCertificateRevocationList for more information on using the ImportClientVpnClientCertificateRevocationList +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ImportClientVpnClientCertificateRevocationListRequest method. +// req, resp := client.ImportClientVpnClientCertificateRevocationListRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportClientVpnClientCertificateRevocationList +func (c *EC2) ImportClientVpnClientCertificateRevocationListRequest(input *ImportClientVpnClientCertificateRevocationListInput) (req *request.Request, output *ImportClientVpnClientCertificateRevocationListOutput) { + op := &request.Operation{ + Name: opImportClientVpnClientCertificateRevocationList, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportClientVpnClientCertificateRevocationListInput{} + } + + output = &ImportClientVpnClientCertificateRevocationListOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportClientVpnClientCertificateRevocationList API operation for Amazon Elastic Compute Cloud. +// +// Uploads a client certificate revocation list to the specified Client VPN +// endpoint. Uploading a client certificate revocation list overwrites the existing +// client certificate revocation list. +// +// Uploading a client certificate revocation list resets existing client connections. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ImportClientVpnClientCertificateRevocationList for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportClientVpnClientCertificateRevocationList +func (c *EC2) ImportClientVpnClientCertificateRevocationList(input *ImportClientVpnClientCertificateRevocationListInput) (*ImportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ImportClientVpnClientCertificateRevocationListRequest(input) + return out, req.Send() +} + +// ImportClientVpnClientCertificateRevocationListWithContext is the same as ImportClientVpnClientCertificateRevocationList with the addition of +// the ability to pass a context and additional request options. +// +// See ImportClientVpnClientCertificateRevocationList for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ImportClientVpnClientCertificateRevocationListWithContext(ctx aws.Context, input *ImportClientVpnClientCertificateRevocationListInput, opts ...request.Option) (*ImportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ImportClientVpnClientCertificateRevocationListRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opImportImage = "ImportImage" // ImportImageRequest generates a "aws/request.Request" representing the @@ -20211,6 +21443,83 @@ func (c *EC2) ModifyCapacityReservationWithContext(ctx aws.Context, input *Modif return out, req.Send() } +const opModifyClientVpnEndpoint = "ModifyClientVpnEndpoint" + +// ModifyClientVpnEndpointRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClientVpnEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ModifyClientVpnEndpoint for more information on using the ModifyClientVpnEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ModifyClientVpnEndpointRequest method. +// req, resp := client.ModifyClientVpnEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyClientVpnEndpoint +func (c *EC2) ModifyClientVpnEndpointRequest(input *ModifyClientVpnEndpointInput) (req *request.Request, output *ModifyClientVpnEndpointOutput) { + op := &request.Operation{ + Name: opModifyClientVpnEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClientVpnEndpointInput{} + } + + output = &ModifyClientVpnEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified Client VPN endpoint. You can only modify an endpoint's +// server certificate information, client connection logging information, DNS +// server, and description. Modifying the DNS server resets existing client +// connections. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyClientVpnEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyClientVpnEndpoint +func (c *EC2) ModifyClientVpnEndpoint(input *ModifyClientVpnEndpointInput) (*ModifyClientVpnEndpointOutput, error) { + req, out := c.ModifyClientVpnEndpointRequest(input) + return out, req.Send() +} + +// ModifyClientVpnEndpointWithContext is the same as ModifyClientVpnEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClientVpnEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) ModifyClientVpnEndpointWithContext(ctx aws.Context, input *ModifyClientVpnEndpointInput, opts ...request.Option) (*ModifyClientVpnEndpointOutput, error) { + req, out := c.ModifyClientVpnEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyFleet = "ModifyFleet" // ModifyFleetRequest generates a "aws/request.Request" representing the @@ -21024,8 +22333,8 @@ func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput // name must be specified in the request. Affinity and tenancy can be modified // in the same request. // -// To modify the host ID, tenancy, or placement group for an instance, the instance -// must be in the stopped state. +// To modify the host ID, tenancy, placement group, or partition for an instance, +// the instance must be in the stopped state. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -24658,6 +25967,80 @@ func (c *EC2) RestoreAddressToClassicWithContext(ctx aws.Context, input *Restore return out, req.Send() } +const opRevokeClientVpnIngress = "RevokeClientVpnIngress" + +// RevokeClientVpnIngressRequest generates a "aws/request.Request" representing the +// client's request for the RevokeClientVpnIngress operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RevokeClientVpnIngress for more information on using the RevokeClientVpnIngress +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RevokeClientVpnIngressRequest method. +// req, resp := client.RevokeClientVpnIngressRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeClientVpnIngress +func (c *EC2) RevokeClientVpnIngressRequest(input *RevokeClientVpnIngressInput) (req *request.Request, output *RevokeClientVpnIngressOutput) { + op := &request.Operation{ + Name: opRevokeClientVpnIngress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeClientVpnIngressInput{} + } + + output = &RevokeClientVpnIngressOutput{} + req = c.newRequest(op, input, output) + return +} + +// RevokeClientVpnIngress API operation for Amazon Elastic Compute Cloud. +// +// Removes an ingress authorization rule from a Client VPN endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation RevokeClientVpnIngress for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeClientVpnIngress +func (c *EC2) RevokeClientVpnIngress(input *RevokeClientVpnIngressInput) (*RevokeClientVpnIngressOutput, error) { + req, out := c.RevokeClientVpnIngressRequest(input) + return out, req.Send() +} + +// RevokeClientVpnIngressWithContext is the same as RevokeClientVpnIngress with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeClientVpnIngress for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) RevokeClientVpnIngressWithContext(ctx aws.Context, input *RevokeClientVpnIngressInput, opts ...request.Option) (*RevokeClientVpnIngressOutput, error) { + req, out := c.RevokeClientVpnIngressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress" // RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the @@ -25333,6 +26716,82 @@ func (c *EC2) StopInstancesWithContext(ctx aws.Context, input *StopInstancesInpu return out, req.Send() } +const opTerminateClientVpnConnections = "TerminateClientVpnConnections" + +// TerminateClientVpnConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the TerminateClientVpnConnections operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TerminateClientVpnConnections for more information on using the TerminateClientVpnConnections +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TerminateClientVpnConnectionsRequest method. +// req, resp := client.TerminateClientVpnConnectionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateClientVpnConnections +func (c *EC2) TerminateClientVpnConnectionsRequest(input *TerminateClientVpnConnectionsInput) (req *request.Request, output *TerminateClientVpnConnectionsOutput) { + op := &request.Operation{ + Name: opTerminateClientVpnConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TerminateClientVpnConnectionsInput{} + } + + output = &TerminateClientVpnConnectionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// TerminateClientVpnConnections API operation for Amazon Elastic Compute Cloud. +// +// Terminates active Client VPN endpoint connections. This action can be used +// to terminate a specific client connection, or up to five connections established +// by a specific user. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation TerminateClientVpnConnections for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateClientVpnConnections +func (c *EC2) TerminateClientVpnConnections(input *TerminateClientVpnConnectionsInput) (*TerminateClientVpnConnectionsOutput, error) { + req, out := c.TerminateClientVpnConnectionsRequest(input) + return out, req.Send() +} + +// TerminateClientVpnConnectionsWithContext is the same as TerminateClientVpnConnections with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateClientVpnConnections for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EC2) TerminateClientVpnConnectionsWithContext(ctx aws.Context, input *TerminateClientVpnConnectionsInput, opts ...request.Option) (*TerminateClientVpnConnectionsOutput, error) { + req, out := c.TerminateClientVpnConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTerminateInstances = "TerminateInstances" // TerminateInstancesRequest generates a "aws/request.Request" representing the @@ -26771,6 +28230,108 @@ func (s *AllowedPrincipal) SetPrincipalType(v string) *AllowedPrincipal { return s } +type ApplySecurityGroupsToClientVpnTargetNetworkInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the security groups to apply to the associated target network. + // Up to 5 security groups can be applied to an associated target network. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list" required:"true"` + + // The ID of the VPC in which the associated target network is located. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplySecurityGroupsToClientVpnTargetNetworkInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetDryRun(v bool) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.DryRun = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetSecurityGroupIds(v []*string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.SecurityGroupIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetVpcId(v string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.VpcId = &v + return s +} + +type ApplySecurityGroupsToClientVpnTargetNetworkOutput struct { + _ struct{} `type:"structure"` + + // The IDs of the applied security groups. + SecurityGroupIds []*string `locationName:"securityGroupIds" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkOutput) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkOutput) SetSecurityGroupIds(v []*string) *ApplySecurityGroupsToClientVpnTargetNetworkOutput { + s.SecurityGroupIds = v + return s +} + type AssignIpv6AddressesInput struct { _ struct{} `type:"structure"` @@ -27064,6 +28625,102 @@ func (s *AssociateAddressOutput) SetAssociationId(v string) *AssociateAddressOut return s } +type AssociateClientVpnTargetNetworkInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the subnet to associate with the Client VPN endpoint. + // + // SubnetId is a required field + SubnetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateClientVpnTargetNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateClientVpnTargetNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateClientVpnTargetNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateClientVpnTargetNetworkInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *AssociateClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *AssociateClientVpnTargetNetworkInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AssociateClientVpnTargetNetworkInput) SetDryRun(v bool) *AssociateClientVpnTargetNetworkInput { + s.DryRun = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *AssociateClientVpnTargetNetworkInput) SetSubnetId(v string) *AssociateClientVpnTargetNetworkInput { + s.SubnetId = &v + return s +} + +type AssociateClientVpnTargetNetworkOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the target network association. + AssociationId *string `locationName:"associationId" type:"string"` + + // The current state of the target network association. + Status *AssociationStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s AssociateClientVpnTargetNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateClientVpnTargetNetworkOutput) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *AssociateClientVpnTargetNetworkOutput) SetAssociationId(v string) *AssociateClientVpnTargetNetworkOutput { + s.AssociationId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AssociateClientVpnTargetNetworkOutput) SetStatus(v *AssociationStatus) *AssociateClientVpnTargetNetworkOutput { + s.Status = v + return s +} + type AssociateDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -27576,6 +29233,73 @@ func (s *AssociateVpcCidrBlockOutput) SetVpcId(v string) *AssociateVpcCidrBlockO return s } +// Describes a target network that is associated with a Client VPN endpoint. +// A target network is a subnet in a VPC. +type AssociatedTargetNetwork struct { + _ struct{} `type:"structure"` + + // The ID of the subnet. + NetworkId *string `locationName:"networkId" type:"string"` + + // The target network type. + NetworkType *string `locationName:"networkType" type:"string" enum:"AssociatedNetworkType"` +} + +// String returns the string representation +func (s AssociatedTargetNetwork) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatedTargetNetwork) GoString() string { + return s.String() +} + +// SetNetworkId sets the NetworkId field's value. +func (s *AssociatedTargetNetwork) SetNetworkId(v string) *AssociatedTargetNetwork { + s.NetworkId = &v + return s +} + +// SetNetworkType sets the NetworkType field's value. +func (s *AssociatedTargetNetwork) SetNetworkType(v string) *AssociatedTargetNetwork { + s.NetworkType = &v + return s +} + +// Describes the state of a target network association. +type AssociationStatus struct { + _ struct{} `type:"structure"` + + // The state of the target network association. + Code *string `locationName:"code" type:"string" enum:"AssociationStatusCode"` + + // A message about the status of the target network association, if applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s AssociationStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *AssociationStatus) SetCode(v string) *AssociationStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *AssociationStatus) SetMessage(v string) *AssociationStatus { + s.Message = &v + return s +} + type AttachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -28076,6 +29800,193 @@ func (s *AttributeValue) SetValue(v string) *AttributeValue { return s } +// Information about an authorization rule. +type AuthorizationRule struct { + _ struct{} `type:"structure"` + + // Indicates whether the authorization rule grants access to all clients. + AccessAll *bool `locationName:"accessAll" type:"boolean"` + + // The ID of the Client VPN endpoint with which the authorization rule is associated. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // A brief description of the authorization rule. + Description *string `locationName:"description" type:"string"` + + // The IPv4 address range, in CIDR notation, of the network to which the authorization + // rule applies. + DestinationCidr *string `locationName:"destinationCidr" type:"string"` + + // The ID of the Active Directory group to which the authorization rule grants + // access. + GroupId *string `locationName:"groupId" type:"string"` + + // The current state of the authorization rule. + Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s AuthorizationRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizationRule) GoString() string { + return s.String() +} + +// SetAccessAll sets the AccessAll field's value. +func (s *AuthorizationRule) SetAccessAll(v bool) *AuthorizationRule { + s.AccessAll = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *AuthorizationRule) SetClientVpnEndpointId(v string) *AuthorizationRule { + s.ClientVpnEndpointId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *AuthorizationRule) SetDescription(v string) *AuthorizationRule { + s.Description = &v + return s +} + +// SetDestinationCidr sets the DestinationCidr field's value. +func (s *AuthorizationRule) SetDestinationCidr(v string) *AuthorizationRule { + s.DestinationCidr = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *AuthorizationRule) SetGroupId(v string) *AuthorizationRule { + s.GroupId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AuthorizationRule) SetStatus(v *ClientVpnAuthorizationRuleStatus) *AuthorizationRule { + s.Status = v + return s +} + +type AuthorizeClientVpnIngressInput struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory group to grant access. + AccessGroupId *string `type:"string"` + + // Indicates whether to grant access to all clients. Use true to grant all clients + // who successfully establish a VPN connection access to the network. + AuthorizeAllGroups *bool `type:"boolean"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // A brief description of the authorization rule. + Description *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IPv4 address range, in CIDR notation, of the network for which access + // is being authorized. + // + // TargetNetworkCidr is a required field + TargetNetworkCidr *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AuthorizeClientVpnIngressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeClientVpnIngressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeClientVpnIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeClientVpnIngressInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.TargetNetworkCidr == nil { + invalidParams.Add(request.NewErrParamRequired("TargetNetworkCidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessGroupId sets the AccessGroupId field's value. +func (s *AuthorizeClientVpnIngressInput) SetAccessGroupId(v string) *AuthorizeClientVpnIngressInput { + s.AccessGroupId = &v + return s +} + +// SetAuthorizeAllGroups sets the AuthorizeAllGroups field's value. +func (s *AuthorizeClientVpnIngressInput) SetAuthorizeAllGroups(v bool) *AuthorizeClientVpnIngressInput { + s.AuthorizeAllGroups = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *AuthorizeClientVpnIngressInput) SetClientVpnEndpointId(v string) *AuthorizeClientVpnIngressInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *AuthorizeClientVpnIngressInput) SetDescription(v string) *AuthorizeClientVpnIngressInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AuthorizeClientVpnIngressInput) SetDryRun(v bool) *AuthorizeClientVpnIngressInput { + s.DryRun = &v + return s +} + +// SetTargetNetworkCidr sets the TargetNetworkCidr field's value. +func (s *AuthorizeClientVpnIngressInput) SetTargetNetworkCidr(v string) *AuthorizeClientVpnIngressInput { + s.TargetNetworkCidr = &v + return s +} + +type AuthorizeClientVpnIngressOutput struct { + _ struct{} `type:"structure"` + + // The current state of the authorization rule. + Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s AuthorizeClientVpnIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeClientVpnIngressOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *AuthorizeClientVpnIngressOutput) SetStatus(v *ClientVpnAuthorizationRuleStatus) *AuthorizeClientVpnIngressOutput { + s.Status = v + return s +} + type AuthorizeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -29258,14 +31169,10 @@ type CancelSpotFleetRequestsError struct { _ struct{} `type:"structure"` // The error code. - // - // Code is a required field - Code *string `locationName:"code" type:"string" required:"true" enum:"CancelBatchErrorCode"` + Code *string `locationName:"code" type:"string" enum:"CancelBatchErrorCode"` // The description for the error code. - // - // Message is a required field - Message *string `locationName:"message" type:"string" required:"true"` + Message *string `locationName:"message" type:"string"` } // String returns the string representation @@ -29295,14 +31202,10 @@ type CancelSpotFleetRequestsErrorItem struct { _ struct{} `type:"structure"` // The error. - // - // Error is a required field - Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure" required:"true"` + Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation @@ -29431,19 +31334,13 @@ type CancelSpotFleetRequestsSuccessItem struct { _ struct{} `type:"structure"` // The current state of the Spot Fleet request. - // - // CurrentSpotFleetRequestState is a required field - CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"` + CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" enum:"BatchState"` // The previous state of the Spot Fleet request. - // - // PreviousSpotFleetRequestState is a required field - PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"` + PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" enum:"BatchState"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation @@ -29923,6 +31820,55 @@ func (s *CapacityReservationTargetResponse) SetCapacityReservationId(v string) * return s } +// Information about the client certificate used for authentication. +type CertificateAuthentication struct { + _ struct{} `type:"structure"` + + // The ARN of the client certificate. + ClientRootCertificateChain *string `locationName:"clientRootCertificateChain" type:"string"` +} + +// String returns the string representation +func (s CertificateAuthentication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthentication) GoString() string { + return s.String() +} + +// SetClientRootCertificateChain sets the ClientRootCertificateChain field's value. +func (s *CertificateAuthentication) SetClientRootCertificateChain(v string) *CertificateAuthentication { + s.ClientRootCertificateChain = &v + return s +} + +// Information about the client certificate to be used for authentication. +type CertificateAuthenticationRequest struct { + _ struct{} `type:"structure"` + + // The ARN of the client certificate. The certificate must be signed by a certificate + // authority (CA) and it must be provisioned in AWS Certificate Manager (ACM). + ClientRootCertificateChainArn *string `type:"string"` +} + +// String returns the string representation +func (s CertificateAuthenticationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthenticationRequest) GoString() string { + return s.String() +} + +// SetClientRootCertificateChainArn sets the ClientRootCertificateChainArn field's value. +func (s *CertificateAuthenticationRequest) SetClientRootCertificateChainArn(v string) *CertificateAuthenticationRequest { + s.ClientRootCertificateChainArn = &v + return s +} + // Provides authorization for Amazon to bring a specific IP address range to // a specific AWS account using bring your own IP addresses (BYOIP). type CidrAuthorizationContext struct { @@ -30090,9 +32036,7 @@ type ClassicLoadBalancer struct { _ struct{} `type:"structure"` // The name of the load balancer. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + Name *string `locationName:"name" type:"string"` } // String returns the string representation @@ -30105,19 +32049,6 @@ func (s ClassicLoadBalancer) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ClassicLoadBalancer) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancer"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetName sets the Name field's value. func (s *ClassicLoadBalancer) SetName(v string) *ClassicLoadBalancer { s.Name = &v @@ -30130,9 +32061,7 @@ type ClassicLoadBalancersConfig struct { _ struct{} `type:"structure"` // One or more Classic Load Balancers. - // - // ClassicLoadBalancers is a required field - ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list" required:"true"` + ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list"` } // String returns the string representation @@ -30148,22 +32077,9 @@ func (s ClassicLoadBalancersConfig) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ClassicLoadBalancersConfig) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancersConfig"} - if s.ClassicLoadBalancers == nil { - invalidParams.Add(request.NewErrParamRequired("ClassicLoadBalancers")) - } if s.ClassicLoadBalancers != nil && len(s.ClassicLoadBalancers) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClassicLoadBalancers", 1)) } - if s.ClassicLoadBalancers != nil { - for i, v := range s.ClassicLoadBalancers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ClassicLoadBalancers", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -30177,6 +32093,40 @@ func (s *ClassicLoadBalancersConfig) SetClassicLoadBalancers(v []*ClassicLoadBal return s } +// Describes the state of a client certificate revocation list. +type ClientCertificateRevocationListStatus struct { + _ struct{} `type:"structure"` + + // The state of the client certificate revocation list. + Code *string `locationName:"code" type:"string" enum:"ClientCertificateRevocationListStatusCode"` + + // A message about the status of the client certificate revocation list, if + // applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ClientCertificateRevocationListStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientCertificateRevocationListStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ClientCertificateRevocationListStatus) SetCode(v string) *ClientCertificateRevocationListStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ClientCertificateRevocationListStatus) SetMessage(v string) *ClientCertificateRevocationListStatus { + s.Message = &v + return s +} + // Describes the client-specific data. type ClientData struct { _ struct{} `type:"structure"` @@ -30228,6 +32178,606 @@ func (s *ClientData) SetUploadStart(v time.Time) *ClientData { return s } +// Describes the authentication methods used by a Client VPN endpoint. Client +// VPN supports Active Directory and mutual authentication. For more information, +// see Authentication (vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) +// in the AWS Client VPN Admin Guide. +type ClientVpnAuthentication struct { + _ struct{} `type:"structure"` + + // Information about the Active Directory, if applicable. + ActiveDirectory *DirectoryServiceAuthentication `locationName:"activeDirectory" type:"structure"` + + // Information about the authentication certificates, if applicable. + MutualAuthentication *CertificateAuthentication `locationName:"mutualAuthentication" type:"structure"` + + // The authentication type used. + Type *string `locationName:"type" type:"string" enum:"ClientVpnAuthenticationType"` +} + +// String returns the string representation +func (s ClientVpnAuthentication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnAuthentication) GoString() string { + return s.String() +} + +// SetActiveDirectory sets the ActiveDirectory field's value. +func (s *ClientVpnAuthentication) SetActiveDirectory(v *DirectoryServiceAuthentication) *ClientVpnAuthentication { + s.ActiveDirectory = v + return s +} + +// SetMutualAuthentication sets the MutualAuthentication field's value. +func (s *ClientVpnAuthentication) SetMutualAuthentication(v *CertificateAuthentication) *ClientVpnAuthentication { + s.MutualAuthentication = v + return s +} + +// SetType sets the Type field's value. +func (s *ClientVpnAuthentication) SetType(v string) *ClientVpnAuthentication { + s.Type = &v + return s +} + +// Describes the authentication method to be used by a Client VPN endpoint. +// Client VPN supports Active Directory and mutual authentication. For more +// information, see Authentication (vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) +// in the AWS Client VPN Admin Guide. +type ClientVpnAuthenticationRequest struct { + _ struct{} `type:"structure"` + + // Information about the Active Directory to be used, if applicable. You must + // provide this information if Type is directory-service-authentication. + ActiveDirectory *DirectoryServiceAuthenticationRequest `type:"structure"` + + // Information about the authentication certificates to be used, if applicable. + // You must provide this information if Type is certificate-authentication. + MutualAuthentication *CertificateAuthenticationRequest `type:"structure"` + + // The type of client authentication to be used. Specify certificate-authentication + // to use certificate-based authentication, or directory-service-authentication + // to use Active Directory authentication. + Type *string `type:"string" enum:"ClientVpnAuthenticationType"` +} + +// String returns the string representation +func (s ClientVpnAuthenticationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnAuthenticationRequest) GoString() string { + return s.String() +} + +// SetActiveDirectory sets the ActiveDirectory field's value. +func (s *ClientVpnAuthenticationRequest) SetActiveDirectory(v *DirectoryServiceAuthenticationRequest) *ClientVpnAuthenticationRequest { + s.ActiveDirectory = v + return s +} + +// SetMutualAuthentication sets the MutualAuthentication field's value. +func (s *ClientVpnAuthenticationRequest) SetMutualAuthentication(v *CertificateAuthenticationRequest) *ClientVpnAuthenticationRequest { + s.MutualAuthentication = v + return s +} + +// SetType sets the Type field's value. +func (s *ClientVpnAuthenticationRequest) SetType(v string) *ClientVpnAuthenticationRequest { + s.Type = &v + return s +} + +// Describes the state of an authorization rule. +type ClientVpnAuthorizationRuleStatus struct { + _ struct{} `type:"structure"` + + // The state of the authorization rule. + Code *string `locationName:"code" type:"string" enum:"ClientVpnAuthorizationRuleStatusCode"` + + // A message about the status of the authorization rule, if applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ClientVpnAuthorizationRuleStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnAuthorizationRuleStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ClientVpnAuthorizationRuleStatus) SetCode(v string) *ClientVpnAuthorizationRuleStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ClientVpnAuthorizationRuleStatus) SetMessage(v string) *ClientVpnAuthorizationRuleStatus { + s.Message = &v + return s +} + +// Describes a client connection. +type ClientVpnConnection struct { + _ struct{} `type:"structure"` + + // The IP address of the client. + ClientIp *string `locationName:"clientIp" type:"string"` + + // The ID of the Client VPN endpoint to which the client is connected. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // The common name associated with the client. This is either the name of the + // client certificate, or the Active Directory user name. + CommonName *string `locationName:"commonName" type:"string"` + + // The date and time the client connection was terminated. + ConnectionEndTime *string `locationName:"connectionEndTime" type:"string"` + + // The date and time the client connection was established. + ConnectionEstablishedTime *string `locationName:"connectionEstablishedTime" type:"string"` + + // The ID of the client connection. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The number of bytes received by the client. + EgressBytes *string `locationName:"egressBytes" type:"string"` + + // The number of packets received by the client. + EgressPackets *string `locationName:"egressPackets" type:"string"` + + // The number of bytes sent by the client. + IngressBytes *string `locationName:"ingressBytes" type:"string"` + + // The number of packets sent by the client. + IngressPackets *string `locationName:"ingressPackets" type:"string"` + + // The current state of the client connection. + Status *ClientVpnConnectionStatus `locationName:"status" type:"structure"` + + // The current date and time. + Timestamp *string `locationName:"timestamp" type:"string"` + + // The username of the client who established the client connection. This information + // is only provided if Active Directory client authentication is used. + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s ClientVpnConnection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnConnection) GoString() string { + return s.String() +} + +// SetClientIp sets the ClientIp field's value. +func (s *ClientVpnConnection) SetClientIp(v string) *ClientVpnConnection { + s.ClientIp = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ClientVpnConnection) SetClientVpnEndpointId(v string) *ClientVpnConnection { + s.ClientVpnEndpointId = &v + return s +} + +// SetCommonName sets the CommonName field's value. +func (s *ClientVpnConnection) SetCommonName(v string) *ClientVpnConnection { + s.CommonName = &v + return s +} + +// SetConnectionEndTime sets the ConnectionEndTime field's value. +func (s *ClientVpnConnection) SetConnectionEndTime(v string) *ClientVpnConnection { + s.ConnectionEndTime = &v + return s +} + +// SetConnectionEstablishedTime sets the ConnectionEstablishedTime field's value. +func (s *ClientVpnConnection) SetConnectionEstablishedTime(v string) *ClientVpnConnection { + s.ConnectionEstablishedTime = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *ClientVpnConnection) SetConnectionId(v string) *ClientVpnConnection { + s.ConnectionId = &v + return s +} + +// SetEgressBytes sets the EgressBytes field's value. +func (s *ClientVpnConnection) SetEgressBytes(v string) *ClientVpnConnection { + s.EgressBytes = &v + return s +} + +// SetEgressPackets sets the EgressPackets field's value. +func (s *ClientVpnConnection) SetEgressPackets(v string) *ClientVpnConnection { + s.EgressPackets = &v + return s +} + +// SetIngressBytes sets the IngressBytes field's value. +func (s *ClientVpnConnection) SetIngressBytes(v string) *ClientVpnConnection { + s.IngressBytes = &v + return s +} + +// SetIngressPackets sets the IngressPackets field's value. +func (s *ClientVpnConnection) SetIngressPackets(v string) *ClientVpnConnection { + s.IngressPackets = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ClientVpnConnection) SetStatus(v *ClientVpnConnectionStatus) *ClientVpnConnection { + s.Status = v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *ClientVpnConnection) SetTimestamp(v string) *ClientVpnConnection { + s.Timestamp = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *ClientVpnConnection) SetUsername(v string) *ClientVpnConnection { + s.Username = &v + return s +} + +// Describes the status of a client connection. +type ClientVpnConnectionStatus struct { + _ struct{} `type:"structure"` + + // The state of the client connection. + Code *string `locationName:"code" type:"string" enum:"ClientVpnConnectionStatusCode"` + + // A message about the status of the client connection, if applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ClientVpnConnectionStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnConnectionStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ClientVpnConnectionStatus) SetCode(v string) *ClientVpnConnectionStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ClientVpnConnectionStatus) SetMessage(v string) *ClientVpnConnectionStatus { + s.Message = &v + return s +} + +// Describes a Client VPN endpoint. +type ClientVpnEndpoint struct { + _ struct{} `type:"structure"` + + // Information about the associated target networks. A target network is a subnet + // in a VPC. + AssociatedTargetNetworks []*AssociatedTargetNetwork `locationName:"associatedTargetNetwork" locationNameList:"item" type:"list"` + + // Information about the authentication method used by the Client VPN endpoint. + AuthenticationOptions []*ClientVpnAuthentication `locationName:"authenticationOptions" locationNameList:"item" type:"list"` + + // The IPv4 address range, in CIDR notation, from which client IP addresses + // are assigned. + ClientCidrBlock *string `locationName:"clientCidrBlock" type:"string"` + + // The ID of the Client VPN endpoint. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // Information about the client connection logging options for the Client VPN + // endpoint. + ConnectionLogOptions *ConnectionLogResponseOptions `locationName:"connectionLogOptions" type:"structure"` + + // The date and time the Client VPN endpoint was created. + CreationTime *string `locationName:"creationTime" type:"string"` + + // The date and time the Client VPN endpoint was deleted, if applicable. Information + // about deleted Client VPN endpoints is retained for 24 hours, unless a new + // Client VPN is created with the same name. + DeletionTime *string `locationName:"deletionTime" type:"string"` + + // A brief description of the endpoint. + Description *string `locationName:"description" type:"string"` + + // The DNS name to be used by clients when establishing a connection. + DnsName *string `locationName:"dnsName" type:"string"` + + // The ARN of the server certificate. + ServerCertificateArn *string `locationName:"serverCertificateArn" type:"string"` + + // Indicates whether VPN split tunneling is supported. + SplitTunnel *bool `locationName:"splitTunnel" type:"boolean"` + + // The current state of the Client VPN endpoint. + Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` + + // The transport protocol used by the Client VPN endpoint. + TransportProtocol *string `locationName:"transportProtocol" type:"string" enum:"TransportProtocol"` + + // The protocol used by the VPN session. + VpnProtocol *string `locationName:"vpnProtocol" type:"string" enum:"VpnProtocol"` +} + +// String returns the string representation +func (s ClientVpnEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnEndpoint) GoString() string { + return s.String() +} + +// SetAssociatedTargetNetworks sets the AssociatedTargetNetworks field's value. +func (s *ClientVpnEndpoint) SetAssociatedTargetNetworks(v []*AssociatedTargetNetwork) *ClientVpnEndpoint { + s.AssociatedTargetNetworks = v + return s +} + +// SetAuthenticationOptions sets the AuthenticationOptions field's value. +func (s *ClientVpnEndpoint) SetAuthenticationOptions(v []*ClientVpnAuthentication) *ClientVpnEndpoint { + s.AuthenticationOptions = v + return s +} + +// SetClientCidrBlock sets the ClientCidrBlock field's value. +func (s *ClientVpnEndpoint) SetClientCidrBlock(v string) *ClientVpnEndpoint { + s.ClientCidrBlock = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ClientVpnEndpoint) SetClientVpnEndpointId(v string) *ClientVpnEndpoint { + s.ClientVpnEndpointId = &v + return s +} + +// SetConnectionLogOptions sets the ConnectionLogOptions field's value. +func (s *ClientVpnEndpoint) SetConnectionLogOptions(v *ConnectionLogResponseOptions) *ClientVpnEndpoint { + s.ConnectionLogOptions = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ClientVpnEndpoint) SetCreationTime(v string) *ClientVpnEndpoint { + s.CreationTime = &v + return s +} + +// SetDeletionTime sets the DeletionTime field's value. +func (s *ClientVpnEndpoint) SetDeletionTime(v string) *ClientVpnEndpoint { + s.DeletionTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ClientVpnEndpoint) SetDescription(v string) *ClientVpnEndpoint { + s.Description = &v + return s +} + +// SetDnsName sets the DnsName field's value. +func (s *ClientVpnEndpoint) SetDnsName(v string) *ClientVpnEndpoint { + s.DnsName = &v + return s +} + +// SetServerCertificateArn sets the ServerCertificateArn field's value. +func (s *ClientVpnEndpoint) SetServerCertificateArn(v string) *ClientVpnEndpoint { + s.ServerCertificateArn = &v + return s +} + +// SetSplitTunnel sets the SplitTunnel field's value. +func (s *ClientVpnEndpoint) SetSplitTunnel(v bool) *ClientVpnEndpoint { + s.SplitTunnel = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ClientVpnEndpoint) SetStatus(v *ClientVpnEndpointStatus) *ClientVpnEndpoint { + s.Status = v + return s +} + +// SetTransportProtocol sets the TransportProtocol field's value. +func (s *ClientVpnEndpoint) SetTransportProtocol(v string) *ClientVpnEndpoint { + s.TransportProtocol = &v + return s +} + +// SetVpnProtocol sets the VpnProtocol field's value. +func (s *ClientVpnEndpoint) SetVpnProtocol(v string) *ClientVpnEndpoint { + s.VpnProtocol = &v + return s +} + +// Describes the state of a Client VPN endpoint. +type ClientVpnEndpointStatus struct { + _ struct{} `type:"structure"` + + // The state of the Client VPN endpoint. Possible states include: + // + // * pending-associate - The Client VPN endpoint has been created but no + // target networks have been associated. The Client VPN endpoint cannot accept + // connections. + // + // * available - The Client VPN endpoint has been created and a target network + // has been associated. The Client VPN endpoint can accept connections. + // + // * deleting - The Client VPN endpoint is being deleted. The Client VPN + // endpoint cannot accept connections. + // + // * deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint + // cannot accept connections. + Code *string `locationName:"code" type:"string" enum:"ClientVpnEndpointStatusCode"` + + // A message about the status of the Client VPN endpoint. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ClientVpnEndpointStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnEndpointStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ClientVpnEndpointStatus) SetCode(v string) *ClientVpnEndpointStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ClientVpnEndpointStatus) SetMessage(v string) *ClientVpnEndpointStatus { + s.Message = &v + return s +} + +// Information about a Client VPN endpoint route. +type ClientVpnRoute struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint with which the route is associated. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // A brief description of the route. + Description *string `locationName:"description" type:"string"` + + // The IPv4 address range, in CIDR notation, of the route destination. + DestinationCidr *string `locationName:"destinationCidr" type:"string"` + + // Indicates how the route was associated with the Client VPN endpoint. associate + // indicates that the route was automatically added when the target network + // was associated with the Client VPN endpoint. add-route indicates that the + // route was manually added using the CreateClientVpnRoute action. + Origin *string `locationName:"origin" type:"string"` + + // The current state of the route. + Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` + + // The ID of the subnet through which traffic is routed. + TargetSubnet *string `locationName:"targetSubnet" type:"string"` + + // The route type. + Type *string `locationName:"type" type:"string"` +} + +// String returns the string representation +func (s ClientVpnRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnRoute) GoString() string { + return s.String() +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ClientVpnRoute) SetClientVpnEndpointId(v string) *ClientVpnRoute { + s.ClientVpnEndpointId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ClientVpnRoute) SetDescription(v string) *ClientVpnRoute { + s.Description = &v + return s +} + +// SetDestinationCidr sets the DestinationCidr field's value. +func (s *ClientVpnRoute) SetDestinationCidr(v string) *ClientVpnRoute { + s.DestinationCidr = &v + return s +} + +// SetOrigin sets the Origin field's value. +func (s *ClientVpnRoute) SetOrigin(v string) *ClientVpnRoute { + s.Origin = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ClientVpnRoute) SetStatus(v *ClientVpnRouteStatus) *ClientVpnRoute { + s.Status = v + return s +} + +// SetTargetSubnet sets the TargetSubnet field's value. +func (s *ClientVpnRoute) SetTargetSubnet(v string) *ClientVpnRoute { + s.TargetSubnet = &v + return s +} + +// SetType sets the Type field's value. +func (s *ClientVpnRoute) SetType(v string) *ClientVpnRoute { + s.Type = &v + return s +} + +// Describes the state of a Client VPN endpoint route. +type ClientVpnRouteStatus struct { + _ struct{} `type:"structure"` + + // The state of the Client VPN endpoint route. + Code *string `locationName:"code" type:"string" enum:"ClientVpnRouteStatusCode"` + + // A message about the status of the Client VPN endpoint route, if applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ClientVpnRouteStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientVpnRouteStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ClientVpnRouteStatus) SetCode(v string) *ClientVpnRouteStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ClientVpnRouteStatus) SetMessage(v string) *ClientVpnRouteStatus { + s.Message = &v + return s +} + type ConfirmProductInstanceInput struct { _ struct{} `type:"structure"` @@ -30326,6 +32876,95 @@ func (s *ConfirmProductInstanceOutput) SetReturn(v bool) *ConfirmProductInstance return s } +// Describes the client connection logging options for the Client VPN endpoint. +type ConnectionLogOptions struct { + _ struct{} `type:"structure"` + + // The name of the CloudWatch Logs log group. + CloudwatchLogGroup *string `type:"string"` + + // The name of the CloudWatch Logs log stream to which the connection data is + // published. + CloudwatchLogStream *string `type:"string"` + + // Indicates whether connection logging is enabled. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s ConnectionLogOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectionLogOptions) GoString() string { + return s.String() +} + +// SetCloudwatchLogGroup sets the CloudwatchLogGroup field's value. +func (s *ConnectionLogOptions) SetCloudwatchLogGroup(v string) *ConnectionLogOptions { + s.CloudwatchLogGroup = &v + return s +} + +// SetCloudwatchLogStream sets the CloudwatchLogStream field's value. +func (s *ConnectionLogOptions) SetCloudwatchLogStream(v string) *ConnectionLogOptions { + s.CloudwatchLogStream = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ConnectionLogOptions) SetEnabled(v bool) *ConnectionLogOptions { + s.Enabled = &v + return s +} + +// Information about the client connection logging options for a Client VPN +// endpoint. +type ConnectionLogResponseOptions struct { + _ struct{} `type:"structure"` + + // The name of the Amazon CloudWatch Logs log group to which connection logging + // data is published. + CloudwatchLogGroup *string `type:"string"` + + // The name of the Amazon CloudWatch Logs log stream to which connection logging + // data is published. + CloudwatchLogStream *string `type:"string"` + + // Indicates whether client connection logging is enabled for the Client VPN + // endpoint. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s ConnectionLogResponseOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectionLogResponseOptions) GoString() string { + return s.String() +} + +// SetCloudwatchLogGroup sets the CloudwatchLogGroup field's value. +func (s *ConnectionLogResponseOptions) SetCloudwatchLogGroup(v string) *ConnectionLogResponseOptions { + s.CloudwatchLogGroup = &v + return s +} + +// SetCloudwatchLogStream sets the CloudwatchLogStream field's value. +func (s *ConnectionLogResponseOptions) SetCloudwatchLogStream(v string) *ConnectionLogResponseOptions { + s.CloudwatchLogStream = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ConnectionLogResponseOptions) SetEnabled(v bool) *ConnectionLogResponseOptions { + s.Enabled = &v + return s +} + // Describes a connection notification for a VPC endpoint or VPC endpoint service. type ConnectionNotification struct { _ struct{} `type:"structure"` @@ -31262,6 +33901,318 @@ func (s *CreateCapacityReservationOutput) SetCapacityReservation(v *CapacityRese return s } +type CreateClientVpnEndpointInput struct { + _ struct{} `type:"structure"` + + // Information about the authentication method to be used to authenticate clients. + // + // AuthenticationOptions is a required field + AuthenticationOptions []*ClientVpnAuthenticationRequest `locationName:"Authentication" type:"list" required:"true"` + + // The IPv4 address range, in CIDR notation, from which to assign client IP + // addresses. The address range cannot overlap with the local CIDR of the VPC + // in which the associated subnet is located, or the routes that you add manually. + // The address range cannot be changed after the Client VPN endpoint has been + // created. The CIDR block should be /22 or greater. + // + // ClientCidrBlock is a required field + ClientCidrBlock *string `type:"string" required:"true"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // Information about the client connection logging options. + // + // If you enable client connection logging, data about client connections is + // sent to a Cloudwatch Logs log stream. The following information is logged: + // + // * Client connection requests + // + // * Client connection results (successful and unsuccessful) + // + // * Reasons for unsuccessful client connection requests + // + // * Client connection termination time + // + // ConnectionLogOptions is a required field + ConnectionLogOptions *ConnectionLogOptions `type:"structure" required:"true"` + + // A brief description of the Client VPN endpoint. + Description *string `type:"string"` + + // Information about the DNS servers to be used for DNS resolution. A Client + // VPN endpoint can have up to two DNS servers. If no DNS server is specified, + // the DNS address of the VPC that is to be associated with Client VPN endpoint + // is used as the DNS server. + DnsServers []*string `locationNameList:"item" type:"list"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ARN of the server certificate. For more information, see the AWS Certificate + // Manager User Guide (acm/latest/userguide/acm-overview.html) . + // + // ServerCertificateArn is a required field + ServerCertificateArn *string `type:"string" required:"true"` + + // The transport protocol to be used by the VPN session. + // + // Default value: udp + TransportProtocol *string `type:"string" enum:"TransportProtocol"` +} + +// String returns the string representation +func (s CreateClientVpnEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClientVpnEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClientVpnEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClientVpnEndpointInput"} + if s.AuthenticationOptions == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationOptions")) + } + if s.ClientCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("ClientCidrBlock")) + } + if s.ConnectionLogOptions == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionLogOptions")) + } + if s.ServerCertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("ServerCertificateArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationOptions sets the AuthenticationOptions field's value. +func (s *CreateClientVpnEndpointInput) SetAuthenticationOptions(v []*ClientVpnAuthenticationRequest) *CreateClientVpnEndpointInput { + s.AuthenticationOptions = v + return s +} + +// SetClientCidrBlock sets the ClientCidrBlock field's value. +func (s *CreateClientVpnEndpointInput) SetClientCidrBlock(v string) *CreateClientVpnEndpointInput { + s.ClientCidrBlock = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateClientVpnEndpointInput) SetClientToken(v string) *CreateClientVpnEndpointInput { + s.ClientToken = &v + return s +} + +// SetConnectionLogOptions sets the ConnectionLogOptions field's value. +func (s *CreateClientVpnEndpointInput) SetConnectionLogOptions(v *ConnectionLogOptions) *CreateClientVpnEndpointInput { + s.ConnectionLogOptions = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateClientVpnEndpointInput) SetDescription(v string) *CreateClientVpnEndpointInput { + s.Description = &v + return s +} + +// SetDnsServers sets the DnsServers field's value. +func (s *CreateClientVpnEndpointInput) SetDnsServers(v []*string) *CreateClientVpnEndpointInput { + s.DnsServers = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateClientVpnEndpointInput) SetDryRun(v bool) *CreateClientVpnEndpointInput { + s.DryRun = &v + return s +} + +// SetServerCertificateArn sets the ServerCertificateArn field's value. +func (s *CreateClientVpnEndpointInput) SetServerCertificateArn(v string) *CreateClientVpnEndpointInput { + s.ServerCertificateArn = &v + return s +} + +// SetTransportProtocol sets the TransportProtocol field's value. +func (s *CreateClientVpnEndpointInput) SetTransportProtocol(v string) *CreateClientVpnEndpointInput { + s.TransportProtocol = &v + return s +} + +type CreateClientVpnEndpointOutput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // The DNS name to be used by clients when establishing their VPN session. + DnsName *string `locationName:"dnsName" type:"string"` + + // The current state of the Client VPN endpoint. + Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s CreateClientVpnEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClientVpnEndpointOutput) GoString() string { + return s.String() +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *CreateClientVpnEndpointOutput) SetClientVpnEndpointId(v string) *CreateClientVpnEndpointOutput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDnsName sets the DnsName field's value. +func (s *CreateClientVpnEndpointOutput) SetDnsName(v string) *CreateClientVpnEndpointOutput { + s.DnsName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateClientVpnEndpointOutput) SetStatus(v *ClientVpnEndpointStatus) *CreateClientVpnEndpointOutput { + s.Status = v + return s +} + +type CreateClientVpnRouteInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint to which to add the route. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // A brief description of the route. + Description *string `type:"string"` + + // The IPv4 address range, in CIDR notation, of the route destination. For example: + // + // * To add a route for Internet access, enter 0.0.0.0/0 + // + // * To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range + // + // * To add a route for an on-premises network, enter the AWS Site-to-Site + // VPN connection's IPv4 CIDR range + // + // Route address ranges cannot overlap with the CIDR range specified for client + // allocation. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the subnet through which you want to route traffic. The specified + // subnet must be an existing target network of the Client VPN endpoint. + // + // TargetVpcSubnetId is a required field + TargetVpcSubnetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateClientVpnRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClientVpnRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClientVpnRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClientVpnRouteInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.TargetVpcSubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetVpcSubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *CreateClientVpnRouteInput) SetClientVpnEndpointId(v string) *CreateClientVpnRouteInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateClientVpnRouteInput) SetDescription(v string) *CreateClientVpnRouteInput { + s.Description = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *CreateClientVpnRouteInput) SetDestinationCidrBlock(v string) *CreateClientVpnRouteInput { + s.DestinationCidrBlock = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateClientVpnRouteInput) SetDryRun(v bool) *CreateClientVpnRouteInput { + s.DryRun = &v + return s +} + +// SetTargetVpcSubnetId sets the TargetVpcSubnetId field's value. +func (s *CreateClientVpnRouteInput) SetTargetVpcSubnetId(v string) *CreateClientVpnRouteInput { + s.TargetVpcSubnetId = &v + return s +} + +type CreateClientVpnRouteOutput struct { + _ struct{} `type:"structure"` + + // The current state of the route. + Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s CreateClientVpnRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClientVpnRouteOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *CreateClientVpnRouteOutput) SetStatus(v *ClientVpnRouteStatus) *CreateClientVpnRouteOutput { + s.Status = v + return s +} + // Contains the parameters for CreateCustomerGateway. type CreateCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -33528,17 +36479,16 @@ type CreatePlacementGroupInput struct { DryRun *bool `locationName:"dryRun" type:"boolean"` // A name for the placement group. Must be unique within the scope of your account - // for the region. + // for the Region. // // Constraints: Up to 255 ASCII characters - // - // GroupName is a required field - GroupName *string `locationName:"groupName" type:"string" required:"true"` + GroupName *string `locationName:"groupName" type:"string"` + + // The number of partitions. Valid only when Strategy is set to partition. + PartitionCount *int64 `type:"integer"` // The placement strategy. - // - // Strategy is a required field - Strategy *string `locationName:"strategy" type:"string" required:"true" enum:"PlacementStrategy"` + Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` } // String returns the string representation @@ -33551,22 +36501,6 @@ func (s CreatePlacementGroupInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlacementGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlacementGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) - } - if s.Strategy == nil { - invalidParams.Add(request.NewErrParamRequired("Strategy")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetDryRun sets the DryRun field's value. func (s *CreatePlacementGroupInput) SetDryRun(v bool) *CreatePlacementGroupInput { s.DryRun = &v @@ -33579,6 +36513,12 @@ func (s *CreatePlacementGroupInput) SetGroupName(v string) *CreatePlacementGroup return s } +// SetPartitionCount sets the PartitionCount field's value. +func (s *CreatePlacementGroupInput) SetPartitionCount(v int64) *CreatePlacementGroupInput { + s.PartitionCount = &v + return s +} + // SetStrategy sets the Strategy field's value. func (s *CreatePlacementGroupInput) SetStrategy(v string) *CreatePlacementGroupInput { s.Strategy = &v @@ -34331,6 +37271,9 @@ type CreateTagsInput struct { // The IDs of one or more resources, separated by spaces. // + // Constraints: Up to 1000 resource IDs. We recommend breaking up this request + // into smaller batches. + // // Resources is a required field Resources []*string `locationName:"ResourceId" type:"list" required:"true"` @@ -34845,7 +37788,7 @@ type CreateVolumeInput struct { Encrypted *bool `locationName:"encrypted" type:"boolean"` // The number of I/O operations per second (IOPS) to provision for the volume, - // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000IOPS for volumes + // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000 IOPS for volumes // in most regions. Maximum IOPS of 64,000 is guaranteed only on Nitro-based // instances (AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). // Other instance families guarantee performance up to 32,000 IOPS. For more @@ -36081,6 +39024,175 @@ func (s *CustomerGateway) SetType(v string) *CustomerGateway { return s } +type DeleteClientVpnEndpointInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN to be deleted. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteClientVpnEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClientVpnEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClientVpnEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClientVpnEndpointInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DeleteClientVpnEndpointInput) SetClientVpnEndpointId(v string) *DeleteClientVpnEndpointInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteClientVpnEndpointInput) SetDryRun(v bool) *DeleteClientVpnEndpointInput { + s.DryRun = &v + return s +} + +type DeleteClientVpnEndpointOutput struct { + _ struct{} `type:"structure"` + + // The current state of the Client VPN endpoint. + Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s DeleteClientVpnEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClientVpnEndpointOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *DeleteClientVpnEndpointOutput) SetStatus(v *ClientVpnEndpointStatus) *DeleteClientVpnEndpointOutput { + s.Status = v + return s +} + +type DeleteClientVpnRouteInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint from which the route is to be deleted. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // The IPv4 address range, in CIDR notation, of the route to be deleted. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the target subnet used by the route. + TargetVpcSubnetId *string `type:"string"` +} + +// String returns the string representation +func (s DeleteClientVpnRouteInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClientVpnRouteInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClientVpnRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClientVpnRouteInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DeleteClientVpnRouteInput) SetClientVpnEndpointId(v string) *DeleteClientVpnRouteInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *DeleteClientVpnRouteInput) SetDestinationCidrBlock(v string) *DeleteClientVpnRouteInput { + s.DestinationCidrBlock = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteClientVpnRouteInput) SetDryRun(v bool) *DeleteClientVpnRouteInput { + s.DryRun = &v + return s +} + +// SetTargetVpcSubnetId sets the TargetVpcSubnetId field's value. +func (s *DeleteClientVpnRouteInput) SetTargetVpcSubnetId(v string) *DeleteClientVpnRouteInput { + s.TargetVpcSubnetId = &v + return s +} + +type DeleteClientVpnRouteOutput struct { + _ struct{} `type:"structure"` + + // The current state of the route. + Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s DeleteClientVpnRouteOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClientVpnRouteOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *DeleteClientVpnRouteOutput) SetStatus(v *ClientVpnRouteStatus) *DeleteClientVpnRouteOutput { + s.Status = v + return s +} + // Contains the parameters for DeleteCustomerGateway. type DeleteCustomerGatewayInput struct { _ struct{} `type:"structure"` @@ -37861,6 +40973,9 @@ type DeleteTagsInput struct { // The IDs of one or more resources, separated by spaces. // + // Constraints: Up to 1000 resource IDs. We recommend breaking up this request + // into smaller batches. + // // Resources is a required field Resources []*string `locationName:"resourceId" type:"list" required:"true"` @@ -39721,6 +42836,600 @@ func (s *DescribeClassicLinkInstancesOutput) SetNextToken(v string) *DescribeCla return s } +type DescribeClientVpnAuthorizationRulesInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. Filter names and values are case-sensitive. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnAuthorizationRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnAuthorizationRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnAuthorizationRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnAuthorizationRulesInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnAuthorizationRulesInput) SetClientVpnEndpointId(v string) *DescribeClientVpnAuthorizationRulesInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClientVpnAuthorizationRulesInput) SetDryRun(v bool) *DescribeClientVpnAuthorizationRulesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClientVpnAuthorizationRulesInput) SetFilters(v []*Filter) *DescribeClientVpnAuthorizationRulesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnAuthorizationRulesInput) SetMaxResults(v int64) *DescribeClientVpnAuthorizationRulesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnAuthorizationRulesInput) SetNextToken(v string) *DescribeClientVpnAuthorizationRulesInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnAuthorizationRulesOutput struct { + _ struct{} `type:"structure"` + + // Information about the authorization rules. + AuthorizationRules []*AuthorizationRule `locationName:"authorizationRule" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnAuthorizationRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnAuthorizationRulesOutput) GoString() string { + return s.String() +} + +// SetAuthorizationRules sets the AuthorizationRules field's value. +func (s *DescribeClientVpnAuthorizationRulesOutput) SetAuthorizationRules(v []*AuthorizationRule) *DescribeClientVpnAuthorizationRulesOutput { + s.AuthorizationRules = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnAuthorizationRulesOutput) SetNextToken(v string) *DescribeClientVpnAuthorizationRulesOutput { + s.NextToken = &v + return s +} + +type DescribeClientVpnConnectionsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. Filter names and values are case-sensitive. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnConnectionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnConnectionsInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnConnectionsInput) SetClientVpnEndpointId(v string) *DescribeClientVpnConnectionsInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClientVpnConnectionsInput) SetDryRun(v bool) *DescribeClientVpnConnectionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClientVpnConnectionsInput) SetFilters(v []*Filter) *DescribeClientVpnConnectionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnConnectionsInput) SetMaxResults(v int64) *DescribeClientVpnConnectionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnConnectionsInput) SetNextToken(v string) *DescribeClientVpnConnectionsInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnConnectionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the active and terminated client connections. + Connections []*ClientVpnConnection `locationName:"connections" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnConnectionsOutput) GoString() string { + return s.String() +} + +// SetConnections sets the Connections field's value. +func (s *DescribeClientVpnConnectionsOutput) SetConnections(v []*ClientVpnConnection) *DescribeClientVpnConnectionsOutput { + s.Connections = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnConnectionsOutput) SetNextToken(v string) *DescribeClientVpnConnectionsOutput { + s.NextToken = &v + return s +} + +type DescribeClientVpnEndpointsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + ClientVpnEndpointIds []*string `locationName:"ClientVpnEndpointId" locationNameList:"item" type:"list"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. Filter names and values are case-sensitive. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnEndpointsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointIds sets the ClientVpnEndpointIds field's value. +func (s *DescribeClientVpnEndpointsInput) SetClientVpnEndpointIds(v []*string) *DescribeClientVpnEndpointsInput { + s.ClientVpnEndpointIds = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClientVpnEndpointsInput) SetDryRun(v bool) *DescribeClientVpnEndpointsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClientVpnEndpointsInput) SetFilters(v []*Filter) *DescribeClientVpnEndpointsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnEndpointsInput) SetMaxResults(v int64) *DescribeClientVpnEndpointsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnEndpointsInput) SetNextToken(v string) *DescribeClientVpnEndpointsInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnEndpointsOutput struct { + _ struct{} `type:"structure"` + + // Information about the Client VPN endpoints. + ClientVpnEndpoints []*ClientVpnEndpoint `locationName:"clientVpnEndpoint" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnEndpointsOutput) GoString() string { + return s.String() +} + +// SetClientVpnEndpoints sets the ClientVpnEndpoints field's value. +func (s *DescribeClientVpnEndpointsOutput) SetClientVpnEndpoints(v []*ClientVpnEndpoint) *DescribeClientVpnEndpointsOutput { + s.ClientVpnEndpoints = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnEndpointsOutput) SetNextToken(v string) *DescribeClientVpnEndpointsOutput { + s.NextToken = &v + return s +} + +type DescribeClientVpnRoutesInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. Filter names and values are case-sensitive. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnRoutesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnRoutesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnRoutesInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnRoutesInput) SetClientVpnEndpointId(v string) *DescribeClientVpnRoutesInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClientVpnRoutesInput) SetDryRun(v bool) *DescribeClientVpnRoutesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClientVpnRoutesInput) SetFilters(v []*Filter) *DescribeClientVpnRoutesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnRoutesInput) SetMaxResults(v int64) *DescribeClientVpnRoutesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnRoutesInput) SetNextToken(v string) *DescribeClientVpnRoutesInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnRoutesOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Information about the Client VPN endpoint routes. + Routes []*ClientVpnRoute `locationName:"routes" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeClientVpnRoutesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnRoutesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnRoutesOutput) SetNextToken(v string) *DescribeClientVpnRoutesOutput { + s.NextToken = &v + return s +} + +// SetRoutes sets the Routes field's value. +func (s *DescribeClientVpnRoutesOutput) SetRoutes(v []*ClientVpnRoute) *DescribeClientVpnRoutesOutput { + s.Routes = v + return s +} + +type DescribeClientVpnTargetNetworksInput struct { + _ struct{} `type:"structure"` + + // The IDs of the target network associations. + AssociationIds []*string `locationNameList:"item" type:"list"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. Filter names and values are case-sensitive. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnTargetNetworksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnTargetNetworksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnTargetNetworksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnTargetNetworksInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationIds sets the AssociationIds field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetAssociationIds(v []*string) *DescribeClientVpnTargetNetworksInput { + s.AssociationIds = v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetClientVpnEndpointId(v string) *DescribeClientVpnTargetNetworksInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetDryRun(v bool) *DescribeClientVpnTargetNetworksInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetFilters(v []*Filter) *DescribeClientVpnTargetNetworksInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetMaxResults(v int64) *DescribeClientVpnTargetNetworksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetNextToken(v string) *DescribeClientVpnTargetNetworksInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnTargetNetworksOutput struct { + _ struct{} `type:"structure"` + + // Information about the associated target networks. + ClientVpnTargetNetworks []*TargetNetwork `locationName:"clientVpnTargetNetworks" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnTargetNetworksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnTargetNetworksOutput) GoString() string { + return s.String() +} + +// SetClientVpnTargetNetworks sets the ClientVpnTargetNetworks field's value. +func (s *DescribeClientVpnTargetNetworksOutput) SetClientVpnTargetNetworks(v []*TargetNetwork) *DescribeClientVpnTargetNetworksOutput { + s.ClientVpnTargetNetworks = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnTargetNetworksOutput) SetNextToken(v string) *DescribeClientVpnTargetNetworksOutput { + s.NextToken = &v + return s +} + // Contains the parameters for DescribeConversionTasks. type DescribeConversionTasksInput struct { _ struct{} `type:"structure"` @@ -42811,6 +46520,9 @@ type DescribeInstancesInput struct { // // * placement-group-name - The name of the placement group for the instance. // + // * placement-partition-number - The partition in which the instance is + // located. + // // * platform - The platform. Use windows if you have Windows instances; // otherwise, leave blank. // @@ -44178,7 +47890,7 @@ type DescribePlacementGroupsInput struct { // * state - The state of the placement group (pending | available | deleting // | deleted). // - // * strategy - The strategy of the placement group (cluster | spread). + // * strategy - The strategy of the placement group (cluster | spread | partition). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // One or more placement group names. @@ -46268,18 +49980,14 @@ type DescribeSpotFleetInstancesOutput struct { // The running instances. This list is refreshed periodically and might be out // of date. - // - // ActiveInstances is a required field - ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list" required:"true"` + ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` // The token required to retrieve the next set of results. This value is null // when there are no more results to return. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation @@ -46409,31 +50117,23 @@ type DescribeSpotFleetRequestHistoryOutput struct { _ struct{} `type:"structure"` // Information about the events in the history of the Spot Fleet request. - // - // HistoryRecords is a required field - HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list" required:"true"` + HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list"` // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). // All records up to this time were retrieved. // // If nextToken indicates that there are more results, this value is not present. - // - // LastEvaluatedTime is a required field - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" required:"true"` + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` // The token required to retrieve the next set of results. This value is null // when there are no more results to return. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation @@ -46541,9 +50241,7 @@ type DescribeSpotFleetRequestsOutput struct { NextToken *string `locationName:"nextToken" type:"string"` // Information about the configuration of your Spot Fleet. - // - // SpotFleetRequestConfigs is a required field - SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list" required:"true"` + SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -46686,6 +50384,15 @@ type DescribeSpotInstanceRequestsInput struct { // * valid-until - The end date of the request. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The maximum number of results to return in a single call. Specify a value + // between 5 and 1000. To retrieve the remaining results, make another call + // with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token to request the next set of results. This value is null when there + // are no more results to return. + NextToken *string `type:"string"` + // One or more Spot Instance request IDs. SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"` } @@ -46712,6 +50419,18 @@ func (s *DescribeSpotInstanceRequestsInput) SetFilters(v []*Filter) *DescribeSpo return s } +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSpotInstanceRequestsInput) SetMaxResults(v int64) *DescribeSpotInstanceRequestsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotInstanceRequestsInput) SetNextToken(v string) *DescribeSpotInstanceRequestsInput { + s.NextToken = &v + return s +} + // SetSpotInstanceRequestIds sets the SpotInstanceRequestIds field's value. func (s *DescribeSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*string) *DescribeSpotInstanceRequestsInput { s.SpotInstanceRequestIds = v @@ -46722,6 +50441,10 @@ func (s *DescribeSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*strin type DescribeSpotInstanceRequestsOutput struct { _ struct{} `type:"structure"` + // The token to use to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + // One or more Spot Instance requests. SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` } @@ -46736,6 +50459,12 @@ func (s DescribeSpotInstanceRequestsOutput) GoString() string { return s.String() } +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotInstanceRequestsOutput) SetNextToken(v string) *DescribeSpotInstanceRequestsOutput { + s.NextToken = &v + return s +} + // SetSpotInstanceRequests sets the SpotInstanceRequests field's value. func (s *DescribeSpotInstanceRequestsOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *DescribeSpotInstanceRequestsOutput { s.SpotInstanceRequests = v @@ -47234,16 +50963,16 @@ type DescribeTransitGatewayAttachmentsInput struct { // One or more filters. The possible values are: // - // * association-id - The ID of the association. + // * association.transit-gateway-route-table-id - The ID of the route table + // for the transit gateway. // - // * association-route-table-id - The ID of the route table for the transit - // gateway. - // - // * associate-state - The state of the association (associating | associated + // * association.state - The state of the association (associating | associated // | disassociating). // // * resource-id - The ID of the resource. // + // * resource-owner - The ID of the AWS account that owns the resource. + // // * resource-type - The resource type (vpc | vpn). // // * state - The state of the attachment (pendingAcceptance | pending | available @@ -47371,13 +51100,13 @@ type DescribeTransitGatewayRouteTablesInput struct { // * default-propagation-route-table - Indicates whether this is the default // propagation route table for the transit gateway (true | false). // + // * state - The state of the attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). + // // * transit-gateway-id - The ID of the transit gateway. // // * transit-gateway-route-table-id - The ID of the transit gateway route // table. - // - // * transit-gateway-route-table-state - The state (pending | available | - // deleting | deleted). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` // The maximum number of results to return with a single call. To retrieve the @@ -47488,10 +51217,10 @@ type DescribeTransitGatewayVpcAttachmentsInput struct { // One or more filters. The possible values are: // - // * transit-gateway-attachment-id - The ID of the attachment. + // * state - The state of the attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). // - // * transit-gateway-attachment-state - The state of the attachment (pendingAcceptance - // | pending | available | modifying | deleting | deleted | failed | rejected). + // * transit-gateway-attachment-id - The ID of the attachment. // // * transit-gateway-id - The ID of the transit gateway. // @@ -47606,24 +51335,37 @@ type DescribeTransitGatewaysInput struct { // One or more filters. The possible values are: // - // * amazon-side-asn - The private ASN for the Amazon side of a BGP session. + // * owner-id - The ID of the AWS account that owns the transit gateway. // - // * association-default-route-table-id - The ID of the default association + // * options.propagation-default-route-table-id - The ID of the default propagation // route table. // - // * default-route-table-association - Indicates whether resource attachments - // are automatically associated with the default association route table - // (enable | disable). + // * options.amazon-side-asn - The private ASN for the Amazon side of a BGP + // session. // - // * default-route-table-propagation - Indicates whether resource attachments - // automatically propagate routes to the default propagation route table - // (enable | disable). - // - // * owner-account-id - The ID of the AWS account that owns the transit gateway. - // - // * propagation-default-route-table-id - The ID of the default propagation + // * options.association-default-route-table-id - The ID of the default association // route table. // + // * options.auto-accept-shared-attachments - Indicates whether there is + // automatic acceptance of attachment requests (enable | disable). + // + // * options.default-route-table-association - Indicates whether resource + // attachments are automatically associated with the default association + // route table (enable | disable). + // + // * options.default-route-table-propagation - Indicates whether resource + // attachments automatically propagate routes to the default propagation + // route table (enable | disable). + // + // * options.dns-support - Indicates whether DNS support is enabled (enable + // | disable). + // + // * options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol + // support is enabled (enable | disable). + // + // * state - The state of the attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). + // // * transit-gateway-id - The ID of the transit gateway. // // * transit-gateway-state - The state of the transit gateway (pending | @@ -50070,6 +53812,54 @@ func (s *DhcpOptions) SetTags(v []*Tag) *DhcpOptions { return s } +// Describes an Active Directory. +type DirectoryServiceAuthentication struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory used for authentication. + DirectoryId *string `locationName:"directoryId" type:"string"` +} + +// String returns the string representation +func (s DirectoryServiceAuthentication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DirectoryServiceAuthentication) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DirectoryServiceAuthentication) SetDirectoryId(v string) *DirectoryServiceAuthentication { + s.DirectoryId = &v + return s +} + +// Describes the Active Directory to be used for client authentication. +type DirectoryServiceAuthenticationRequest struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory to be used for authentication. + DirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s DirectoryServiceAuthenticationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DirectoryServiceAuthenticationRequest) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DirectoryServiceAuthenticationRequest) SetDirectoryId(v string) *DirectoryServiceAuthenticationRequest { + s.DirectoryId = &v + return s +} + type DisableTransitGatewayRouteTablePropagationInput struct { _ struct{} `type:"structure"` @@ -50401,6 +54191,102 @@ func (s DisassociateAddressOutput) GoString() string { return s.String() } +type DisassociateClientVpnTargetNetworkInput struct { + _ struct{} `type:"structure"` + + // The ID of the target network association. + // + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` + + // The ID of the Client VPN endpoint from which to disassociate the target network. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DisassociateClientVpnTargetNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateClientVpnTargetNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateClientVpnTargetNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateClientVpnTargetNetworkInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateClientVpnTargetNetworkInput) SetAssociationId(v string) *DisassociateClientVpnTargetNetworkInput { + s.AssociationId = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DisassociateClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *DisassociateClientVpnTargetNetworkInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DisassociateClientVpnTargetNetworkInput) SetDryRun(v bool) *DisassociateClientVpnTargetNetworkInput { + s.DryRun = &v + return s +} + +type DisassociateClientVpnTargetNetworkOutput struct { + _ struct{} `type:"structure"` + + // The ID of the target network association. + AssociationId *string `locationName:"associationId" type:"string"` + + // The current state of the target network association. + Status *AssociationStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s DisassociateClientVpnTargetNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateClientVpnTargetNetworkOutput) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateClientVpnTargetNetworkOutput) SetAssociationId(v string) *DisassociateClientVpnTargetNetworkOutput { + s.AssociationId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DisassociateClientVpnTargetNetworkOutput) SetStatus(v *AssociationStatus) *DisassociateClientVpnTargetNetworkOutput { + s.Status = v + return s +} + type DisassociateIamInstanceProfileInput struct { _ struct{} `type:"structure"` @@ -51023,6 +54909,42 @@ func (s *DnsEntry) SetHostedZoneId(v string) *DnsEntry { return s } +// Information about the DNS server to be used. +type DnsServersOptionsModifyStructure struct { + _ struct{} `type:"structure"` + + // The IPv4 address range, in CIDR notation, of the DNS servers to be used. + // You can specify up to two DNS servers. Ensure that the DNS servers can be + // reached by the clients. The specified values overwrite the existing values. + CustomDnsServers []*string `locationNameList:"item" type:"list"` + + // Indicates whether DNS servers should be used. Specify False to delete the + // existing DNS servers. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s DnsServersOptionsModifyStructure) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DnsServersOptionsModifyStructure) GoString() string { + return s.String() +} + +// SetCustomDnsServers sets the CustomDnsServers field's value. +func (s *DnsServersOptionsModifyStructure) SetCustomDnsServers(v []*string) *DnsServersOptionsModifyStructure { + s.CustomDnsServers = v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *DnsServersOptionsModifyStructure) SetEnabled(v bool) *DnsServersOptionsModifyStructure { + s.Enabled = &v + return s +} + // Describes a block device for an EBS volume. type EbsBlockDevice struct { _ struct{} `type:"structure"` @@ -51049,8 +54971,8 @@ type EbsBlockDevice struct { // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraints: Range is 100-10,000 IOPS for gp2 volumes and 100 to 64,000IOPS - // for io1 volumes in most regions. Maximum io1IOPS of 64,000 is guaranteed + // Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS + // for io1 volumes in most Regions. Maximum io1IOPS of 64,000 is guaranteed // only on Nitro-based instances (AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). // Other instance families guarantee performance up to 32,000 IOPS. For more // information, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) @@ -52001,6 +55923,161 @@ func (s *EventInformation) SetInstanceId(v string) *EventInformation { return s } +type ExportClientVpnClientCertificateRevocationListInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s ExportClientVpnClientCertificateRevocationListInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportClientVpnClientCertificateRevocationListInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportClientVpnClientCertificateRevocationListInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportClientVpnClientCertificateRevocationListInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ExportClientVpnClientCertificateRevocationListInput) SetClientVpnEndpointId(v string) *ExportClientVpnClientCertificateRevocationListInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ExportClientVpnClientCertificateRevocationListInput) SetDryRun(v bool) *ExportClientVpnClientCertificateRevocationListInput { + s.DryRun = &v + return s +} + +type ExportClientVpnClientCertificateRevocationListOutput struct { + _ struct{} `type:"structure"` + + // Information about the client certificate revocation list. + CertificateRevocationList *string `locationName:"certificateRevocationList" type:"string"` + + // The current state of the client certificate revocation list. + Status *ClientCertificateRevocationListStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s ExportClientVpnClientCertificateRevocationListOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportClientVpnClientCertificateRevocationListOutput) GoString() string { + return s.String() +} + +// SetCertificateRevocationList sets the CertificateRevocationList field's value. +func (s *ExportClientVpnClientCertificateRevocationListOutput) SetCertificateRevocationList(v string) *ExportClientVpnClientCertificateRevocationListOutput { + s.CertificateRevocationList = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ExportClientVpnClientCertificateRevocationListOutput) SetStatus(v *ClientCertificateRevocationListStatus) *ExportClientVpnClientCertificateRevocationListOutput { + s.Status = v + return s +} + +type ExportClientVpnClientConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s ExportClientVpnClientConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportClientVpnClientConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportClientVpnClientConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportClientVpnClientConfigurationInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ExportClientVpnClientConfigurationInput) SetClientVpnEndpointId(v string) *ExportClientVpnClientConfigurationInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ExportClientVpnClientConfigurationInput) SetDryRun(v bool) *ExportClientVpnClientConfigurationInput { + s.DryRun = &v + return s +} + +type ExportClientVpnClientConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The contents of the Client VPN endpoint configuration file. + ClientConfiguration *string `locationName:"clientConfiguration" type:"string"` +} + +// String returns the string representation +func (s ExportClientVpnClientConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportClientVpnClientConfigurationOutput) GoString() string { + return s.String() +} + +// SetClientConfiguration sets the ClientConfiguration field's value. +func (s *ExportClientVpnClientConfigurationOutput) SetClientConfiguration(v string) *ExportClientVpnClientConfigurationOutput { + s.ClientConfiguration = &v + return s +} + // Describes an instance export task. type ExportTask struct { _ struct{} `type:"structure"` @@ -54053,8 +58130,6 @@ type GetTransitGatewayRouteTableAssociationsInput struct { // One or more filters. The possible values are: // - // * association-id - The ID of the association. - // // * resource-id - The ID of the resource. // // * resource-type - The resource type (vpc | vpn). @@ -54381,9 +58456,7 @@ type HistoryRecord struct { _ struct{} `type:"structure"` // Information about the event. - // - // EventInformation is a required field - EventInformation *EventInformation `locationName:"eventInformation" type:"structure" required:"true"` + EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` // The event type. // @@ -54395,14 +58468,10 @@ type HistoryRecord struct { // * instanceChange - An instance was launched or terminated. // // * Information - An informational event. - // - // EventType is a required field - EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"` + EventType *string `locationName:"eventType" type:"string" enum:"EventType"` // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // - // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation @@ -55414,6 +59483,96 @@ func (s *ImageDiskContainer) SetUserBucket(v *UserBucket) *ImageDiskContainer { return s } +type ImportClientVpnClientCertificateRevocationListInput struct { + _ struct{} `type:"structure"` + + // The client certificate revocation list file. For more information, see Generate + // a Client Certificate Revocation List (vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate) + // in the AWS Client VPN Admin Guide. + // + // CertificateRevocationList is a required field + CertificateRevocationList *string `type:"string" required:"true"` + + // The ID of the Client VPN endpoint to which the client certificate revocation + // list applies. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s ImportClientVpnClientCertificateRevocationListInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportClientVpnClientCertificateRevocationListInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportClientVpnClientCertificateRevocationListInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportClientVpnClientCertificateRevocationListInput"} + if s.CertificateRevocationList == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateRevocationList")) + } + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateRevocationList sets the CertificateRevocationList field's value. +func (s *ImportClientVpnClientCertificateRevocationListInput) SetCertificateRevocationList(v string) *ImportClientVpnClientCertificateRevocationListInput { + s.CertificateRevocationList = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ImportClientVpnClientCertificateRevocationListInput) SetClientVpnEndpointId(v string) *ImportClientVpnClientCertificateRevocationListInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ImportClientVpnClientCertificateRevocationListInput) SetDryRun(v bool) *ImportClientVpnClientCertificateRevocationListInput { + s.DryRun = &v + return s +} + +type ImportClientVpnClientCertificateRevocationListOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ImportClientVpnClientCertificateRevocationListOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportClientVpnClientCertificateRevocationListOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ImportClientVpnClientCertificateRevocationListOutput) SetReturn(v bool) *ImportClientVpnClientCertificateRevocationListOutput { + s.Return = &v + return s +} + // Contains the parameters for ImportImage. type ImportImageInput struct { _ struct{} `type:"structure"` @@ -60853,6 +65012,128 @@ func (s *ModifyCapacityReservationOutput) SetReturn(v bool) *ModifyCapacityReser return s } +type ModifyClientVpnEndpointInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint to modify. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Information about the client connection logging options. + // + // If you enable client connection logging, data about client connections is + // sent to a Cloudwatch Logs log stream. The following information is logged: + // + // * Client connection requests + // + // * Client connection results (successful and unsuccessful) + // + // * Reasons for unsuccessful client connection requests + // + // * Client connection termination time + ConnectionLogOptions *ConnectionLogOptions `type:"structure"` + + // A brief description of the Client VPN endpoint. + Description *string `type:"string"` + + // Information about the DNS servers to be used by Client VPN connections. A + // Client VPN endpoint can have up to two DNS servers. + DnsServers *DnsServersOptionsModifyStructure `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ARN of the server certificate to be used. The server certificate must + // be provisioned in AWS Certificate Manager (ACM). + ServerCertificateArn *string `type:"string"` +} + +// String returns the string representation +func (s ModifyClientVpnEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClientVpnEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClientVpnEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClientVpnEndpointInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ModifyClientVpnEndpointInput) SetClientVpnEndpointId(v string) *ModifyClientVpnEndpointInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetConnectionLogOptions sets the ConnectionLogOptions field's value. +func (s *ModifyClientVpnEndpointInput) SetConnectionLogOptions(v *ConnectionLogOptions) *ModifyClientVpnEndpointInput { + s.ConnectionLogOptions = v + return s +} + +// SetDescription sets the Description field's value. +func (s *ModifyClientVpnEndpointInput) SetDescription(v string) *ModifyClientVpnEndpointInput { + s.Description = &v + return s +} + +// SetDnsServers sets the DnsServers field's value. +func (s *ModifyClientVpnEndpointInput) SetDnsServers(v *DnsServersOptionsModifyStructure) *ModifyClientVpnEndpointInput { + s.DnsServers = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyClientVpnEndpointInput) SetDryRun(v bool) *ModifyClientVpnEndpointInput { + s.DryRun = &v + return s +} + +// SetServerCertificateArn sets the ServerCertificateArn field's value. +func (s *ModifyClientVpnEndpointInput) SetServerCertificateArn(v string) *ModifyClientVpnEndpointInput { + s.ServerCertificateArn = &v + return s +} + +type ModifyClientVpnEndpointOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ModifyClientVpnEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClientVpnEndpointOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ModifyClientVpnEndpointOutput) SetReturn(v bool) *ModifyClientVpnEndpointOutput { + s.Return = &v + return s +} + type ModifyFleetInput struct { _ struct{} `type:"structure"` @@ -61918,7 +66199,8 @@ type ModifyInstancePlacementInput struct { // The name of the placement group in which to place the instance. For spread // placement groups, the instance must have a tenancy of default. For cluster - // placement groups, the instance must have a tenancy of default or dedicated. + // and partition placement groups, the instance must have a tenancy of default + // or dedicated. // // To remove an instance from a placement group, specify an empty string (""). GroupName *string `type:"string"` @@ -61931,6 +66213,9 @@ type ModifyInstancePlacementInput struct { // InstanceId is a required field InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // Reserved for future use. + PartitionNumber *int64 `type:"integer"` + // The tenancy for the instance. Tenancy *string `locationName:"tenancy" type:"string" enum:"HostTenancy"` } @@ -61982,6 +66267,12 @@ func (s *ModifyInstancePlacementInput) SetInstanceId(v string) *ModifyInstancePl return s } +// SetPartitionNumber sets the PartitionNumber field's value. +func (s *ModifyInstancePlacementInput) SetPartitionNumber(v int64) *ModifyInstancePlacementInput { + s.PartitionNumber = &v + return s +} + // SetTenancy sets the Tenancy field's value. func (s *ModifyInstancePlacementInput) SetTenancy(v string) *ModifyInstancePlacementInput { s.Tenancy = &v @@ -64840,6 +69131,10 @@ type OnDemandOptions struct { // minimum target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` + // Indicates that the fleet launches all On-Demand Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` + // Indicates that the fleet uses a single instance type to launch all On-Demand // Instances in the fleet. SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` @@ -64867,6 +69162,12 @@ func (s *OnDemandOptions) SetMinTargetCapacity(v int64) *OnDemandOptions { return s } +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *OnDemandOptions) SetSingleAvailabilityZone(v bool) *OnDemandOptions { + s.SingleAvailabilityZone = &v + return s +} + // SetSingleInstanceType sets the SingleInstanceType field's value. func (s *OnDemandOptions) SetSingleInstanceType(v bool) *OnDemandOptions { s.SingleInstanceType = &v @@ -64889,6 +69190,10 @@ type OnDemandOptionsRequest struct { // minimum target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `type:"integer"` + // Indicates that the fleet launches all On-Demand Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `type:"boolean"` + // Indicates that the fleet uses a single instance type to launch all On-Demand // Instances in the fleet. SingleInstanceType *bool `type:"boolean"` @@ -64916,6 +69221,12 @@ func (s *OnDemandOptionsRequest) SetMinTargetCapacity(v int64) *OnDemandOptionsR return s } +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *OnDemandOptionsRequest) SetSingleAvailabilityZone(v bool) *OnDemandOptionsRequest { + s.SingleAvailabilityZone = &v + return s +} + // SetSingleInstanceType sets the SingleInstanceType field's value. func (s *OnDemandOptionsRequest) SetSingleInstanceType(v bool) *OnDemandOptionsRequest { s.SingleInstanceType = &v @@ -65082,6 +69393,10 @@ type Placement struct { // is not supported for the ImportInstance command. HostId *string `locationName:"hostId" type:"string"` + // The number of the partition the instance is in. Valid only if the placement + // group strategy is set to partition. + PartitionNumber *int64 `locationName:"partitionNumber" type:"integer"` + // Reserved for future use. SpreadDomain *string `locationName:"spreadDomain" type:"string"` @@ -65125,6 +69440,12 @@ func (s *Placement) SetHostId(v string) *Placement { return s } +// SetPartitionNumber sets the PartitionNumber field's value. +func (s *Placement) SetPartitionNumber(v int64) *Placement { + s.PartitionNumber = &v + return s +} + // SetSpreadDomain sets the SpreadDomain field's value. func (s *Placement) SetSpreadDomain(v string) *Placement { s.SpreadDomain = &v @@ -65144,6 +69465,9 @@ type PlacementGroup struct { // The name of the placement group. GroupName *string `locationName:"groupName" type:"string"` + // The number of partitions. Valid only if strategy is set to partition. + PartitionCount *int64 `locationName:"partitionCount" type:"integer"` + // The state of the placement group. State *string `locationName:"state" type:"string" enum:"PlacementGroupState"` @@ -65167,6 +69491,12 @@ func (s *PlacementGroup) SetGroupName(v string) *PlacementGroup { return s } +// SetPartitionCount sets the PartitionCount field's value. +func (s *PlacementGroup) SetPartitionCount(v int64) *PlacementGroup { + s.PartitionCount = &v + return s +} + // SetState sets the State field's value. func (s *PlacementGroup) SetState(v string) *PlacementGroup { s.State = &v @@ -68226,9 +72556,7 @@ type RequestSpotFleetOutput struct { _ struct{} `type:"structure"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation @@ -70239,6 +74567,112 @@ func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToCla return s } +type RevokeClientVpnIngressInput struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory group for which to revoke access. + AccessGroupId *string `type:"string"` + + // The ID of the Client VPN endpoint with which the authorization rule is associated. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Indicates whether access should be revoked for all clients. + RevokeAllGroups *bool `type:"boolean"` + + // The IPv4 address range, in CIDR notation, of the network for which access + // is being removed. + // + // TargetNetworkCidr is a required field + TargetNetworkCidr *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RevokeClientVpnIngressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeClientVpnIngressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeClientVpnIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeClientVpnIngressInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.TargetNetworkCidr == nil { + invalidParams.Add(request.NewErrParamRequired("TargetNetworkCidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessGroupId sets the AccessGroupId field's value. +func (s *RevokeClientVpnIngressInput) SetAccessGroupId(v string) *RevokeClientVpnIngressInput { + s.AccessGroupId = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *RevokeClientVpnIngressInput) SetClientVpnEndpointId(v string) *RevokeClientVpnIngressInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *RevokeClientVpnIngressInput) SetDryRun(v bool) *RevokeClientVpnIngressInput { + s.DryRun = &v + return s +} + +// SetRevokeAllGroups sets the RevokeAllGroups field's value. +func (s *RevokeClientVpnIngressInput) SetRevokeAllGroups(v bool) *RevokeClientVpnIngressInput { + s.RevokeAllGroups = &v + return s +} + +// SetTargetNetworkCidr sets the TargetNetworkCidr field's value. +func (s *RevokeClientVpnIngressInput) SetTargetNetworkCidr(v string) *RevokeClientVpnIngressInput { + s.TargetNetworkCidr = &v + return s +} + +type RevokeClientVpnIngressOutput struct { + _ struct{} `type:"structure"` + + // The current state of the authorization rule. + Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s RevokeClientVpnIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeClientVpnIngressOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *RevokeClientVpnIngressOutput) SetStatus(v *ClientVpnAuthorizationRuleStatus) *RevokeClientVpnIngressOutput { + s.Status = v + return s +} + type RevokeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -72504,8 +76938,6 @@ type SearchTransitGatewayRoutesInput struct { // // * transit-gateway-route-type - The route type (static | propagated). // - // * transit-gateway-route-vpn-connection-id - The ID of the VPN connection. - // // Filters is a required field Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list" required:"true"` @@ -73334,7 +77766,7 @@ type SnapshotDiskContainer struct { // The format of the disk image being imported. // - // Valid values: VHD | VMDK | OVA + // Valid values: VHD | VMDK Format *string `type:"string"` // The URL to the Amazon S3-based disk image being imported. It can either be @@ -73791,24 +78223,16 @@ type SpotFleetRequestConfig struct { ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"ActivityStatus"` // The creation date and time of the request. - // - // CreateTime is a required field - CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"` + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The configuration of the Spot Fleet request. - // - // SpotFleetRequestConfig is a required field - SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` + SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` // The state of the Spot Fleet request. - // - // SpotFleetRequestState is a required field - SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true" enum:"BatchState"` + SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" enum:"BatchState"` } // String returns the string representation @@ -73947,9 +78371,10 @@ type SpotFleetRequestConfigData struct { // capacity or also attempts to maintain it. When this value is request, the // Spot Fleet only places the required requests. It does not attempt to replenish // Spot Instances if capacity is diminished, nor does it submit requests in - // alternative Spot pools if capacity is not available. To maintain a certain - // target capacity, the Spot Fleet places the required requests to meet capacity - // and automatically replenishes any interrupted instances. Default: maintain. + // alternative Spot pools if capacity is not available. When this value is maintain, + // the Spot Fleet maintains the target capacity. The Spot Fleet places the required + // requests to meet capacity and automatically replenishes any interrupted instances. + // Default: maintain. instant is listed but is not used by Spot Fleet. Type *string `locationName:"type" type:"string" enum:"FleetType"` // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). @@ -74523,6 +78948,10 @@ type SpotOptions struct { // target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` + // Indicates that the fleet launches all Spot Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` + // Indicates that the fleet uses a single instance type to launch all Spot Instances // in the fleet. SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` @@ -74562,6 +78991,12 @@ func (s *SpotOptions) SetMinTargetCapacity(v int64) *SpotOptions { return s } +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *SpotOptions) SetSingleAvailabilityZone(v bool) *SpotOptions { + s.SingleAvailabilityZone = &v + return s +} + // SetSingleInstanceType sets the SingleInstanceType field's value. func (s *SpotOptions) SetSingleInstanceType(v bool) *SpotOptions { s.SingleInstanceType = &v @@ -74589,6 +79024,10 @@ type SpotOptionsRequest struct { // target capacity is not reached, the fleet launches no instances. MinTargetCapacity *int64 `type:"integer"` + // Indicates that the fleet launches all Spot Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `type:"boolean"` + // Indicates that the fleet uses a single instance type to launch all Spot Instances // in the fleet. SingleInstanceType *bool `type:"boolean"` @@ -74628,6 +79067,12 @@ func (s *SpotOptionsRequest) SetMinTargetCapacity(v int64) *SpotOptionsRequest { return s } +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *SpotOptionsRequest) SetSingleAvailabilityZone(v bool) *SpotOptionsRequest { + s.SingleAvailabilityZone = &v + return s +} + // SetSingleInstanceType sets the SingleInstanceType field's value. func (s *SpotOptionsRequest) SetSingleInstanceType(v bool) *SpotOptionsRequest { s.SingleInstanceType = &v @@ -75778,9 +80223,7 @@ type TargetGroup struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the target group. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` + Arn *string `locationName:"arn" type:"string"` } // String returns the string representation @@ -75793,19 +80236,6 @@ func (s TargetGroup) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetGroup"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetArn sets the Arn field's value. func (s *TargetGroup) SetArn(v string) *TargetGroup { s.Arn = &v @@ -75818,9 +80248,7 @@ type TargetGroupsConfig struct { _ struct{} `type:"structure"` // One or more target groups. - // - // TargetGroups is a required field - TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list" required:"true"` + TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list"` } // String returns the string representation @@ -75836,22 +80264,9 @@ func (s TargetGroupsConfig) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *TargetGroupsConfig) Validate() error { invalidParams := request.ErrInvalidParams{Context: "TargetGroupsConfig"} - if s.TargetGroups == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroups")) - } if s.TargetGroups != nil && len(s.TargetGroups) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetGroups", 1)) } - if s.TargetGroups != nil { - for i, v := range s.TargetGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGroups", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -75865,6 +80280,75 @@ func (s *TargetGroupsConfig) SetTargetGroups(v []*TargetGroup) *TargetGroupsConf return s } +// Describes a target network associated with a Client VPN endpoint. +type TargetNetwork struct { + _ struct{} `type:"structure"` + + // The ID of the association. + AssociationId *string `locationName:"associationId" type:"string"` + + // The ID of the Client VPN endpoint with which the target network is associated. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // The IDs of the security groups applied to the target network association. + SecurityGroups []*string `locationName:"securityGroups" locationNameList:"item" type:"list"` + + // The current state of the target network association. + Status *AssociationStatus `locationName:"status" type:"structure"` + + // The ID of the subnet specified as the target network. + TargetNetworkId *string `locationName:"targetNetworkId" type:"string"` + + // The ID of the VPC in which the target network (subnet) is located. + VpcId *string `locationName:"vpcId" type:"string"` +} + +// String returns the string representation +func (s TargetNetwork) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetNetwork) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *TargetNetwork) SetAssociationId(v string) *TargetNetwork { + s.AssociationId = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *TargetNetwork) SetClientVpnEndpointId(v string) *TargetNetwork { + s.ClientVpnEndpointId = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *TargetNetwork) SetSecurityGroups(v []*string) *TargetNetwork { + s.SecurityGroups = v + return s +} + +// SetStatus sets the Status field's value. +func (s *TargetNetwork) SetStatus(v *AssociationStatus) *TargetNetwork { + s.Status = v + return s +} + +// SetTargetNetworkId sets the TargetNetworkId field's value. +func (s *TargetNetwork) SetTargetNetworkId(v string) *TargetNetwork { + s.TargetNetworkId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *TargetNetwork) SetVpcId(v string) *TargetNetwork { + s.VpcId = &v + return s +} + // The total value of the new Convertible Reserved Instances. type TargetReservationValue struct { _ struct{} `type:"structure"` @@ -75901,6 +80385,159 @@ func (s *TargetReservationValue) SetTargetConfiguration(v *TargetConfiguration) return s } +type TerminateClientVpnConnectionsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint to which the client is connected. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // The ID of the client connection to be terminated. + ConnectionId *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The name of the user who initiated the connection. Use this option to terminate + // all active connections for the specified user. This option can only be used + // if the user has established up to five connections. + Username *string `type:"string"` +} + +// String returns the string representation +func (s TerminateClientVpnConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateClientVpnConnectionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateClientVpnConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateClientVpnConnectionsInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *TerminateClientVpnConnectionsInput) SetClientVpnEndpointId(v string) *TerminateClientVpnConnectionsInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *TerminateClientVpnConnectionsInput) SetConnectionId(v string) *TerminateClientVpnConnectionsInput { + s.ConnectionId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *TerminateClientVpnConnectionsInput) SetDryRun(v bool) *TerminateClientVpnConnectionsInput { + s.DryRun = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *TerminateClientVpnConnectionsInput) SetUsername(v string) *TerminateClientVpnConnectionsInput { + s.Username = &v + return s +} + +type TerminateClientVpnConnectionsOutput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // The current state of the client connections. + ConnectionStatuses []*TerminateConnectionStatus `locationName:"connectionStatuses" locationNameList:"item" type:"list"` + + // The user who established the terminated client connections. + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s TerminateClientVpnConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateClientVpnConnectionsOutput) GoString() string { + return s.String() +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *TerminateClientVpnConnectionsOutput) SetClientVpnEndpointId(v string) *TerminateClientVpnConnectionsOutput { + s.ClientVpnEndpointId = &v + return s +} + +// SetConnectionStatuses sets the ConnectionStatuses field's value. +func (s *TerminateClientVpnConnectionsOutput) SetConnectionStatuses(v []*TerminateConnectionStatus) *TerminateClientVpnConnectionsOutput { + s.ConnectionStatuses = v + return s +} + +// SetUsername sets the Username field's value. +func (s *TerminateClientVpnConnectionsOutput) SetUsername(v string) *TerminateClientVpnConnectionsOutput { + s.Username = &v + return s +} + +// Information about a terminated Client VPN endpoint client connection. +type TerminateConnectionStatus struct { + _ struct{} `type:"structure"` + + // The ID of the client connection. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // A message about the status of the client connection, if applicable. + CurrentStatus *ClientVpnConnectionStatus `locationName:"currentStatus" type:"structure"` + + // The state of the client connection. + PreviousStatus *ClientVpnConnectionStatus `locationName:"previousStatus" type:"structure"` +} + +// String returns the string representation +func (s TerminateConnectionStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateConnectionStatus) GoString() string { + return s.String() +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *TerminateConnectionStatus) SetConnectionId(v string) *TerminateConnectionStatus { + s.ConnectionId = &v + return s +} + +// SetCurrentStatus sets the CurrentStatus field's value. +func (s *TerminateConnectionStatus) SetCurrentStatus(v *ClientVpnConnectionStatus) *TerminateConnectionStatus { + s.CurrentStatus = v + return s +} + +// SetPreviousStatus sets the PreviousStatus field's value. +func (s *TerminateConnectionStatus) SetPreviousStatus(v *ClientVpnConnectionStatus) *TerminateConnectionStatus { + s.PreviousStatus = v + return s +} + type TerminateInstancesInput struct { _ struct{} `type:"structure"` @@ -77224,9 +81861,7 @@ type UnsuccessfulItem struct { _ struct{} `type:"structure"` // Information about the error. - // - // Error is a required field - Error *UnsuccessfulItemError `locationName:"error" type:"structure" required:"true"` + Error *UnsuccessfulItemError `locationName:"error" type:"structure"` // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` @@ -77260,14 +81895,10 @@ type UnsuccessfulItemError struct { _ struct{} `type:"structure"` // The error code. - // - // Code is a required field - Code *string `locationName:"code" type:"string" required:"true"` + Code *string `locationName:"code" type:"string"` // The error message accompanying the error code. - // - // Message is a required field - Message *string `locationName:"message" type:"string" required:"true"` + Message *string `locationName:"message" type:"string"` } // String returns the string representation @@ -77752,7 +82383,7 @@ type Volume struct { // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraints: Range is 100-10,000 IOPS for gp2 volumes and 100 to 64,000IOPS + // Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS // for io1 volumes in most regions. Maximum io1IOPS of 64,000 is guaranteed // only on Nitro-based instances (AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). // Other instance families guarantee performance up to 32,000 IOPS. For more @@ -79568,6 +84199,28 @@ const ( ArchitectureValuesArm64 = "arm64" ) +const ( + // AssociatedNetworkTypeVpc is a AssociatedNetworkType enum value + AssociatedNetworkTypeVpc = "vpc" +) + +const ( + // AssociationStatusCodeAssociating is a AssociationStatusCode enum value + AssociationStatusCodeAssociating = "associating" + + // AssociationStatusCodeAssociated is a AssociationStatusCode enum value + AssociationStatusCodeAssociated = "associated" + + // AssociationStatusCodeAssociationFailed is a AssociationStatusCode enum value + AssociationStatusCodeAssociationFailed = "association-failed" + + // AssociationStatusCodeDisassociating is a AssociationStatusCode enum value + AssociationStatusCodeDisassociating = "disassociating" + + // AssociationStatusCodeDisassociated is a AssociationStatusCode enum value + AssociationStatusCodeDisassociated = "disassociated" +) + const ( // AttachmentStatusAttaching is a AttachmentStatus enum value AttachmentStatusAttaching = "attaching" @@ -79771,6 +84424,78 @@ const ( CapacityReservationTenancyDedicated = "dedicated" ) +const ( + // ClientCertificateRevocationListStatusCodePending is a ClientCertificateRevocationListStatusCode enum value + ClientCertificateRevocationListStatusCodePending = "pending" + + // ClientCertificateRevocationListStatusCodeActive is a ClientCertificateRevocationListStatusCode enum value + ClientCertificateRevocationListStatusCodeActive = "active" +) + +const ( + // ClientVpnAuthenticationTypeCertificateAuthentication is a ClientVpnAuthenticationType enum value + ClientVpnAuthenticationTypeCertificateAuthentication = "certificate-authentication" + + // ClientVpnAuthenticationTypeDirectoryServiceAuthentication is a ClientVpnAuthenticationType enum value + ClientVpnAuthenticationTypeDirectoryServiceAuthentication = "directory-service-authentication" +) + +const ( + // ClientVpnAuthorizationRuleStatusCodeAuthorizing is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeAuthorizing = "authorizing" + + // ClientVpnAuthorizationRuleStatusCodeActive is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeActive = "active" + + // ClientVpnAuthorizationRuleStatusCodeFailed is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeFailed = "failed" + + // ClientVpnAuthorizationRuleStatusCodeRevoking is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeRevoking = "revoking" +) + +const ( + // ClientVpnConnectionStatusCodeActive is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeActive = "active" + + // ClientVpnConnectionStatusCodeFailedToTerminate is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeFailedToTerminate = "failed-to-terminate" + + // ClientVpnConnectionStatusCodeTerminating is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeTerminating = "terminating" + + // ClientVpnConnectionStatusCodeTerminated is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeTerminated = "terminated" +) + +const ( + // ClientVpnEndpointStatusCodePendingAssociate is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodePendingAssociate = "pending-associate" + + // ClientVpnEndpointStatusCodeAvailable is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodeAvailable = "available" + + // ClientVpnEndpointStatusCodeDeleting is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodeDeleting = "deleting" + + // ClientVpnEndpointStatusCodeDeleted is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodeDeleted = "deleted" +) + +const ( + // ClientVpnRouteStatusCodeCreating is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeCreating = "creating" + + // ClientVpnRouteStatusCodeActive is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeActive = "active" + + // ClientVpnRouteStatusCodeFailed is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeFailed = "failed" + + // ClientVpnRouteStatusCodeDeleting is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeDeleting = "deleting" +) + const ( // ConnectionNotificationStateEnabled is a ConnectionNotificationState enum value ConnectionNotificationStateEnabled = "Enabled" @@ -80429,15 +85154,9 @@ const ( // InstanceTypeR54xlarge is a InstanceType enum value InstanceTypeR54xlarge = "r5.4xlarge" - // InstanceTypeR58xlarge is a InstanceType enum value - InstanceTypeR58xlarge = "r5.8xlarge" - // InstanceTypeR512xlarge is a InstanceType enum value InstanceTypeR512xlarge = "r5.12xlarge" - // InstanceTypeR516xlarge is a InstanceType enum value - InstanceTypeR516xlarge = "r5.16xlarge" - // InstanceTypeR524xlarge is a InstanceType enum value InstanceTypeR524xlarge = "r5.24xlarge" @@ -80474,15 +85193,9 @@ const ( // InstanceTypeR5d4xlarge is a InstanceType enum value InstanceTypeR5d4xlarge = "r5d.4xlarge" - // InstanceTypeR5d8xlarge is a InstanceType enum value - InstanceTypeR5d8xlarge = "r5d.8xlarge" - // InstanceTypeR5d12xlarge is a InstanceType enum value InstanceTypeR5d12xlarge = "r5d.12xlarge" - // InstanceTypeR5d16xlarge is a InstanceType enum value - InstanceTypeR5d16xlarge = "r5d.16xlarge" - // InstanceTypeR5d24xlarge is a InstanceType enum value InstanceTypeR5d24xlarge = "r5d.24xlarge" @@ -81069,6 +85782,9 @@ const ( // PlacementStrategySpread is a PlacementStrategy enum value PlacementStrategySpread = "spread" + + // PlacementStrategyPartition is a PlacementStrategy enum value + PlacementStrategyPartition = "partition" ) const ( @@ -81662,6 +86378,14 @@ const ( TransitGatewayStateDeleted = "deleted" ) +const ( + // TransportProtocolTcp is a TransportProtocol enum value + TransportProtocolTcp = "tcp" + + // TransportProtocolUdp is a TransportProtocol enum value + TransportProtocolUdp = "udp" +) + const ( // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed = "InvalidInstanceID.Malformed" @@ -81865,6 +86589,11 @@ const ( VpnEcmpSupportValueDisable = "disable" ) +const ( + // VpnProtocolOpenvpn is a VpnProtocol enum value + VpnProtocolOpenvpn = "openvpn" +) + const ( // VpnStatePending is a VpnState enum value VpnStatePending = "pending" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index ef61f6e8e..e3284308c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" @@ -456,6 +458,15 @@ func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *reques // The specified parameter is invalid. Review the available parameters for the // API request. // +// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" +// An invalid parameter has been specified. Tag keys can have a maximum character +// length of 128 characters, and tag values can have a maximum length of 256 +// characters. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. +// // * ErrCodeRepositoryAlreadyExistsException "RepositoryAlreadyExistsException" // The specified repository already exists in the specified registry. // @@ -1756,6 +1767,93 @@ func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput return p.Err() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource +func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon EC2 Container Registry. +// +// List the tags for an Amazon ECR resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource +func (c *ECR) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutImage = "PutImage" // PutImageRequest generates a "aws/request.Request" representing the @@ -2131,6 +2229,201 @@ func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *Sta return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource +func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon EC2 Container Registry. +// +// Adds specified tags to a resource with the specified ARN. Existing tags on +// a resource are not changed if they are not specified in the request parameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" +// An invalid parameter has been specified. Tag keys can have a maximum character +// length of 128 characters, and tag values can have a maximum length of 256 +// characters. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource +func (c *ECR) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource +func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon EC2 Container Registry. +// +// Deletes specified tags from a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" +// An invalid parameter has been specified. Tag keys can have a maximum character +// length of 128 characters, and tag values can have a maximum length of 256 +// characters. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource +func (c *ECR) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUploadLayerPart = "UploadLayerPart" // UploadLayerPartRequest generates a "aws/request.Request" representing the @@ -2745,6 +3038,8 @@ type CreateRepositoryInput struct { // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` + + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -2779,6 +3074,12 @@ func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInp return s } +// SetTags sets the Tags field's value. +func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput { + s.Tags = v + return s +} + type CreateRepositoryOutput struct { _ struct{} `type:"structure"` @@ -3119,7 +3420,7 @@ type DescribeImagesInput struct { // results in a single page along with a nextToken response element. The remaining // results of the initial request can be seen by sending another DescribeImages // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then DescribeImages returns up to 100 + // 1000. If this parameter is not used, then DescribeImages returns up to 100 // results and a nextToken value, if applicable. This option cannot be used // when you specify images with imageIds. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` @@ -3136,8 +3437,7 @@ type DescribeImagesInput struct { // registry is assumed. RegistryId *string `locationName:"registryId" type:"string"` - // A list of repositories to describe. If this parameter is omitted, then all - // repositories in a registry are described. + // A list of repositories to describe. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` @@ -3254,7 +3554,7 @@ type DescribeRepositoriesInput struct { // returns maxResults results in a single page along with a nextToken response // element. The remaining results of the initial request can be seen by sending // another DescribeRepositories request with the returned nextToken value. This - // value can be between 1 and 100. If this parameter is not used, then DescribeRepositories + // value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories // returns up to 100 results and a nextToken value, if applicable. This option // cannot be used when you specify repositories with repositoryNames. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` @@ -3640,7 +3940,7 @@ type GetLifecyclePolicyPreviewInput struct { // only returns
 maxResults results in a single page along with a nextToken // response element. The remaining results of the initial request can be seen // by sending
 another GetLifecyclePolicyPreviewRequest request with the returned - // nextToken
 value. This value can be between 1 and 100. If this
 parameter + // nextToken
 value. This value can be between 1 and 1000. If this
 parameter // is not used, then GetLifecyclePolicyPreviewRequest returns up to
 100 results // and a nextToken value, if
 applicable. This option cannot be used when you // specify images with imageIds. @@ -4452,9 +4752,9 @@ type ListImagesInput struct { // When this parameter is used, ListImages only returns maxResults results in // a single page along with a nextToken response element. The remaining results // of the initial request can be seen by sending another ListImages request - // with the returned nextToken value. This value can be between 1 and 100. If - // this parameter is not used, then ListImages returns up to 100 results and - // a nextToken value, if applicable. + // with the returned nextToken value. This value can be between 1 and 1000. + // If this parameter is not used, then ListImages returns up to 100 results + // and a nextToken value, if applicable. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` // The nextToken value returned from a previous paginated ListImages request @@ -4571,6 +4871,68 @@ func (s *ListImagesOutput) SetNextToken(v string) *ListImagesOutput { return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that identifies the resource for which to + // list the tags. Currently, the only supported resource is an Amazon ECR repository. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The tags for the resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + type PutImageInput struct { _ struct{} `type:"structure"` @@ -5074,6 +5436,180 @@ func (s *StartLifecyclePolicyPreviewOutput) SetStatus(v string) *StartLifecycleP return s } +// The metadata that you apply to a resource to help you categorize and organize +// them. Each tag consists of a key and an optional value, both of which you +// define. Tag keys can have a maximum character length of 128 characters, and +// tag values can have a maximum length of 256 characters. +type Tag struct { + _ struct{} `type:"structure"` + + // One part of a key-value pair that make up a tag. A key is a general label + // that acts like a category for more specific tag values. + Key *string `type:"string"` + + // The optional part of a key-value pair that make up a tag. A value acts as + // a descriptor within a tag category (key). + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the the resource to which to add tags. + // Currently, the only supported resource is an Amazon ECR repository. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The tags to add to the resource. A tag is an array of key-value pairs. Tag + // keys can have a maximum character length of 128 characters, and tag values + // can have a maximum length of 256 characters. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource from which to remove tags. + // Currently, the only supported resource is an Amazon ECR repository. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The keys of the tags to be removed. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UploadLayerPartInput struct { _ struct{} `type:"structure"` @@ -5292,4 +5828,7 @@ const ( // TagStatusUntagged is a TagStatus enum value TagStatusUntagged = "UNTAGGED" + + // TagStatusAny is a TagStatus enum value + TagStatusAny = "ANY" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go index 09e0595de..834905106 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go @@ -44,6 +44,14 @@ const ( // API request. ErrCodeInvalidParameterException = "InvalidParameterException" + // ErrCodeInvalidTagParameterException for service response error code + // "InvalidTagParameterException". + // + // An invalid parameter has been specified. Tag keys can have a maximum character + // length of 128 characters, and tag values can have a maximum length of 256 + // characters. + ErrCodeInvalidTagParameterException = "InvalidTagParameterException" + // ErrCodeLayerAlreadyExistsException for service response error code // "LayerAlreadyExistsException". // @@ -131,6 +139,13 @@ const ( // These errors are usually caused by a server-side issue. ErrCodeServerException = "ServerException" + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // The list of tags on the repository is over the limit. The maximum number + // of tags that can be applied to a repository is 50. + ErrCodeTooManyTagsException = "TooManyTagsException" + // ErrCodeUploadNotFoundException for service response error code // "UploadNotFoundException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go index 7bdf21370..3eba7f696 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/service.go @@ -29,9 +29,9 @@ var initRequest func(*request.Request) // Service information constants const ( - ServiceName = "ecr" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "ECR" // ServiceID is a unique identifer of a specific service. + ServiceName = "ecr" // Name of service. + EndpointsID = "api.ecr" // ID to lookup a service endpoint with. + ServiceID = "ECR" // ServiceID is a unique identifer of a specific service. ) // New creates a new instance of the ECR client with a session. @@ -46,6 +46,9 @@ const ( // svc := ecr.New(mySession, aws.NewConfig().WithRegion("us-west-2")) func New(p client.ConfigProvider, cfgs ...*aws.Config) *ECR { c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "ecr" + } return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 52ec24bb1..23a09052c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -5784,7 +5784,7 @@ type CreateServiceInput struct { // Specifies whether to enable Amazon ECS managed tags for the tasks within // the service. For more information, see Tagging Your Amazon ECS Resources - // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Using_Tags.html) + // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) // in the Amazon Elastic Container Service Developer Guide. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` @@ -10297,7 +10297,7 @@ type RunTaskInput struct { Count *int64 `locationName:"count" type:"integer"` // Specifies whether to enable Amazon ECS managed tags for the task. For more - // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Using_Tags.html) + // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) // in the Amazon Elastic Container Service Developer Guide. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` @@ -10647,7 +10647,7 @@ type Service struct { DesiredCount *int64 `locationName:"desiredCount" type:"integer"` // Specifies whether to enable Amazon ECS managed tags for the tasks in the - // service. For more information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Using_Tags.html) + // service. For more information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) // in the Amazon Elastic Container Service Developer Guide. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` @@ -11108,7 +11108,7 @@ type StartTaskInput struct { ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` // Specifies whether to enable Amazon ECS managed tags for the task. For more - // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Using_Tags.html) + // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) // in the Amazon Elastic Container Service Developer Guide. EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index dba975892..a91da3f52 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -7707,7 +7707,7 @@ type EnvironmentDescription struct { // // * Grey: Default health for a new environment. The environment is not fully // launched and health checks have not started or health checks are suspended - // during an UpdateEnvironment or RestartEnvironement request. + // during an UpdateEnvironment or RestartEnvironment request. // // Default: Grey Health *string `type:"string" enum:"EnvironmentHealth"` @@ -7924,7 +7924,11 @@ type EnvironmentInfoDescription struct { // The type of information retrieved. InfoType *string `type:"string" enum:"EnvironmentInfoType"` - // The retrieved information. + // The retrieved information. Currently contains a presigned Amazon S3 URL. + // The files are deleted after 15 minutes. + // + // Anyone in possession of this URL can access the files before they are deleted. + // Make the URL available only to trusted parties. Message *string `type:"string"` // The time stamp when this information was retrieved. @@ -8018,6 +8022,9 @@ type EnvironmentResourceDescription struct { // The Auto Scaling launch configurations in use by this environment. LaunchConfigurations []*LaunchConfiguration `type:"list"` + // The Amazon EC2 launch templates in use by this environment. + LaunchTemplates []*LaunchTemplate `type:"list"` + // The LoadBalancers in use by this environment. LoadBalancers []*LoadBalancer `type:"list"` @@ -8062,6 +8069,12 @@ func (s *EnvironmentResourceDescription) SetLaunchConfigurations(v []*LaunchConf return s } +// SetLaunchTemplates sets the LaunchTemplates field's value. +func (s *EnvironmentResourceDescription) SetLaunchTemplates(v []*LaunchTemplate) *EnvironmentResourceDescription { + s.LaunchTemplates = v + return s +} + // SetLoadBalancers sets the LoadBalancers field's value. func (s *EnvironmentResourceDescription) SetLoadBalancers(v []*LoadBalancer) *EnvironmentResourceDescription { s.LoadBalancers = v @@ -8110,9 +8123,21 @@ type EnvironmentTier struct { _ struct{} `type:"structure"` // The name of this environment tier. + // + // Valid values: + // + // * For Web server tier – WebServer + // + // * For Worker tier – Worker Name *string `type:"string"` // The type of this environment tier. + // + // Valid values: + // + // * For Web server tier – Standard + // + // * For Worker tier – SQS/HTTP Type *string `type:"string"` // The version of this environment tier. When you don't set a value to it, Elastic @@ -8485,6 +8510,30 @@ func (s *LaunchConfiguration) SetName(v string) *LaunchConfiguration { return s } +// Describes an Amazon EC2 launch template. +type LaunchTemplate struct { + _ struct{} `type:"structure"` + + // The ID of the launch template. + Id *string `type:"string"` +} + +// String returns the string representation +func (s LaunchTemplate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplate) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *LaunchTemplate) SetId(v string) *LaunchTemplate { + s.Id = &v + return s +} + type ListAvailableSolutionStacksInput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index b2a0738e3..89d85401b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -57,7 +57,7 @@ func (c *ELBV2) AddListenerCertificatesRequest(input *AddListenerCertificatesInp // AddListenerCertificates API operation for Elastic Load Balancing. // -// Adds the specified certificate to the specified secure listener. +// Adds the specified certificate to the specified HTTPS listener. // // If the certificate was already added, the call is successful but the certificate // is not added again. @@ -1259,7 +1259,7 @@ func (c *ELBV2) DescribeListenerCertificatesRequest(input *DescribeListenerCerti // DescribeListenerCertificates API operation for Elastic Load Balancing. // -// Describes the certificates for the specified secure listener. +// Describes the certificates for the specified HTTPS listener. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2278,9 +2278,10 @@ func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request. // Modifies the specified properties of the specified listener. // // Any properties that you do not specify retain their current values. However, -// changing the protocol from HTTPS to HTTP removes the security policy and -// SSL certificate properties. If you change the protocol from HTTP to HTTPS, -// you must add the security policy and server certificate. +// changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the +// security policy and server certificate properties. If you change the protocol +// from HTTP to HTTPS, or from TCP to TLS, you must add the security policy +// and server certificate properties. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2874,7 +2875,7 @@ func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertifica // RemoveListenerCertificates API operation for Elastic Load Balancing. // -// Removes the specified certificate from the specified secure listener. +// Removes the specified certificate from the specified HTTPS listener. // // You can't remove the default certificate for a listener. To replace the default // certificate, call ModifyListener. @@ -3379,11 +3380,11 @@ func (c *ELBV2) SetSubnetsWithContext(ctx aws.Context, input *SetSubnetsInput, o type Action struct { _ struct{} `type:"structure"` - // [HTTPS listener] Information for using Amazon Cognito to authenticate users. + // [HTTPS listeners] Information for using Amazon Cognito to authenticate users. // Specify only when Type is authenticate-cognito. AuthenticateCognitoConfig *AuthenticateCognitoActionConfig `type:"structure"` - // [HTTPS listener] Information about an identity provider that is compliant + // [HTTPS listeners] Information about an identity provider that is compliant // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc. AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"` @@ -4065,9 +4066,9 @@ func (s *Cipher) SetPriority(v int64) *Cipher { type CreateListenerInput struct { _ struct{} `type:"structure"` - // [HTTPS listeners] The default SSL server certificate. You must provide exactly - // one certificate. Set CertificateArn to the certificate ARN but do not set - // IsDefault. + // [HTTPS and TLS listeners] The default SSL server certificate. You must provide + // exactly one certificate. Set CertificateArn to the certificate ARN but do + // not set IsDefault. // // To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` @@ -4076,13 +4077,13 @@ type CreateListenerInput struct { // or one or more fixed-response actions. // // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer or - // TCP for a Network Load Balancer. + // the target group must be HTTP or HTTPS for an Application Load Balancer. + // The protocol of the target group must be TCP or TLS for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate // users through the user pools supported by Amazon Cognito. // // [Application Load Balancer] If the action type is redirect, you redirect @@ -4106,13 +4107,14 @@ type CreateListenerInput struct { // The protocol for connections from clients to the load balancer. For Application // Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load - // Balancers, the supported protocol is TCP. + // Balancers, the supported protocols are TCP and TLS. // // Protocol is a required field Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"` - // [HTTPS listeners] The security policy that defines which ciphers and protocols - // are supported. The default is the current predefined security policy. + // [HTTPS and TLS listeners] The security policy that defines which ciphers + // and protocols are supported. The default is the current predefined security + // policy. SslPolicy *string `type:"string"` } @@ -4396,13 +4398,13 @@ type CreateRuleInput struct { // actions: forward, fixed-response, or redirect. // // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer or - // TCP for a Network Load Balancer. + // the target group must be HTTP or HTTPS for an Application Load Balancer. + // The protocol of the target group must be TCP or TLS for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate // users through the user pools supported by Amazon Cognito. // // [Application Load Balancer] If the action type is redirect, you redirect @@ -4575,9 +4577,10 @@ type CreateTargetGroupInput struct { HealthCheckPort *string `type:"string"` // The protocol the load balancer uses when performing health checks on targets. - // The TCP protocol is supported only if the protocol of the target group is - // TCP. For Application Load Balancers, the default is HTTP. For Network Load - // Balancers, the default is TCP. + // For Application Load Balancers, the default is HTTP. For Network Load Balancers, + // the default is TCP. The TCP protocol is supported for health checks only + // if the protocol of the target group is TCP or TLS. The TLS protocol is not + // supported for health checks. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` // The amount of time, in seconds, during which no response from a target means @@ -4613,8 +4616,8 @@ type CreateTargetGroupInput struct { // The protocol to use for routing traffic to the targets. For Application Load // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, - // the supported protocol is TCP. If the target is a Lambda function, this parameter - // does not apply. + // the supported protocols are TCP and TLS. If the target is a Lambda function, + // this parameter does not apply. Protocol *string `type:"string" enum:"ProtocolEnum"` // The type of target that you must specify when registering targets with this @@ -6119,7 +6122,7 @@ type Listener struct { _ struct{} `type:"structure"` // The SSL server certificate. You must provide a certificate if the protocol - // is HTTPS. + // is HTTPS or TLS. Certificates []*Certificate `type:"list"` // The default actions for the listener. @@ -6506,9 +6509,9 @@ func (s *Matcher) SetHttpCode(v string) *Matcher { type ModifyListenerInput struct { _ struct{} `type:"structure"` - // [HTTPS listeners] The default SSL server certificate. You must provide exactly - // one certificate. Set CertificateArn to the certificate ARN but do not set - // IsDefault. + // [HTTPS and TLS listeners] The default SSL server certificate. You must provide + // exactly one certificate. Set CertificateArn to the certificate ARN but do + // not set IsDefault. // // To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` @@ -6517,13 +6520,13 @@ type ModifyListenerInput struct { // or one or more fixed-response actions. // // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer or - // TCP for a Network Load Balancer. + // the target group must be HTTP or HTTPS for an Application Load Balancer. + // The protocol of the target group must be TCP or TLS for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate // users through the user pools supported by Amazon Cognito. // // [Application Load Balancer] If the action type is redirect, you redirect @@ -6542,12 +6545,12 @@ type ModifyListenerInput struct { Port *int64 `min:"1" type:"integer"` // The protocol for connections from clients to the load balancer. Application - // Load Balancers support HTTP and HTTPS and Network Load Balancers support - // TCP. + // Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers + // support the TCP and TLS protocols. Protocol *string `type:"string" enum:"ProtocolEnum"` - // [HTTPS listeners] The security policy that defines which protocols and ciphers - // are supported. For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) + // [HTTPS and TLS listeners] The security policy that defines which protocols + // and ciphers are supported. For more information, see Security Policies (http://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) // in the Application Load Balancers Guide. SslPolicy *string `type:"string"` } @@ -6728,13 +6731,13 @@ type ModifyRuleInput struct { // The actions. // // If the action type is forward, you specify a target group. The protocol of - // the target group must be HTTP or HTTPS for an Application Load Balancer or - // TCP for a Network Load Balancer. + // the target group must be HTTP or HTTPS for an Application Load Balancer. + // The protocol of the target group must be TCP or TLS for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // [HTTPS listeners] If the action type is authenticate-oidc, you authenticate // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // [HTTPS listeners] If the action type is authenticate-cognito, you authenticate // users through the user pools supported by Amazon Cognito. // // [Application Load Balancer] If the action type is redirect, you redirect @@ -6951,8 +6954,9 @@ type ModifyTargetGroupInput struct { HealthCheckPort *string `type:"string"` // The protocol the load balancer uses when performing health checks on targets. - // The TCP protocol is supported only if the protocol of the target group is - // TCP. + // The TCP protocol is supported for health checks only if the protocol of the + // target group is TCP or TLS. The TLS protocol is not supported for health + // checks. // // If the protocol of the target group is TCP, you can't modify this setting. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` @@ -8617,6 +8621,9 @@ const ( // ProtocolEnumTcp is a ProtocolEnum enum value ProtocolEnumTcp = "TCP" + + // ProtocolEnumTls is a ProtocolEnum enum value + ProtocolEnumTls = "TLS" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go index 99a2ea81f..cae80a951 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go @@ -19,7 +19,7 @@ // // An Application Load Balancer makes routing and load balancing decisions at // the application layer (HTTP/HTTPS). A Network Load Balancer makes routing -// and load balancing decisions at the transport layer (TCP). Both Application +// and load balancing decisions at the transport layer (TCP/TLS). Both Application // Load Balancers and Network Load Balancers can route requests to one or more // ports on each EC2 instance or container instance in your virtual private // cloud (VPC). diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index cc98bed8e..6f844686a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -3034,24 +3034,16 @@ func (s AddTagsOutput) GoString() string { return s.String() } -// An application is any Amazon or third-party software that you can add to -// the cluster. This structure contains a list of strings that indicates the -// software to use with the cluster and accepts a user argument list. Amazon -// EMR accepts and forwards the argument list to the corresponding installation -// script as bootstrap action argument. For more information, see Using the -// MapR Distribution for Hadoop (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-mapr.html). -// Currently supported values are: +// With Amazon EMR release version 4.0 and later, the only accepted parameter +// is the application name. To pass arguments to applications, you use configuration +// classifications specified using configuration JSON objects. For more information, +// see Configuring Applications (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html). // -// * "mapr-m3" - launch the cluster using MapR M3 Edition. -// -// * "mapr-m5" - launch the cluster using MapR M5 Edition. -// -// * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" -// - launch the cluster using MapR M3 or M5 Edition, respectively. -// -// In Amazon EMR releases 4.x and later, the only accepted parameter is the -// application name. To pass arguments to applications, you supply a configuration -// for each application. +// With earlier Amazon EMR releases, the application is any Amazon or third-party +// software that you can add to the cluster. This structure contains a list +// of strings that indicates the software to use with the cluster and accepts +// a user argument list. Amazon EMR accepts and forwards the argument list to +// the corresponding installation script as bootstrap action argument. type Application struct { _ struct{} `type:"structure"` @@ -4788,7 +4780,8 @@ type Ec2InstanceAttributes struct { // A list of additional Amazon EC2 security group IDs for the master node. AdditionalMasterSecurityGroups []*string `type:"list"` - // A list of additional Amazon EC2 security group IDs for the slave nodes. + // A list of additional Amazon EC2 security group IDs for the core and task + // nodes. AdditionalSlaveSecurityGroups []*string `type:"list"` // The Availability Zone in which the cluster will run. @@ -4811,7 +4804,7 @@ type Ec2InstanceAttributes struct { // The identifier of the Amazon EC2 security group for the master node. EmrManagedMasterSecurityGroup *string `type:"string"` - // The identifier of the Amazon EC2 security group for the slave nodes. + // The identifier of the Amazon EC2 security group for the core and task nodes. EmrManagedSlaveSecurityGroup *string `type:"string"` // The IAM role that was specified when the cluster was launched. The EC2 instances @@ -7028,7 +7021,8 @@ type JobFlowInstancesConfig struct { // A list of additional Amazon EC2 security group IDs for the master node. AdditionalMasterSecurityGroups []*string `type:"list"` - // A list of additional Amazon EC2 security group IDs for the slave nodes. + // A list of additional Amazon EC2 security group IDs for the core and task + // nodes. AdditionalSlaveSecurityGroups []*string `type:"list"` // The name of the EC2 key pair that can be used to ssh to the master node as @@ -7059,7 +7053,7 @@ type JobFlowInstancesConfig struct { // The identifier of the Amazon EC2 security group for the master node. EmrManagedMasterSecurityGroup *string `type:"string"` - // The identifier of the Amazon EC2 security group for the slave nodes. + // The identifier of the Amazon EC2 security group for the core and task nodes. EmrManagedSlaveSecurityGroup *string `type:"string"` // Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop @@ -7097,7 +7091,7 @@ type JobFlowInstancesConfig struct { // to access clusters in VPC private subnets. ServiceAccessSecurityGroup *string `type:"string"` - // The EC2 instance type of the slave nodes. + // The EC2 instance type of the core and task nodes. SlaveInstanceType *string `min:"1" type:"string"` // Specifies whether to lock the cluster to prevent the Amazon EC2 instances @@ -7271,8 +7265,9 @@ type JobFlowInstancesDetail struct { HadoopVersion *string `type:"string"` // The number of Amazon EC2 instances in the cluster. If the value is 1, the - // same instance serves as both the master and slave node. If the value is greater - // than 1, one instance is the master node and all others are slave nodes. + // same instance serves as both the master and core and task node. If the value + // is greater than 1, one instance is the master node and all others are core + // and task nodes. // // InstanceCount is a required field InstanceCount *int64 `type:"integer" required:"true"` @@ -7307,7 +7302,7 @@ type JobFlowInstancesDetail struct { // The Amazon EC2 Availability Zone for the cluster. Placement *PlacementType `type:"structure"` - // The Amazon EC2 slave node instance type. + // The Amazon EC2 core and task node instance type. // // SlaveInstanceType is a required field SlaveInstanceType *string `min:"1" type:"string" required:"true"` @@ -8617,9 +8612,10 @@ type RunJobFlowInput struct { // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. AmiVersion *string `type:"string"` - // For Amazon EMR releases 4.0 and later. A list of applications for the cluster. - // Valid values are: "Hadoop", "Hive", "Mahout", "Pig", and "Spark." They are - // case insensitive. + // Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of + // applications for Amazon EMR to install and configure when launching the cluster. + // For a list of applications available for each Amazon EMR release version, + // see the Amazon EMR Release Guide (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). Applications []*Application `type:"list"` // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. @@ -9595,10 +9591,11 @@ type SpotProvisioningSpecification struct { BlockDurationMinutes *int64 `type:"integer"` // The action to take when TargetSpotCapacity has not been fulfilled when the - // TimeoutDurationMinutes has expired. Spot instances are not uprovisioned within - // the Spot provisioining timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. - // SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand - // Instances should be provisioned to fulfill any remaining Spot capacity. + // TimeoutDurationMinutes has expired; that is, when all Spot instances could + // not be provisioned within the Spot provisioning timeout. Valid values are + // TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies + // that if no Spot instances are available, On-Demand Instances should be provisioned + // to fulfill any remaining Spot capacity. // // TimeoutAction is a required field TimeoutAction *string `type:"string" required:"true" enum:"SpotProvisioningTimeoutAction"` @@ -9660,8 +9657,9 @@ func (s *SpotProvisioningSpecification) SetTimeoutDurationMinutes(v int64) *Spot type Step struct { _ struct{} `type:"structure"` - // This specifies what action to take when the cluster step fails. Possible - // values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. + // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, + // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward + // compatibility. We recommend using TERMINATE_CLUSTER instead. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` // The Hadoop job configuration of the cluster step. @@ -9721,7 +9719,9 @@ func (s *Step) SetStatus(v *StepStatus) *Step { type StepConfig struct { _ struct{} `type:"structure"` - // The action to take if the step fails. + // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, + // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward + // compatibility. We recommend using TERMINATE_CLUSTER instead. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` // The JAR file used for the step. @@ -9975,8 +9975,9 @@ func (s *StepStatus) SetTimeline(v *StepTimeline) *StepStatus { type StepSummary struct { _ struct{} `type:"structure"` - // This specifies what action to take when the cluster step fails. Possible - // values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. + // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, + // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward + // compatibility. We recommend using TERMINATE_CLUSTER instead. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` // The Hadoop job configuration of the cluster step. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index fea196d26..509168174 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -814,13 +814,16 @@ func (c *Firehose) StartDeliveryStreamEncryptionRequest(input *StartDeliveryStre // StartDeliveryStreamEncryption API operation for Amazon Kinesis Firehose. // -// Enables server-side encryption (SSE) for the delivery stream. This operation -// is asynchronous. It returns immediately. When you invoke it, Kinesis Firehose -// first sets the status of the stream to ENABLING then to ENABLED. You can -// continue to read and write data to your stream while its status is ENABLING -// but they won't get encrypted. It can take up to 5 seconds after the encryption -// status changes to ENABLED before all records written to the delivery stream -// are encrypted. +// Enables server-side encryption (SSE) for the delivery stream. +// +// This operation is asynchronous. It returns immediately. When you invoke it, +// Kinesis Data Firehose first sets the status of the stream to ENABLING, and +// then to ENABLED. You can continue to read and write data to your stream while +// its status is ENABLING, but the data is not encrypted. It can take up to +// 5 seconds after the encryption status changes to ENABLED before all records +// written to the delivery stream are encrypted. To find out whether a record +// or a batch of records was encrypted, check the response elements PutRecordOutput$Encrypted +// and PutRecordBatchOutput$Encrypted, respectively. // // To check the encryption state of a delivery stream, use DescribeDeliveryStream. // @@ -829,8 +832,8 @@ func (c *Firehose) StartDeliveryStreamEncryptionRequest(input *StartDeliveryStre // // The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations // have a combined limit of 25 calls per delivery stream per 24 hours. For example, -// you reach the limit if you call StartDeliveryStreamEncryption thirteen times -// and StopDeliveryStreamEncryption twelve times for the same stream in a 24-hour +// you reach the limit if you call StartDeliveryStreamEncryption 13 times and +// StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour // period. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -920,20 +923,23 @@ func (c *Firehose) StopDeliveryStreamEncryptionRequest(input *StopDeliveryStream // StopDeliveryStreamEncryption API operation for Amazon Kinesis Firehose. // -// Disables server-side encryption (SSE) for the delivery stream. This operation -// is asynchronous. It returns immediately. When you invoke it, Kinesis Firehose -// first sets the status of the stream to DISABLING then to DISABLED. You can -// continue to read and write data to your stream while its status is DISABLING. -// It can take up to 5 seconds after the encryption status changes to DISABLED -// before all records written to the delivery stream are no longer subject to -// encryption. +// Disables server-side encryption (SSE) for the delivery stream. +// +// This operation is asynchronous. It returns immediately. When you invoke it, +// Kinesis Data Firehose first sets the status of the stream to DISABLING, and +// then to DISABLED. You can continue to read and write data to your stream +// while its status is DISABLING. It can take up to 5 seconds after the encryption +// status changes to DISABLED before all records written to the delivery stream +// are no longer subject to encryption. To find out whether a record or a batch +// of records was encrypted, check the response elements PutRecordOutput$Encrypted +// and PutRecordBatchOutput$Encrypted, respectively. // // To check the encryption state of a delivery stream, use DescribeDeliveryStream. // // The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations // have a combined limit of 25 calls per delivery stream per 24 hours. For example, -// you reach the limit if you call StartDeliveryStreamEncryption thirteen times -// and StopDeliveryStreamEncryption twelve times for the same stream in a 24-hour +// you reach the limit if you call StartDeliveryStreamEncryption 13 times and +// StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour // period. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1024,12 +1030,12 @@ func (c *Firehose) TagDeliveryStreamRequest(input *TagDeliveryStreamInput) (req // TagDeliveryStream API operation for Amazon Kinesis Firehose. // // Adds or updates tags for the specified delivery stream. A tag is a key-value -// pair (the value is optional) that you can define and assign to AWS resources. -// If you specify a tag that already exists, the tag value is replaced with -// the value that you specify in the request. Tags are metadata. For example, -// you can add friendly names and descriptions or other types of information -// that can help you distinguish the delivery stream. For more information about -// tags, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// pair that you can define and assign to AWS resources. If you specify a tag +// that already exists, the tag value is replaced with the value that you specify +// in the request. Tags are metadata. For example, you can add friendly names +// and descriptions or other types of information that can help you distinguish +// the delivery stream. For more information about tags, see Using Cost Allocation +// Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) // in the AWS Billing and Cost Management User Guide. // // Each delivery stream can have up to 50 tags. @@ -2249,7 +2255,7 @@ type ElasticsearchDestinationConfiguration struct { // IndexName is a required field IndexName *string `min:"1" type:"string" required:"true"` - // The Elasticsearch index rotation period. Index rotation appends a time stamp + // The Elasticsearch index rotation period. Index rotation appends a timestamp // to the IndexName to facilitate the expiration of old data. For more information, // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // The default value is OneDay. @@ -2559,7 +2565,7 @@ type ElasticsearchDestinationUpdate struct { // The Elasticsearch index name. IndexName *string `min:"1" type:"string"` - // The Elasticsearch index rotation period. Index rotation appends a time stamp + // The Elasticsearch index rotation period. Index rotation appends a timestamp // to IndexName to facilitate the expiration of old data. For more information, // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // Default value is OneDay. @@ -2800,6 +2806,11 @@ type ExtendedS3DestinationConfiguration struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -2917,6 +2928,12 @@ func (s *ExtendedS3DestinationConfiguration) SetEncryptionConfiguration(v *Encry return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *ExtendedS3DestinationConfiguration) SetErrorOutputPrefix(v string) *ExtendedS3DestinationConfiguration { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ExtendedS3DestinationConfiguration) SetPrefix(v string) *ExtendedS3DestinationConfiguration { s.Prefix = &v @@ -2980,6 +2997,11 @@ type ExtendedS3DestinationDescription struct { // EncryptionConfiguration is a required field EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -3050,6 +3072,12 @@ func (s *ExtendedS3DestinationDescription) SetEncryptionConfiguration(v *Encrypt return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *ExtendedS3DestinationDescription) SetErrorOutputPrefix(v string) *ExtendedS3DestinationDescription { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ExtendedS3DestinationDescription) SetPrefix(v string) *ExtendedS3DestinationDescription { s.Prefix = &v @@ -3105,6 +3133,11 @@ type ExtendedS3DestinationUpdate struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -3214,6 +3247,12 @@ func (s *ExtendedS3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionCo return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *ExtendedS3DestinationUpdate) SetErrorOutputPrefix(v string) *ExtendedS3DestinationUpdate { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ExtendedS3DestinationUpdate) SetPrefix(v string) *ExtendedS3DestinationUpdate { s.Prefix = &v @@ -3252,11 +3291,11 @@ func (s *ExtendedS3DestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) type HiveJsonSerDe struct { _ struct{} `type:"structure"` - // Indicates how you want Kinesis Data Firehose to parse the date and time stamps + // Indicates how you want Kinesis Data Firehose to parse the date and timestamps // that may be present in your input data JSON. To specify these format strings, // follow the pattern syntax of JodaTime's DateTimeFormat format strings. For // more information, see Class DateTimeFormat (https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html). - // You can also use the special value millis to parse time stamps in epoch milliseconds. + // You can also use the special value millis to parse timestamps in epoch milliseconds. // If you don't specify a format, Kinesis Data Firehose uses java.sql.Timestamp::valueOf // by default. TimestampFormats []*string `type:"list"` @@ -3418,7 +3457,7 @@ type KinesisStreamSourceDescription struct { _ struct{} `type:"structure"` // Kinesis Data Firehose starts retrieving records from the Kinesis data stream - // starting with this time stamp. + // starting with this timestamp. DeliveryStartTimestamp *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the source Kinesis data stream. For more @@ -5005,6 +5044,11 @@ type S3DestinationConfiguration struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -5092,6 +5136,12 @@ func (s *S3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionCon return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *S3DestinationConfiguration) SetErrorOutputPrefix(v string) *S3DestinationConfiguration { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *S3DestinationConfiguration) SetPrefix(v string) *S3DestinationConfiguration { s.Prefix = &v @@ -5134,6 +5184,11 @@ type S3DestinationDescription struct { // EncryptionConfiguration is a required field EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -5189,6 +5244,12 @@ func (s *S3DestinationDescription) SetEncryptionConfiguration(v *EncryptionConfi return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *S3DestinationDescription) SetErrorOutputPrefix(v string) *S3DestinationDescription { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *S3DestinationDescription) SetPrefix(v string) *S3DestinationDescription { s.Prefix = &v @@ -5227,6 +5288,11 @@ type S3DestinationUpdate struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -5306,6 +5372,12 @@ func (s *S3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionConfigurat return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *S3DestinationUpdate) SetErrorOutputPrefix(v string) *S3DestinationUpdate { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *S3DestinationUpdate) SetPrefix(v string) *S3DestinationUpdate { s.Prefix = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go index 61cdda7a7..4c2b2be53 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -338,8 +338,8 @@ func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInp // DisassociateAdminAccount API operation for Firewall Management Service. // // Disassociates the account that has been set as the AWS Firewall Manager administrator -// account. You will need to submit an AssociateAdminAccount request to set -// a new account as the AWS Firewall administrator. +// account. To set a different account as the administrator account, you must +// submit an AssociateAdminAccount request . // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1327,6 +1327,10 @@ func (s DeleteNotificationChannelOutput) GoString() string { type DeletePolicyInput struct { _ struct{} `type:"structure"` + // If True, the request will also delete all web ACLs in this policy. Associated + // resources will no longer be protected by web ACLs in this policy. + DeleteAllPolicyResources *bool `type:"boolean"` + // The ID of the policy that you want to delete. PolicyId is returned by PutPolicy // and by ListPolicies. // @@ -1360,6 +1364,12 @@ func (s *DeletePolicyInput) Validate() error { return nil } +// SetDeleteAllPolicyResources sets the DeleteAllPolicyResources field's value. +func (s *DeletePolicyInput) SetDeleteAllPolicyResources(v bool) *DeletePolicyInput { + s.DeleteAllPolicyResources = &v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput { s.PolicyId = &v @@ -1819,8 +1829,7 @@ type ListMemberAccountsInput struct { // Specifies the number of member account IDs that you want AWS Firewall Manager // to return for this request. If you have more IDs than the number that you // specify for MaxResults, the response includes a NextToken value that you - // can use to get another batch of member account IDs. The maximum value for - // MaxResults is 100. + // can use to get another batch of member account IDs. MaxResults *int64 `min:"1" type:"integer"` // If you specify a value for MaxResults and you have more account IDs than @@ -2002,8 +2011,8 @@ type Policy struct { _ struct{} `type:"structure"` // Specifies the AWS account IDs to exclude from the policy. The IncludeMap - // values are evaluated first, with all of the appropriate account IDs added - // to the policy. Then the accounts listed in ExcludeMap are removed, resulting + // values are evaluated first, with all the appropriate account IDs added to + // the policy. Then the accounts listed in ExcludeMap are removed, resulting // in the final list of accounts to add to the policy. // // The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” @@ -2019,9 +2028,9 @@ type Policy struct { ExcludeResourceTags *bool `type:"boolean" required:"true"` // Specifies the AWS account IDs to include in the policy. If IncludeMap is - // null, all accounts in the AWS Organization are included in the policy. If - // IncludeMap is not null, only values listed in IncludeMap will be included - // in the policy. + // null, all accounts in the organization in AWS Organizations are included + // in the policy. If IncludeMap is not null, only values listed in IncludeMap + // are included in the policy. // // The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” // : [“accountID1”, “accountID2”]}. @@ -2201,8 +2210,8 @@ type PolicyComplianceDetail struct { // Details about problems with dependent services, such as AWS WAF or AWS Config, // that are causing a resource to be non-compliant. The details include the - // name of the dependent service and the error message recieved indicating the - // problem with the service. + // name of the dependent service and the error message received that indicates + // the problem with the service. IssueInfoMap map[string]*string `type:"map"` // The AWS account ID. @@ -2281,8 +2290,8 @@ type PolicyComplianceStatus struct { // Details about problems with dependent services, such as AWS WAF or AWS Config, // that are causing a resource to be non-compliant. The details include the - // name of the dependent service and the error message recieved indicating the - // problem with the service. + // name of the dependent service and the error message received that indicates + // the problem with the service. IssueInfoMap map[string]*string `type:"map"` // Time stamp of the last update to the EvaluationResult objects. diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go new file mode 100644 index 000000000..6c43a4417 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fsx/api.go @@ -0,0 +1,3646 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fsx + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCreateBackup = "CreateBackup" + +// CreateBackupRequest generates a "aws/request.Request" representing the +// client's request for the CreateBackup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateBackup for more information on using the CreateBackup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateBackupRequest method. +// req, resp := client.CreateBackupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateBackup +func (c *FSx) CreateBackupRequest(input *CreateBackupInput) (req *request.Request, output *CreateBackupOutput) { + op := &request.Operation{ + Name: opCreateBackup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateBackupInput{} + } + + output = &CreateBackupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBackup API operation for Amazon FSx. +// +// Creates a backup of an existing Amazon FSx for Windows File Server file system. +// Creating regular backups for your file system is a best practice that complements +// the replication that Amazon FSx for Windows File Server performs for your +// file system. It also enables you to restore from user modification of data. +// +// If a backup with the specified client request token exists, and the parameters +// match, this operation returns the description of the existing backup. If +// a backup specified client request token exists, and the parameters don't +// match, this operation returns IncompatibleParameterError. If a backup with +// the specified client request token doesn't exist, CreateBackup does the following: +// +// * Creates a new Amazon FSx backup with an assigned ID, and an initial +// lifecycle state of CREATING. +// +// * Returns the description of the backup. +// +// By using the idempotent operation, you can retry a CreateBackup operation +// without the risk of creating an extra backup. This approach can be useful +// when an initial call fails in a way that makes it unclear whether a backup +// was created. If you use the same client request token and the initial call +// created a backup, the operation returns a successful result because all the +// parameters are the same. +// +// The CreateFileSystem operation returns while the backup's lifecycle state +// is still CREATING. You can check the file system creation status by calling +// the DescribeBackups operation, which returns the backup state along with +// other information. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation CreateBackup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeBackupInProgress "BackupInProgress" +// Another backup is already under way. Wait for completion before initiating +// additional backups of this file system. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" +// An error indicating that a particular service limit was exceeded. You can +// increase some service limits by contacting AWS Support. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateBackup +func (c *FSx) CreateBackup(input *CreateBackupInput) (*CreateBackupOutput, error) { + req, out := c.CreateBackupRequest(input) + return out, req.Send() +} + +// CreateBackupWithContext is the same as CreateBackup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBackup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, opts ...request.Option) (*CreateBackupOutput, error) { + req, out := c.CreateBackupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFileSystem = "CreateFileSystem" + +// CreateFileSystemRequest generates a "aws/request.Request" representing the +// client's request for the CreateFileSystem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFileSystem for more information on using the CreateFileSystem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFileSystemRequest method. +// req, resp := client.CreateFileSystemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystem +func (c *FSx) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *CreateFileSystemOutput) { + op := &request.Operation{ + Name: opCreateFileSystem, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateFileSystemInput{} + } + + output = &CreateFileSystemOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFileSystem API operation for Amazon FSx. +// +// Creates a new, empty Amazon FSx file system. +// +// If a file system with the specified client request token exists and the parameters +// match, CreateFileSystem returns the description of the existing file system. +// If a file system specified client request token exists and the parameters +// don't match, this call returns IncompatibleParameterError. If a file system +// with the specified client request token doesn't exist, CreateFileSystem does +// the following: +// +// * Creates a new, empty Amazon FSx file system with an assigned ID, and +// an initial lifecycle state of CREATING. +// +// * Returns the description of the file system. +// +// This operation requires a client request token in the request that Amazon +// FSx uses to ensure idempotent creation. This means that calling the operation +// multiple times with the same client request token has no effect. By using +// the idempotent operation, you can retry a CreateFileSystem operation without +// the risk of creating an extra file system. This approach can be useful when +// an initial call fails in a way that makes it unclear whether a file system +// was created. Examples are if a transport level timeout occurred, or your +// connection was reset. If you use the same client request token and the initial +// call created a file system, the client receives success as long as the parameters +// are the same. +// +// The CreateFileSystem call returns while the file system's lifecycle state +// is still CREATING. You can check the file-system creation status by calling +// the DescribeFileSystems operation, which returns the file system state along +// with other information. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation CreateFileSystem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeActiveDirectoryError "ActiveDirectoryError" +// An Active Directory error. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeInvalidImportPath "InvalidImportPath" +// The path provided for data repository import isn't valid. +// +// * ErrCodeInvalidNetworkSettings "InvalidNetworkSettings" +// One or more network settings specified in the request are invalid. InvalidVpcId +// means that the ID passed for the virtual private cloud (VPC) is invalid. +// InvalidSubnetIds returns the list of IDs for subnets that are either invalid +// or not part of the VPC specified. InvalidSecurityGroupIds returns the list +// of IDs for security groups that are either invalid or not part of the VPC +// specified. +// +// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" +// An error indicating that a particular service limit was exceeded. You can +// increase some service limits by contacting AWS Support. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeMissingFileSystemConfiguration "MissingFileSystemConfiguration" +// File system configuration is required for this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystem +func (c *FSx) CreateFileSystem(input *CreateFileSystemInput) (*CreateFileSystemOutput, error) { + req, out := c.CreateFileSystemRequest(input) + return out, req.Send() +} + +// CreateFileSystemWithContext is the same as CreateFileSystem with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFileSystem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*CreateFileSystemOutput, error) { + req, out := c.CreateFileSystemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFileSystemFromBackup = "CreateFileSystemFromBackup" + +// CreateFileSystemFromBackupRequest generates a "aws/request.Request" representing the +// client's request for the CreateFileSystemFromBackup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFileSystemFromBackup for more information on using the CreateFileSystemFromBackup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFileSystemFromBackupRequest method. +// req, resp := client.CreateFileSystemFromBackupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystemFromBackup +func (c *FSx) CreateFileSystemFromBackupRequest(input *CreateFileSystemFromBackupInput) (req *request.Request, output *CreateFileSystemFromBackupOutput) { + op := &request.Operation{ + Name: opCreateFileSystemFromBackup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateFileSystemFromBackupInput{} + } + + output = &CreateFileSystemFromBackupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFileSystemFromBackup API operation for Amazon FSx. +// +// Creates a new Amazon FSx file system from an existing Amazon FSx for Windows +// File Server backup. +// +// If a file system with the specified client request token exists and the parameters +// match, this call returns the description of the existing file system. If +// a client request token specified by the file system exists and the parameters +// don't match, this call returns IncompatibleParameterError. If a file system +// with the specified client request token doesn't exist, this operation does +// the following: +// +// * Creates a new Amazon FSx file system from backup with an assigned ID, +// and an initial lifecycle state of CREATING. +// +// * Returns the description of the file system. +// +// Parameters like Active Directory, default share name, automatic backup, and +// backup settings default to the parameters of the file system that was backed +// up, unless overridden. You can explicitly supply other settings. +// +// By using the idempotent operation, you can retry a CreateFileSystemFromBackup +// call without the risk of creating an extra file system. This approach can +// be useful when an initial call fails in a way that makes it unclear whether +// a file system was created. Examples are if a transport level timeout occurred, +// or your connection was reset. If you use the same client request token and +// the initial call created a file system, the client receives success as long +// as the parameters are the same. +// +// The CreateFileSystemFromBackup call returns while the file system's lifecycle +// state is still CREATING. You can check the file-system creation status by +// calling the DescribeFileSystems operation, which returns the file system +// state along with other information. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation CreateFileSystemFromBackup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeActiveDirectoryError "ActiveDirectoryError" +// An Active Directory error. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeInvalidNetworkSettings "InvalidNetworkSettings" +// One or more network settings specified in the request are invalid. InvalidVpcId +// means that the ID passed for the virtual private cloud (VPC) is invalid. +// InvalidSubnetIds returns the list of IDs for subnets that are either invalid +// or not part of the VPC specified. InvalidSecurityGroupIds returns the list +// of IDs for security groups that are either invalid or not part of the VPC +// specified. +// +// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" +// An error indicating that a particular service limit was exceeded. You can +// increase some service limits by contacting AWS Support. +// +// * ErrCodeBackupNotFound "BackupNotFound" +// No Amazon FSx backups were found based upon the supplied parameters. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeMissingFileSystemConfiguration "MissingFileSystemConfiguration" +// File system configuration is required for this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/CreateFileSystemFromBackup +func (c *FSx) CreateFileSystemFromBackup(input *CreateFileSystemFromBackupInput) (*CreateFileSystemFromBackupOutput, error) { + req, out := c.CreateFileSystemFromBackupRequest(input) + return out, req.Send() +} + +// CreateFileSystemFromBackupWithContext is the same as CreateFileSystemFromBackup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFileSystemFromBackup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) CreateFileSystemFromBackupWithContext(ctx aws.Context, input *CreateFileSystemFromBackupInput, opts ...request.Option) (*CreateFileSystemFromBackupOutput, error) { + req, out := c.CreateFileSystemFromBackupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackup = "DeleteBackup" + +// DeleteBackupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteBackup for more information on using the DeleteBackup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteBackupRequest method. +// req, resp := client.DeleteBackupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteBackup +func (c *FSx) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { + op := &request.Operation{ + Name: opDeleteBackup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBackupInput{} + } + + output = &DeleteBackupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBackup API operation for Amazon FSx. +// +// Deletes an Amazon FSx for Windows File Server backup, deleting its contents. +// After deletion, the backup no longer exists, and its data is gone. +// +// The DeleteBackup call returns instantly. The backup will not show up in later +// DescribeBackups calls. +// +// The data in a deleted backup is also deleted and can't be recovered by any +// means. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation DeleteBackup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeBackupNotFound "BackupNotFound" +// No Amazon FSx backups were found based upon the supplied parameters. +// +// * ErrCodeBackupRestoring "BackupRestoring" +// You can't delete a backup while it's being used to restore a file system. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteBackup +func (c *FSx) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { + req, out := c.DeleteBackupRequest(input) + return out, req.Send() +} + +// DeleteBackupWithContext is the same as DeleteBackup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { + req, out := c.DeleteBackupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteFileSystem = "DeleteFileSystem" + +// DeleteFileSystemRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFileSystem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFileSystem for more information on using the DeleteFileSystem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFileSystemRequest method. +// req, resp := client.DeleteFileSystemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteFileSystem +func (c *FSx) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) { + op := &request.Operation{ + Name: opDeleteFileSystem, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFileSystemInput{} + } + + output = &DeleteFileSystemOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFileSystem API operation for Amazon FSx. +// +// Deletes a file system, deleting its contents. After deletion, the file system +// no longer exists, and its data is gone. Any existing automatic backups will +// also be deleted. +// +// By default, when you delete an Amazon FSx for Windows File Server file system, +// a final backup is created upon deletion. This final backup is not subject +// to the file system's retention policy, and must be manually deleted. +// +// The DeleteFileSystem action returns while the file system has the DELETING +// status. You can check the file system deletion status by calling the DescribeFileSystems +// action, which returns a list of file systems in your account. If you pass +// the file system ID for a deleted file system, the DescribeFileSystems returns +// a FileSystemNotFound error. +// +// The data in a deleted file system is also deleted and can't be recovered +// by any means. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation DeleteFileSystem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeServiceLimitExceeded "ServiceLimitExceeded" +// An error indicating that a particular service limit was exceeded. You can +// increase some service limits by contacting AWS Support. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DeleteFileSystem +func (c *FSx) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) { + req, out := c.DeleteFileSystemRequest(input) + return out, req.Send() +} + +// DeleteFileSystemWithContext is the same as DeleteFileSystem with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFileSystem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DeleteFileSystemWithContext(ctx aws.Context, input *DeleteFileSystemInput, opts ...request.Option) (*DeleteFileSystemOutput, error) { + req, out := c.DeleteFileSystemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBackups = "DescribeBackups" + +// DescribeBackupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBackups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeBackups for more information on using the DescribeBackups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeBackupsRequest method. +// req, resp := client.DescribeBackupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeBackups +func (c *FSx) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { + op := &request.Operation{ + Name: opDescribeBackups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeBackupsInput{} + } + + output = &DescribeBackupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBackups API operation for Amazon FSx. +// +// Returns the description of specific Amazon FSx for Windows File Server backups, +// if a BackupIds value is provided for that backup. Otherwise, it returns all +// backups owned by your AWS account in the AWS Region of the endpoint that +// you're calling. +// +// When retrieving all backups, you can optionally specify the MaxResults parameter +// to limit the number of backups in a response. If more backups remain, Amazon +// FSx returns a NextToken value in the response. In this case, send a later +// request with the NextToken request parameter set to the value of NextToken +// from the last response. +// +// This action is used in an iterative process to retrieve a list of your backups. +// DescribeBackups is called first without a NextTokenvalue. Then the action +// continues to be called with the NextToken parameter set to the value of the +// last NextToken value until a response has no NextToken. +// +// When using this action, keep the following in mind: +// +// * The implementation might return fewer than MaxResults file system descriptions +// while still including a NextToken value. +// +// * The order of backups returned in the response of one DescribeBackups +// call and the order of backups returned across the responses of a multi-call +// iteration is unspecified. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation DescribeBackups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeBackupNotFound "BackupNotFound" +// No Amazon FSx backups were found based upon the supplied parameters. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeBackups +func (c *FSx) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { + req, out := c.DescribeBackupsRequest(input) + return out, req.Send() +} + +// DescribeBackupsWithContext is the same as DescribeBackups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBackups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { + req, out := c.DescribeBackupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeBackupsPages iterates over the pages of a DescribeBackups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeBackups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeBackups operation. +// pageNum := 0 +// err := client.DescribeBackupsPages(params, +// func(page *DescribeBackupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *FSx) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { + return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeBackupsPagesWithContext same as DescribeBackupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeBackupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeBackupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeFileSystems = "DescribeFileSystems" + +// DescribeFileSystemsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFileSystems operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFileSystems for more information on using the DescribeFileSystems +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFileSystemsRequest method. +// req, resp := client.DescribeFileSystemsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems +func (c *FSx) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) { + op := &request.Operation{ + Name: opDescribeFileSystems, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeFileSystemsInput{} + } + + output = &DescribeFileSystemsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFileSystems API operation for Amazon FSx. +// +// Returns the description of specific Amazon FSx file systems, if a FileSystemIds +// value is provided for that file system. Otherwise, it returns descriptions +// of all file systems owned by your AWS account in the AWS Region of the endpoint +// that you're calling. +// +// When retrieving all file system descriptions, you can optionally specify +// the MaxResults parameter to limit the number of descriptions in a response. +// If more file system descriptions remain, Amazon FSx returns a NextToken value +// in the response. In this case, send a later request with the NextToken request +// parameter set to the value of NextToken from the last response. +// +// This action is used in an iterative process to retrieve a list of your file +// system descriptions. DescribeFileSystems is called first without a NextTokenvalue. +// Then the action continues to be called with the NextToken parameter set to +// the value of the last NextToken value until a response has no NextToken. +// +// When using this action, keep the following in mind: +// +// * The implementation might return fewer than MaxResults file system descriptions +// while still including a NextToken value. +// +// * The order of file systems returned in the response of one DescribeFileSystems +// call and the order of file systems returned across the responses of a +// multicall iteration is unspecified. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation DescribeFileSystems for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/DescribeFileSystems +func (c *FSx) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) { + req, out := c.DescribeFileSystemsRequest(input) + return out, req.Send() +} + +// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFileSystems for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) { + req, out := c.DescribeFileSystemsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeFileSystemsPages iterates over the pages of a DescribeFileSystems operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeFileSystems method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeFileSystems operation. +// pageNum := 0 +// err := client.DescribeFileSystemsPages(params, +// func(page *DescribeFileSystemsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *FSx) DescribeFileSystemsPages(input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool) error { + return c.DescribeFileSystemsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeFileSystemsPagesWithContext same as DescribeFileSystemsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeFileSystemsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeFileSystemsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/ListTagsForResource +func (c *FSx) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon FSx. +// +// Lists tags for an Amazon FSx file systems and backups in the case of Amazon +// FSx for Windows File Server. +// +// When retrieving all tags, you can optionally specify the MaxResults parameter +// to limit the number of tags in a response. If more tags remain, Amazon FSx +// returns a NextToken value in the response. In this case, send a later request +// with the NextToken request parameter set to the value of NextToken from the +// last response. +// +// This action is used in an iterative process to retrieve a list of your tags. +// ListTagsForResource is called first without a NextTokenvalue. Then the action +// continues to be called with the NextToken parameter set to the value of the +// last NextToken value until a response has no NextToken. +// +// When using this action, keep the following in mind: +// +// * The implementation might return fewer than MaxResults file system descriptions +// while still including a NextToken value. +// +// * The order of tags returned in the response of one ListTagsForResource +// call and the order of tags returned across the responses of a multi-call +// iteration is unspecified. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// The resource specified by the Amazon Resource Name (ARN) can't be found. +// +// * ErrCodeNotServiceResourceError "NotServiceResourceError" +// The resource specified for the tagging operation is not a resource type owned +// by Amazon FSx. Use the API of the relevant service to perform the operation. +// +// * ErrCodeResourceDoesNotSupportTagging "ResourceDoesNotSupportTagging" +// The resource specified does not support tagging. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/ListTagsForResource +func (c *FSx) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/TagResource +func (c *FSx) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon FSx. +// +// Tags an Amazon FSx resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// The resource specified by the Amazon Resource Name (ARN) can't be found. +// +// * ErrCodeNotServiceResourceError "NotServiceResourceError" +// The resource specified for the tagging operation is not a resource type owned +// by Amazon FSx. Use the API of the relevant service to perform the operation. +// +// * ErrCodeResourceDoesNotSupportTagging "ResourceDoesNotSupportTagging" +// The resource specified does not support tagging. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/TagResource +func (c *FSx) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UntagResource +func (c *FSx) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon FSx. +// +// This action removes a tag from an Amazon FSx resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// The resource specified by the Amazon Resource Name (ARN) can't be found. +// +// * ErrCodeNotServiceResourceError "NotServiceResourceError" +// The resource specified for the tagging operation is not a resource type owned +// by Amazon FSx. Use the API of the relevant service to perform the operation. +// +// * ErrCodeResourceDoesNotSupportTagging "ResourceDoesNotSupportTagging" +// The resource specified does not support tagging. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UntagResource +func (c *FSx) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFileSystem = "UpdateFileSystem" + +// UpdateFileSystemRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFileSystem operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFileSystem for more information on using the UpdateFileSystem +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFileSystemRequest method. +// req, resp := client.UpdateFileSystemRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UpdateFileSystem +func (c *FSx) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { + op := &request.Operation{ + Name: opUpdateFileSystem, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateFileSystemInput{} + } + + output = &UpdateFileSystemOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFileSystem API operation for Amazon FSx. +// +// Updates a file system configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon FSx's +// API operation UpdateFileSystem for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequest "BadRequest" +// A generic error indicating a failure with a client request. +// +// * ErrCodeIncompatibleParameterError "IncompatibleParameterError" +// The error returned when a second request is received with the same client +// request token but different parameters settings. A client request token should +// always uniquely identify a single request. +// +// * ErrCodeInternalServerError "InternalServerError" +// A generic error indicating a server-side failure. +// +// * ErrCodeFileSystemNotFound "FileSystemNotFound" +// No Amazon FSx file systems were found based upon supplied parameters. +// +// * ErrCodeMissingFileSystemConfiguration "MissingFileSystemConfiguration" +// File system configuration is required for this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/UpdateFileSystem +func (c *FSx) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) { + req, out := c.UpdateFileSystemRequest(input) + return out, req.Send() +} + +// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFileSystem for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FSx) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { + req, out := c.UpdateFileSystemRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A backup of an Amazon FSx for Windows File Server file system. You can create +// a new file system from a backup to protect against data loss. +type Backup struct { + _ struct{} `type:"structure"` + + // The ID of the backup. + // + // BackupId is a required field + BackupId *string `min:"12" type:"string" required:"true"` + + // The time when a particular backup was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Details explaining any failures that occur when creating a backup. + FailureDetails *BackupFailureDetails `type:"structure"` + + // Metadata of the file system associated with the backup. This metadata is + // persisted even if the file system is deleted. + // + // FileSystem is a required field + FileSystem *FileSystem `type:"structure" required:"true"` + + // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt this + // backup's data. + KmsKeyId *string `min:"1" type:"string"` + + // The lifecycle status of the backup. + // + // Lifecycle is a required field + Lifecycle *string `type:"string" required:"true" enum:"BackupLifecycle"` + + // The current percent of progress of an asynchronous task. + ProgressPercent *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) for the backup resource. + ResourceARN *string `min:"8" type:"string"` + + // Tags associated with a particular file system. + Tags []*Tag `min:"1" type:"list"` + + // The type of the backup. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"BackupType"` +} + +// String returns the string representation +func (s Backup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Backup) GoString() string { + return s.String() +} + +// SetBackupId sets the BackupId field's value. +func (s *Backup) SetBackupId(v string) *Backup { + s.BackupId = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *Backup) SetCreationTime(v time.Time) *Backup { + s.CreationTime = &v + return s +} + +// SetFailureDetails sets the FailureDetails field's value. +func (s *Backup) SetFailureDetails(v *BackupFailureDetails) *Backup { + s.FailureDetails = v + return s +} + +// SetFileSystem sets the FileSystem field's value. +func (s *Backup) SetFileSystem(v *FileSystem) *Backup { + s.FileSystem = v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *Backup) SetKmsKeyId(v string) *Backup { + s.KmsKeyId = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *Backup) SetLifecycle(v string) *Backup { + s.Lifecycle = &v + return s +} + +// SetProgressPercent sets the ProgressPercent field's value. +func (s *Backup) SetProgressPercent(v int64) *Backup { + s.ProgressPercent = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *Backup) SetResourceARN(v string) *Backup { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Backup) SetTags(v []*Tag) *Backup { + s.Tags = v + return s +} + +// SetType sets the Type field's value. +func (s *Backup) SetType(v string) *Backup { + s.Type = &v + return s +} + +// If backup creation fails, this structure contains the details of that failure. +type BackupFailureDetails struct { + _ struct{} `type:"structure"` + + // A message describing the backup creation failure. + Message *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s BackupFailureDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BackupFailureDetails) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *BackupFailureDetails) SetMessage(v string) *BackupFailureDetails { + s.Message = &v + return s +} + +// The request object for the CreateBackup operation. +type CreateBackupInput struct { + _ struct{} `type:"structure"` + + // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to + // ensure idempotent creation. This string is automatically filled on your behalf + // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The ID of the file system to back up. + // + // FileSystemId is a required field + FileSystemId *string `min:"11" type:"string" required:"true"` + + // The tags to apply to the backup at backup creation. The key value of the + // Name tag appears in the console as the backup name. + Tags []*Tag `min:"1" type:"list"` +} + +// String returns the string representation +func (s CreateBackupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBackupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBackupInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateBackupInput) SetClientRequestToken(v string) *CreateBackupInput { + s.ClientRequestToken = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *CreateBackupInput) SetFileSystemId(v string) *CreateBackupInput { + s.FileSystemId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateBackupInput) SetTags(v []*Tag) *CreateBackupInput { + s.Tags = v + return s +} + +// The response object for the CreateBackup operation. +type CreateBackupOutput struct { + _ struct{} `type:"structure"` + + // A description of the backup. + Backup *Backup `type:"structure"` +} + +// String returns the string representation +func (s CreateBackupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBackupOutput) GoString() string { + return s.String() +} + +// SetBackup sets the Backup field's value. +func (s *CreateBackupOutput) SetBackup(v *Backup) *CreateBackupOutput { + s.Backup = v + return s +} + +// The request object for the CreateFileSystemFromBackup operation. +type CreateFileSystemFromBackupInput struct { + _ struct{} `type:"structure"` + + // The ID of the backup. + // + // BackupId is a required field + BackupId *string `min:"12" type:"string" required:"true"` + + // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to + // ensure idempotent creation. This string is automatically filled on your behalf + // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // A list of IDs for the security groups that apply to the specified network + // interfaces created for file system access. These security groups apply to + // all network interfaces. This value isn't returned in later describe requests. + SecurityGroupIds []*string `type:"list"` + + // A list of IDs for the subnets that the file system will be accessible from. + // Currently, you can specify only one subnet. The file server is also launched + // in that subnet's Availability Zone. + // + // SubnetIds is a required field + SubnetIds []*string `type:"list" required:"true"` + + // The tags to be applied to the file system at file system creation. The key + // value of the Name tag appears in the console as the file system name. + Tags []*Tag `min:"1" type:"list"` + + // The configuration for this Microsoft Windows file system. + WindowsConfiguration *CreateFileSystemWindowsConfiguration `type:"structure"` +} + +// String returns the string representation +func (s CreateFileSystemFromBackupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemFromBackupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFileSystemFromBackupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemFromBackupInput"} + if s.BackupId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupId")) + } + if s.BackupId != nil && len(*s.BackupId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("BackupId", 12)) + } + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.WindowsConfiguration != nil { + if err := s.WindowsConfiguration.Validate(); err != nil { + invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupId sets the BackupId field's value. +func (s *CreateFileSystemFromBackupInput) SetBackupId(v string) *CreateFileSystemFromBackupInput { + s.BackupId = &v + return s +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateFileSystemFromBackupInput) SetClientRequestToken(v string) *CreateFileSystemFromBackupInput { + s.ClientRequestToken = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateFileSystemFromBackupInput) SetSecurityGroupIds(v []*string) *CreateFileSystemFromBackupInput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateFileSystemFromBackupInput) SetSubnetIds(v []*string) *CreateFileSystemFromBackupInput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateFileSystemFromBackupInput) SetTags(v []*Tag) *CreateFileSystemFromBackupInput { + s.Tags = v + return s +} + +// SetWindowsConfiguration sets the WindowsConfiguration field's value. +func (s *CreateFileSystemFromBackupInput) SetWindowsConfiguration(v *CreateFileSystemWindowsConfiguration) *CreateFileSystemFromBackupInput { + s.WindowsConfiguration = v + return s +} + +// The response object for the CreateFileSystemFromBackup operation. +type CreateFileSystemFromBackupOutput struct { + _ struct{} `type:"structure"` + + // A description of the file system. + FileSystem *FileSystem `type:"structure"` +} + +// String returns the string representation +func (s CreateFileSystemFromBackupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemFromBackupOutput) GoString() string { + return s.String() +} + +// SetFileSystem sets the FileSystem field's value. +func (s *CreateFileSystemFromBackupOutput) SetFileSystem(v *FileSystem) *CreateFileSystemFromBackupOutput { + s.FileSystem = v + return s +} + +// The request object for the CreateFileSystem operation. +type CreateFileSystemInput struct { + _ struct{} `type:"structure"` + + // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to + // ensure idempotent creation. This string is automatically filled on your behalf + // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The type of file system. + // + // FileSystemType is a required field + FileSystemType *string `type:"string" required:"true" enum:"FileSystemType"` + + // The ID of your AWS Key Management Service (AWS KMS) key. This ID is used + // to encrypt the data in your file system at rest. For more information, see + // Encrypt (http://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) + // in the AWS Key Management Service API Reference. + KmsKeyId *string `min:"1" type:"string"` + + // The configuration object for Lustre file systems used in the CreateFileSystem + // operation. + LustreConfiguration *CreateFileSystemLustreConfiguration `type:"structure"` + + // A list of IDs for the security groups that apply to the specified network + // interfaces created for file system access. These security groups will apply + // to all network interfaces. This list isn't returned in later describe requests. + SecurityGroupIds []*string `type:"list"` + + // The storage capacity of the file system. + // + // For Windows file systems, the storage capacity has a minimum of 300 GiB, + // and a maximum of 65,536 GiB. + // + // For Lustre file systems, the storage capacity has a minimum of 3,600 GiB. + // Storage capacity is provisioned in increments of 3,600 GiB. + // + // StorageCapacity is a required field + StorageCapacity *int64 `min:"300" type:"integer" required:"true"` + + // A list of IDs for the subnets that the file system will be accessible from. + // File systems support only one subnet. The file server is also launched in + // that subnet's Availability Zone. + // + // SubnetIds is a required field + SubnetIds []*string `type:"list" required:"true"` + + // The tags to be applied to the file system at file system creation. The key + // value of the Name tag appears in the console as the file system name. + Tags []*Tag `min:"1" type:"list"` + + // The configuration for this Microsoft Windows file system. + WindowsConfiguration *CreateFileSystemWindowsConfiguration `type:"structure"` +} + +// String returns the string representation +func (s CreateFileSystemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.FileSystemType == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemType")) + } + if s.KmsKeyId != nil && len(*s.KmsKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KmsKeyId", 1)) + } + if s.StorageCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("StorageCapacity")) + } + if s.StorageCapacity != nil && *s.StorageCapacity < 300 { + invalidParams.Add(request.NewErrParamMinValue("StorageCapacity", 300)) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.LustreConfiguration != nil { + if err := s.LustreConfiguration.Validate(); err != nil { + invalidParams.AddNested("LustreConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.WindowsConfiguration != nil { + if err := s.WindowsConfiguration.Validate(); err != nil { + invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateFileSystemInput) SetClientRequestToken(v string) *CreateFileSystemInput { + s.ClientRequestToken = &v + return s +} + +// SetFileSystemType sets the FileSystemType field's value. +func (s *CreateFileSystemInput) SetFileSystemType(v string) *CreateFileSystemInput { + s.FileSystemType = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateFileSystemInput) SetKmsKeyId(v string) *CreateFileSystemInput { + s.KmsKeyId = &v + return s +} + +// SetLustreConfiguration sets the LustreConfiguration field's value. +func (s *CreateFileSystemInput) SetLustreConfiguration(v *CreateFileSystemLustreConfiguration) *CreateFileSystemInput { + s.LustreConfiguration = v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateFileSystemInput) SetSecurityGroupIds(v []*string) *CreateFileSystemInput { + s.SecurityGroupIds = v + return s +} + +// SetStorageCapacity sets the StorageCapacity field's value. +func (s *CreateFileSystemInput) SetStorageCapacity(v int64) *CreateFileSystemInput { + s.StorageCapacity = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateFileSystemInput) SetSubnetIds(v []*string) *CreateFileSystemInput { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateFileSystemInput) SetTags(v []*Tag) *CreateFileSystemInput { + s.Tags = v + return s +} + +// SetWindowsConfiguration sets the WindowsConfiguration field's value. +func (s *CreateFileSystemInput) SetWindowsConfiguration(v *CreateFileSystemWindowsConfiguration) *CreateFileSystemInput { + s.WindowsConfiguration = v + return s +} + +// The configuration object for Lustre file systems used in the CreateFileSystem +// operation. +type CreateFileSystemLustreConfiguration struct { + _ struct{} `type:"structure"` + + // (Optional) The path to the Amazon S3 bucket (and optional prefix) that you're + // using as the data repository for your FSx for Lustre file system, for example + // s3://import-bucket/optional-prefix. If you specify a prefix after the Amazon + // S3 bucket name, only object keys with that prefix are loaded into the file + // system. + ImportPath *string `min:"3" type:"string"` + + // (Optional) For files imported from a data repository, this value determines + // the stripe count and maximum amount of data per file (in MiB) stored on a + // single physical disk. The maximum number of disks that a single file can + // be striped across is limited by the total number of disks that make up the + // file system. + // + // The chunk size default is 1,024 MiB (1 GiB) and can go as high as 512,000 + // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. + ImportedFileChunkSize *int64 `min:"1" type:"integer"` + + // The preferred time to perform weekly maintenance, in the UTC time zone. + WeeklyMaintenanceStartTime *string `min:"7" type:"string"` +} + +// String returns the string representation +func (s CreateFileSystemLustreConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemLustreConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFileSystemLustreConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemLustreConfiguration"} + if s.ImportPath != nil && len(*s.ImportPath) < 3 { + invalidParams.Add(request.NewErrParamMinLen("ImportPath", 3)) + } + if s.ImportedFileChunkSize != nil && *s.ImportedFileChunkSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("ImportedFileChunkSize", 1)) + } + if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { + invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetImportPath sets the ImportPath field's value. +func (s *CreateFileSystemLustreConfiguration) SetImportPath(v string) *CreateFileSystemLustreConfiguration { + s.ImportPath = &v + return s +} + +// SetImportedFileChunkSize sets the ImportedFileChunkSize field's value. +func (s *CreateFileSystemLustreConfiguration) SetImportedFileChunkSize(v int64) *CreateFileSystemLustreConfiguration { + s.ImportedFileChunkSize = &v + return s +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *CreateFileSystemLustreConfiguration) SetWeeklyMaintenanceStartTime(v string) *CreateFileSystemLustreConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// The response object for the CreateFileSystem operation. +type CreateFileSystemOutput struct { + _ struct{} `type:"structure"` + + // A description of the file system. + FileSystem *FileSystem `type:"structure"` +} + +// String returns the string representation +func (s CreateFileSystemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemOutput) GoString() string { + return s.String() +} + +// SetFileSystem sets the FileSystem field's value. +func (s *CreateFileSystemOutput) SetFileSystem(v *FileSystem) *CreateFileSystemOutput { + s.FileSystem = v + return s +} + +// The configuration object for the Microsoft Windows file system used in CreateFileSystem +// and CreateFileSystemFromBackup operations. +type CreateFileSystemWindowsConfiguration struct { + _ struct{} `type:"structure"` + + // The ID for an existing Microsoft Active Directory instance that the file + // system should join when it's created. + ActiveDirectoryId *string `min:"12" type:"string"` + + // The number of days to retain automatic backups. The default is to retain + // backups for 7 days. Setting this value to 0 disables the creation of automatic + // backups. The maximum retention period for backups is 35 days. + AutomaticBackupRetentionDays *int64 `type:"integer"` + + // A boolean flag indicating whether tags on the file system should be copied + // to backups. This value defaults to false. If it's set to true, all tags on + // the file system are copied to all automatic backups and any user-initiated + // backups where the user doesn't specify any tags. If this value is true, and + // you specify one or more tags, only the specified tags are copied to backups. + CopyTagsToBackups *bool `type:"boolean"` + + // The preferred time to take daily automatic backups, in the UTC time zone. + DailyAutomaticBackupStartTime *string `min:"5" type:"string"` + + // The throughput of an Amazon FSx file system, measured in megabytes per second. + // + // ThroughputCapacity is a required field + ThroughputCapacity *int64 `min:"8" type:"integer" required:"true"` + + // The preferred start time to perform weekly maintenance, in the UTC time zone. + WeeklyMaintenanceStartTime *string `min:"7" type:"string"` +} + +// String returns the string representation +func (s CreateFileSystemWindowsConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFileSystemWindowsConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFileSystemWindowsConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemWindowsConfiguration"} + if s.ActiveDirectoryId != nil && len(*s.ActiveDirectoryId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("ActiveDirectoryId", 12)) + } + if s.DailyAutomaticBackupStartTime != nil && len(*s.DailyAutomaticBackupStartTime) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DailyAutomaticBackupStartTime", 5)) + } + if s.ThroughputCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("ThroughputCapacity")) + } + if s.ThroughputCapacity != nil && *s.ThroughputCapacity < 8 { + invalidParams.Add(request.NewErrParamMinValue("ThroughputCapacity", 8)) + } + if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { + invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActiveDirectoryId sets the ActiveDirectoryId field's value. +func (s *CreateFileSystemWindowsConfiguration) SetActiveDirectoryId(v string) *CreateFileSystemWindowsConfiguration { + s.ActiveDirectoryId = &v + return s +} + +// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. +func (s *CreateFileSystemWindowsConfiguration) SetAutomaticBackupRetentionDays(v int64) *CreateFileSystemWindowsConfiguration { + s.AutomaticBackupRetentionDays = &v + return s +} + +// SetCopyTagsToBackups sets the CopyTagsToBackups field's value. +func (s *CreateFileSystemWindowsConfiguration) SetCopyTagsToBackups(v bool) *CreateFileSystemWindowsConfiguration { + s.CopyTagsToBackups = &v + return s +} + +// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. +func (s *CreateFileSystemWindowsConfiguration) SetDailyAutomaticBackupStartTime(v string) *CreateFileSystemWindowsConfiguration { + s.DailyAutomaticBackupStartTime = &v + return s +} + +// SetThroughputCapacity sets the ThroughputCapacity field's value. +func (s *CreateFileSystemWindowsConfiguration) SetThroughputCapacity(v int64) *CreateFileSystemWindowsConfiguration { + s.ThroughputCapacity = &v + return s +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *CreateFileSystemWindowsConfiguration) SetWeeklyMaintenanceStartTime(v string) *CreateFileSystemWindowsConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// The data repository configuration object for Lustre file systems returned +// in the response of the CreateFileSystem operation. +type DataRepositoryConfiguration struct { + _ struct{} `type:"structure"` + + // The Amazon S3 commit path to use for storing new and changed Lustre file + // system files as part of the archive operation from the file system to Amazon + // S3. The value is s3://import-bucket/FSxLustre[creationtimestamp]. The timestamp + // is presented in UTC format, for example s3://import-bucket/FSxLustre20181105T222312Z. + // Files are archived to a different prefix in the Amazon S3 bucket, preventing + // input data from being overwritten. + ExportPath *string `min:"3" type:"string"` + + // The import path to the Amazon S3 bucket (and optional prefix) that you're + // using as the data repository for your FSx for Lustre file system, for example + // s3://import-bucket/optional-prefix. If a prefix is specified after the Amazon + // S3 bucket name, only object keys with that prefix are loaded into the file + // system. + ImportPath *string `min:"3" type:"string"` + + // For files imported from a data repository, this value determines the stripe + // count and maximum amount of data per file (in MiB) stored on a single physical + // disk. The maximum number of disks that a single file can be striped across + // is limited by the total number of disks that make up the file system. + // + // The default chunk size is 1,024 MiB (1 GiB) and can go as high as 512,000 + // MiB (500 GiB). Amazon S3 objects have a maximum size of 5 TB. + ImportedFileChunkSize *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s DataRepositoryConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataRepositoryConfiguration) GoString() string { + return s.String() +} + +// SetExportPath sets the ExportPath field's value. +func (s *DataRepositoryConfiguration) SetExportPath(v string) *DataRepositoryConfiguration { + s.ExportPath = &v + return s +} + +// SetImportPath sets the ImportPath field's value. +func (s *DataRepositoryConfiguration) SetImportPath(v string) *DataRepositoryConfiguration { + s.ImportPath = &v + return s +} + +// SetImportedFileChunkSize sets the ImportedFileChunkSize field's value. +func (s *DataRepositoryConfiguration) SetImportedFileChunkSize(v int64) *DataRepositoryConfiguration { + s.ImportedFileChunkSize = &v + return s +} + +// The request object for DeleteBackup operation. +type DeleteBackupInput struct { + _ struct{} `type:"structure"` + + // The ID of the backup you want to delete. + // + // BackupId is a required field + BackupId *string `min:"12" type:"string" required:"true"` + + // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to + // ensure idempotent deletion. This is automatically filled on your behalf when + // using the AWS CLI or SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` +} + +// String returns the string representation +func (s DeleteBackupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} + if s.BackupId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupId")) + } + if s.BackupId != nil && len(*s.BackupId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("BackupId", 12)) + } + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupId sets the BackupId field's value. +func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput { + s.BackupId = &v + return s +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *DeleteBackupInput) SetClientRequestToken(v string) *DeleteBackupInput { + s.ClientRequestToken = &v + return s +} + +// The response object for DeleteBackup operation. +type DeleteBackupOutput struct { + _ struct{} `type:"structure"` + + // The ID of the backup deleted. + BackupId *string `min:"12" type:"string"` + + // The lifecycle of the backup. Should be DELETED. + Lifecycle *string `type:"string" enum:"BackupLifecycle"` +} + +// String returns the string representation +func (s DeleteBackupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupOutput) GoString() string { + return s.String() +} + +// SetBackupId sets the BackupId field's value. +func (s *DeleteBackupOutput) SetBackupId(v string) *DeleteBackupOutput { + s.BackupId = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *DeleteBackupOutput) SetLifecycle(v string) *DeleteBackupOutput { + s.Lifecycle = &v + return s +} + +// The request object for DeleteFileSystem operation. +type DeleteFileSystemInput struct { + _ struct{} `type:"structure"` + + // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to + // ensure idempotent deletion. This is automatically filled on your behalf when + // using the AWS CLI or SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The ID of the file system you want to delete. + // + // FileSystemId is a required field + FileSystemId *string `min:"11" type:"string" required:"true"` + + // The configuration object for the Microsoft Windows file system used in the + // DeleteFileSystem operation. + WindowsConfiguration *DeleteFileSystemWindowsConfiguration `type:"structure"` +} + +// String returns the string representation +func (s DeleteFileSystemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileSystemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) + } + if s.WindowsConfiguration != nil { + if err := s.WindowsConfiguration.Validate(); err != nil { + invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *DeleteFileSystemInput) SetClientRequestToken(v string) *DeleteFileSystemInput { + s.ClientRequestToken = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput { + s.FileSystemId = &v + return s +} + +// SetWindowsConfiguration sets the WindowsConfiguration field's value. +func (s *DeleteFileSystemInput) SetWindowsConfiguration(v *DeleteFileSystemWindowsConfiguration) *DeleteFileSystemInput { + s.WindowsConfiguration = v + return s +} + +// The response object for the DeleteFileSystem operation. +type DeleteFileSystemOutput struct { + _ struct{} `type:"structure"` + + // The ID of the file system being deleted. + FileSystemId *string `min:"11" type:"string"` + + // The file system lifecycle for the deletion request. Should be DELETING. + Lifecycle *string `type:"string" enum:"FileSystemLifecycle"` + + // The response object for the Microsoft Windows file system used in the DeleteFileSystem + // operation. + WindowsResponse *DeleteFileSystemWindowsResponse `type:"structure"` +} + +// String returns the string representation +func (s DeleteFileSystemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileSystemOutput) GoString() string { + return s.String() +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *DeleteFileSystemOutput) SetFileSystemId(v string) *DeleteFileSystemOutput { + s.FileSystemId = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *DeleteFileSystemOutput) SetLifecycle(v string) *DeleteFileSystemOutput { + s.Lifecycle = &v + return s +} + +// SetWindowsResponse sets the WindowsResponse field's value. +func (s *DeleteFileSystemOutput) SetWindowsResponse(v *DeleteFileSystemWindowsResponse) *DeleteFileSystemOutput { + s.WindowsResponse = v + return s +} + +// The configuration object for the Microsoft Windows file system used in the +// DeleteFileSystem operation. +type DeleteFileSystemWindowsConfiguration struct { + _ struct{} `type:"structure"` + + // A set of tags for your final backup. + FinalBackupTags []*Tag `min:"1" type:"list"` + + // By default, Amazon FSx for Windows takes a final backup on your behalf when + // the DeleteFileSystem operation is invoked. Doing this helps protect you from + // data loss, and we highly recommend taking the final backup. If you want to + // skip this backup, use this flag to do so. + SkipFinalBackup *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteFileSystemWindowsConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileSystemWindowsConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileSystemWindowsConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemWindowsConfiguration"} + if s.FinalBackupTags != nil && len(s.FinalBackupTags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FinalBackupTags", 1)) + } + if s.FinalBackupTags != nil { + for i, v := range s.FinalBackupTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FinalBackupTags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFinalBackupTags sets the FinalBackupTags field's value. +func (s *DeleteFileSystemWindowsConfiguration) SetFinalBackupTags(v []*Tag) *DeleteFileSystemWindowsConfiguration { + s.FinalBackupTags = v + return s +} + +// SetSkipFinalBackup sets the SkipFinalBackup field's value. +func (s *DeleteFileSystemWindowsConfiguration) SetSkipFinalBackup(v bool) *DeleteFileSystemWindowsConfiguration { + s.SkipFinalBackup = &v + return s +} + +// The response object for the Microsoft Windows file system used in the DeleteFileSystem +// operation. +type DeleteFileSystemWindowsResponse struct { + _ struct{} `type:"structure"` + + // The ID of the final backup for this file system. + FinalBackupId *string `min:"12" type:"string"` + + // The set of tags applied to the final backup. + FinalBackupTags []*Tag `min:"1" type:"list"` +} + +// String returns the string representation +func (s DeleteFileSystemWindowsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileSystemWindowsResponse) GoString() string { + return s.String() +} + +// SetFinalBackupId sets the FinalBackupId field's value. +func (s *DeleteFileSystemWindowsResponse) SetFinalBackupId(v string) *DeleteFileSystemWindowsResponse { + s.FinalBackupId = &v + return s +} + +// SetFinalBackupTags sets the FinalBackupTags field's value. +func (s *DeleteFileSystemWindowsResponse) SetFinalBackupTags(v []*Tag) *DeleteFileSystemWindowsResponse { + s.FinalBackupTags = v + return s +} + +// The request object for DescribeBackups operation. +type DescribeBackupsInput struct { + _ struct{} `type:"structure"` + + // (Optional) IDs of the backups you want to retrieve (String). This overrides + // any filters. If any IDs are not found, BackupNotFound will be thrown. + BackupIds []*string `type:"list"` + + // (Optional) Filters structure. Supported names are file-system-id and backup-type. + Filters []*Filter `type:"list"` + + // (Optional) Maximum number of backups to return in the response (integer). + // This parameter value must be greater than 0. The number of items that Amazon + // FSx returns is the minimum of the MaxResults parameter specified in the request + // and the service's internal maximum number of items per page. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Opaque pagination token returned from a previous DescribeBackups + // operation (String). If a token present, the action continues the list from + // where the returning call left off. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeBackupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBackupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupIds sets the BackupIds field's value. +func (s *DescribeBackupsInput) SetBackupIds(v []*string) *DescribeBackupsInput { + s.BackupIds = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeBackupsInput) SetFilters(v []*Filter) *DescribeBackupsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { + s.NextToken = &v + return s +} + +// Response object for DescribeBackups operation. +type DescribeBackupsOutput struct { + _ struct{} `type:"structure"` + + // Any array of backups. + Backups []*Backup `type:"list"` + + // This is present if there are more backups than returned in the response (String). + // You can use the NextToken value in the later request to fetch the backups. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeBackupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupsOutput) GoString() string { + return s.String() +} + +// SetBackups sets the Backups field's value. +func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { + s.Backups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { + s.NextToken = &v + return s +} + +// The request object for DescribeFileSystems operation. +type DescribeFileSystemsInput struct { + _ struct{} `type:"structure"` + + // (Optional) IDs of the file systems whose descriptions you want to retrieve + // (String). + FileSystemIds []*string `type:"list"` + + // (Optional) Maximum number of file systems to return in the response (integer). + // This parameter value must be greater than 0. The number of items that Amazon + // FSx returns is the minimum of the MaxResults parameter specified in the request + // and the service's internal maximum number of items per page. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Opaque pagination token returned from a previous DescribeFileSystems + // operation (String). If a token present, the action continues the list from + // where the returning call left off. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeFileSystemsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFileSystemsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFileSystemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFileSystemIds sets the FileSystemIds field's value. +func (s *DescribeFileSystemsInput) SetFileSystemIds(v []*string) *DescribeFileSystemsInput { + s.FileSystemIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFileSystemsInput) SetMaxResults(v int64) *DescribeFileSystemsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFileSystemsInput) SetNextToken(v string) *DescribeFileSystemsInput { + s.NextToken = &v + return s +} + +// The response object for DescribeFileSystems operation. +type DescribeFileSystemsOutput struct { + _ struct{} `type:"structure"` + + // An array of file system descriptions. + FileSystems []*FileSystem `type:"list"` + + // Present if there are more file systems than returned in the response (String). + // You can use the NextToken value in the later request to fetch the descriptions. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeFileSystemsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFileSystemsOutput) GoString() string { + return s.String() +} + +// SetFileSystems sets the FileSystems field's value. +func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystem) *DescribeFileSystemsOutput { + s.FileSystems = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFileSystemsOutput) SetNextToken(v string) *DescribeFileSystemsOutput { + s.NextToken = &v + return s +} + +// A description of a specific Amazon FSx file system. +type FileSystem struct { + _ struct{} `type:"structure"` + + // The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z), + // also known as Unix time. + CreationTime *time.Time `type:"timestamp"` + + // The DNS name for the file system. + DNSName *string `min:"16" type:"string"` + + // Structure providing details of any failures that occur when creating the + // file system has failed. + FailureDetails *FileSystemFailureDetails `type:"structure"` + + // The eight-digit ID of the file system that was automatically assigned by + // Amazon FSx. + FileSystemId *string `min:"11" type:"string"` + + // Type of file system. Currently the only supported type is WINDOWS. + FileSystemType *string `type:"string" enum:"FileSystemType"` + + // The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the + // file system's data for an Amazon FSx for Windows File Server file system. + KmsKeyId *string `min:"1" type:"string"` + + // The lifecycle status of the file system. + Lifecycle *string `type:"string" enum:"FileSystemLifecycle"` + + // The configuration for the Amazon FSx for Lustre file system. + LustreConfiguration *LustreFileSystemConfiguration `type:"structure"` + + // The IDs of the elastic network interface from which a specific file system + // is accessible. The elastic network interface is automatically created in + // the same VPC that the Amazon FSx file system was created in. For more information, + // see Elastic Network Interfaces (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) + // in the Amazon EC2 User Guide. + // + // For an Amazon FSx for Windows File Server file system, you can have one network + // interface Id. For an Amazon FSx for Lustre file system, you can have more + // than one. + NetworkInterfaceIds []*string `type:"list"` + + // The AWS account that created the file system. If the file system was created + // by an IAM user, the AWS account to which the IAM user belongs is the owner. + OwnerId *string `min:"12" type:"string"` + + // The resource ARN of the file system. + ResourceARN *string `min:"8" type:"string"` + + // The storage capacity of the file system in gigabytes. + StorageCapacity *int64 `min:"300" type:"integer"` + + // The IDs of the subnets to contain the endpoint for the file system. One and + // only one is supported. The file system is launched in the Availability Zone + // associated with this subnet. + SubnetIds []*string `type:"list"` + + // The tags to associate with the file system. For more information, see Tagging + // Your Amazon EC2 Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) + // in the Amazon EC2 User Guide. + Tags []*Tag `min:"1" type:"list"` + + // The ID of the primary VPC for the file system. + VpcId *string `min:"12" type:"string"` + + // The configuration for this Microsoft Windows file system. + WindowsConfiguration *WindowsFileSystemConfiguration `type:"structure"` +} + +// String returns the string representation +func (s FileSystem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileSystem) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *FileSystem) SetCreationTime(v time.Time) *FileSystem { + s.CreationTime = &v + return s +} + +// SetDNSName sets the DNSName field's value. +func (s *FileSystem) SetDNSName(v string) *FileSystem { + s.DNSName = &v + return s +} + +// SetFailureDetails sets the FailureDetails field's value. +func (s *FileSystem) SetFailureDetails(v *FileSystemFailureDetails) *FileSystem { + s.FailureDetails = v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *FileSystem) SetFileSystemId(v string) *FileSystem { + s.FileSystemId = &v + return s +} + +// SetFileSystemType sets the FileSystemType field's value. +func (s *FileSystem) SetFileSystemType(v string) *FileSystem { + s.FileSystemType = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *FileSystem) SetKmsKeyId(v string) *FileSystem { + s.KmsKeyId = &v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *FileSystem) SetLifecycle(v string) *FileSystem { + s.Lifecycle = &v + return s +} + +// SetLustreConfiguration sets the LustreConfiguration field's value. +func (s *FileSystem) SetLustreConfiguration(v *LustreFileSystemConfiguration) *FileSystem { + s.LustreConfiguration = v + return s +} + +// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. +func (s *FileSystem) SetNetworkInterfaceIds(v []*string) *FileSystem { + s.NetworkInterfaceIds = v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *FileSystem) SetOwnerId(v string) *FileSystem { + s.OwnerId = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *FileSystem) SetResourceARN(v string) *FileSystem { + s.ResourceARN = &v + return s +} + +// SetStorageCapacity sets the StorageCapacity field's value. +func (s *FileSystem) SetStorageCapacity(v int64) *FileSystem { + s.StorageCapacity = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *FileSystem) SetSubnetIds(v []*string) *FileSystem { + s.SubnetIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *FileSystem) SetTags(v []*Tag) *FileSystem { + s.Tags = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *FileSystem) SetVpcId(v string) *FileSystem { + s.VpcId = &v + return s +} + +// SetWindowsConfiguration sets the WindowsConfiguration field's value. +func (s *FileSystem) SetWindowsConfiguration(v *WindowsFileSystemConfiguration) *FileSystem { + s.WindowsConfiguration = v + return s +} + +// Structure providing details of any failures that occur when creating the +// file system has failed. +type FileSystemFailureDetails struct { + _ struct{} `type:"structure"` + + // Message describing the failures that occurred during file system creation. + Message *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s FileSystemFailureDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileSystemFailureDetails) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *FileSystemFailureDetails) SetMessage(v string) *FileSystemFailureDetails { + s.Message = &v + return s +} + +// A filter used to restrict the results of describe calls. You can use multiple +// filters to return results that meet all applied filter requirements. +type Filter struct { + _ struct{} `type:"structure"` + + // The name for this filter. + Name *string `type:"string" enum:"FilterName"` + + // The values of the filter. These are all the values for any of the applied + // filters. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v + return s +} + +// The request object for ListTagsForResource operation. +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // (Optional) Maximum number of tags to return in the response (integer). This + // parameter value must be greater than 0. The number of items that Amazon FSx + // returns is the minimum of the MaxResults parameter specified in the request + // and the service's internal maximum number of items per page. + MaxResults *int64 `min:"1" type:"integer"` + + // (Optional) Opaque pagination token returned from a previous ListTagsForResource + // operation (String). If a token present, the action continues the list from + // where the returning call left off. + NextToken *string `min:"1" type:"string"` + + // The ARN of the Amazon FSx resource that will have its tags listed. + // + // ResourceARN is a required field + ResourceARN *string `min:"8" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 8 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 8)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { + s.NextToken = &v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +// The response object for ListTagsForResource operation. +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // This is present if there are more tags than returned in the response (String). + // You can use the NextToken value in the later request to fetch the tags. + NextToken *string `min:"1" type:"string"` + + // A list of tags on the resource. + Tags []*Tag `min:"1" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// The configuration for the Amazon FSx for Lustre file system. +type LustreFileSystemConfiguration struct { + _ struct{} `type:"structure"` + + // The data repository configuration object for Lustre file systems returned + // in the response of the CreateFileSystem operation. + DataRepositoryConfiguration *DataRepositoryConfiguration `type:"structure"` + + // The UTC time that you want to begin your weekly maintenance window. + WeeklyMaintenanceStartTime *string `min:"7" type:"string"` +} + +// String returns the string representation +func (s LustreFileSystemConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LustreFileSystemConfiguration) GoString() string { + return s.String() +} + +// SetDataRepositoryConfiguration sets the DataRepositoryConfiguration field's value. +func (s *LustreFileSystemConfiguration) SetDataRepositoryConfiguration(v *DataRepositoryConfiguration) *LustreFileSystemConfiguration { + s.DataRepositoryConfiguration = v + return s +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *LustreFileSystemConfiguration) SetWeeklyMaintenanceStartTime(v string) *LustreFileSystemConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// Specifies a key-value pair for a resource tag. +type Tag struct { + _ struct{} `type:"structure"` + + // A value that specifies the TagKey, the name of the tag. Tag keys must be + // unique for the resource to which they are attached. + Key *string `min:"1" type:"string"` + + // A value that specifies the TagValue, the value assigned to the corresponding + // tag key. Tag values can be null and don't have to be unique in a tag set. + // For example, you can have a key-value pair in a tag set of finances : April + // and also of payroll : April. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// The request object for the TagResource operation. +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon FSx resource that you want to + // tag. + // + // ResourceARN is a required field + ResourceARN *string `min:"8" type:"string" required:"true"` + + // A list of tags for the resource. If a tag with a given key already exists, + // the value is replaced by the one specified in this parameter. + // + // Tags is a required field + Tags []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 8 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 8)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +// The response object for the TagResource operation. +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// The request object for UntagResource action. +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the Amazon FSx resource to untag. + // + // ResourceARN is a required field + ResourceARN *string `min:"8" type:"string" required:"true"` + + // A list of keys of tags on the resource to untag. In case the tag key doesn't + // exist, the call will still succeed to be idempotent. + // + // TagKeys is a required field + TagKeys []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 8 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 8)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +// The response object for UntagResource action. +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// The request object for the UpdateFileSystem operation. +type UpdateFileSystemInput struct { + _ struct{} `type:"structure"` + + // (Optional) A string of up to 64 ASCII characters that Amazon FSx uses to + // ensure idempotent updates. This string is automatically filled on your behalf + // when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The globally unique ID of the file system, assigned by Amazon FSx. + // + // FileSystemId is a required field + FileSystemId *string `min:"11" type:"string" required:"true"` + + // The configuration object for Amazon FSx for Lustre file systems used in the + // UpdateFileSystem operation. + LustreConfiguration *UpdateFileSystemLustreConfiguration `type:"structure"` + + // The configuration for this Microsoft Windows file system. The only supported + // options are for backup and maintenance. + WindowsConfiguration *UpdateFileSystemWindowsConfiguration `type:"structure"` +} + +// String returns the string representation +func (s UpdateFileSystemInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFileSystemInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.FileSystemId == nil { + invalidParams.Add(request.NewErrParamRequired("FileSystemId")) + } + if s.FileSystemId != nil && len(*s.FileSystemId) < 11 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 11)) + } + if s.LustreConfiguration != nil { + if err := s.LustreConfiguration.Validate(); err != nil { + invalidParams.AddNested("LustreConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.WindowsConfiguration != nil { + if err := s.WindowsConfiguration.Validate(); err != nil { + invalidParams.AddNested("WindowsConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *UpdateFileSystemInput) SetClientRequestToken(v string) *UpdateFileSystemInput { + s.ClientRequestToken = &v + return s +} + +// SetFileSystemId sets the FileSystemId field's value. +func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput { + s.FileSystemId = &v + return s +} + +// SetLustreConfiguration sets the LustreConfiguration field's value. +func (s *UpdateFileSystemInput) SetLustreConfiguration(v *UpdateFileSystemLustreConfiguration) *UpdateFileSystemInput { + s.LustreConfiguration = v + return s +} + +// SetWindowsConfiguration sets the WindowsConfiguration field's value. +func (s *UpdateFileSystemInput) SetWindowsConfiguration(v *UpdateFileSystemWindowsConfiguration) *UpdateFileSystemInput { + s.WindowsConfiguration = v + return s +} + +// The configuration object for Amazon FSx for Lustre file systems used in the +// UpdateFileSystem operation. +type UpdateFileSystemLustreConfiguration struct { + _ struct{} `type:"structure"` + + // The preferred time to perform weekly maintenance, in the UTC time zone. + WeeklyMaintenanceStartTime *string `min:"7" type:"string"` +} + +// String returns the string representation +func (s UpdateFileSystemLustreConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemLustreConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFileSystemLustreConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemLustreConfiguration"} + if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { + invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *UpdateFileSystemLustreConfiguration) SetWeeklyMaintenanceStartTime(v string) *UpdateFileSystemLustreConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// The response object for the UpdateFileSystem operation. +type UpdateFileSystemOutput struct { + _ struct{} `type:"structure"` + + // A description of the file system. + FileSystem *FileSystem `type:"structure"` +} + +// String returns the string representation +func (s UpdateFileSystemOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemOutput) GoString() string { + return s.String() +} + +// SetFileSystem sets the FileSystem field's value. +func (s *UpdateFileSystemOutput) SetFileSystem(v *FileSystem) *UpdateFileSystemOutput { + s.FileSystem = v + return s +} + +// The configuration object for the Microsoft Windows file system used in the +// UpdateFileSystem operation. +type UpdateFileSystemWindowsConfiguration struct { + _ struct{} `type:"structure"` + + // The number of days to retain automatic backups. Setting this to 0 disables + // automatic backups. You can retain automatic backups for a maximum of 35 days. + AutomaticBackupRetentionDays *int64 `type:"integer"` + + // The preferred time to take daily automatic backups, in the UTC time zone. + DailyAutomaticBackupStartTime *string `min:"5" type:"string"` + + // The preferred time to perform weekly maintenance, in the UTC time zone. + WeeklyMaintenanceStartTime *string `min:"7" type:"string"` +} + +// String returns the string representation +func (s UpdateFileSystemWindowsConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFileSystemWindowsConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFileSystemWindowsConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemWindowsConfiguration"} + if s.DailyAutomaticBackupStartTime != nil && len(*s.DailyAutomaticBackupStartTime) < 5 { + invalidParams.Add(request.NewErrParamMinLen("DailyAutomaticBackupStartTime", 5)) + } + if s.WeeklyMaintenanceStartTime != nil && len(*s.WeeklyMaintenanceStartTime) < 7 { + invalidParams.Add(request.NewErrParamMinLen("WeeklyMaintenanceStartTime", 7)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. +func (s *UpdateFileSystemWindowsConfiguration) SetAutomaticBackupRetentionDays(v int64) *UpdateFileSystemWindowsConfiguration { + s.AutomaticBackupRetentionDays = &v + return s +} + +// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. +func (s *UpdateFileSystemWindowsConfiguration) SetDailyAutomaticBackupStartTime(v string) *UpdateFileSystemWindowsConfiguration { + s.DailyAutomaticBackupStartTime = &v + return s +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *UpdateFileSystemWindowsConfiguration) SetWeeklyMaintenanceStartTime(v string) *UpdateFileSystemWindowsConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// The configuration for this Microsoft Windows file system. +type WindowsFileSystemConfiguration struct { + _ struct{} `type:"structure"` + + // The ID for an existing Microsoft Active Directory instance that the file + // system should join when it's created. + ActiveDirectoryId *string `min:"12" type:"string"` + + // The number of days to retain automatic backups. Setting this to 0 disables + // automatic backups. You can retain automatic backups for a maximum of 35 days. + AutomaticBackupRetentionDays *int64 `type:"integer"` + + // A boolean flag indicating whether tags on the file system should be copied + // to backups. This value defaults to false. If it's set to true, all tags on + // the file system are copied to all automatic backups and any user-initiated + // backups where the user doesn't specify any tags. If this value is true, and + // you specify one or more tags, only the specified tags are copied to backups. + CopyTagsToBackups *bool `type:"boolean"` + + // The preferred time to take daily automatic backups, in the UTC time zone. + DailyAutomaticBackupStartTime *string `min:"5" type:"string"` + + // The list of maintenance operations in progress for this file system. + MaintenanceOperationsInProgress []*string `type:"list"` + + // The throughput of an Amazon FSx file system, measured in megabytes per second. + ThroughputCapacity *int64 `min:"8" type:"integer"` + + // The preferred time to perform weekly maintenance, in the UTC time zone. + WeeklyMaintenanceStartTime *string `min:"7" type:"string"` +} + +// String returns the string representation +func (s WindowsFileSystemConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WindowsFileSystemConfiguration) GoString() string { + return s.String() +} + +// SetActiveDirectoryId sets the ActiveDirectoryId field's value. +func (s *WindowsFileSystemConfiguration) SetActiveDirectoryId(v string) *WindowsFileSystemConfiguration { + s.ActiveDirectoryId = &v + return s +} + +// SetAutomaticBackupRetentionDays sets the AutomaticBackupRetentionDays field's value. +func (s *WindowsFileSystemConfiguration) SetAutomaticBackupRetentionDays(v int64) *WindowsFileSystemConfiguration { + s.AutomaticBackupRetentionDays = &v + return s +} + +// SetCopyTagsToBackups sets the CopyTagsToBackups field's value. +func (s *WindowsFileSystemConfiguration) SetCopyTagsToBackups(v bool) *WindowsFileSystemConfiguration { + s.CopyTagsToBackups = &v + return s +} + +// SetDailyAutomaticBackupStartTime sets the DailyAutomaticBackupStartTime field's value. +func (s *WindowsFileSystemConfiguration) SetDailyAutomaticBackupStartTime(v string) *WindowsFileSystemConfiguration { + s.DailyAutomaticBackupStartTime = &v + return s +} + +// SetMaintenanceOperationsInProgress sets the MaintenanceOperationsInProgress field's value. +func (s *WindowsFileSystemConfiguration) SetMaintenanceOperationsInProgress(v []*string) *WindowsFileSystemConfiguration { + s.MaintenanceOperationsInProgress = v + return s +} + +// SetThroughputCapacity sets the ThroughputCapacity field's value. +func (s *WindowsFileSystemConfiguration) SetThroughputCapacity(v int64) *WindowsFileSystemConfiguration { + s.ThroughputCapacity = &v + return s +} + +// SetWeeklyMaintenanceStartTime sets the WeeklyMaintenanceStartTime field's value. +func (s *WindowsFileSystemConfiguration) SetWeeklyMaintenanceStartTime(v string) *WindowsFileSystemConfiguration { + s.WeeklyMaintenanceStartTime = &v + return s +} + +// The type of error relating to Microsoft Active Directory. NOT_FOUND means +// that no directory was found by specifying the given directory. INCOMPATIBLE_MODE +// means that the directory specified is not a Microsoft AD directory. WRONG_VPC +// means that the specified directory isn't accessible from the specified VPC. +// WRONG_STAGE means that the specified directory isn't currently in the ACTIVE +// state. +const ( + // ActiveDirectoryErrorTypeDomainNotFound is a ActiveDirectoryErrorType enum value + ActiveDirectoryErrorTypeDomainNotFound = "DOMAIN_NOT_FOUND" + + // ActiveDirectoryErrorTypeIncompatibleDomainMode is a ActiveDirectoryErrorType enum value + ActiveDirectoryErrorTypeIncompatibleDomainMode = "INCOMPATIBLE_DOMAIN_MODE" + + // ActiveDirectoryErrorTypeWrongVpc is a ActiveDirectoryErrorType enum value + ActiveDirectoryErrorTypeWrongVpc = "WRONG_VPC" + + // ActiveDirectoryErrorTypeInvalidDomainStage is a ActiveDirectoryErrorType enum value + ActiveDirectoryErrorTypeInvalidDomainStage = "INVALID_DOMAIN_STAGE" +) + +// The lifecycle status of the backup. +const ( + // BackupLifecycleAvailable is a BackupLifecycle enum value + BackupLifecycleAvailable = "AVAILABLE" + + // BackupLifecycleCreating is a BackupLifecycle enum value + BackupLifecycleCreating = "CREATING" + + // BackupLifecycleDeleted is a BackupLifecycle enum value + BackupLifecycleDeleted = "DELETED" + + // BackupLifecycleFailed is a BackupLifecycle enum value + BackupLifecycleFailed = "FAILED" +) + +// The type of the backup. +const ( + // BackupTypeAutomatic is a BackupType enum value + BackupTypeAutomatic = "AUTOMATIC" + + // BackupTypeUserInitiated is a BackupType enum value + BackupTypeUserInitiated = "USER_INITIATED" +) + +// The lifecycle status of the file system. +const ( + // FileSystemLifecycleAvailable is a FileSystemLifecycle enum value + FileSystemLifecycleAvailable = "AVAILABLE" + + // FileSystemLifecycleCreating is a FileSystemLifecycle enum value + FileSystemLifecycleCreating = "CREATING" + + // FileSystemLifecycleFailed is a FileSystemLifecycle enum value + FileSystemLifecycleFailed = "FAILED" + + // FileSystemLifecycleDeleting is a FileSystemLifecycle enum value + FileSystemLifecycleDeleting = "DELETING" +) + +// An enumeration specifying the currently ongoing maintenance operation. +const ( + // FileSystemMaintenanceOperationPatching is a FileSystemMaintenanceOperation enum value + FileSystemMaintenanceOperationPatching = "PATCHING" + + // FileSystemMaintenanceOperationBackingUp is a FileSystemMaintenanceOperation enum value + FileSystemMaintenanceOperationBackingUp = "BACKING_UP" +) + +// The type of file system. +const ( + // FileSystemTypeWindows is a FileSystemType enum value + FileSystemTypeWindows = "WINDOWS" + + // FileSystemTypeLustre is a FileSystemType enum value + FileSystemTypeLustre = "LUSTRE" +) + +// The name for a filter. +const ( + // FilterNameFileSystemId is a FilterName enum value + FilterNameFileSystemId = "file-system-id" + + // FilterNameBackupType is a FilterName enum value + FilterNameBackupType = "backup-type" +) + +// The types of limits on your service utilization. Limits include file system +// count, total throughput capacity, total storage, and total user-initiated +// backups. These limits apply for a specific account in a specific AWS Region. +// You can increase some of them by contacting AWS Support. +const ( + // ServiceLimitFileSystemCount is a ServiceLimit enum value + ServiceLimitFileSystemCount = "FILE_SYSTEM_COUNT" + + // ServiceLimitTotalThroughputCapacity is a ServiceLimit enum value + ServiceLimitTotalThroughputCapacity = "TOTAL_THROUGHPUT_CAPACITY" + + // ServiceLimitTotalStorage is a ServiceLimit enum value + ServiceLimitTotalStorage = "TOTAL_STORAGE" + + // ServiceLimitTotalUserInitiatedBackups is a ServiceLimit enum value + ServiceLimitTotalUserInitiatedBackups = "TOTAL_USER_INITIATED_BACKUPS" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go new file mode 100644 index 000000000..0c23c396c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fsx/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package fsx provides the client and types for making API +// requests to Amazon FSx. +// +// Amazon FSx is a fully managed service that makes it easy for storage and +// application administrators to launch and use shared file storage. +// +// See https://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01 for more information on this service. +// +// See fsx package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/fsx/ +// +// Using the Client +// +// To contact Amazon FSx with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon FSx client FSx for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/fsx/#New +package fsx diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go new file mode 100644 index 000000000..1a7801fb4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fsx/errors.go @@ -0,0 +1,106 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fsx + +const ( + + // ErrCodeActiveDirectoryError for service response error code + // "ActiveDirectoryError". + // + // An Active Directory error. + ErrCodeActiveDirectoryError = "ActiveDirectoryError" + + // ErrCodeBackupInProgress for service response error code + // "BackupInProgress". + // + // Another backup is already under way. Wait for completion before initiating + // additional backups of this file system. + ErrCodeBackupInProgress = "BackupInProgress" + + // ErrCodeBackupNotFound for service response error code + // "BackupNotFound". + // + // No Amazon FSx backups were found based upon the supplied parameters. + ErrCodeBackupNotFound = "BackupNotFound" + + // ErrCodeBackupRestoring for service response error code + // "BackupRestoring". + // + // You can't delete a backup while it's being used to restore a file system. + ErrCodeBackupRestoring = "BackupRestoring" + + // ErrCodeBadRequest for service response error code + // "BadRequest". + // + // A generic error indicating a failure with a client request. + ErrCodeBadRequest = "BadRequest" + + // ErrCodeFileSystemNotFound for service response error code + // "FileSystemNotFound". + // + // No Amazon FSx file systems were found based upon supplied parameters. + ErrCodeFileSystemNotFound = "FileSystemNotFound" + + // ErrCodeIncompatibleParameterError for service response error code + // "IncompatibleParameterError". + // + // The error returned when a second request is received with the same client + // request token but different parameters settings. A client request token should + // always uniquely identify a single request. + ErrCodeIncompatibleParameterError = "IncompatibleParameterError" + + // ErrCodeInternalServerError for service response error code + // "InternalServerError". + // + // A generic error indicating a server-side failure. + ErrCodeInternalServerError = "InternalServerError" + + // ErrCodeInvalidImportPath for service response error code + // "InvalidImportPath". + // + // The path provided for data repository import isn't valid. + ErrCodeInvalidImportPath = "InvalidImportPath" + + // ErrCodeInvalidNetworkSettings for service response error code + // "InvalidNetworkSettings". + // + // One or more network settings specified in the request are invalid. InvalidVpcId + // means that the ID passed for the virtual private cloud (VPC) is invalid. + // InvalidSubnetIds returns the list of IDs for subnets that are either invalid + // or not part of the VPC specified. InvalidSecurityGroupIds returns the list + // of IDs for security groups that are either invalid or not part of the VPC + // specified. + ErrCodeInvalidNetworkSettings = "InvalidNetworkSettings" + + // ErrCodeMissingFileSystemConfiguration for service response error code + // "MissingFileSystemConfiguration". + // + // File system configuration is required for this operation. + ErrCodeMissingFileSystemConfiguration = "MissingFileSystemConfiguration" + + // ErrCodeNotServiceResourceError for service response error code + // "NotServiceResourceError". + // + // The resource specified for the tagging operation is not a resource type owned + // by Amazon FSx. Use the API of the relevant service to perform the operation. + ErrCodeNotServiceResourceError = "NotServiceResourceError" + + // ErrCodeResourceDoesNotSupportTagging for service response error code + // "ResourceDoesNotSupportTagging". + // + // The resource specified does not support tagging. + ErrCodeResourceDoesNotSupportTagging = "ResourceDoesNotSupportTagging" + + // ErrCodeResourceNotFound for service response error code + // "ResourceNotFound". + // + // The resource specified by the Amazon Resource Name (ARN) can't be found. + ErrCodeResourceNotFound = "ResourceNotFound" + + // ErrCodeServiceLimitExceeded for service response error code + // "ServiceLimitExceeded". + // + // An error indicating that a particular service limit was exceeded. You can + // increase some service limits by contacting AWS Support. + ErrCodeServiceLimitExceeded = "ServiceLimitExceeded" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go b/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go new file mode 100644 index 000000000..544a82e1b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/fsx/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package fsx + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// FSx provides the API operation methods for making requests to +// Amazon FSx. See this package's package overview docs +// for details on the service. +// +// FSx methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type FSx struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "FSx" // Name of service. + EndpointsID = "fsx" // ID to lookup a service endpoint with. + ServiceID = "FSx" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the FSx client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a FSx client from just a session. +// svc := fsx.New(mySession) +// +// // Create a FSx client with additional configuration +// svc := fsx.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *FSx { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *FSx { + svc := &FSx{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-03-01", + JSONVersion: "1.1", + TargetPrefix: "AWSSimbaAPIService_v20180301", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a FSx operation and runs any +// custom request initialization. +func (c *FSx) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go new file mode 100644 index 000000000..ac7d30d2d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/api.go @@ -0,0 +1,3617 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package globalaccelerator + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCreateAccelerator = "CreateAccelerator" + +// CreateAcceleratorRequest generates a "aws/request.Request" representing the +// client's request for the CreateAccelerator operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateAccelerator for more information on using the CreateAccelerator +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateAcceleratorRequest method. +// req, resp := client.CreateAcceleratorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator +func (c *GlobalAccelerator) CreateAcceleratorRequest(input *CreateAcceleratorInput) (req *request.Request, output *CreateAcceleratorOutput) { + op := &request.Operation{ + Name: opCreateAccelerator, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateAcceleratorInput{} + } + + output = &CreateAcceleratorOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateAccelerator API operation for AWS Global Accelerator. +// +// Create an accelerator. An accelerator includes one or more listeners that +// process inbound connections and direct traffic to one or more endpoint groups, +// each of which includes endpoints, such as Network Load Balancers. To see +// an AWS CLI example of creating an accelerator, scroll down to Example. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation CreateAccelerator for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Processing your request would cause you to exceed an AWS Global Accelerator +// limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateAccelerator +func (c *GlobalAccelerator) CreateAccelerator(input *CreateAcceleratorInput) (*CreateAcceleratorOutput, error) { + req, out := c.CreateAcceleratorRequest(input) + return out, req.Send() +} + +// CreateAcceleratorWithContext is the same as CreateAccelerator with the addition of +// the ability to pass a context and additional request options. +// +// See CreateAccelerator for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) CreateAcceleratorWithContext(ctx aws.Context, input *CreateAcceleratorInput, opts ...request.Option) (*CreateAcceleratorOutput, error) { + req, out := c.CreateAcceleratorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateEndpointGroup = "CreateEndpointGroup" + +// CreateEndpointGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateEndpointGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateEndpointGroup for more information on using the CreateEndpointGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateEndpointGroupRequest method. +// req, resp := client.CreateEndpointGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup +func (c *GlobalAccelerator) CreateEndpointGroupRequest(input *CreateEndpointGroupInput) (req *request.Request, output *CreateEndpointGroupOutput) { + op := &request.Operation{ + Name: opCreateEndpointGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateEndpointGroupInput{} + } + + output = &CreateEndpointGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateEndpointGroup API operation for AWS Global Accelerator. +// +// Create an endpoint group for the specified listener. An endpoint group is +// a collection of endpoints in one AWS Region. To see an AWS CLI example of +// creating an endpoint group, scroll down to Example. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation CreateEndpointGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeEndpointGroupAlreadyExistsException "EndpointGroupAlreadyExistsException" +// The endpoint group that you specified already exists. +// +// * ErrCodeListenerNotFoundException "ListenerNotFoundException" +// The listener that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Processing your request would cause you to exceed an AWS Global Accelerator +// limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateEndpointGroup +func (c *GlobalAccelerator) CreateEndpointGroup(input *CreateEndpointGroupInput) (*CreateEndpointGroupOutput, error) { + req, out := c.CreateEndpointGroupRequest(input) + return out, req.Send() +} + +// CreateEndpointGroupWithContext is the same as CreateEndpointGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateEndpointGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) CreateEndpointGroupWithContext(ctx aws.Context, input *CreateEndpointGroupInput, opts ...request.Option) (*CreateEndpointGroupOutput, error) { + req, out := c.CreateEndpointGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateListener = "CreateListener" + +// CreateListenerRequest generates a "aws/request.Request" representing the +// client's request for the CreateListener operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateListener for more information on using the CreateListener +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateListenerRequest method. +// req, resp := client.CreateListenerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener +func (c *GlobalAccelerator) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) { + op := &request.Operation{ + Name: opCreateListener, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateListenerInput{} + } + + output = &CreateListenerOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateListener API operation for AWS Global Accelerator. +// +// Create a listener to process inbound connections from clients to an accelerator. +// Connections arrive to assigned static IP addresses on a port, port range, +// or list of port ranges that you specify. To see an AWS CLI example of creating +// a listener, scroll down to Example. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation CreateListener for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeInvalidPortRangeException "InvalidPortRangeException" +// The port numbers that you specified are not valid numbers or are not unique +// for this accelerator. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Processing your request would cause you to exceed an AWS Global Accelerator +// limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/CreateListener +func (c *GlobalAccelerator) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) { + req, out := c.CreateListenerRequest(input) + return out, req.Send() +} + +// CreateListenerWithContext is the same as CreateListener with the addition of +// the ability to pass a context and additional request options. +// +// See CreateListener for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) { + req, out := c.CreateListenerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAccelerator = "DeleteAccelerator" + +// DeleteAcceleratorRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAccelerator operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAccelerator for more information on using the DeleteAccelerator +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAcceleratorRequest method. +// req, resp := client.DeleteAcceleratorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator +func (c *GlobalAccelerator) DeleteAcceleratorRequest(input *DeleteAcceleratorInput) (req *request.Request, output *DeleteAcceleratorOutput) { + op := &request.Operation{ + Name: opDeleteAccelerator, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAcceleratorInput{} + } + + output = &DeleteAcceleratorOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteAccelerator API operation for AWS Global Accelerator. +// +// Delete an accelerator. Note: before you can delete an accelerator, you must +// disable it and remove all dependent resources (listeners and endpoint groups). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DeleteAccelerator for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeAcceleratorNotDisabledException "AcceleratorNotDisabledException" +// The accelerator that you specified could not be disabled. +// +// * ErrCodeAssociatedListenerFoundException "AssociatedListenerFoundException" +// The accelerator that you specified has a listener associated with it. You +// must remove all dependent resources from an accelerator before you can delete +// it. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteAccelerator +func (c *GlobalAccelerator) DeleteAccelerator(input *DeleteAcceleratorInput) (*DeleteAcceleratorOutput, error) { + req, out := c.DeleteAcceleratorRequest(input) + return out, req.Send() +} + +// DeleteAcceleratorWithContext is the same as DeleteAccelerator with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAccelerator for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DeleteAcceleratorWithContext(ctx aws.Context, input *DeleteAcceleratorInput, opts ...request.Option) (*DeleteAcceleratorOutput, error) { + req, out := c.DeleteAcceleratorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEndpointGroup = "DeleteEndpointGroup" + +// DeleteEndpointGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEndpointGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEndpointGroup for more information on using the DeleteEndpointGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEndpointGroupRequest method. +// req, resp := client.DeleteEndpointGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup +func (c *GlobalAccelerator) DeleteEndpointGroupRequest(input *DeleteEndpointGroupInput) (req *request.Request, output *DeleteEndpointGroupOutput) { + op := &request.Operation{ + Name: opDeleteEndpointGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteEndpointGroupInput{} + } + + output = &DeleteEndpointGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteEndpointGroup API operation for AWS Global Accelerator. +// +// Delete an endpoint group from a listener. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DeleteEndpointGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException" +// The endpoint group that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteEndpointGroup +func (c *GlobalAccelerator) DeleteEndpointGroup(input *DeleteEndpointGroupInput) (*DeleteEndpointGroupOutput, error) { + req, out := c.DeleteEndpointGroupRequest(input) + return out, req.Send() +} + +// DeleteEndpointGroupWithContext is the same as DeleteEndpointGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEndpointGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DeleteEndpointGroupWithContext(ctx aws.Context, input *DeleteEndpointGroupInput, opts ...request.Option) (*DeleteEndpointGroupOutput, error) { + req, out := c.DeleteEndpointGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteListener = "DeleteListener" + +// DeleteListenerRequest generates a "aws/request.Request" representing the +// client's request for the DeleteListener operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteListener for more information on using the DeleteListener +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteListenerRequest method. +// req, resp := client.DeleteListenerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener +func (c *GlobalAccelerator) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) { + op := &request.Operation{ + Name: opDeleteListener, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteListenerInput{} + } + + output = &DeleteListenerOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteListener API operation for AWS Global Accelerator. +// +// Delete a listener from an accelerator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DeleteListener for usage and error information. +// +// Returned Error Codes: +// * ErrCodeListenerNotFoundException "ListenerNotFoundException" +// The listener that you specified doesn't exist. +// +// * ErrCodeAssociatedEndpointGroupFoundException "AssociatedEndpointGroupFoundException" +// The listener that you specified has an endpoint group associated with it. +// You must remove all dependent resources from a listener before you can delete +// it. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DeleteListener +func (c *GlobalAccelerator) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) { + req, out := c.DeleteListenerRequest(input) + return out, req.Send() +} + +// DeleteListenerWithContext is the same as DeleteListener with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteListener for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) { + req, out := c.DeleteListenerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAccelerator = "DescribeAccelerator" + +// DescribeAcceleratorRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccelerator operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAccelerator for more information on using the DescribeAccelerator +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAcceleratorRequest method. +// req, resp := client.DescribeAcceleratorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator +func (c *GlobalAccelerator) DescribeAcceleratorRequest(input *DescribeAcceleratorInput) (req *request.Request, output *DescribeAcceleratorOutput) { + op := &request.Operation{ + Name: opDescribeAccelerator, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAcceleratorInput{} + } + + output = &DescribeAcceleratorOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAccelerator API operation for AWS Global Accelerator. +// +// Describe an accelerator. To see an AWS CLI example of describing an accelerator, +// scroll down to Example. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DescribeAccelerator for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAccelerator +func (c *GlobalAccelerator) DescribeAccelerator(input *DescribeAcceleratorInput) (*DescribeAcceleratorOutput, error) { + req, out := c.DescribeAcceleratorRequest(input) + return out, req.Send() +} + +// DescribeAcceleratorWithContext is the same as DescribeAccelerator with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAccelerator for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DescribeAcceleratorWithContext(ctx aws.Context, input *DescribeAcceleratorInput, opts ...request.Option) (*DescribeAcceleratorOutput, error) { + req, out := c.DescribeAcceleratorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAcceleratorAttributes = "DescribeAcceleratorAttributes" + +// DescribeAcceleratorAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAcceleratorAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAcceleratorAttributes for more information on using the DescribeAcceleratorAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAcceleratorAttributesRequest method. +// req, resp := client.DescribeAcceleratorAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes +func (c *GlobalAccelerator) DescribeAcceleratorAttributesRequest(input *DescribeAcceleratorAttributesInput) (req *request.Request, output *DescribeAcceleratorAttributesOutput) { + op := &request.Operation{ + Name: opDescribeAcceleratorAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAcceleratorAttributesInput{} + } + + output = &DescribeAcceleratorAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAcceleratorAttributes API operation for AWS Global Accelerator. +// +// Describe the attributes of an accelerator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DescribeAcceleratorAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeAcceleratorAttributes +func (c *GlobalAccelerator) DescribeAcceleratorAttributes(input *DescribeAcceleratorAttributesInput) (*DescribeAcceleratorAttributesOutput, error) { + req, out := c.DescribeAcceleratorAttributesRequest(input) + return out, req.Send() +} + +// DescribeAcceleratorAttributesWithContext is the same as DescribeAcceleratorAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAcceleratorAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DescribeAcceleratorAttributesWithContext(ctx aws.Context, input *DescribeAcceleratorAttributesInput, opts ...request.Option) (*DescribeAcceleratorAttributesOutput, error) { + req, out := c.DescribeAcceleratorAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEndpointGroup = "DescribeEndpointGroup" + +// DescribeEndpointGroupRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpointGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEndpointGroup for more information on using the DescribeEndpointGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEndpointGroupRequest method. +// req, resp := client.DescribeEndpointGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup +func (c *GlobalAccelerator) DescribeEndpointGroupRequest(input *DescribeEndpointGroupInput) (req *request.Request, output *DescribeEndpointGroupOutput) { + op := &request.Operation{ + Name: opDescribeEndpointGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEndpointGroupInput{} + } + + output = &DescribeEndpointGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpointGroup API operation for AWS Global Accelerator. +// +// Describe an endpoint group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DescribeEndpointGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException" +// The endpoint group that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeEndpointGroup +func (c *GlobalAccelerator) DescribeEndpointGroup(input *DescribeEndpointGroupInput) (*DescribeEndpointGroupOutput, error) { + req, out := c.DescribeEndpointGroupRequest(input) + return out, req.Send() +} + +// DescribeEndpointGroupWithContext is the same as DescribeEndpointGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpointGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DescribeEndpointGroupWithContext(ctx aws.Context, input *DescribeEndpointGroupInput, opts ...request.Option) (*DescribeEndpointGroupOutput, error) { + req, out := c.DescribeEndpointGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeListener = "DescribeListener" + +// DescribeListenerRequest generates a "aws/request.Request" representing the +// client's request for the DescribeListener operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeListener for more information on using the DescribeListener +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeListenerRequest method. +// req, resp := client.DescribeListenerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener +func (c *GlobalAccelerator) DescribeListenerRequest(input *DescribeListenerInput) (req *request.Request, output *DescribeListenerOutput) { + op := &request.Operation{ + Name: opDescribeListener, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeListenerInput{} + } + + output = &DescribeListenerOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeListener API operation for AWS Global Accelerator. +// +// Describe a listener. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation DescribeListener for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeListenerNotFoundException "ListenerNotFoundException" +// The listener that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/DescribeListener +func (c *GlobalAccelerator) DescribeListener(input *DescribeListenerInput) (*DescribeListenerOutput, error) { + req, out := c.DescribeListenerRequest(input) + return out, req.Send() +} + +// DescribeListenerWithContext is the same as DescribeListener with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeListener for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) DescribeListenerWithContext(ctx aws.Context, input *DescribeListenerInput, opts ...request.Option) (*DescribeListenerOutput, error) { + req, out := c.DescribeListenerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAccelerators = "ListAccelerators" + +// ListAcceleratorsRequest generates a "aws/request.Request" representing the +// client's request for the ListAccelerators operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAccelerators for more information on using the ListAccelerators +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAcceleratorsRequest method. +// req, resp := client.ListAcceleratorsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators +func (c *GlobalAccelerator) ListAcceleratorsRequest(input *ListAcceleratorsInput) (req *request.Request, output *ListAcceleratorsOutput) { + op := &request.Operation{ + Name: opListAccelerators, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAcceleratorsInput{} + } + + output = &ListAcceleratorsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAccelerators API operation for AWS Global Accelerator. +// +// List the accelerators for an AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation ListAccelerators for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// There isn't another item to return. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListAccelerators +func (c *GlobalAccelerator) ListAccelerators(input *ListAcceleratorsInput) (*ListAcceleratorsOutput, error) { + req, out := c.ListAcceleratorsRequest(input) + return out, req.Send() +} + +// ListAcceleratorsWithContext is the same as ListAccelerators with the addition of +// the ability to pass a context and additional request options. +// +// See ListAccelerators for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) ListAcceleratorsWithContext(ctx aws.Context, input *ListAcceleratorsInput, opts ...request.Option) (*ListAcceleratorsOutput, error) { + req, out := c.ListAcceleratorsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListEndpointGroups = "ListEndpointGroups" + +// ListEndpointGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListEndpointGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEndpointGroups for more information on using the ListEndpointGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEndpointGroupsRequest method. +// req, resp := client.ListEndpointGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListEndpointGroups +func (c *GlobalAccelerator) ListEndpointGroupsRequest(input *ListEndpointGroupsInput) (req *request.Request, output *ListEndpointGroupsOutput) { + op := &request.Operation{ + Name: opListEndpointGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListEndpointGroupsInput{} + } + + output = &ListEndpointGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEndpointGroups API operation for AWS Global Accelerator. +// +// List the endpoint groups that are associated with a listener. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation ListEndpointGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeListenerNotFoundException "ListenerNotFoundException" +// The listener that you specified doesn't exist. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// There isn't another item to return. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListEndpointGroups +func (c *GlobalAccelerator) ListEndpointGroups(input *ListEndpointGroupsInput) (*ListEndpointGroupsOutput, error) { + req, out := c.ListEndpointGroupsRequest(input) + return out, req.Send() +} + +// ListEndpointGroupsWithContext is the same as ListEndpointGroups with the addition of +// the ability to pass a context and additional request options. +// +// See ListEndpointGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) ListEndpointGroupsWithContext(ctx aws.Context, input *ListEndpointGroupsInput, opts ...request.Option) (*ListEndpointGroupsOutput, error) { + req, out := c.ListEndpointGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListListeners = "ListListeners" + +// ListListenersRequest generates a "aws/request.Request" representing the +// client's request for the ListListeners operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListListeners for more information on using the ListListeners +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListListenersRequest method. +// req, resp := client.ListListenersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListListeners +func (c *GlobalAccelerator) ListListenersRequest(input *ListListenersInput) (req *request.Request, output *ListListenersOutput) { + op := &request.Operation{ + Name: opListListeners, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListListenersInput{} + } + + output = &ListListenersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListListeners API operation for AWS Global Accelerator. +// +// List the listeners for an accelerator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation ListListeners for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// There isn't another item to return. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/ListListeners +func (c *GlobalAccelerator) ListListeners(input *ListListenersInput) (*ListListenersOutput, error) { + req, out := c.ListListenersRequest(input) + return out, req.Send() +} + +// ListListenersWithContext is the same as ListListeners with the addition of +// the ability to pass a context and additional request options. +// +// See ListListeners for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) ListListenersWithContext(ctx aws.Context, input *ListListenersInput, opts ...request.Option) (*ListListenersOutput, error) { + req, out := c.ListListenersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAccelerator = "UpdateAccelerator" + +// UpdateAcceleratorRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAccelerator operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAccelerator for more information on using the UpdateAccelerator +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAcceleratorRequest method. +// req, resp := client.UpdateAcceleratorRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAccelerator +func (c *GlobalAccelerator) UpdateAcceleratorRequest(input *UpdateAcceleratorInput) (req *request.Request, output *UpdateAcceleratorOutput) { + op := &request.Operation{ + Name: opUpdateAccelerator, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAcceleratorInput{} + } + + output = &UpdateAcceleratorOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAccelerator API operation for AWS Global Accelerator. +// +// Update an accelerator. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation UpdateAccelerator for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAccelerator +func (c *GlobalAccelerator) UpdateAccelerator(input *UpdateAcceleratorInput) (*UpdateAcceleratorOutput, error) { + req, out := c.UpdateAcceleratorRequest(input) + return out, req.Send() +} + +// UpdateAcceleratorWithContext is the same as UpdateAccelerator with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAccelerator for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) UpdateAcceleratorWithContext(ctx aws.Context, input *UpdateAcceleratorInput, opts ...request.Option) (*UpdateAcceleratorOutput, error) { + req, out := c.UpdateAcceleratorRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAcceleratorAttributes = "UpdateAcceleratorAttributes" + +// UpdateAcceleratorAttributesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAcceleratorAttributes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAcceleratorAttributes for more information on using the UpdateAcceleratorAttributes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAcceleratorAttributesRequest method. +// req, resp := client.UpdateAcceleratorAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAcceleratorAttributes +func (c *GlobalAccelerator) UpdateAcceleratorAttributesRequest(input *UpdateAcceleratorAttributesInput) (req *request.Request, output *UpdateAcceleratorAttributesOutput) { + op := &request.Operation{ + Name: opUpdateAcceleratorAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAcceleratorAttributesInput{} + } + + output = &UpdateAcceleratorAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAcceleratorAttributes API operation for AWS Global Accelerator. +// +// Update the attributes for an accelerator. To see an AWS CLI example of updating +// an accelerator to enable flow logs, scroll down to Example. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation UpdateAcceleratorAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAcceleratorNotFoundException "AcceleratorNotFoundException" +// The accelerator that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateAcceleratorAttributes +func (c *GlobalAccelerator) UpdateAcceleratorAttributes(input *UpdateAcceleratorAttributesInput) (*UpdateAcceleratorAttributesOutput, error) { + req, out := c.UpdateAcceleratorAttributesRequest(input) + return out, req.Send() +} + +// UpdateAcceleratorAttributesWithContext is the same as UpdateAcceleratorAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAcceleratorAttributes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) UpdateAcceleratorAttributesWithContext(ctx aws.Context, input *UpdateAcceleratorAttributesInput, opts ...request.Option) (*UpdateAcceleratorAttributesOutput, error) { + req, out := c.UpdateAcceleratorAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpointGroup = "UpdateEndpointGroup" + +// UpdateEndpointGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpointGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateEndpointGroup for more information on using the UpdateEndpointGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateEndpointGroupRequest method. +// req, resp := client.UpdateEndpointGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateEndpointGroup +func (c *GlobalAccelerator) UpdateEndpointGroupRequest(input *UpdateEndpointGroupInput) (req *request.Request, output *UpdateEndpointGroupOutput) { + op := &request.Operation{ + Name: opUpdateEndpointGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateEndpointGroupInput{} + } + + output = &UpdateEndpointGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpointGroup API operation for AWS Global Accelerator. +// +// Update an endpoint group. To see an AWS CLI example of updating an endpoint +// group, scroll down to Example. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation UpdateEndpointGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeEndpointGroupNotFoundException "EndpointGroupNotFoundException" +// The endpoint group that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Processing your request would cause you to exceed an AWS Global Accelerator +// limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateEndpointGroup +func (c *GlobalAccelerator) UpdateEndpointGroup(input *UpdateEndpointGroupInput) (*UpdateEndpointGroupOutput, error) { + req, out := c.UpdateEndpointGroupRequest(input) + return out, req.Send() +} + +// UpdateEndpointGroupWithContext is the same as UpdateEndpointGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpointGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) UpdateEndpointGroupWithContext(ctx aws.Context, input *UpdateEndpointGroupInput, opts ...request.Option) (*UpdateEndpointGroupOutput, error) { + req, out := c.UpdateEndpointGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateListener = "UpdateListener" + +// UpdateListenerRequest generates a "aws/request.Request" representing the +// client's request for the UpdateListener operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateListener for more information on using the UpdateListener +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateListenerRequest method. +// req, resp := client.UpdateListenerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateListener +func (c *GlobalAccelerator) UpdateListenerRequest(input *UpdateListenerInput) (req *request.Request, output *UpdateListenerOutput) { + op := &request.Operation{ + Name: opUpdateListener, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateListenerInput{} + } + + output = &UpdateListenerOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateListener API operation for AWS Global Accelerator. +// +// Update a listener. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Global Accelerator's +// API operation UpdateListener for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// An argument that you specified is invalid. +// +// * ErrCodeInvalidPortRangeException "InvalidPortRangeException" +// The port numbers that you specified are not valid numbers or are not unique +// for this accelerator. +// +// * ErrCodeListenerNotFoundException "ListenerNotFoundException" +// The listener that you specified doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// There was an internal error for AWS Global Accelerator. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Processing your request would cause you to exceed an AWS Global Accelerator +// limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08/UpdateListener +func (c *GlobalAccelerator) UpdateListener(input *UpdateListenerInput) (*UpdateListenerOutput, error) { + req, out := c.UpdateListenerRequest(input) + return out, req.Send() +} + +// UpdateListenerWithContext is the same as UpdateListener with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateListener for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *GlobalAccelerator) UpdateListenerWithContext(ctx aws.Context, input *UpdateListenerInput, opts ...request.Option) (*UpdateListenerOutput, error) { + req, out := c.UpdateListenerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// An accelerator is a complex type that includes one or more listeners that +// process inbound connections and then direct traffic to one or more endpoint +// groups, each of which includes endpoints, such as load balancers. +type Accelerator struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the accelerator. + AcceleratorArn *string `type:"string"` + + // The date and time that the accelerator was created. + CreatedTime *time.Time `type:"timestamp"` + + // Indicates whether theaccelerator is enabled. The value is true or false. + // The default value is true. + // + // If the value is set to true, the accelerator cannot be deleted. If set to + // false, accelerator can be deleted. + Enabled *bool `type:"boolean"` + + // The value for the address type must be IPv4. + IpAddressType *string `type:"string" enum:"IpAddressType"` + + // IP address set associated with the accelerator. + IpSets []*IpSet `type:"list"` + + // The date and time that the accelerator was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The name of the accelerator. The name can have a maximum of 32 characters, + // must contain only alphanumeric characters or hyphens (-), and must not begin + // or end with a hyphen. + Name *string `type:"string"` + + // Describes the deployment status of the accelerator. + Status *string `type:"string" enum:"AcceleratorStatus"` +} + +// String returns the string representation +func (s Accelerator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Accelerator) GoString() string { + return s.String() +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *Accelerator) SetAcceleratorArn(v string) *Accelerator { + s.AcceleratorArn = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *Accelerator) SetCreatedTime(v time.Time) *Accelerator { + s.CreatedTime = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *Accelerator) SetEnabled(v bool) *Accelerator { + s.Enabled = &v + return s +} + +// SetIpAddressType sets the IpAddressType field's value. +func (s *Accelerator) SetIpAddressType(v string) *Accelerator { + s.IpAddressType = &v + return s +} + +// SetIpSets sets the IpSets field's value. +func (s *Accelerator) SetIpSets(v []*IpSet) *Accelerator { + s.IpSets = v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *Accelerator) SetLastModifiedTime(v time.Time) *Accelerator { + s.LastModifiedTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *Accelerator) SetName(v string) *Accelerator { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *Accelerator) SetStatus(v string) *Accelerator { + s.Status = &v + return s +} + +// Attributes of an accelerator. +type AcceleratorAttributes struct { + _ struct{} `type:"structure"` + + // Indicates whether flow logs are enabled. The default value is false. If the + // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. + // + // For more information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) + // in the AWS Global Accelerator Developer Guide. + FlowLogsEnabled *bool `type:"boolean"` + + // The name of the Amazon S3 bucket for the flow logs. Attribute is required + // if FlowLogsEnabled is true. The bucket must exist and have a bucket policy + // that grants AWS Global Accelerator permission to write to the bucket. + FlowLogsS3Bucket *string `type:"string"` + + // The prefix for the location in the Amazon S3 bucket for the flow logs. Attribute + // is required if FlowLogsEnabled is true. If you don’t specify a prefix, the + // flow logs are stored in the root of the bucket. + FlowLogsS3Prefix *string `type:"string"` +} + +// String returns the string representation +func (s AcceleratorAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceleratorAttributes) GoString() string { + return s.String() +} + +// SetFlowLogsEnabled sets the FlowLogsEnabled field's value. +func (s *AcceleratorAttributes) SetFlowLogsEnabled(v bool) *AcceleratorAttributes { + s.FlowLogsEnabled = &v + return s +} + +// SetFlowLogsS3Bucket sets the FlowLogsS3Bucket field's value. +func (s *AcceleratorAttributes) SetFlowLogsS3Bucket(v string) *AcceleratorAttributes { + s.FlowLogsS3Bucket = &v + return s +} + +// SetFlowLogsS3Prefix sets the FlowLogsS3Prefix field's value. +func (s *AcceleratorAttributes) SetFlowLogsS3Prefix(v string) *AcceleratorAttributes { + s.FlowLogsS3Prefix = &v + return s +} + +type CreateAcceleratorInput struct { + _ struct{} `type:"structure"` + + // Indicates whether an accelerator is enabled. The value is true or false. + // The default value is true. + // + // If the value is set to true, an accelerator cannot be deleted. If set to + // false, the accelerator can be deleted. + Enabled *bool `type:"boolean"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency—that + // is, the uniqueness—of an accelerator. + // + // IdempotencyToken is a required field + IdempotencyToken *string `type:"string" required:"true"` + + // The value for the address type must be IPv4. + IpAddressType *string `type:"string" enum:"IpAddressType"` + + // The name of an accelerator. The name can have a maximum of 32 characters, + // must contain only alphanumeric characters or hyphens (-), and must not begin + // or end with a hyphen. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateAcceleratorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAcceleratorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAcceleratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAcceleratorInput"} + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *CreateAcceleratorInput) SetEnabled(v bool) *CreateAcceleratorInput { + s.Enabled = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateAcceleratorInput) SetIdempotencyToken(v string) *CreateAcceleratorInput { + s.IdempotencyToken = &v + return s +} + +// SetIpAddressType sets the IpAddressType field's value. +func (s *CreateAcceleratorInput) SetIpAddressType(v string) *CreateAcceleratorInput { + s.IpAddressType = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateAcceleratorInput) SetName(v string) *CreateAcceleratorInput { + s.Name = &v + return s +} + +type CreateAcceleratorOutput struct { + _ struct{} `type:"structure"` + + // The accelerator that is created by specifying a listener and the supported + // IP address types. + Accelerator *Accelerator `type:"structure"` +} + +// String returns the string representation +func (s CreateAcceleratorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAcceleratorOutput) GoString() string { + return s.String() +} + +// SetAccelerator sets the Accelerator field's value. +func (s *CreateAcceleratorOutput) SetAccelerator(v *Accelerator) *CreateAcceleratorOutput { + s.Accelerator = v + return s +} + +type CreateEndpointGroupInput struct { + _ struct{} `type:"structure"` + + // The list of endpoint objects. + EndpointConfigurations []*EndpointConfiguration `type:"list"` + + // The name of the AWS Region where the endpoint group is located. A listener + // can have only one endpoint group in a specific Region. + // + // EndpointGroupRegion is a required field + EndpointGroupRegion *string `type:"string" required:"true"` + + // The time—10 seconds or 30 seconds—between each health check for an endpoint. + // The default value is 30. + HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"` + + // If the protocol is HTTP/S, then this specifies the path that is the destination + // for health check targets. The default value is slash (/). + HealthCheckPath *string `type:"string"` + + // The port that AWS Global Accelerator uses to check the health of endpoints + // that are part of this endpoint group. The default port is the listener port + // that this endpoint group is associated with. If listener port is a list of + // ports, Global Accelerator uses the first port in the list. + HealthCheckPort *int64 `min:"1" type:"integer"` + + // The protocol that AWS Global Accelerator uses to check the health of endpoints + // that are part of this endpoint group. The default value is TCP. + HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency—that + // is, the uniqueness—of the request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the listener. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` + + // The number of consecutive health checks required to set the state of a healthy + // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default + // value is 3. + ThresholdCount *int64 `min:"1" type:"integer"` + + // The percentage of traffic to send to an AWS Region. Additional traffic is + // distributed to other endpoint groups for this listener. + // + // Use this action to increase (dial up) or decrease (dial down) traffic to + // a specific Region. The percentage is applied to the traffic that would otherwise + // have been routed to the Region based on optimal routing. + // + // The default value is 100. + TrafficDialPercentage *float64 `type:"float"` +} + +// String returns the string representation +func (s CreateEndpointGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEndpointGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEndpointGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEndpointGroupInput"} + if s.EndpointGroupRegion == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointGroupRegion")) + } + if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 10 { + invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 10)) + } + if s.HealthCheckPort != nil && *s.HealthCheckPort < 1 { + invalidParams.Add(request.NewErrParamMinValue("HealthCheckPort", 1)) + } + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + if s.ThresholdCount != nil && *s.ThresholdCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("ThresholdCount", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigurations sets the EndpointConfigurations field's value. +func (s *CreateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *CreateEndpointGroupInput { + s.EndpointConfigurations = v + return s +} + +// SetEndpointGroupRegion sets the EndpointGroupRegion field's value. +func (s *CreateEndpointGroupInput) SetEndpointGroupRegion(v string) *CreateEndpointGroupInput { + s.EndpointGroupRegion = &v + return s +} + +// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. +func (s *CreateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateEndpointGroupInput { + s.HealthCheckIntervalSeconds = &v + return s +} + +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *CreateEndpointGroupInput) SetHealthCheckPath(v string) *CreateEndpointGroupInput { + s.HealthCheckPath = &v + return s +} + +// SetHealthCheckPort sets the HealthCheckPort field's value. +func (s *CreateEndpointGroupInput) SetHealthCheckPort(v int64) *CreateEndpointGroupInput { + s.HealthCheckPort = &v + return s +} + +// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. +func (s *CreateEndpointGroupInput) SetHealthCheckProtocol(v string) *CreateEndpointGroupInput { + s.HealthCheckProtocol = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateEndpointGroupInput) SetIdempotencyToken(v string) *CreateEndpointGroupInput { + s.IdempotencyToken = &v + return s +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *CreateEndpointGroupInput) SetListenerArn(v string) *CreateEndpointGroupInput { + s.ListenerArn = &v + return s +} + +// SetThresholdCount sets the ThresholdCount field's value. +func (s *CreateEndpointGroupInput) SetThresholdCount(v int64) *CreateEndpointGroupInput { + s.ThresholdCount = &v + return s +} + +// SetTrafficDialPercentage sets the TrafficDialPercentage field's value. +func (s *CreateEndpointGroupInput) SetTrafficDialPercentage(v float64) *CreateEndpointGroupInput { + s.TrafficDialPercentage = &v + return s +} + +type CreateEndpointGroupOutput struct { + _ struct{} `type:"structure"` + + // The information about the endpoint group that was created. + EndpointGroup *EndpointGroup `type:"structure"` +} + +// String returns the string representation +func (s CreateEndpointGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEndpointGroupOutput) GoString() string { + return s.String() +} + +// SetEndpointGroup sets the EndpointGroup field's value. +func (s *CreateEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *CreateEndpointGroupOutput { + s.EndpointGroup = v + return s +} + +type CreateListenerInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of your accelerator. + // + // AcceleratorArn is a required field + AcceleratorArn *string `type:"string" required:"true"` + + // Client affinity lets you direct all requests from a user to the same endpoint, + // if you have stateful applications, regardless of the port and protocol of + // the client request. Clienty affinity gives you control over whether to always + // route each client to the same specific endpoint. + // + // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose + // the optimal endpoint for a connection. If client affinity is NONE, Global + // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, + // source port, destination IP address, destination port, and protocol—to select + // the hash value, and then chooses the best endpoint. However, with this setting, + // if someone uses different ports to connect to Global Accelerator, their connections + // might not be always routed to the same endpoint because the hash value changes. + // + // If you want a given client to always be routed to the same endpoint, set + // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, + // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) + // IP address and destination IP address—to select the hash value. + // + // The default value is NONE. + ClientAffinity *string `type:"string" enum:"ClientAffinity"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency—that + // is, the uniqueness—of the request. + // + // IdempotencyToken is a required field + IdempotencyToken *string `type:"string" required:"true"` + + // The list of port ranges to support for connections from clients to your accelerator. + // + // PortRanges is a required field + PortRanges []*PortRange `min:"1" type:"list" required:"true"` + + // The protocol for connections from clients to your accelerator. + // + // Protocol is a required field + Protocol *string `type:"string" required:"true" enum:"Protocol"` +} + +// String returns the string representation +func (s CreateListenerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateListenerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateListenerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"} + if s.AcceleratorArn == nil { + invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) + } + if s.IdempotencyToken == nil { + invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) + } + if s.PortRanges == nil { + invalidParams.Add(request.NewErrParamRequired("PortRanges")) + } + if s.PortRanges != nil && len(s.PortRanges) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortRanges", 1)) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.PortRanges != nil { + for i, v := range s.PortRanges { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortRanges", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *CreateListenerInput) SetAcceleratorArn(v string) *CreateListenerInput { + s.AcceleratorArn = &v + return s +} + +// SetClientAffinity sets the ClientAffinity field's value. +func (s *CreateListenerInput) SetClientAffinity(v string) *CreateListenerInput { + s.ClientAffinity = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateListenerInput) SetIdempotencyToken(v string) *CreateListenerInput { + s.IdempotencyToken = &v + return s +} + +// SetPortRanges sets the PortRanges field's value. +func (s *CreateListenerInput) SetPortRanges(v []*PortRange) *CreateListenerInput { + s.PortRanges = v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput { + s.Protocol = &v + return s +} + +type CreateListenerOutput struct { + _ struct{} `type:"structure"` + + // The listener that you've created. + Listener *Listener `type:"structure"` +} + +// String returns the string representation +func (s CreateListenerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateListenerOutput) GoString() string { + return s.String() +} + +// SetListener sets the Listener field's value. +func (s *CreateListenerOutput) SetListener(v *Listener) *CreateListenerOutput { + s.Listener = v + return s +} + +type DeleteAcceleratorInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an accelerator. + // + // AcceleratorArn is a required field + AcceleratorArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAcceleratorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAcceleratorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAcceleratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAcceleratorInput"} + if s.AcceleratorArn == nil { + invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *DeleteAcceleratorInput) SetAcceleratorArn(v string) *DeleteAcceleratorInput { + s.AcceleratorArn = &v + return s +} + +type DeleteAcceleratorOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAcceleratorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAcceleratorOutput) GoString() string { + return s.String() +} + +type DeleteEndpointGroupInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the endpoint group to delete. + // + // EndpointGroupArn is a required field + EndpointGroupArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEndpointGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointGroupInput"} + if s.EndpointGroupArn == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointGroupArn sets the EndpointGroupArn field's value. +func (s *DeleteEndpointGroupInput) SetEndpointGroupArn(v string) *DeleteEndpointGroupInput { + s.EndpointGroupArn = &v + return s +} + +type DeleteEndpointGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteEndpointGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointGroupOutput) GoString() string { + return s.String() +} + +type DeleteListenerInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the listener. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteListenerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteListenerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteListenerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"} + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput { + s.ListenerArn = &v + return s +} + +type DeleteListenerOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteListenerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteListenerOutput) GoString() string { + return s.String() +} + +type DescribeAcceleratorAttributesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the accelerator with the attributes that + // you want to describe. Value is required. + AcceleratorArn *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAcceleratorAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAcceleratorAttributesInput) GoString() string { + return s.String() +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *DescribeAcceleratorAttributesInput) SetAcceleratorArn(v string) *DescribeAcceleratorAttributesInput { + s.AcceleratorArn = &v + return s +} + +type DescribeAcceleratorAttributesOutput struct { + _ struct{} `type:"structure"` + + // The attributes of the accelerator. + AcceleratorAttributes *AcceleratorAttributes `type:"structure"` +} + +// String returns the string representation +func (s DescribeAcceleratorAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAcceleratorAttributesOutput) GoString() string { + return s.String() +} + +// SetAcceleratorAttributes sets the AcceleratorAttributes field's value. +func (s *DescribeAcceleratorAttributesOutput) SetAcceleratorAttributes(v *AcceleratorAttributes) *DescribeAcceleratorAttributesOutput { + s.AcceleratorAttributes = v + return s +} + +type DescribeAcceleratorInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the accelerator to describe. + // + // AcceleratorArn is a required field + AcceleratorArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAcceleratorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAcceleratorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAcceleratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAcceleratorInput"} + if s.AcceleratorArn == nil { + invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *DescribeAcceleratorInput) SetAcceleratorArn(v string) *DescribeAcceleratorInput { + s.AcceleratorArn = &v + return s +} + +type DescribeAcceleratorOutput struct { + _ struct{} `type:"structure"` + + // The description of the accelerator. + Accelerator *Accelerator `type:"structure"` +} + +// String returns the string representation +func (s DescribeAcceleratorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAcceleratorOutput) GoString() string { + return s.String() +} + +// SetAccelerator sets the Accelerator field's value. +func (s *DescribeAcceleratorOutput) SetAccelerator(v *Accelerator) *DescribeAcceleratorOutput { + s.Accelerator = v + return s +} + +type DescribeEndpointGroupInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the endpoint group to describe. + // + // EndpointGroupArn is a required field + EndpointGroupArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEndpointGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointGroupInput"} + if s.EndpointGroupArn == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointGroupArn sets the EndpointGroupArn field's value. +func (s *DescribeEndpointGroupInput) SetEndpointGroupArn(v string) *DescribeEndpointGroupInput { + s.EndpointGroupArn = &v + return s +} + +type DescribeEndpointGroupOutput struct { + _ struct{} `type:"structure"` + + // The description of an endpoint group. + EndpointGroup *EndpointGroup `type:"structure"` +} + +// String returns the string representation +func (s DescribeEndpointGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointGroupOutput) GoString() string { + return s.String() +} + +// SetEndpointGroup sets the EndpointGroup field's value. +func (s *DescribeEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *DescribeEndpointGroupOutput { + s.EndpointGroup = v + return s +} + +type DescribeListenerInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the listener to describe. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeListenerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeListenerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeListenerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeListenerInput"} + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *DescribeListenerInput) SetListenerArn(v string) *DescribeListenerInput { + s.ListenerArn = &v + return s +} + +type DescribeListenerOutput struct { + _ struct{} `type:"structure"` + + // The description of a listener. + Listener *Listener `type:"structure"` +} + +// String returns the string representation +func (s DescribeListenerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeListenerOutput) GoString() string { + return s.String() +} + +// SetListener sets the Listener field's value. +func (s *DescribeListenerOutput) SetListener(v *Listener) *DescribeListenerOutput { + s.Listener = v + return s +} + +// A complex type for endpoints. +type EndpointConfiguration struct { + _ struct{} `type:"structure"` + + // An ID for the endpoint. If the endpoint is a Network Load Balancer or Application + // Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If + // the endpoint is an Elastic IP address, this is the Elastic IP address allocation + // ID. + EndpointId *string `type:"string"` + + // The weight associated with the endpoint. When you add weights to endpoints, + // you configure AWS Global Accelerator to route traffic based on proportions + // that you specify. For example, you might specify endpoint weights of 4, 5, + // 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is + // routed to the first endpoint, 5/20 is routed both to the second and third + // endpoints, and 6/20 is routed to the last endpoint. For more information, + // see Endpoint Weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) + // in the AWS Global Accelerator Developer Guide. + Weight *int64 `type:"integer"` +} + +// String returns the string representation +func (s EndpointConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointConfiguration) GoString() string { + return s.String() +} + +// SetEndpointId sets the EndpointId field's value. +func (s *EndpointConfiguration) SetEndpointId(v string) *EndpointConfiguration { + s.EndpointId = &v + return s +} + +// SetWeight sets the Weight field's value. +func (s *EndpointConfiguration) SetWeight(v int64) *EndpointConfiguration { + s.Weight = &v + return s +} + +// A complex type for an endpoint. Each endpoint group can include one or more +// endpoints, such as load balancers. +type EndpointDescription struct { + _ struct{} `type:"structure"` + + // An ID for the endpoint. If the endpoint is a Network Load Balancer or Application + // Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If + // the endpoint is an Elastic IP address, this is the Elastic IP address allocation + // ID. + EndpointId *string `type:"string"` + + // The reason code associated with why the endpoint is not healthy. If the endpoint + // state is healthy, a reason code is not provided. + // + // If the endpoint state is unhealthy, the reason code can be one of the following + // values: + // + // * Timeout: The health check requests to the endpoint are timing out before + // returning a status. + // + // * Failed: The health check failed, for example because the endpoint response + // was invalid (malformed). + // + // If the endpoint state is initial, the reason code can be one of the following + // values: + // + // * ProvisioningInProgress: The endpoint is in the process of being provisioned. + // + // * InitialHealthChecking: Global Accelerator is still setting up the minimum + // number of health checks for the endpoint that are required to determine + // its health status. + HealthReason *string `type:"string"` + + // The health status of the endpoint. + HealthState *string `type:"string" enum:"HealthState"` + + // The weight associated with the endpoint. When you add weights to endpoints, + // you configure AWS Global Accelerator to route traffic based on proportions + // that you specify. For example, you might specify endpoint weights of 4, 5, + // 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is + // routed to the first endpoint, 5/20 is routed both to the second and third + // endpoints, and 6/20 is routed to the last endpoint. For more information, + // see Endpoint Weights (https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) + // in the AWS Global Accelerator Developer Guide. + Weight *int64 `type:"integer"` +} + +// String returns the string representation +func (s EndpointDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointDescription) GoString() string { + return s.String() +} + +// SetEndpointId sets the EndpointId field's value. +func (s *EndpointDescription) SetEndpointId(v string) *EndpointDescription { + s.EndpointId = &v + return s +} + +// SetHealthReason sets the HealthReason field's value. +func (s *EndpointDescription) SetHealthReason(v string) *EndpointDescription { + s.HealthReason = &v + return s +} + +// SetHealthState sets the HealthState field's value. +func (s *EndpointDescription) SetHealthState(v string) *EndpointDescription { + s.HealthState = &v + return s +} + +// SetWeight sets the Weight field's value. +func (s *EndpointDescription) SetWeight(v int64) *EndpointDescription { + s.Weight = &v + return s +} + +// A complex type for the endpoint group. An AWS Region can have only one endpoint +// group for a specific listener. +type EndpointGroup struct { + _ struct{} `type:"structure"` + + // The list of endpoint objects. + EndpointDescriptions []*EndpointDescription `type:"list"` + + // The Amazon Resource Name (ARN) of the endpoint group. + EndpointGroupArn *string `type:"string"` + + // The AWS Region that this endpoint group belongs. + EndpointGroupRegion *string `type:"string"` + + // The time—10 seconds or 30 seconds—between health checks for each endpoint. + // The default value is 30. + HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"` + + // If the protocol is HTTP/S, then this value provides the ping path that Global + // Accelerator uses for the destination on the endpoints for health checks. + // The default is slash (/). + HealthCheckPath *string `type:"string"` + + // The port that Global Accelerator uses to perform health checks on endpoints + // that are part of this endpoint group. + // + // The default port is the port for the listener that this endpoint group is + // associated with. If the listener port is a list, Global Accelerator uses + // the first specified port in the list of ports. + HealthCheckPort *int64 `min:"1" type:"integer"` + + // The protocol that Global Accelerator uses to perform health checks on endpoints + // that are part of this endpoint group. The default value is TCP. + HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"` + + // The number of consecutive health checks required to set the state of a healthy + // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default + // value is 3. + ThresholdCount *int64 `min:"1" type:"integer"` + + // The percentage of traffic to send to an AWS Region. Additional traffic is + // distributed to other endpoint groups for this listener. + // + // Use this action to increase (dial up) or decrease (dial down) traffic to + // a specific Region. The percentage is applied to the traffic that would otherwise + // have been routed to the Region based on optimal routing. + // + // The default value is 100. + TrafficDialPercentage *float64 `type:"float"` +} + +// String returns the string representation +func (s EndpointGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointGroup) GoString() string { + return s.String() +} + +// SetEndpointDescriptions sets the EndpointDescriptions field's value. +func (s *EndpointGroup) SetEndpointDescriptions(v []*EndpointDescription) *EndpointGroup { + s.EndpointDescriptions = v + return s +} + +// SetEndpointGroupArn sets the EndpointGroupArn field's value. +func (s *EndpointGroup) SetEndpointGroupArn(v string) *EndpointGroup { + s.EndpointGroupArn = &v + return s +} + +// SetEndpointGroupRegion sets the EndpointGroupRegion field's value. +func (s *EndpointGroup) SetEndpointGroupRegion(v string) *EndpointGroup { + s.EndpointGroupRegion = &v + return s +} + +// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. +func (s *EndpointGroup) SetHealthCheckIntervalSeconds(v int64) *EndpointGroup { + s.HealthCheckIntervalSeconds = &v + return s +} + +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *EndpointGroup) SetHealthCheckPath(v string) *EndpointGroup { + s.HealthCheckPath = &v + return s +} + +// SetHealthCheckPort sets the HealthCheckPort field's value. +func (s *EndpointGroup) SetHealthCheckPort(v int64) *EndpointGroup { + s.HealthCheckPort = &v + return s +} + +// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. +func (s *EndpointGroup) SetHealthCheckProtocol(v string) *EndpointGroup { + s.HealthCheckProtocol = &v + return s +} + +// SetThresholdCount sets the ThresholdCount field's value. +func (s *EndpointGroup) SetThresholdCount(v int64) *EndpointGroup { + s.ThresholdCount = &v + return s +} + +// SetTrafficDialPercentage sets the TrafficDialPercentage field's value. +func (s *EndpointGroup) SetTrafficDialPercentage(v float64) *EndpointGroup { + s.TrafficDialPercentage = &v + return s +} + +// A complex type for the set of IP addresses for an accelerator. +type IpSet struct { + _ struct{} `type:"structure"` + + // The array of IP addresses in the IP address set. An IP address set can have + // a maximum of two IP addresses. + IpAddresses []*string `type:"list"` + + // The types of IP addresses included in this IP set. + IpFamily *string `type:"string"` +} + +// String returns the string representation +func (s IpSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpSet) GoString() string { + return s.String() +} + +// SetIpAddresses sets the IpAddresses field's value. +func (s *IpSet) SetIpAddresses(v []*string) *IpSet { + s.IpAddresses = v + return s +} + +// SetIpFamily sets the IpFamily field's value. +func (s *IpSet) SetIpFamily(v string) *IpSet { + s.IpFamily = &v + return s +} + +type ListAcceleratorsInput struct { + _ struct{} `type:"structure"` + + // The number of Global Accelerator objects that you want to return with this + // call. The default value is 10. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of results. You receive this token from a previous + // call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAcceleratorsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAcceleratorsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAcceleratorsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAcceleratorsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAcceleratorsInput) SetMaxResults(v int64) *ListAcceleratorsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAcceleratorsInput) SetNextToken(v string) *ListAcceleratorsInput { + s.NextToken = &v + return s +} + +type ListAcceleratorsOutput struct { + _ struct{} `type:"structure"` + + // The list of accelerators for a customer account. + Accelerators []*Accelerator `type:"list"` + + // The token for the next set of results. You receive this token from a previous + // call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAcceleratorsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAcceleratorsOutput) GoString() string { + return s.String() +} + +// SetAccelerators sets the Accelerators field's value. +func (s *ListAcceleratorsOutput) SetAccelerators(v []*Accelerator) *ListAcceleratorsOutput { + s.Accelerators = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAcceleratorsOutput) SetNextToken(v string) *ListAcceleratorsOutput { + s.NextToken = &v + return s +} + +type ListEndpointGroupsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the listener. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` + + // The number of endpoint group objects that you want to return with this call. + // The default value is 10. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of results. You receive this token from a previous + // call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListEndpointGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEndpointGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEndpointGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEndpointGroupsInput"} + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *ListEndpointGroupsInput) SetListenerArn(v string) *ListEndpointGroupsInput { + s.ListenerArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListEndpointGroupsInput) SetMaxResults(v int64) *ListEndpointGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEndpointGroupsInput) SetNextToken(v string) *ListEndpointGroupsInput { + s.NextToken = &v + return s +} + +type ListEndpointGroupsOutput struct { + _ struct{} `type:"structure"` + + // The list of the endpoint groups associated with a listener. + EndpointGroups []*EndpointGroup `type:"list"` + + // The token for the next set of results. You receive this token from a previous + // call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListEndpointGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEndpointGroupsOutput) GoString() string { + return s.String() +} + +// SetEndpointGroups sets the EndpointGroups field's value. +func (s *ListEndpointGroupsOutput) SetEndpointGroups(v []*EndpointGroup) *ListEndpointGroupsOutput { + s.EndpointGroups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEndpointGroupsOutput) SetNextToken(v string) *ListEndpointGroupsOutput { + s.NextToken = &v + return s +} + +type ListListenersInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the accelerator for which you want to list + // listener objects. + // + // AcceleratorArn is a required field + AcceleratorArn *string `type:"string" required:"true"` + + // The number of listener objects that you want to return with this call. The + // default value is 10. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of results. You receive this token from a previous + // call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListListenersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListListenersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListListenersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListListenersInput"} + if s.AcceleratorArn == nil { + invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *ListListenersInput) SetAcceleratorArn(v string) *ListListenersInput { + s.AcceleratorArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListListenersInput) SetMaxResults(v int64) *ListListenersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListListenersInput) SetNextToken(v string) *ListListenersInput { + s.NextToken = &v + return s +} + +type ListListenersOutput struct { + _ struct{} `type:"structure"` + + // The list of listeners for an accelerator. + Listeners []*Listener `type:"list"` + + // The token for the next set of results. You receive this token from a previous + // call. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListListenersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListListenersOutput) GoString() string { + return s.String() +} + +// SetListeners sets the Listeners field's value. +func (s *ListListenersOutput) SetListeners(v []*Listener) *ListListenersOutput { + s.Listeners = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListListenersOutput) SetNextToken(v string) *ListListenersOutput { + s.NextToken = &v + return s +} + +// A complex type for a listener. +type Listener struct { + _ struct{} `type:"structure"` + + // Client affinity lets you direct all requests from a user to the same endpoint, + // if you have stateful applications, regardless of the port and protocol of + // the client request. Clienty affinity gives you control over whether to always + // route each client to the same specific endpoint. + // + // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose + // the optimal endpoint for a connection. If client affinity is NONE, Global + // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, + // source port, destination IP address, destination port, and protocol—to select + // the hash value, and then chooses the best endpoint. However, with this setting, + // if someone uses different ports to connect to Global Accelerator, their connections + // might not be always routed to the same endpoint because the hash value changes. + // + // If you want a given client to always be routed to the same endpoint, set + // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, + // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) + // IP address and destination IP address—to select the hash value. + // + // The default value is NONE. + ClientAffinity *string `type:"string" enum:"ClientAffinity"` + + // The Amazon Resource Name (ARN) of the listener. + ListenerArn *string `type:"string"` + + // The list of port ranges for the connections from clients to the accelerator. + PortRanges []*PortRange `min:"1" type:"list"` + + // The protocol for the connections from clients to the accelerator. + Protocol *string `type:"string" enum:"Protocol"` +} + +// String returns the string representation +func (s Listener) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Listener) GoString() string { + return s.String() +} + +// SetClientAffinity sets the ClientAffinity field's value. +func (s *Listener) SetClientAffinity(v string) *Listener { + s.ClientAffinity = &v + return s +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *Listener) SetListenerArn(v string) *Listener { + s.ListenerArn = &v + return s +} + +// SetPortRanges sets the PortRanges field's value. +func (s *Listener) SetPortRanges(v []*PortRange) *Listener { + s.PortRanges = v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *Listener) SetProtocol(v string) *Listener { + s.Protocol = &v + return s +} + +// A complex type for a range of ports for a listener. +type PortRange struct { + _ struct{} `type:"structure"` + + // The first port in the range of ports, inclusive. + FromPort *int64 `min:"1" type:"integer"` + + // The last port in the range of ports, inclusive. + ToPort *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s PortRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PortRange) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PortRange) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PortRange"} + if s.FromPort != nil && *s.FromPort < 1 { + invalidParams.Add(request.NewErrParamMinValue("FromPort", 1)) + } + if s.ToPort != nil && *s.ToPort < 1 { + invalidParams.Add(request.NewErrParamMinValue("ToPort", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFromPort sets the FromPort field's value. +func (s *PortRange) SetFromPort(v int64) *PortRange { + s.FromPort = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *PortRange) SetToPort(v int64) *PortRange { + s.ToPort = &v + return s +} + +type UpdateAcceleratorAttributesInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the accelerator that you want to update. + // Attribute is required. + AcceleratorArn *string `type:"string"` + + // Update whether flow logs are enabled. The default value is false. If the + // value is true, FlowLogsS3Bucket and FlowLogsS3Prefix must be specified. + // + // For more information, see Flow Logs (https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html) + // in the AWS Global Accelerator Developer Guide. + FlowLogsEnabled *bool `type:"boolean"` + + // The name of the Amazon S3 bucket for the flow logs. Attribute is required + // if FlowLogsEnabled is true. The bucket must exist and have a bucket policy + // that grants AWS Global Accelerator permission to write to the bucket. + FlowLogsS3Bucket *string `type:"string"` + + // Update the prefix for the location in the Amazon S3 bucket for the flow logs. + // Attribute is required if FlowLogsEnabled is true. If you don’t specify a + // prefix, the flow logs are stored in the root of the bucket. + FlowLogsS3Prefix *string `type:"string"` +} + +// String returns the string representation +func (s UpdateAcceleratorAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAcceleratorAttributesInput) GoString() string { + return s.String() +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *UpdateAcceleratorAttributesInput) SetAcceleratorArn(v string) *UpdateAcceleratorAttributesInput { + s.AcceleratorArn = &v + return s +} + +// SetFlowLogsEnabled sets the FlowLogsEnabled field's value. +func (s *UpdateAcceleratorAttributesInput) SetFlowLogsEnabled(v bool) *UpdateAcceleratorAttributesInput { + s.FlowLogsEnabled = &v + return s +} + +// SetFlowLogsS3Bucket sets the FlowLogsS3Bucket field's value. +func (s *UpdateAcceleratorAttributesInput) SetFlowLogsS3Bucket(v string) *UpdateAcceleratorAttributesInput { + s.FlowLogsS3Bucket = &v + return s +} + +// SetFlowLogsS3Prefix sets the FlowLogsS3Prefix field's value. +func (s *UpdateAcceleratorAttributesInput) SetFlowLogsS3Prefix(v string) *UpdateAcceleratorAttributesInput { + s.FlowLogsS3Prefix = &v + return s +} + +type UpdateAcceleratorAttributesOutput struct { + _ struct{} `type:"structure"` + + // Updated attributes for the accelerator. + AcceleratorAttributes *AcceleratorAttributes `type:"structure"` +} + +// String returns the string representation +func (s UpdateAcceleratorAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAcceleratorAttributesOutput) GoString() string { + return s.String() +} + +// SetAcceleratorAttributes sets the AcceleratorAttributes field's value. +func (s *UpdateAcceleratorAttributesOutput) SetAcceleratorAttributes(v *AcceleratorAttributes) *UpdateAcceleratorAttributesOutput { + s.AcceleratorAttributes = v + return s +} + +type UpdateAcceleratorInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the accelerator to update. + // + // AcceleratorArn is a required field + AcceleratorArn *string `type:"string" required:"true"` + + // Indicates whether an accelerator is enabled. The value is true or false. + // The default value is true. + // + // If the value is set to true, the accelerator cannot be deleted. If set to + // false, the accelerator can be deleted. + Enabled *bool `type:"boolean"` + + // The value for the address type must be IPv4. + IpAddressType *string `type:"string" enum:"IpAddressType"` + + // The name of the accelerator. The name can have a maximum of 32 characters, + // must contain only alphanumeric characters or hyphens (-), and must not begin + // or end with a hyphen. + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateAcceleratorInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAcceleratorInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAcceleratorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAcceleratorInput"} + if s.AcceleratorArn == nil { + invalidParams.Add(request.NewErrParamRequired("AcceleratorArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorArn sets the AcceleratorArn field's value. +func (s *UpdateAcceleratorInput) SetAcceleratorArn(v string) *UpdateAcceleratorInput { + s.AcceleratorArn = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *UpdateAcceleratorInput) SetEnabled(v bool) *UpdateAcceleratorInput { + s.Enabled = &v + return s +} + +// SetIpAddressType sets the IpAddressType field's value. +func (s *UpdateAcceleratorInput) SetIpAddressType(v string) *UpdateAcceleratorInput { + s.IpAddressType = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateAcceleratorInput) SetName(v string) *UpdateAcceleratorInput { + s.Name = &v + return s +} + +type UpdateAcceleratorOutput struct { + _ struct{} `type:"structure"` + + // Information about the updated accelerator. + Accelerator *Accelerator `type:"structure"` +} + +// String returns the string representation +func (s UpdateAcceleratorOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAcceleratorOutput) GoString() string { + return s.String() +} + +// SetAccelerator sets the Accelerator field's value. +func (s *UpdateAcceleratorOutput) SetAccelerator(v *Accelerator) *UpdateAcceleratorOutput { + s.Accelerator = v + return s +} + +type UpdateEndpointGroupInput struct { + _ struct{} `type:"structure"` + + // The list of endpoint objects. + EndpointConfigurations []*EndpointConfiguration `type:"list"` + + // The Amazon Resource Name (ARN) of the endpoint group. + // + // EndpointGroupArn is a required field + EndpointGroupArn *string `type:"string" required:"true"` + + // The time—10 seconds or 30 seconds—between each health check for an endpoint. + // The default value is 30. + HealthCheckIntervalSeconds *int64 `min:"10" type:"integer"` + + // If the protocol is HTTP/S, then this specifies the path that is the destination + // for health check targets. The default value is slash (/). + HealthCheckPath *string `type:"string"` + + // The port that AWS Global Accelerator uses to check the health of endpoints + // that are part of this endpoint group. The default port is the listener port + // that this endpoint group is associated with. If the listener port is a list + // of ports, Global Accelerator uses the first port in the list. + HealthCheckPort *int64 `min:"1" type:"integer"` + + // The protocol that AWS Global Accelerator uses to check the health of endpoints + // that are part of this endpoint group. The default value is TCP. + HealthCheckProtocol *string `type:"string" enum:"HealthCheckProtocol"` + + // The number of consecutive health checks required to set the state of a healthy + // endpoint to unhealthy, or to set an unhealthy endpoint to healthy. The default + // value is 3. + ThresholdCount *int64 `min:"1" type:"integer"` + + // The percentage of traffic to send to an AWS Region. Additional traffic is + // distributed to other endpoint groups for this listener. + // + // Use this action to increase (dial up) or decrease (dial down) traffic to + // a specific Region. The percentage is applied to the traffic that would otherwise + // have been routed to the Region based on optimal routing. + // + // The default value is 100. + TrafficDialPercentage *float64 `type:"float"` +} + +// String returns the string representation +func (s UpdateEndpointGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointGroupInput"} + if s.EndpointGroupArn == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointGroupArn")) + } + if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 10 { + invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 10)) + } + if s.HealthCheckPort != nil && *s.HealthCheckPort < 1 { + invalidParams.Add(request.NewErrParamMinValue("HealthCheckPort", 1)) + } + if s.ThresholdCount != nil && *s.ThresholdCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("ThresholdCount", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigurations sets the EndpointConfigurations field's value. +func (s *UpdateEndpointGroupInput) SetEndpointConfigurations(v []*EndpointConfiguration) *UpdateEndpointGroupInput { + s.EndpointConfigurations = v + return s +} + +// SetEndpointGroupArn sets the EndpointGroupArn field's value. +func (s *UpdateEndpointGroupInput) SetEndpointGroupArn(v string) *UpdateEndpointGroupInput { + s.EndpointGroupArn = &v + return s +} + +// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. +func (s *UpdateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *UpdateEndpointGroupInput { + s.HealthCheckIntervalSeconds = &v + return s +} + +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *UpdateEndpointGroupInput) SetHealthCheckPath(v string) *UpdateEndpointGroupInput { + s.HealthCheckPath = &v + return s +} + +// SetHealthCheckPort sets the HealthCheckPort field's value. +func (s *UpdateEndpointGroupInput) SetHealthCheckPort(v int64) *UpdateEndpointGroupInput { + s.HealthCheckPort = &v + return s +} + +// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. +func (s *UpdateEndpointGroupInput) SetHealthCheckProtocol(v string) *UpdateEndpointGroupInput { + s.HealthCheckProtocol = &v + return s +} + +// SetThresholdCount sets the ThresholdCount field's value. +func (s *UpdateEndpointGroupInput) SetThresholdCount(v int64) *UpdateEndpointGroupInput { + s.ThresholdCount = &v + return s +} + +// SetTrafficDialPercentage sets the TrafficDialPercentage field's value. +func (s *UpdateEndpointGroupInput) SetTrafficDialPercentage(v float64) *UpdateEndpointGroupInput { + s.TrafficDialPercentage = &v + return s +} + +type UpdateEndpointGroupOutput struct { + _ struct{} `type:"structure"` + + // The information about the endpoint group that was updated. + EndpointGroup *EndpointGroup `type:"structure"` +} + +// String returns the string representation +func (s UpdateEndpointGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointGroupOutput) GoString() string { + return s.String() +} + +// SetEndpointGroup sets the EndpointGroup field's value. +func (s *UpdateEndpointGroupOutput) SetEndpointGroup(v *EndpointGroup) *UpdateEndpointGroupOutput { + s.EndpointGroup = v + return s +} + +type UpdateListenerInput struct { + _ struct{} `type:"structure"` + + // Client affinity lets you direct all requests from a user to the same endpoint, + // if you have stateful applications, regardless of the port and protocol of + // the client request. Clienty affinity gives you control over whether to always + // route each client to the same specific endpoint. + // + // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose + // the optimal endpoint for a connection. If client affinity is NONE, Global + // Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, + // source port, destination IP address, destination port, and protocol—to select + // the hash value, and then chooses the best endpoint. However, with this setting, + // if someone uses different ports to connect to Global Accelerator, their connections + // might not be always routed to the same endpoint because the hash value changes. + // + // If you want a given client to always be routed to the same endpoint, set + // client affinity to SOURCE_IP instead. When you use the SOURCE_IP setting, + // Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) + // IP address and destination IP address—to select the hash value. + // + // The default value is NONE. + ClientAffinity *string `type:"string" enum:"ClientAffinity"` + + // The Amazon Resource Name (ARN) of the listener to update. + // + // ListenerArn is a required field + ListenerArn *string `type:"string" required:"true"` + + // The updated list of port ranges for the connections from clients to the accelerator. + PortRanges []*PortRange `min:"1" type:"list"` + + // The updated protocol for the connections from clients to the accelerator. + Protocol *string `type:"string" enum:"Protocol"` +} + +// String returns the string representation +func (s UpdateListenerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateListenerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateListenerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateListenerInput"} + if s.ListenerArn == nil { + invalidParams.Add(request.NewErrParamRequired("ListenerArn")) + } + if s.PortRanges != nil && len(s.PortRanges) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortRanges", 1)) + } + if s.PortRanges != nil { + for i, v := range s.PortRanges { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PortRanges", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientAffinity sets the ClientAffinity field's value. +func (s *UpdateListenerInput) SetClientAffinity(v string) *UpdateListenerInput { + s.ClientAffinity = &v + return s +} + +// SetListenerArn sets the ListenerArn field's value. +func (s *UpdateListenerInput) SetListenerArn(v string) *UpdateListenerInput { + s.ListenerArn = &v + return s +} + +// SetPortRanges sets the PortRanges field's value. +func (s *UpdateListenerInput) SetPortRanges(v []*PortRange) *UpdateListenerInput { + s.PortRanges = v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *UpdateListenerInput) SetProtocol(v string) *UpdateListenerInput { + s.Protocol = &v + return s +} + +type UpdateListenerOutput struct { + _ struct{} `type:"structure"` + + // Information for the updated listener. + Listener *Listener `type:"structure"` +} + +// String returns the string representation +func (s UpdateListenerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateListenerOutput) GoString() string { + return s.String() +} + +// SetListener sets the Listener field's value. +func (s *UpdateListenerOutput) SetListener(v *Listener) *UpdateListenerOutput { + s.Listener = v + return s +} + +const ( + // AcceleratorStatusDeployed is a AcceleratorStatus enum value + AcceleratorStatusDeployed = "DEPLOYED" + + // AcceleratorStatusInProgress is a AcceleratorStatus enum value + AcceleratorStatusInProgress = "IN_PROGRESS" +) + +const ( + // ClientAffinityNone is a ClientAffinity enum value + ClientAffinityNone = "NONE" + + // ClientAffinitySourceIp is a ClientAffinity enum value + ClientAffinitySourceIp = "SOURCE_IP" +) + +const ( + // HealthCheckProtocolTcp is a HealthCheckProtocol enum value + HealthCheckProtocolTcp = "TCP" + + // HealthCheckProtocolHttp is a HealthCheckProtocol enum value + HealthCheckProtocolHttp = "HTTP" + + // HealthCheckProtocolHttps is a HealthCheckProtocol enum value + HealthCheckProtocolHttps = "HTTPS" +) + +const ( + // HealthStateInitial is a HealthState enum value + HealthStateInitial = "INITIAL" + + // HealthStateHealthy is a HealthState enum value + HealthStateHealthy = "HEALTHY" + + // HealthStateUnhealthy is a HealthState enum value + HealthStateUnhealthy = "UNHEALTHY" +) + +const ( + // IpAddressTypeIpv4 is a IpAddressType enum value + IpAddressTypeIpv4 = "IPV4" +) + +const ( + // ProtocolTcp is a Protocol enum value + ProtocolTcp = "TCP" + + // ProtocolUdp is a Protocol enum value + ProtocolUdp = "UDP" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go new file mode 100644 index 000000000..f75f98cf1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/doc.go @@ -0,0 +1,94 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package globalaccelerator provides the client and types for making API +// requests to AWS Global Accelerator. +// +// This is the AWS Global Accelerator API Reference. This guide is for developers +// who need detailed information about AWS Global Accelerator API actions, data +// types, and errors. For more information about Global Accelerator features, +// see the AWS Global Accelerator Developer Guide (https://docs.aws.amazon.com/global-accelerator/latest/dg/Welcome.html). +// +// AWS Global Accelerator is a network layer service in which you create accelerators +// to improve availability and performance for internet applications used by +// a global audience. +// +// Global Accelerator provides you with static IP addresses that you associate +// with your accelerator. These IP addresses are anycast from the AWS edge network +// and distribute incoming application traffic across multiple endpoint resources +// in multiple AWS Regions, which increases the availability of your applications. +// Endpoints can be Elastic IP addresses, Network Load Balancers, and Application +// Load Balancers that are located in one AWS Region or multiple Regions. +// +// Global Accelerator uses the AWS global network to route traffic to the optimal +// regional endpoint based on health, client location, and policies that you +// configure. The service reacts instantly to changes in health or configuration +// to ensure that internet traffic from clients is directed to only healthy +// endpoints. +// +// Global Accelerator includes components that work together to help you improve +// performance and availability for your applications: +// +// Static IP addressAWS Global Accelerator provides you with a set of static +// IP addresses which are anycast from the AWS edge network and serve as the +// single fixed entry points for your clients. If you already have Elastic Load +// Balancing or Elastic IP address resources set up for your applications, you +// can easily add those to Global Accelerator to allow the resources to be accessed +// by a Global Accelerator static IP address. +// +// AcceleratorAn accelerator directs traffic to optimal endpoints over the AWS +// global network to improve availability and performance for your internet +// applications that have a global audience. Each accelerator includes one or +// more listeners. +// +// Network zoneA network zone services the static IP addresses for your accelerator +// from a unique IP subnet. Similar to an AWS Availability Zone, a network zone +// is an isolated unit with its own set of physical infrastructure. When you +// configure an accelerator, Global Accelerator allocates two IPv4 addresses +// for it. If one IP address from a network zone becomes unavailable due to +// IP address blocking by certain client networks, or network disruptions, then +// client applications can retry on the healthy static IP address from the other +// isolated network zone. +// +// ListenerA listener processes inbound connections from clients to Global Accelerator, +// based on the protocol and port that you configure. Each listener has one +// or more endpoint groups associated with it, and traffic is forwarded to endpoints +// in one of the groups. You associate endpoint groups with listeners by specifying +// the Regions that you want to distribute traffic to. Traffic is distributed +// to optimal endpoints within the endpoint groups associated with a listener. +// +// Endpoint groupEach endpoint group is associated with a specific AWS Region. +// Endpoint groups include one or more endpoints in the Region. You can increase +// or reduce the percentage of traffic that would be otherwise directed to an +// endpoint group by adjusting a setting called a traffic dial. The traffic +// dial lets you easily do performance testing or blue/green deployment testing +// for new releases across different AWS Regions, for example. +// +// EndpointAn endpoint is an Elastic IP address, Network Load Balancer, or Application +// Load Balancer. Traffic is routed to endpoints based on several factors, including +// the geo-proximity to the user, the health of the endpoint, and the configuration +// options that you choose, such as endpoint weights. For each endpoint, you +// can configure weights, which are numbers that you can use to specify the +// proportion of traffic to route to each one. This can be useful, for example, +// to do performance testing within a Region. +// +// See https://docs.aws.amazon.com/goto/WebAPI/globalaccelerator-2018-08-08 for more information on this service. +// +// See globalaccelerator package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/globalaccelerator/ +// +// Using the Client +// +// To contact AWS Global Accelerator with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Global Accelerator client GlobalAccelerator for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/globalaccelerator/#New +package globalaccelerator diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go new file mode 100644 index 000000000..13aea5e36 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/errors.go @@ -0,0 +1,84 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package globalaccelerator + +const ( + + // ErrCodeAcceleratorNotDisabledException for service response error code + // "AcceleratorNotDisabledException". + // + // The accelerator that you specified could not be disabled. + ErrCodeAcceleratorNotDisabledException = "AcceleratorNotDisabledException" + + // ErrCodeAcceleratorNotFoundException for service response error code + // "AcceleratorNotFoundException". + // + // The accelerator that you specified doesn't exist. + ErrCodeAcceleratorNotFoundException = "AcceleratorNotFoundException" + + // ErrCodeAssociatedEndpointGroupFoundException for service response error code + // "AssociatedEndpointGroupFoundException". + // + // The listener that you specified has an endpoint group associated with it. + // You must remove all dependent resources from a listener before you can delete + // it. + ErrCodeAssociatedEndpointGroupFoundException = "AssociatedEndpointGroupFoundException" + + // ErrCodeAssociatedListenerFoundException for service response error code + // "AssociatedListenerFoundException". + // + // The accelerator that you specified has a listener associated with it. You + // must remove all dependent resources from an accelerator before you can delete + // it. + ErrCodeAssociatedListenerFoundException = "AssociatedListenerFoundException" + + // ErrCodeEndpointGroupAlreadyExistsException for service response error code + // "EndpointGroupAlreadyExistsException". + // + // The endpoint group that you specified already exists. + ErrCodeEndpointGroupAlreadyExistsException = "EndpointGroupAlreadyExistsException" + + // ErrCodeEndpointGroupNotFoundException for service response error code + // "EndpointGroupNotFoundException". + // + // The endpoint group that you specified doesn't exist. + ErrCodeEndpointGroupNotFoundException = "EndpointGroupNotFoundException" + + // ErrCodeInternalServiceErrorException for service response error code + // "InternalServiceErrorException". + // + // There was an internal error for AWS Global Accelerator. + ErrCodeInternalServiceErrorException = "InternalServiceErrorException" + + // ErrCodeInvalidArgumentException for service response error code + // "InvalidArgumentException". + // + // An argument that you specified is invalid. + ErrCodeInvalidArgumentException = "InvalidArgumentException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // There isn't another item to return. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidPortRangeException for service response error code + // "InvalidPortRangeException". + // + // The port numbers that you specified are not valid numbers or are not unique + // for this accelerator. + ErrCodeInvalidPortRangeException = "InvalidPortRangeException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // Processing your request would cause you to exceed an AWS Global Accelerator + // limit. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeListenerNotFoundException for service response error code + // "ListenerNotFoundException". + // + // The listener that you specified doesn't exist. + ErrCodeListenerNotFoundException = "ListenerNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go new file mode 100644 index 000000000..31552ab8c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/globalaccelerator/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package globalaccelerator + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// GlobalAccelerator provides the API operation methods for making requests to +// AWS Global Accelerator. See this package's package overview docs +// for details on the service. +// +// GlobalAccelerator methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type GlobalAccelerator struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Global Accelerator" // Name of service. + EndpointsID = "globalaccelerator" // ID to lookup a service endpoint with. + ServiceID = "Global Accelerator" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the GlobalAccelerator client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a GlobalAccelerator client from just a session. +// svc := globalaccelerator.New(mySession) +// +// // Create a GlobalAccelerator client with additional configuration +// svc := globalaccelerator.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *GlobalAccelerator { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "globalaccelerator" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *GlobalAccelerator { + svc := &GlobalAccelerator{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-08-08", + JSONVersion: "1.1", + TargetPrefix: "GlobalAccelerator_V20180706", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a GlobalAccelerator operation and runs any +// custom request initialization. +func (c *GlobalAccelerator) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index b27419748..165c29bab 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -11396,12 +11396,16 @@ func (s *CreateGrokClassifierRequest) SetName(v string) *CreateGrokClassifierReq type CreateJobInput struct { _ struct{} `type:"structure"` + // This parameter is deprecated. Use MaxCapacity instead. + // // The number of AWS Glue data processing units (DPUs) to allocate to this Job. // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative // measure of processing power that consists of 4 vCPUs of compute capacity // and 16 GB of memory. For more information, see the AWS Glue pricing page // (https://aws.amazon.com/glue/pricing/). - AllocatedCapacity *int64 `type:"integer"` + // + // Deprecated: This property is deprecated, use MaxCapacity instead. + AllocatedCapacity *int64 `deprecated:"true" type:"integer"` // The JobCommand that executes this job. // @@ -11435,6 +11439,11 @@ type CreateJobInput struct { // This field is reserved for future use. LogUri *string `type:"string"` + // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated + // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. + // Glue ETL jobs running in any other way cannot have fractional DPU allocations. + MaxCapacity *float64 `type:"double"` + // The maximum number of times to retry this job if it fails. MaxRetries *int64 `type:"integer"` @@ -11545,6 +11554,12 @@ func (s *CreateJobInput) SetLogUri(v string) *CreateJobInput { return s } +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *CreateJobInput) SetMaxCapacity(v float64) *CreateJobInput { + s.MaxCapacity = &v + return s +} + // SetMaxRetries sets the MaxRetries field's value. func (s *CreateJobInput) SetMaxRetries(v int64) *CreateJobInput { s.MaxRetries = &v @@ -17086,12 +17101,16 @@ func (s *JdbcTarget) SetPath(v string) *JdbcTarget { type Job struct { _ struct{} `type:"structure"` + // This field is deprecated, use MaxCapacity instead. + // // The number of AWS Glue data processing units (DPUs) allocated to runs of // this job. From 2 to 100 DPUs can be allocated; the default is 10. A DPU is // a relative measure of processing power that consists of 4 vCPUs of compute // capacity and 16 GB of memory. For more information, see the AWS Glue pricing // page (https://aws.amazon.com/glue/pricing/). - AllocatedCapacity *int64 `type:"integer"` + // + // Deprecated: This property is deprecated, use MaxCapacity instead. + AllocatedCapacity *int64 `deprecated:"true" type:"integer"` // The JobCommand that executes this job. Command *JobCommand `type:"structure"` @@ -17129,6 +17148,11 @@ type Job struct { // This field is reserved for future use. LogUri *string `type:"string"` + // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated + // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. + // Glue ETL jobs running in any other way cannot have fractional DPU allocations. + MaxCapacity *float64 `type:"double"` + // The maximum number of times to retry this job after a JobRun fails. MaxRetries *int64 `type:"integer"` @@ -17214,6 +17238,12 @@ func (s *Job) SetLogUri(v string) *Job { return s } +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *Job) SetMaxCapacity(v float64) *Job { + s.MaxCapacity = &v + return s +} + // SetMaxRetries sets the MaxRetries field's value. func (s *Job) SetMaxRetries(v int64) *Job { s.MaxRetries = &v @@ -17347,7 +17377,8 @@ func (s *JobBookmarksEncryption) SetKmsKeyArn(v string) *JobBookmarksEncryption type JobCommand struct { _ struct{} `type:"structure"` - // The name of the job command: this must be glueetl. + // The name of the job command: this must be glueetl, for an Apache Spark ETL + // job, or pythonshell, for a Python shell job. Name *string `type:"string"` // Specifies the S3 path to a script that executes a job (required). @@ -17380,12 +17411,16 @@ func (s *JobCommand) SetScriptLocation(v string) *JobCommand { type JobRun struct { _ struct{} `type:"structure"` + // This field is deprecated, use MaxCapacity instead. + // // The number of AWS Glue data processing units (DPUs) allocated to this JobRun. // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative // measure of processing power that consists of 4 vCPUs of compute capacity // and 16 GB of memory. For more information, see the AWS Glue pricing page // (https://aws.amazon.com/glue/pricing/). - AllocatedCapacity *int64 `type:"integer"` + // + // Deprecated: This property is deprecated, use MaxCapacity instead. + AllocatedCapacity *int64 `deprecated:"true" type:"integer"` // The job arguments associated with this run. These override equivalent default // arguments set for the job. @@ -17433,6 +17468,11 @@ type JobRun struct { // then that security configuration will be used to encrypt the log group. LogGroupName *string `type:"string"` + // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated + // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. + // Glue ETL jobs running in any other way cannot have fractional DPU allocations. + MaxCapacity *float64 `type:"double"` + // Specifies configuration properties of a job run notification. NotificationProperty *NotificationProperty `type:"structure"` @@ -17536,6 +17576,12 @@ func (s *JobRun) SetLogGroupName(v string) *JobRun { return s } +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *JobRun) SetMaxCapacity(v float64) *JobRun { + s.MaxCapacity = &v + return s +} + // SetNotificationProperty sets the NotificationProperty field's value. func (s *JobRun) SetNotificationProperty(v *NotificationProperty) *JobRun { s.NotificationProperty = v @@ -17583,12 +17629,16 @@ func (s *JobRun) SetTriggerName(v string) *JobRun { type JobUpdate struct { _ struct{} `type:"structure"` + // This field is deprecated. Use MaxCapacity instead. + // // The number of AWS Glue data processing units (DPUs) to allocate to this Job. // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative // measure of processing power that consists of 4 vCPUs of compute capacity // and 16 GB of memory. For more information, see the AWS Glue pricing page // (https://aws.amazon.com/glue/pricing/). - AllocatedCapacity *int64 `type:"integer"` + // + // Deprecated: This property is deprecated, use MaxCapacity instead. + AllocatedCapacity *int64 `deprecated:"true" type:"integer"` // The JobCommand that executes this job (required). Command *JobCommand `type:"structure"` @@ -17620,6 +17670,11 @@ type JobUpdate struct { // This field is reserved for future use. LogUri *string `type:"string"` + // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated + // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. + // Glue ETL jobs running in any other way cannot have fractional DPU allocations. + MaxCapacity *float64 `type:"double"` + // The maximum number of times to retry this job if it fails. MaxRetries *int64 `type:"integer"` @@ -17711,6 +17766,12 @@ func (s *JobUpdate) SetLogUri(v string) *JobUpdate { return s } +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *JobUpdate) SetMaxCapacity(v float64) *JobUpdate { + s.MaxCapacity = &v + return s +} + // SetMaxRetries sets the MaxRetries field's value. func (s *JobUpdate) SetMaxRetries(v int64) *JobUpdate { s.MaxRetries = &v @@ -19223,12 +19284,16 @@ func (s StartCrawlerScheduleOutput) GoString() string { type StartJobRunInput struct { _ struct{} `type:"structure"` + // This field is deprecated, use MaxCapacity instead. + // // The number of AWS Glue data processing units (DPUs) to allocate to this JobRun. // From 2 to 100 DPUs can be allocated; the default is 10. A DPU is a relative // measure of processing power that consists of 4 vCPUs of compute capacity // and 16 GB of memory. For more information, see the AWS Glue pricing page // (https://aws.amazon.com/glue/pricing/). - AllocatedCapacity *int64 `type:"integer"` + // + // Deprecated: This property is deprecated, use MaxCapacity instead. + AllocatedCapacity *int64 `deprecated:"true" type:"integer"` // The job arguments specifically for this run. They override the equivalent // default arguments set for in the job definition itself. @@ -19253,6 +19318,11 @@ type StartJobRunInput struct { // The ID of a previous JobRun to retry. JobRunId *string `min:"1" type:"string"` + // AWS Glue supports running jobs on a JobCommand.Name="pythonshell" with allocated + // processing as low as 0.0625 DPU, which can be specified using MaxCapacity. + // Glue ETL jobs running in any other way cannot have fractional DPU allocations. + MaxCapacity *float64 `type:"double"` + // Specifies configuration properties of a job run notification. NotificationProperty *NotificationProperty `type:"structure"` @@ -19331,6 +19401,12 @@ func (s *StartJobRunInput) SetJobRunId(v string) *StartJobRunInput { return s } +// SetMaxCapacity sets the MaxCapacity field's value. +func (s *StartJobRunInput) SetMaxCapacity(v float64) *StartJobRunInput { + s.MaxCapacity = &v + return s +} + // SetNotificationProperty sets the NotificationProperty field's value. func (s *StartJobRunInput) SetNotificationProperty(v *NotificationProperty) *StartJobRunInput { s.NotificationProperty = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index 9cf125993..8345e1736 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -20126,6 +20126,15 @@ type CreateTopicRuleInput struct { // RuleName is a required field RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` + // Metadata which can be used to manage the topic rule. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags *string `location:"header" locationName:"x-amz-tagging" type:"string"` + // The rule payload. // // TopicRulePayload is a required field @@ -20172,6 +20181,12 @@ func (s *CreateTopicRuleInput) SetRuleName(v string) *CreateTopicRuleInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateTopicRuleInput) SetTags(v string) *CreateTopicRuleInput { + s.Tags = &v + return s +} + // SetTopicRulePayload sets the TopicRulePayload field's value. func (s *CreateTopicRuleInput) SetTopicRulePayload(v *TopicRulePayload) *CreateTopicRuleInput { s.TopicRulePayload = v @@ -24007,10 +24022,14 @@ type DynamoDBv2Action struct { // // Each attribute in the message payload will be written to a separate column // in the DynamoDB database. - PutItem *PutItemInput `locationName:"putItem" type:"structure"` + // + // PutItem is a required field + PutItem *PutItemInput `locationName:"putItem" type:"structure" required:"true"` // The ARN of the IAM role that grants access to the DynamoDB table. - RoleArn *string `locationName:"roleArn" type:"string"` + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` } // String returns the string representation @@ -24026,6 +24045,12 @@ func (s DynamoDBv2Action) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DynamoDBv2Action) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DynamoDBv2Action"} + if s.PutItem == nil { + invalidParams.Add(request.NewErrParamRequired("PutItem")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } if s.PutItem != nil { if err := s.PutItem.Validate(); err != nil { invalidParams.AddNested("PutItem", err.(request.ErrInvalidParams)) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go new file mode 100644 index 000000000..c60e1698b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kafka/api.go @@ -0,0 +1,1736 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package kafka + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateCluster = "CreateCluster" + +// CreateClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCluster for more information on using the CreateCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateClusterRequest method. +// req, resp := client.CreateClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/CreateCluster +func (c *Kafka) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { + op := &request.Operation{ + Name: opCreateCluster, + HTTPMethod: "POST", + HTTPPath: "/v1/clusters", + } + + if input == nil { + input = &CreateClusterInput{} + } + + output = &CreateClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCluster API operation for Managed Streaming for Kafka. +// +// Creates a new MSK cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Managed Streaming for Kafka's +// API operation CreateCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Returns information about an error. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Returns information about an error. +// +// * ErrCodeConflictException "ConflictException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/CreateCluster +func (c *Kafka) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + return out, req.Send() +} + +// CreateClusterWithContext is the same as CreateCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kafka) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCluster = "DeleteCluster" + +// DeleteClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCluster for more information on using the DeleteCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteClusterRequest method. +// req, resp := client.DeleteClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DeleteCluster +func (c *Kafka) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { + op := &request.Operation{ + Name: opDeleteCluster, + HTTPMethod: "DELETE", + HTTPPath: "/v1/clusters/{clusterArn}", + } + + if input == nil { + input = &DeleteClusterInput{} + } + + output = &DeleteClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCluster API operation for Managed Streaming for Kafka. +// +// Deletes the MSK cluster specified by the Amazon Resource Name (ARN) in the +// request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Managed Streaming for Kafka's +// API operation DeleteCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Returns information about an error. +// +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DeleteCluster +func (c *Kafka) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + return out, req.Send() +} + +// DeleteClusterWithContext is the same as DeleteCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kafka) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCluster = "DescribeCluster" + +// DescribeClusterRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCluster operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCluster for more information on using the DescribeCluster +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeClusterRequest method. +// req, resp := client.DescribeClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DescribeCluster +func (c *Kafka) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput) { + op := &request.Operation{ + Name: opDescribeCluster, + HTTPMethod: "GET", + HTTPPath: "/v1/clusters/{clusterArn}", + } + + if input == nil { + input = &DescribeClusterInput{} + } + + output = &DescribeClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCluster API operation for Managed Streaming for Kafka. +// +// Returns a description of the MSK cluster whose Amazon Resource Name (ARN) +// is specified in the request. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Managed Streaming for Kafka's +// API operation DescribeCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Returns information about an error. +// +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/DescribeCluster +func (c *Kafka) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error) { + req, out := c.DescribeClusterRequest(input) + return out, req.Send() +} + +// DescribeClusterWithContext is the same as DescribeCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCluster for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kafka) DescribeClusterWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.Option) (*DescribeClusterOutput, error) { + req, out := c.DescribeClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBootstrapBrokers = "GetBootstrapBrokers" + +// GetBootstrapBrokersRequest generates a "aws/request.Request" representing the +// client's request for the GetBootstrapBrokers operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetBootstrapBrokers for more information on using the GetBootstrapBrokers +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetBootstrapBrokersRequest method. +// req, resp := client.GetBootstrapBrokersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/GetBootstrapBrokers +func (c *Kafka) GetBootstrapBrokersRequest(input *GetBootstrapBrokersInput) (req *request.Request, output *GetBootstrapBrokersOutput) { + op := &request.Operation{ + Name: opGetBootstrapBrokers, + HTTPMethod: "GET", + HTTPPath: "/v1/clusters/{clusterArn}/bootstrap-brokers", + } + + if input == nil { + input = &GetBootstrapBrokersInput{} + } + + output = &GetBootstrapBrokersOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBootstrapBrokers API operation for Managed Streaming for Kafka. +// +// A list of brokers that a client application can use to bootstrap. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Managed Streaming for Kafka's +// API operation GetBootstrapBrokers for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeConflictException "ConflictException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/GetBootstrapBrokers +func (c *Kafka) GetBootstrapBrokers(input *GetBootstrapBrokersInput) (*GetBootstrapBrokersOutput, error) { + req, out := c.GetBootstrapBrokersRequest(input) + return out, req.Send() +} + +// GetBootstrapBrokersWithContext is the same as GetBootstrapBrokers with the addition of +// the ability to pass a context and additional request options. +// +// See GetBootstrapBrokers for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kafka) GetBootstrapBrokersWithContext(ctx aws.Context, input *GetBootstrapBrokersInput, opts ...request.Option) (*GetBootstrapBrokersOutput, error) { + req, out := c.GetBootstrapBrokersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListClusters = "ListClusters" + +// ListClustersRequest generates a "aws/request.Request" representing the +// client's request for the ListClusters operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListClusters for more information on using the ListClusters +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListClustersRequest method. +// req, resp := client.ListClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListClusters +func (c *Kafka) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput) { + op := &request.Operation{ + Name: opListClusters, + HTTPMethod: "GET", + HTTPPath: "/v1/clusters", + } + + if input == nil { + input = &ListClustersInput{} + } + + output = &ListClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListClusters API operation for Managed Streaming for Kafka. +// +// Returns a list of clusters in an account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Managed Streaming for Kafka's +// API operation ListClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListClusters +func (c *Kafka) ListClusters(input *ListClustersInput) (*ListClustersOutput, error) { + req, out := c.ListClustersRequest(input) + return out, req.Send() +} + +// ListClustersWithContext is the same as ListClusters with the addition of +// the ability to pass a context and additional request options. +// +// See ListClusters for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kafka) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error) { + req, out := c.ListClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListNodes = "ListNodes" + +// ListNodesRequest generates a "aws/request.Request" representing the +// client's request for the ListNodes operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListNodes for more information on using the ListNodes +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListNodesRequest method. +// req, resp := client.ListNodesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListNodes +func (c *Kafka) ListNodesRequest(input *ListNodesInput) (req *request.Request, output *ListNodesOutput) { + op := &request.Operation{ + Name: opListNodes, + HTTPMethod: "GET", + HTTPPath: "/v1/clusters/{clusterArn}/nodes", + } + + if input == nil { + input = &ListNodesInput{} + } + + output = &ListNodesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListNodes API operation for Managed Streaming for Kafka. +// +// Returns a list of the broker nodes in the cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Managed Streaming for Kafka's +// API operation ListNodes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Returns information about an error. +// +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14/ListNodes +func (c *Kafka) ListNodes(input *ListNodesInput) (*ListNodesOutput, error) { + req, out := c.ListNodesRequest(input) + return out, req.Send() +} + +// ListNodesWithContext is the same as ListNodes with the addition of +// the ability to pass a context and additional request options. +// +// See ListNodes for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Kafka) ListNodesWithContext(ctx aws.Context, input *ListNodesInput, opts ...request.Option) (*ListNodesOutput, error) { + req, out := c.ListNodesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Describes the setup to be used for Kafka broker nodes in the cluster. +type BrokerNodeGroupInfo struct { + _ struct{} `type:"structure"` + + // The distribution of broker nodes across Availability Zones. + BrokerAZDistribution *string `locationName:"brokerAZDistribution" type:"string" enum:"BrokerAZDistribution"` + + // The list of subnets to connect to in the client virtual private cloud (VPC). + // AWS creates elastic network interfaces inside these subnets. Client applications + // use elastic network interfaces to produce and consume data. Client subnets + // can't be in Availability Zone us-east-1e. + // + // ClientSubnets is a required field + ClientSubnets []*string `locationName:"clientSubnets" type:"list" required:"true"` + + // The type of Amazon EC2 instances to use for Kafka brokers. The following + // instance types are allowed: kafka.m5.large, kafka.m5.xlarge, kafka.m5.2xlarge,kafka.m5.4xlarge, + // kafka.m5.12xlarge, and kafka.m5.24xlarge. + // + // InstanceType is a required field + InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"` + + // The AWS security groups to associate with the elastic network interfaces + // in order to specify who can connect to and communicate with the Amazon MSK + // cluster. + SecurityGroups []*string `locationName:"securityGroups" type:"list"` + + // Contains information about storage volumes attached to MSK broker nodes. + StorageInfo *StorageInfo `locationName:"storageInfo" type:"structure"` +} + +// String returns the string representation +func (s BrokerNodeGroupInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BrokerNodeGroupInfo) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BrokerNodeGroupInfo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BrokerNodeGroupInfo"} + if s.ClientSubnets == nil { + invalidParams.Add(request.NewErrParamRequired("ClientSubnets")) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.InstanceType != nil && len(*s.InstanceType) < 5 { + invalidParams.Add(request.NewErrParamMinLen("InstanceType", 5)) + } + if s.StorageInfo != nil { + if err := s.StorageInfo.Validate(); err != nil { + invalidParams.AddNested("StorageInfo", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBrokerAZDistribution sets the BrokerAZDistribution field's value. +func (s *BrokerNodeGroupInfo) SetBrokerAZDistribution(v string) *BrokerNodeGroupInfo { + s.BrokerAZDistribution = &v + return s +} + +// SetClientSubnets sets the ClientSubnets field's value. +func (s *BrokerNodeGroupInfo) SetClientSubnets(v []*string) *BrokerNodeGroupInfo { + s.ClientSubnets = v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *BrokerNodeGroupInfo) SetInstanceType(v string) *BrokerNodeGroupInfo { + s.InstanceType = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *BrokerNodeGroupInfo) SetSecurityGroups(v []*string) *BrokerNodeGroupInfo { + s.SecurityGroups = v + return s +} + +// SetStorageInfo sets the StorageInfo field's value. +func (s *BrokerNodeGroupInfo) SetStorageInfo(v *StorageInfo) *BrokerNodeGroupInfo { + s.StorageInfo = v + return s +} + +// BrokerNodeInfo +type BrokerNodeInfo struct { + _ struct{} `type:"structure"` + + // The attached elastic network interface of the broker. + AttachedENIId *string `locationName:"attachedENIId" type:"string"` + + // The ID of the broker. + BrokerId *float64 `locationName:"brokerId" type:"double"` + + // The client subnet to which this broker node belongs. + ClientSubnet *string `locationName:"clientSubnet" type:"string"` + + // The virtual private cloud (VPC) of the client. + ClientVpcIpAddress *string `locationName:"clientVpcIpAddress" type:"string"` + + // Information about the version of software currently deployed on the Kafka + // brokers in the cluster. + CurrentBrokerSoftwareInfo *BrokerSoftwareInfo `locationName:"currentBrokerSoftwareInfo" type:"structure"` +} + +// String returns the string representation +func (s BrokerNodeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BrokerNodeInfo) GoString() string { + return s.String() +} + +// SetAttachedENIId sets the AttachedENIId field's value. +func (s *BrokerNodeInfo) SetAttachedENIId(v string) *BrokerNodeInfo { + s.AttachedENIId = &v + return s +} + +// SetBrokerId sets the BrokerId field's value. +func (s *BrokerNodeInfo) SetBrokerId(v float64) *BrokerNodeInfo { + s.BrokerId = &v + return s +} + +// SetClientSubnet sets the ClientSubnet field's value. +func (s *BrokerNodeInfo) SetClientSubnet(v string) *BrokerNodeInfo { + s.ClientSubnet = &v + return s +} + +// SetClientVpcIpAddress sets the ClientVpcIpAddress field's value. +func (s *BrokerNodeInfo) SetClientVpcIpAddress(v string) *BrokerNodeInfo { + s.ClientVpcIpAddress = &v + return s +} + +// SetCurrentBrokerSoftwareInfo sets the CurrentBrokerSoftwareInfo field's value. +func (s *BrokerNodeInfo) SetCurrentBrokerSoftwareInfo(v *BrokerSoftwareInfo) *BrokerNodeInfo { + s.CurrentBrokerSoftwareInfo = v + return s +} + +// Information about the current software installed on the cluster. +type BrokerSoftwareInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the configuration used for the cluster. + ConfigurationArn *string `locationName:"configurationArn" type:"string"` + + // The revision of the configuration to use. + ConfigurationRevision *string `locationName:"configurationRevision" type:"string"` + + // The version of Apache Kafka. + KafkaVersion *string `locationName:"kafkaVersion" type:"string"` +} + +// String returns the string representation +func (s BrokerSoftwareInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BrokerSoftwareInfo) GoString() string { + return s.String() +} + +// SetConfigurationArn sets the ConfigurationArn field's value. +func (s *BrokerSoftwareInfo) SetConfigurationArn(v string) *BrokerSoftwareInfo { + s.ConfigurationArn = &v + return s +} + +// SetConfigurationRevision sets the ConfigurationRevision field's value. +func (s *BrokerSoftwareInfo) SetConfigurationRevision(v string) *BrokerSoftwareInfo { + s.ConfigurationRevision = &v + return s +} + +// SetKafkaVersion sets the KafkaVersion field's value. +func (s *BrokerSoftwareInfo) SetKafkaVersion(v string) *BrokerSoftwareInfo { + s.KafkaVersion = &v + return s +} + +// Returns information about a cluster. +type ClusterInfo struct { + _ struct{} `type:"structure"` + + // Information about the broker nodes. + BrokerNodeGroupInfo *BrokerNodeGroupInfo `locationName:"brokerNodeGroupInfo" type:"structure"` + + // The Amazon Resource Name (ARN) that uniquely identifies the cluster. + ClusterArn *string `locationName:"clusterArn" type:"string"` + + // The name of the cluster. + ClusterName *string `locationName:"clusterName" type:"string"` + + // The time when the cluster was created. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"` + + // Information about the version of software currently deployed on the Kafka + // brokers in the cluster. + CurrentBrokerSoftwareInfo *BrokerSoftwareInfo `locationName:"currentBrokerSoftwareInfo" type:"structure"` + + // The current version of the MSK cluster. + CurrentVersion *string `locationName:"currentVersion" type:"string"` + + // Includes all encryption-related information. + EncryptionInfo *EncryptionInfo `locationName:"encryptionInfo" type:"structure"` + + // Specifies which metrics are gathered for the MSK cluster. This property has + // three possible values: DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER. + EnhancedMonitoring *string `locationName:"enhancedMonitoring" type:"string" enum:"EnhancedMonitoring"` + + // The number of Kafka broker nodes in the cluster. + NumberOfBrokerNodes *int64 `locationName:"numberOfBrokerNodes" type:"integer"` + + // The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED. + State *string `locationName:"state" type:"string" enum:"ClusterState"` + + // The connection string to use to connect to the Apache ZooKeeper cluster. + ZookeeperConnectString *string `locationName:"zookeeperConnectString" type:"string"` +} + +// String returns the string representation +func (s ClusterInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClusterInfo) GoString() string { + return s.String() +} + +// SetBrokerNodeGroupInfo sets the BrokerNodeGroupInfo field's value. +func (s *ClusterInfo) SetBrokerNodeGroupInfo(v *BrokerNodeGroupInfo) *ClusterInfo { + s.BrokerNodeGroupInfo = v + return s +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *ClusterInfo) SetClusterArn(v string) *ClusterInfo { + s.ClusterArn = &v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *ClusterInfo) SetClusterName(v string) *ClusterInfo { + s.ClusterName = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ClusterInfo) SetCreationTime(v time.Time) *ClusterInfo { + s.CreationTime = &v + return s +} + +// SetCurrentBrokerSoftwareInfo sets the CurrentBrokerSoftwareInfo field's value. +func (s *ClusterInfo) SetCurrentBrokerSoftwareInfo(v *BrokerSoftwareInfo) *ClusterInfo { + s.CurrentBrokerSoftwareInfo = v + return s +} + +// SetCurrentVersion sets the CurrentVersion field's value. +func (s *ClusterInfo) SetCurrentVersion(v string) *ClusterInfo { + s.CurrentVersion = &v + return s +} + +// SetEncryptionInfo sets the EncryptionInfo field's value. +func (s *ClusterInfo) SetEncryptionInfo(v *EncryptionInfo) *ClusterInfo { + s.EncryptionInfo = v + return s +} + +// SetEnhancedMonitoring sets the EnhancedMonitoring field's value. +func (s *ClusterInfo) SetEnhancedMonitoring(v string) *ClusterInfo { + s.EnhancedMonitoring = &v + return s +} + +// SetNumberOfBrokerNodes sets the NumberOfBrokerNodes field's value. +func (s *ClusterInfo) SetNumberOfBrokerNodes(v int64) *ClusterInfo { + s.NumberOfBrokerNodes = &v + return s +} + +// SetState sets the State field's value. +func (s *ClusterInfo) SetState(v string) *ClusterInfo { + s.State = &v + return s +} + +// SetZookeeperConnectString sets the ZookeeperConnectString field's value. +func (s *ClusterInfo) SetZookeeperConnectString(v string) *ClusterInfo { + s.ZookeeperConnectString = &v + return s +} + +// Creates a cluster. +type CreateClusterInput struct { + _ struct{} `type:"structure"` + + // Information about the broker nodes in the cluster. + // + // BrokerNodeGroupInfo is a required field + BrokerNodeGroupInfo *BrokerNodeGroupInfo `locationName:"brokerNodeGroupInfo" type:"structure" required:"true"` + + // The name of the cluster. + // + // ClusterName is a required field + ClusterName *string `locationName:"clusterName" min:"1" type:"string" required:"true"` + + // Includes all encryption-related information. + EncryptionInfo *EncryptionInfo `locationName:"encryptionInfo" type:"structure"` + + // Specifies the level of monitoring for the MSK cluster. The possible values + // are DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER. + EnhancedMonitoring *string `locationName:"enhancedMonitoring" type:"string" enum:"EnhancedMonitoring"` + + // The version of Apache Kafka. + // + // KafkaVersion is a required field + KafkaVersion *string `locationName:"kafkaVersion" min:"1" type:"string" required:"true"` + + // The number of Kafka broker nodes in the Amazon MSK cluster. + // + // NumberOfBrokerNodes is a required field + NumberOfBrokerNodes *int64 `locationName:"numberOfBrokerNodes" min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s CreateClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} + if s.BrokerNodeGroupInfo == nil { + invalidParams.Add(request.NewErrParamRequired("BrokerNodeGroupInfo")) + } + if s.ClusterName == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterName")) + } + if s.ClusterName != nil && len(*s.ClusterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterName", 1)) + } + if s.KafkaVersion == nil { + invalidParams.Add(request.NewErrParamRequired("KafkaVersion")) + } + if s.KafkaVersion != nil && len(*s.KafkaVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KafkaVersion", 1)) + } + if s.NumberOfBrokerNodes == nil { + invalidParams.Add(request.NewErrParamRequired("NumberOfBrokerNodes")) + } + if s.NumberOfBrokerNodes != nil && *s.NumberOfBrokerNodes < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfBrokerNodes", 1)) + } + if s.BrokerNodeGroupInfo != nil { + if err := s.BrokerNodeGroupInfo.Validate(); err != nil { + invalidParams.AddNested("BrokerNodeGroupInfo", err.(request.ErrInvalidParams)) + } + } + if s.EncryptionInfo != nil { + if err := s.EncryptionInfo.Validate(); err != nil { + invalidParams.AddNested("EncryptionInfo", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBrokerNodeGroupInfo sets the BrokerNodeGroupInfo field's value. +func (s *CreateClusterInput) SetBrokerNodeGroupInfo(v *BrokerNodeGroupInfo) *CreateClusterInput { + s.BrokerNodeGroupInfo = v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput { + s.ClusterName = &v + return s +} + +// SetEncryptionInfo sets the EncryptionInfo field's value. +func (s *CreateClusterInput) SetEncryptionInfo(v *EncryptionInfo) *CreateClusterInput { + s.EncryptionInfo = v + return s +} + +// SetEnhancedMonitoring sets the EnhancedMonitoring field's value. +func (s *CreateClusterInput) SetEnhancedMonitoring(v string) *CreateClusterInput { + s.EnhancedMonitoring = &v + return s +} + +// SetKafkaVersion sets the KafkaVersion field's value. +func (s *CreateClusterInput) SetKafkaVersion(v string) *CreateClusterInput { + s.KafkaVersion = &v + return s +} + +// SetNumberOfBrokerNodes sets the NumberOfBrokerNodes field's value. +func (s *CreateClusterInput) SetNumberOfBrokerNodes(v int64) *CreateClusterInput { + s.NumberOfBrokerNodes = &v + return s +} + +// Returns information about the created cluster. +type CreateClusterOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the cluster. + ClusterArn *string `locationName:"clusterArn" type:"string"` + + // The name of the MSK cluster. + ClusterName *string `locationName:"clusterName" type:"string"` + + // The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED. + State *string `locationName:"state" type:"string" enum:"ClusterState"` +} + +// String returns the string representation +func (s CreateClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterOutput) GoString() string { + return s.String() +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *CreateClusterOutput) SetClusterArn(v string) *CreateClusterOutput { + s.ClusterArn = &v + return s +} + +// SetClusterName sets the ClusterName field's value. +func (s *CreateClusterOutput) SetClusterName(v string) *CreateClusterOutput { + s.ClusterName = &v + return s +} + +// SetState sets the State field's value. +func (s *CreateClusterOutput) SetState(v string) *CreateClusterOutput { + s.State = &v + return s +} + +type DeleteClusterInput struct { + _ struct{} `type:"structure"` + + // ClusterArn is a required field + ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` + + CurrentVersion *string `location:"querystring" locationName:"currentVersion" type:"string"` +} + +// String returns the string representation +func (s DeleteClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} + if s.ClusterArn == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterArn")) + } + if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *DeleteClusterInput) SetClusterArn(v string) *DeleteClusterInput { + s.ClusterArn = &v + return s +} + +// SetCurrentVersion sets the CurrentVersion field's value. +func (s *DeleteClusterInput) SetCurrentVersion(v string) *DeleteClusterInput { + s.CurrentVersion = &v + return s +} + +// Returns information about the deleted cluster. +type DeleteClusterOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the cluster. + ClusterArn *string `locationName:"clusterArn" type:"string"` + + // The state of the cluster. The possible states are CREATING, ACTIVE, and FAILED. + State *string `locationName:"state" type:"string" enum:"ClusterState"` +} + +// String returns the string representation +func (s DeleteClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterOutput) GoString() string { + return s.String() +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *DeleteClusterOutput) SetClusterArn(v string) *DeleteClusterOutput { + s.ClusterArn = &v + return s +} + +// SetState sets the State field's value. +func (s *DeleteClusterOutput) SetState(v string) *DeleteClusterOutput { + s.State = &v + return s +} + +type DescribeClusterInput struct { + _ struct{} `type:"structure"` + + // ClusterArn is a required field + ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClusterInput"} + if s.ClusterArn == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterArn")) + } + if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *DescribeClusterInput) SetClusterArn(v string) *DescribeClusterInput { + s.ClusterArn = &v + return s +} + +// Returns information about a cluster. +type DescribeClusterOutput struct { + _ struct{} `type:"structure"` + + // The cluster information. + ClusterInfo *ClusterInfo `locationName:"clusterInfo" type:"structure"` +} + +// String returns the string representation +func (s DescribeClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClusterOutput) GoString() string { + return s.String() +} + +// SetClusterInfo sets the ClusterInfo field's value. +func (s *DescribeClusterOutput) SetClusterInfo(v *ClusterInfo) *DescribeClusterOutput { + s.ClusterInfo = v + return s +} + +// Contains information about the EBS storage volumes attached to Kafka broker +// nodes. +type EBSStorageInfo struct { + _ struct{} `type:"structure"` + + // The size in GiB of the EBS volume for the data drive on each broker node. + VolumeSize *int64 `locationName:"volumeSize" min:"1" type:"integer"` +} + +// String returns the string representation +func (s EBSStorageInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EBSStorageInfo) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EBSStorageInfo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EBSStorageInfo"} + if s.VolumeSize != nil && *s.VolumeSize < 1 { + invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVolumeSize sets the VolumeSize field's value. +func (s *EBSStorageInfo) SetVolumeSize(v int64) *EBSStorageInfo { + s.VolumeSize = &v + return s +} + +// The data volume encryption details. +type EncryptionAtRest struct { + _ struct{} `type:"structure"` + + // The AWS KMS key used for data encryption. + // + // DataVolumeKMSKeyId is a required field + DataVolumeKMSKeyId *string `locationName:"dataVolumeKMSKeyId" type:"string" required:"true"` +} + +// String returns the string representation +func (s EncryptionAtRest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncryptionAtRest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptionAtRest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionAtRest"} + if s.DataVolumeKMSKeyId == nil { + invalidParams.Add(request.NewErrParamRequired("DataVolumeKMSKeyId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDataVolumeKMSKeyId sets the DataVolumeKMSKeyId field's value. +func (s *EncryptionAtRest) SetDataVolumeKMSKeyId(v string) *EncryptionAtRest { + s.DataVolumeKMSKeyId = &v + return s +} + +// Includes encryption-related information, such as the AWS KMS key used for +// encrypting data at rest. +type EncryptionInfo struct { + _ struct{} `type:"structure"` + + // The data volume encryption details. + EncryptionAtRest *EncryptionAtRest `locationName:"encryptionAtRest" type:"structure"` +} + +// String returns the string representation +func (s EncryptionInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncryptionInfo) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncryptionInfo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncryptionInfo"} + if s.EncryptionAtRest != nil { + if err := s.EncryptionAtRest.Validate(); err != nil { + invalidParams.AddNested("EncryptionAtRest", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionAtRest sets the EncryptionAtRest field's value. +func (s *EncryptionInfo) SetEncryptionAtRest(v *EncryptionAtRest) *EncryptionInfo { + s.EncryptionAtRest = v + return s +} + +type GetBootstrapBrokersInput struct { + _ struct{} `type:"structure"` + + // ClusterArn is a required field + ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBootstrapBrokersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBootstrapBrokersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBootstrapBrokersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBootstrapBrokersInput"} + if s.ClusterArn == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterArn")) + } + if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *GetBootstrapBrokersInput) SetClusterArn(v string) *GetBootstrapBrokersInput { + s.ClusterArn = &v + return s +} + +// Returns a string containing one or more hostname:port pairs. +type GetBootstrapBrokersOutput struct { + _ struct{} `type:"structure"` + + // A string containing one or more hostname:port pairs. + BootstrapBrokerString *string `locationName:"bootstrapBrokerString" type:"string"` +} + +// String returns the string representation +func (s GetBootstrapBrokersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBootstrapBrokersOutput) GoString() string { + return s.String() +} + +// SetBootstrapBrokerString sets the BootstrapBrokerString field's value. +func (s *GetBootstrapBrokersOutput) SetBootstrapBrokerString(v string) *GetBootstrapBrokersOutput { + s.BootstrapBrokerString = &v + return s +} + +type ListClustersInput struct { + _ struct{} `type:"structure"` + + ClusterNameFilter *string `location:"querystring" locationName:"clusterNameFilter" type:"string"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListClustersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterNameFilter sets the ClusterNameFilter field's value. +func (s *ListClustersInput) SetClusterNameFilter(v string) *ListClustersInput { + s.ClusterNameFilter = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { + s.NextToken = &v + return s +} + +// The response contains an array containing cluster information and a next +// token if the response is truncated. +type ListClustersOutput struct { + _ struct{} `type:"structure"` + + // Information on each of the MSK clusters in the response. + ClusterInfoList []*ClusterInfo `locationName:"clusterInfoList" type:"list"` + + // The paginated results marker. When the result of a ListClusters operation + // is truncated, the call returns NextToken in the response. To get another + // batch of clusters, provide this token in your next request. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListClustersOutput) GoString() string { + return s.String() +} + +// SetClusterInfoList sets the ClusterInfoList field's value. +func (s *ListClustersOutput) SetClusterInfoList(v []*ClusterInfo) *ListClustersOutput { + s.ClusterInfoList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput { + s.NextToken = &v + return s +} + +type ListNodesInput struct { + _ struct{} `type:"structure"` + + // ClusterArn is a required field + ClusterArn *string `location:"uri" locationName:"clusterArn" type:"string" required:"true"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListNodesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNodesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListNodesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListNodesInput"} + if s.ClusterArn == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterArn")) + } + if s.ClusterArn != nil && len(*s.ClusterArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClusterArn", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterArn sets the ClusterArn field's value. +func (s *ListNodesInput) SetClusterArn(v string) *ListNodesInput { + s.ClusterArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListNodesInput) SetMaxResults(v int64) *ListNodesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNodesInput) SetNextToken(v string) *ListNodesInput { + s.NextToken = &v + return s +} + +// Information about nodes in the cluster. +type ListNodesOutput struct { + _ struct{} `type:"structure"` + + // The paginated results marker. When the result of a ListNodes operation is + // truncated, the call returns NextToken in the response. To get another batch + // of nodes, provide this token in your next request. + NextToken *string `locationName:"nextToken" type:"string"` + + // List containing a NodeInfo object. + NodeInfoList []*NodeInfo `locationName:"nodeInfoList" type:"list"` +} + +// String returns the string representation +func (s ListNodesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNodesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNodesOutput) SetNextToken(v string) *ListNodesOutput { + s.NextToken = &v + return s +} + +// SetNodeInfoList sets the NodeInfoList field's value. +func (s *ListNodesOutput) SetNodeInfoList(v []*NodeInfo) *ListNodesOutput { + s.NodeInfoList = v + return s +} + +// The node information object. +type NodeInfo struct { + _ struct{} `type:"structure"` + + // The start time. + AddedToClusterTime *string `locationName:"addedToClusterTime" type:"string"` + + // The broker node info. + BrokerNodeInfo *BrokerNodeInfo `locationName:"brokerNodeInfo" type:"structure"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string"` + + // The Amazon Resource Name (ARN) of the node. + NodeARN *string `locationName:"nodeARN" type:"string"` + + // The node type. + NodeType *string `locationName:"nodeType" type:"string" enum:"NodeType"` + + // The ZookeeperNodeInfo. + ZookeeperNodeInfo *ZookeeperNodeInfo `locationName:"zookeeperNodeInfo" type:"structure"` +} + +// String returns the string representation +func (s NodeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeInfo) GoString() string { + return s.String() +} + +// SetAddedToClusterTime sets the AddedToClusterTime field's value. +func (s *NodeInfo) SetAddedToClusterTime(v string) *NodeInfo { + s.AddedToClusterTime = &v + return s +} + +// SetBrokerNodeInfo sets the BrokerNodeInfo field's value. +func (s *NodeInfo) SetBrokerNodeInfo(v *BrokerNodeInfo) *NodeInfo { + s.BrokerNodeInfo = v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *NodeInfo) SetInstanceType(v string) *NodeInfo { + s.InstanceType = &v + return s +} + +// SetNodeARN sets the NodeARN field's value. +func (s *NodeInfo) SetNodeARN(v string) *NodeInfo { + s.NodeARN = &v + return s +} + +// SetNodeType sets the NodeType field's value. +func (s *NodeInfo) SetNodeType(v string) *NodeInfo { + s.NodeType = &v + return s +} + +// SetZookeeperNodeInfo sets the ZookeeperNodeInfo field's value. +func (s *NodeInfo) SetZookeeperNodeInfo(v *ZookeeperNodeInfo) *NodeInfo { + s.ZookeeperNodeInfo = v + return s +} + +// Contains information about storage volumes attached to MSK broker nodes. +type StorageInfo struct { + _ struct{} `type:"structure"` + + // EBS volume information. + EbsStorageInfo *EBSStorageInfo `locationName:"ebsStorageInfo" type:"structure"` +} + +// String returns the string representation +func (s StorageInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StorageInfo) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StorageInfo) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StorageInfo"} + if s.EbsStorageInfo != nil { + if err := s.EbsStorageInfo.Validate(); err != nil { + invalidParams.AddNested("EbsStorageInfo", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEbsStorageInfo sets the EbsStorageInfo field's value. +func (s *StorageInfo) SetEbsStorageInfo(v *EBSStorageInfo) *StorageInfo { + s.EbsStorageInfo = v + return s +} + +// Zookeeper node information. +type ZookeeperNodeInfo struct { + _ struct{} `type:"structure"` + + // The attached elastic network interface of the broker. + AttachedENIId *string `locationName:"attachedENIId" type:"string"` + + // The virtual private cloud (VPC) IP address of the client. + ClientVpcIpAddress *string `locationName:"clientVpcIpAddress" type:"string"` + + // The role-specific ID for Zookeeper. + ZookeeperId *float64 `locationName:"zookeeperId" type:"double"` + + // The version of Zookeeper. + ZookeeperVersion *string `locationName:"zookeeperVersion" type:"string"` +} + +// String returns the string representation +func (s ZookeeperNodeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ZookeeperNodeInfo) GoString() string { + return s.String() +} + +// SetAttachedENIId sets the AttachedENIId field's value. +func (s *ZookeeperNodeInfo) SetAttachedENIId(v string) *ZookeeperNodeInfo { + s.AttachedENIId = &v + return s +} + +// SetClientVpcIpAddress sets the ClientVpcIpAddress field's value. +func (s *ZookeeperNodeInfo) SetClientVpcIpAddress(v string) *ZookeeperNodeInfo { + s.ClientVpcIpAddress = &v + return s +} + +// SetZookeeperId sets the ZookeeperId field's value. +func (s *ZookeeperNodeInfo) SetZookeeperId(v float64) *ZookeeperNodeInfo { + s.ZookeeperId = &v + return s +} + +// SetZookeeperVersion sets the ZookeeperVersion field's value. +func (s *ZookeeperNodeInfo) SetZookeeperVersion(v string) *ZookeeperNodeInfo { + s.ZookeeperVersion = &v + return s +} + +// The distribution of broker nodes across Availability Zones. By default, broker +// nodes are distributed among three Availability Zones. Currently, the only +// supported value is DEFAULT. You can either specify this value explicitly +// or leave it out. +const ( + // BrokerAZDistributionDefault is a BrokerAZDistribution enum value + BrokerAZDistributionDefault = "DEFAULT" +) + +// The state of a Kafka cluster. +const ( + // ClusterStateActive is a ClusterState enum value + ClusterStateActive = "ACTIVE" + + // ClusterStateCreating is a ClusterState enum value + ClusterStateCreating = "CREATING" + + // ClusterStateDeleting is a ClusterState enum value + ClusterStateDeleting = "DELETING" + + // ClusterStateFailed is a ClusterState enum value + ClusterStateFailed = "FAILED" +) + +// Specifies which metrics are gathered for the MSK cluster. This property has +// three possible values: DEFAULT, PER_BROKER, and PER_TOPIC_PER_BROKER. +const ( + // EnhancedMonitoringDefault is a EnhancedMonitoring enum value + EnhancedMonitoringDefault = "DEFAULT" + + // EnhancedMonitoringPerBroker is a EnhancedMonitoring enum value + EnhancedMonitoringPerBroker = "PER_BROKER" + + // EnhancedMonitoringPerTopicPerBroker is a EnhancedMonitoring enum value + EnhancedMonitoringPerTopicPerBroker = "PER_TOPIC_PER_BROKER" +) + +// The broker or Zookeeper node. +const ( + // NodeTypeBroker is a NodeType enum value + NodeTypeBroker = "BROKER" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go new file mode 100644 index 000000000..bc1d6eed6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kafka/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package kafka provides the client and types for making API +// requests to Managed Streaming for Kafka. +// +// The operations for managing an Amazon MSK cluster. +// +// See https://docs.aws.amazon.com/goto/WebAPI/kafka-2018-11-14 for more information on this service. +// +// See kafka package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/kafka/ +// +// Using the Client +// +// To contact Managed Streaming for Kafka with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Managed Streaming for Kafka client Kafka for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/kafka/#New +package kafka diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go new file mode 100644 index 000000000..2927a1714 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kafka/errors.go @@ -0,0 +1,54 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package kafka + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // Returns information about an error. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // Returns information about an error. + ErrCodeConflictException = "ConflictException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + // + // Returns information about an error. + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // Returns information about an error. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // Returns information about an error. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // Returns information about an error. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // Returns information about an error. + ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeUnauthorizedException for service response error code + // "UnauthorizedException". + // + // Returns information about an error. + ErrCodeUnauthorizedException = "UnauthorizedException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kafka/service.go b/vendor/github.com/aws/aws-sdk-go/service/kafka/service.go new file mode 100644 index 000000000..51b606d9a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kafka/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package kafka + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// Kafka provides the API operation methods for making requests to +// Managed Streaming for Kafka. See this package's package overview docs +// for details on the service. +// +// Kafka methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Kafka struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Kafka" // Name of service. + EndpointsID = "kafka" // ID to lookup a service endpoint with. + ServiceID = "Kafka" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Kafka client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Kafka client from just a session. +// svc := kafka.New(mySession) +// +// // Create a Kafka client with additional configuration +// svc := kafka.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Kafka { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "kafka" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Kafka { + svc := &Kafka{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-11-14", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Kafka operation and runs any +// custom request initialization. +func (c *Kafka) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index fbbb32e8a..016ef4d7b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -57,10 +57,11 @@ func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissi // AddLayerVersionPermission API operation for AWS Lambda. // -// Adds permissions to the resource-based policy of a version of a function -// layer. Use this action to grant layer usage permission to other accounts. -// You can grant permission to a single account, all AWS accounts, or all accounts -// in an organization. +// Adds permissions to the resource-based policy of a version of an AWS Lambda +// layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). +// Use this action to grant layer usage permission to other accounts. You can +// grant permission to a single account, all AWS accounts, or all accounts in +// an organization. // // To revoke permission, call RemoveLayerVersionPermission with the statement // ID that you specified when you added it. @@ -84,7 +85,7 @@ func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissi // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -165,20 +166,23 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // AddPermission API operation for AWS Lambda. // -// Adds a permission to the resource policy associated with the specified AWS -// Lambda function. You use resource policies to grant permissions to event -// sources that use the push model. In a push model, event sources (such as -// Amazon S3 and custom applications) invoke your Lambda function. Each permission -// you add to the resource policy allows an event source permission to invoke -// the Lambda function. +// Grants an AWS service or another account permission to use a function. You +// can apply the policy at the function level, or specify a qualifier to restrict +// access to a single version or alias. If you use a qualifier, the invoker +// must use the full Amazon Resource Name (ARN) of that version or alias to +// invoke the function. // -// Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, -// which can be unqualified (the unpublished version of the function), or include -// a version or alias. If a client uses a version or alias to invoke a function, -// use the Qualifier parameter to apply permissions to that ARN. For more information -// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// To grant permission to another account, specify the account ID as the Principal. +// For AWS services, the principal is a domain-style identifier defined by the +// service, like s3.amazonaws.com or sns.amazonaws.com. For AWS services, you +// can also specify the ARN or owning account of the associated resource as +// the SourceArn or SourceAccount. If you grant permission to a service principal +// without specifying the source, other accounts could potentially configure +// resources in their account to invoke your Lambda function. // -// This operation requires permission for the lambda:AddPermission action. +// This action adds a statement to a resource-based permission policy for the +// function. For more information about function policies, see Lambda Function +// Policies (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -207,7 +211,7 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // Lambda function access policy is limited to 20 KB. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -280,11 +284,13 @@ func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Reque // CreateAlias API operation for AWS Lambda. // -// Creates an alias that points to the specified Lambda function version. For -// more information, see Introduction to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). +// Creates an alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) +// for a Lambda function version. Use aliases to provide clients with a function +// identifier that you can update to invoke a different version. // -// Alias names are unique for a given function. This requires permission for -// the lambda:CreateAlias action. +// You can also map an alias to split invocation requests between two versions. +// Use the RoutingConfig parameter to specify a second version and the percentage +// of invocation requests that it receives. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -310,7 +316,7 @@ func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) { @@ -409,7 +415,7 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource (for example, a Lambda function or access policy statement) @@ -481,11 +487,33 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // CreateFunction API operation for AWS Lambda. // -// Creates a new Lambda function. The function configuration is created from -// the request parameters, and the code for the function is provided by a .zip -// file. The function name is case-sensitive. +// Creates a Lambda function. To create a function, you need a deployment package +// (http://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html) +// and an execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role). +// The deployment package contains your function code. The execution role grants +// the function permission to use AWS services such as Amazon CloudWatch Logs +// for log streaming and AWS X-Ray for request tracing. // -// This operation requires permission for the lambda:CreateFunction action. +// A function has an unpublished version, and can have published versions and +// aliases. A published version is a snapshot of your function code and configuration +// that can not be changed. An alias is a named resource that maps to a version, +// and can be changed to map to a different version. Use the Publish parameter +// to create version 1 of your function from its initial configuration. +// +// The other parameters let you configure version-specific and function-level +// settings. You can modify version-specific settings later with UpdateFunctionConfiguration. +// Function-level settings apply to both the unpublished and published versions +// of the function and include tags (TagResource) and per-function concurrency +// limits (PutFunctionConcurrency). +// +// If another account or a AWS service invokes your function, use AddPermission +// to grant permission by creating a resource-based IAM policy. You can grant +// permissions at the function level, on a version, or on an alias. +// +// To invoke your function directly, use Invoke. To invoke your function in +// response to events in other AWS services, create an event source mapping +// (CreateEventSourceMapping), or configure a function trigger in the other +// service. For more information, see Invoking Functions (http://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-functions.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -511,7 +539,7 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -583,10 +611,7 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque // DeleteAlias API operation for AWS Lambda. // -// Deletes the specified Lambda function alias. For more information, see Introduction -// to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). -// -// This requires permission for the lambda:DeleteAlias action. +// Deletes a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -605,7 +630,7 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { @@ -673,7 +698,8 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // DeleteEventSourceMapping API operation for AWS Lambda. // -// Deletes an event source mapping. +// Deletes an event source mapping (http://docs.aws.amazon.com/lambda/latest/dg/intro-invocation-modes.html). +// You can get the identifier of a mapping from the output of ListEventSourceMappings. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -696,12 +722,12 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeResourceInUseException "ResourceInUseException" // The operation conflicts with the resource's availability. For example, you -// attempted to update an EventSoure Mapping in CREATING, or tried to delete -// a EventSoure mapping currently in the UPDATING state. +// attempted to update an EventSource Mapping in CREATING, or tried to delete +// a EventSource mapping currently in the UPDATING state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMapping func (c *Lambda) DeleteEventSourceMapping(input *DeleteEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { @@ -771,10 +797,11 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request // DeleteFunction API operation for AWS Lambda. // // Deletes a Lambda function. To delete a specific function version, use the -// Qualifier parameter. Otherwise, all versions and aliases are deleted. Event -// source mappings are not deleted. +// Qualifier parameter. Otherwise, all versions and aliases are deleted. // -// This operation requires permission for the lambda:DeleteFunction action. +// To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. +// For AWS services and resources that invoke your function directly, delete +// the trigger in the service where you originally configured it. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -792,7 +819,7 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -869,8 +896,7 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren // DeleteFunctionConcurrency API operation for AWS Lambda. // -// Removes concurrent execution limits from this function. For more information, -// see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). +// Removes a concurrent execution limit from a function. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -888,7 +914,7 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -962,9 +988,10 @@ func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req // DeleteLayerVersion API operation for AWS Lambda. // -// Deletes a version of a function layer. Deleted versions can no longer be -// viewed or added to functions. However, a copy of the version remains in Lambda -// until no functions refer to it. +// Deletes a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). +// Deleted versions can no longer be viewed or added to functions. To avoid +// breaking functions, a copy of the version remains in Lambda until no functions +// refer to it. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -978,7 +1005,7 @@ func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req // The AWS Lambda service encountered an internal error. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion func (c *Lambda) DeleteLayerVersion(input *DeleteLayerVersionInput) (*DeleteLayerVersionOutput, error) { @@ -1058,7 +1085,7 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req // // Returned Error Codes: // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. @@ -1129,11 +1156,7 @@ func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, ou // GetAlias API operation for AWS Lambda. // -// Returns the specified alias information such as the alias ARN, description, -// and function version it is pointing to. For more information, see Introduction -// to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). -// -// This requires permission for the lambda:GetAlias action. +// Returns details about a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1156,7 +1179,7 @@ func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, ou // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) { @@ -1224,7 +1247,8 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) // GetEventSourceMapping API operation for AWS Lambda. // -// Returns details about an event source mapping. +// Returns details about an event source mapping. You can get the identifier +// of a mapping from the output of ListEventSourceMappings. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1247,7 +1271,7 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { @@ -1315,17 +1339,9 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // GetFunction API operation for AWS Lambda. // -// Returns the configuration information of the Lambda function and a presigned -// URL link to the .zip file you uploaded with CreateFunction so you can download -// the .zip file. Note that the URL is valid for up to 10 minutes. The configuration -// information is the same information you provided as parameters when uploading -// the function. -// -// Use the Qualifier parameter to retrieve a published version of the function. -// Otherwise, returns the unpublished version ($LATEST). For more information, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// This operation requires permission for the lambda:GetFunction action. +// Returns information about function or function version, with a link to download +// the deployment package that's valid for 10 minutes. If you specify a function +// version, only details specific to that version are returned. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1343,7 +1359,7 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1416,19 +1432,12 @@ func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfiguration // GetFunctionConfiguration API operation for AWS Lambda. // -// Returns the configuration information of the Lambda function. This the same -// information you provided as parameters when uploading the function by using -// CreateFunction. +// Returns a the version-specific settings of a Lambda function or version. +// The output includes only options that can vary between versions of a function. +// To modify these settings, use UpdateFunctionConfiguration. // -// If you are using the versioning feature, you can retrieve this information -// for a specific function version by using the optional Qualifier parameter -// and specifying the function version or alias that points to it. If you don't -// provide it, the API returns information about the $LATEST version of the -// function. For more information about versioning, see AWS Lambda Function -// Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// This operation requires permission for the lambda:GetFunctionConfiguration -// operation. +// To get all of a function's details, including function-level settings, use +// GetFunction. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1446,7 +1455,7 @@ func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfiguration // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1519,8 +1528,8 @@ func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *reque // GetLayerVersion API operation for AWS Lambda. // -// Returns information about a version of a function layer, with a link to download -// the layer archive that's valid for 10 minutes. +// Returns information about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html), +// with a link to download the layer archive that's valid for 10 minutes. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1539,7 +1548,7 @@ func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource (for example, a Lambda function or access policy statement) @@ -1611,8 +1620,8 @@ func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) // GetLayerVersionPolicy API operation for AWS Lambda. // -// Returns the permission policy for a layer version. For more information, -// see AddLayerVersionPermission. +// Returns the permission policy for a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). +// For more information, see AddLayerVersionPermission. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1630,7 +1639,7 @@ func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1703,9 +1712,8 @@ func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, // GetPolicy API operation for AWS Lambda. // -// Returns the resource policy associated with the specified Lambda function. -// -// This action requires permission for the lambda:GetPolicy action. +// Returns the resource-based IAM policy (http://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html) +// for a function, version, or alias. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -1723,7 +1731,7 @@ func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1796,17 +1804,24 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // Invoke API operation for AWS Lambda. // -// Invokes a Lambda function. For an example, see Create the Lambda Function -// and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually). +// Invokes a Lambda function. You can invoke a function synchronously and wait +// for the response, or asynchronously. To invoke a function asynchronously, +// set InvocationType to Event. // -// Specify just a function name to invoke the latest version of the function. -// To invoke a published version, use the Qualifier parameter to specify a version -// or alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// For synchronous invocation, details about the function response, including +// errors, are included in the response body and headers. For either invocation +// type, you can find more information in the execution log (http://docs.aws.amazon.com/lambda/latest/dg/monitoring-functions.html) +// and trace (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). To record +// function errors for asynchronous invocations, configure your function with +// a dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). // -// If you use the RequestResponse (synchronous) invocation option, the function -// will be invoked only once. If you use the Event (asynchronous) invocation -// option, the function will be invoked at least once in response to an event -// and the function must be idempotent to handle this. +// The status code in the API response does not reflect function errors. Error +// codes are reserved for errors that prevent your function from executing, +// such as permissions errors, limit errors (http://docs.aws.amazon.com/lambda/latest/dg/limits.html), +// or issues with your function's code and configuration. For example, Lambda +// returns TooManyRequestsException if executing the function would cause you +// to exceed a concurrency limit at either the account level (ConcurrentInvocationLimitExceeded) +// or function level (ReservedFunctionConcurrentInvocationLimitExceeded). // // For functions with a long timeout, your client may be disconnected during // synchronous invocation while it waits for a response. Configure your HTTP @@ -1815,13 +1830,6 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // // This operation requires permission for the lambda:InvokeFunction action. // -// The TooManyRequestsException noted below will return the following: ConcurrentInvocationLimitExceeded -// will be returned if you have no functions with reserved concurrency and have -// exceeded your account concurrent limit or if a function without reserved -// concurrency exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded -// will be returned when a function with reserved concurrency exceeds its configured -// concurrency limit. -// // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. @@ -1848,7 +1856,7 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // The content type of the Invoke request body is not JSON. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1977,11 +1985,7 @@ func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Reque // // For asynchronous function invocation, use Invoke. // -// Submits an invocation request to AWS Lambda. Upon receiving the request, -// Lambda executes the specified function asynchronously. To see the logs generated -// by the Lambda function execution, see the CloudWatch Logs console. -// -// This operation requires permission for the lambda:InvokeFunction action. +// Invokes a function asynchronously. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2074,12 +2078,8 @@ func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Reque // ListAliases API operation for AWS Lambda. // -// Returns list of aliases created for a Lambda function. For each alias, the -// response includes information such as the alias ARN, description, alias name, -// and the function version to which it points. For more information, see Introduction -// to AWS Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). -// -// This requires permission for the lambda:ListAliases action. +// Returns a list of aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) +// for a Lambda function. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2102,7 +2102,7 @@ func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { @@ -2200,7 +2200,7 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) { @@ -2324,15 +2324,12 @@ func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.R // ListFunctions API operation for AWS Lambda. // -// Returns a list of your Lambda functions. For each function, the response -// includes the function configuration information. You must use GetFunction -// to retrieve the code for your function. +// Returns a list of Lambda functions, with the version-specific configuration +// of each. // -// This operation requires permission for the lambda:ListFunctions action. -// -// If you are using the versioning feature, you can list all of your functions -// or only $LATEST versions. For information about the versioning feature, see -// AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Set FunctionVersion to ALL to include all published versions of each function +// in addition to the unpublished version. To get more information about a function +// or version, use GetFunction. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2346,7 +2343,7 @@ func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.R // The AWS Lambda service encountered an internal error. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -2469,9 +2466,10 @@ func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *r // ListLayerVersions API operation for AWS Lambda. // -// Lists the versions of a function layer. Versions that have been deleted aren't -// listed. Specify a runtime identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) -// to list only versions that indicate that they're compatible with that runtime. +// Lists the versions of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). +// Versions that have been deleted aren't listed. Specify a runtime identifier +// (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) to list +// only versions that indicate that they're compatible with that runtime. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2494,7 +2492,7 @@ func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *r // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error) { @@ -2562,8 +2560,9 @@ func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request // ListLayers API operation for AWS Lambda. // -// Lists function layers and shows information about the latest version of each. -// Specify a runtime identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) +// Lists AWS Lambda layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) +// and shows information about the latest version of each. Specify a runtime +// identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) // to list only layers that indicate that they're compatible with that runtime. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2583,7 +2582,7 @@ func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error) { @@ -2651,10 +2650,8 @@ func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou // ListTags API operation for AWS Lambda. // -// Returns a list of tags assigned to a function when supplied the function -// ARN (Amazon Resource Name). For more information on Tagging, see Tagging -// Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) -// in the AWS Lambda Developer Guide. +// Returns a function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html). +// You can also view tags with GetFunction. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2677,7 +2674,7 @@ func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, ou // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { @@ -2745,8 +2742,8 @@ func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInpu // ListVersionsByFunction API operation for AWS Lambda. // -// Lists all versions of a function. For information about versioning, see AWS -// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Returns a list of versions (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html), +// with the version-specific configuration of each. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2769,7 +2766,7 @@ func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInpu // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) { @@ -2837,8 +2834,9 @@ func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (re // PublishLayerVersion API operation for AWS Lambda. // -// Creates a function layer from a ZIP archive. Each time you call PublishLayerVersion -// with the same version name, a new version is created. +// Creates an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) +// from a ZIP archive. Each time you call PublishLayerVersion with the same +// version name, a new version is created. // // Add layers to your function with CreateFunction or UpdateFunctionConfiguration. // @@ -2858,7 +2856,7 @@ func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (re // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -2934,11 +2932,16 @@ func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request // PublishVersion API operation for AWS Lambda. // -// Publishes a version of your function from the current snapshot of $LATEST. -// That is, AWS Lambda takes a snapshot of the function code and configuration -// information from $LATEST and publishes a new version. The code and configuration -// cannot be modified after publication. For information about the versioning -// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Creates a version (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) +// from the current code and configuration of a function. Use versions to create +// a snapshot of your function code and configuration that doesn't change. +// +// AWS Lambda does not publish a version if the function's configuration and +// code hasn't changed since the last version. Use UpdateFunctionCode or UpdateFunctionConfiguration +// to update the function prior to publishing a version. +// +// Clients can invoke versions directly or with an alias. To create an alias, +// use CreateAlias. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -2961,7 +2964,7 @@ func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -3037,12 +3040,20 @@ func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInpu // PutFunctionConcurrency API operation for AWS Lambda. // -// Sets a limit on the number of concurrent executions available to this function. -// It is a subset of your account's total concurrent execution limit per region. -// Note that Lambda automatically reserves a buffer of 100 concurrent executions -// for functions without any reserved concurrency limit. This means if your -// account limit is 1000, you have a total of 900 available to allocate to individual -// functions. For more information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). +// Sets the maximum number of simultaneous executions for a function, and reserves +// capacity for that concurrency level. +// +// Concurrency settings apply to the function as a whole, including all published +// versions and the unpublished version. Reserving concurrency both guarantees +// that your function has capacity to process the specified number of events +// simultaneously, and prevents it from scaling beyond that level. Use GetFunction +// to see the current setting for a function. +// +// Use GetAccountSettings to see your regional concurrency limit. You can reserve +// concurrency for as many functions as you like, as long as you leave at least +// 100 simultaneous executions unreserved for functions that aren't configured +// with a per-function limit. For more information, see Managing Concurrency +// (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3065,7 +3076,7 @@ func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInpu // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) { @@ -3134,8 +3145,9 @@ func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPe // RemoveLayerVersionPermission API operation for AWS Lambda. // -// Removes a statement from the permissions policy for a layer version. For -// more information, see AddLayerVersionPermission. +// Removes a statement from the permissions policy for a version of an AWS Lambda +// layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). +// For more information, see AddLayerVersionPermission. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3158,7 +3170,7 @@ func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPe // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -3232,19 +3244,8 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req // RemovePermission API operation for AWS Lambda. // -// Removes permissions from a function. You can remove individual permissions -// from an resource policy associated with a Lambda function by providing a -// statement ID that you provided when you added the permission. When you remove -// permissions, disable the event source mapping or trigger configuration first -// to avoid errors. -// -// Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, -// which can be unqualified (the unpublished version of the function), or include -// a version or alias. If a client uses a version or alias to invoke a function, -// use the Qualifier parameter to apply permissions to that ARN. For more information -// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// You need permission for the lambda:RemovePermission action. +// Revokes function use permission from an AWS service or another account. You +// can get the ID of the statement from the output of GetPolicy. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3267,7 +3268,7 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -3341,11 +3342,8 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque // TagResource API operation for AWS Lambda. // -// Creates a list of tags (key-value pairs) on the Lambda function. Requires -// the Lambda function ARN (Amazon Resource Name). If a key is specified without -// a value, Lambda creates a tag with the specified key and a value of null. -// For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) -// in the AWS Lambda Developer Guide. +// Adds tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to a +// function. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3368,7 +3366,7 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { @@ -3437,9 +3435,8 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R // UntagResource API operation for AWS Lambda. // -// Removes tags from a Lambda function. Requires the function ARN (Amazon Resource -// Name). For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) -// in the AWS Lambda Developer Guide. +// Removes tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) from +// a function. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3462,7 +3459,7 @@ func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.R // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { @@ -3530,11 +3527,7 @@ func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Reque // UpdateAlias API operation for AWS Lambda. // -// Using this API you can update the function version to which the alias points -// and the alias description. For more information, see Introduction to AWS -// Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). -// -// This requires permission for the lambda:UpdateAlias action. +// Updates the configuration of a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3557,7 +3550,7 @@ func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -3654,15 +3647,15 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. // // * ErrCodeResourceInUseException "ResourceInUseException" // The operation conflicts with the resource's availability. For example, you -// attempted to update an EventSoure Mapping in CREATING, or tried to delete -// a EventSoure mapping currently in the UPDATING state. +// attempted to update an EventSource Mapping in CREATING, or tried to delete +// a EventSource mapping currently in the UPDATING state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { @@ -3730,15 +3723,10 @@ func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req // UpdateFunctionCode API operation for AWS Lambda. // -// Updates the code for the specified Lambda function. This operation must only -// be used on an existing Lambda function and cannot be used to update the function -// configuration. +// Updates a Lambda function's code. // -// If you are using the versioning feature, note this API will always update -// the $LATEST version of your Lambda function. For information about the versioning -// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// This operation requires permission for the lambda:UpdateFunctionCode action. +// The function's code is locked when you publish a version. You cannot modify +// the code of a published version, only the unpublished version. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3761,7 +3749,7 @@ func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -3837,17 +3825,14 @@ func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigu // UpdateFunctionConfiguration API operation for AWS Lambda. // -// Updates the configuration parameters for the specified Lambda function by -// using the values provided in the request. You provide only the parameters -// you want to change. This operation must only be used on an existing Lambda -// function and cannot be used to update the function's code. +// Modify the version-specifc settings of a Lambda function. // -// If you are using the versioning feature, note this API will always update -// the $LATEST version of your Lambda function. For information about the versioning -// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// These settings can vary between versions of a function and are locked when +// you publish a version. You cannot modify the configuration of a published +// version, only the unpublished version. // -// This operation requires permission for the lambda:UpdateFunctionConfiguration -// action. +// To configure function concurrency, use PutFunctionConcurrency. To grant invoke +// permissions to an account or AWS service, use AddPermission. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3870,7 +3855,7 @@ func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigu // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Request throughput limit exceeded +// Request throughput limit exceeded. // // * ErrCodeResourceConflictException "ResourceConflictException" // The resource already exists. @@ -3902,31 +3887,27 @@ func (c *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input * return out, req.Send() } -// Provides limits of code size and concurrency associated with the current -// account and region. For more information or to request a limit increase for -// concurrent executions, see Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). +// Limits related to concurrency and code storage. All file and storage sizes +// are in bytes. type AccountLimit struct { _ struct{} `type:"structure"` - // Size, in bytes, of code/dependencies that you can zip into a deployment package - // (uncompressed zip/jar size) for uploading. The default limit is 250 MB. + // The maximum size of your function's code and layers when extracted. CodeSizeUnzipped *int64 `type:"long"` - // Size, in bytes, of a single zipped code/dependencies package you can upload - // for your Lambda function(.zip/.jar file). Try using Amazon S3 for uploading - // larger files. Default limit is 50 MB. + // The maximum size of a deployment package when uploaded direcly to AWS Lambda. + // Use Amazon S3 for larger files. CodeSizeZipped *int64 `type:"long"` - // Number of simultaneous executions of your function per region. The default - // limit is 1000. + // The maximum number of simultaneous function executions. ConcurrentExecutions *int64 `type:"integer"` - // Maximum size, in bytes, of a code package you can upload per region. The - // default size is 75 GB. + // The amount of storage space that you can use for all deployment packages + // and layer archives. TotalCodeSize *int64 `type:"long"` - // The number of concurrent executions available to functions that do not have - // concurrency limits set. For more information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). + // The maximum number of simultaneous function executions, less the concurrency + // reserved for individual functions with PutFunctionConcurrency. UnreservedConcurrentExecutions *int64 `type:"integer"` } @@ -3970,15 +3951,15 @@ func (s *AccountLimit) SetUnreservedConcurrentExecutions(v int64) *AccountLimit return s } -// Provides code size usage and function count associated with the current account -// and region. +// The number of functions and amount of storage in use. type AccountUsage struct { _ struct{} `type:"structure"` - // The number of your account's existing functions per region. + // The number of Lambda functions. FunctionCount *int64 `type:"long"` - // Total size, in bytes, of the account's deployment packages per region. + // The amount of storage space, in bytes, in use by deployment packages and + // layer archives. TotalCodeSize *int64 `type:"long"` } @@ -4012,7 +3993,7 @@ type AddLayerVersionPermissionInput struct { // Action is a required field Action *string `type:"string" required:"true"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -4160,39 +4141,35 @@ func (s *AddLayerVersionPermissionOutput) SetStatement(v string) *AddLayerVersio type AddPermissionInput struct { _ struct{} `type:"structure"` - // The AWS Lambda action you want to allow in this statement. Each Lambda action - // is a string starting with lambda: followed by the API name . For example, - // lambda:CreateFunction. You can use wildcard (lambda:*) to grant permission - // for all AWS Lambda actions. + // The action that the principal can use on the function. For example, lambda:InvokeFunction + // or lambda:GetFunction. // // Action is a required field Action *string `type:"string" required:"true"` - // A unique token that must be supplied by the principal invoking the function. - // This is currently only used for Alexa Smart Home functions. + // For Alexa Smart Home functions, a token that must be supplied by the invoker. EventSourceToken *string `type:"string"` - // The name of the Lambda function. + // The name of the Lambda function, version, or alias. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:v1 (with alias). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // The principal who is getting this permission. The principal can be an AWS - // service (e.g. s3.amazonaws.com or sns.amazonaws.com) for service triggers, - // or an account ID for cross-account access. If you specify a service as a - // principal, use the SourceArn parameter to limit who can invoke the function - // through that service. + // The AWS service or account that invokes the function. If you specify a service, + // use SourceArn or SourceAccount to limit who can invoke the function through + // that service. // // Principal is a required field Principal *string `type:"string" required:"true"` @@ -4201,30 +4178,24 @@ type AddPermissionInput struct { // function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` - // An optional value you can use to ensure you are updating the latest update - // of the function version or alias. If the RevisionID you pass doesn't match - // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you to retrieve the latest function version or alias RevisionID - // using either GetFunction or GetAlias + // Only update the policy if the revision ID matches the ID specified. Use this + // option to avoid modifying a policy that has changed since you last read it. RevisionId *string `type:"string"` - // This parameter is used for S3 and SES. The AWS account ID (without a hyphen) - // of the source owner. For example, if the SourceArn identifies a bucket, then - // this is the bucket owner's account ID. You can use this additional condition - // to ensure the bucket you specify is owned by a specific account (it is possible - // the bucket owner deleted the bucket and some other AWS account created the - // bucket). You can also use this condition to specify all sources (that is, - // you don't specify the SourceArn) owned by a specific account. + // For AWS services, the ID of the account that owns the resource. Use instead + // of SourceArn to grant permission to resources owned by another account (e.g. + // all of an account's Amazon S3 buckets). Or use together with SourceArn to + // ensure that the resource is owned by the specified account. For example, + // an Amazon S3 bucket could be deleted by its owner and recreated by another + // account. SourceAccount *string `type:"string"` - // The Amazon Resource Name of the invoker. - // - // If you add a permission to a service principal without providing the source - // ARN, any AWS account that creates a mapping to your function ARN can invoke - // your Lambda function. + // For AWS services, the ARN of the AWS resource that invokes the function. + // For example, an Amazon S3 bucket or Amazon SNS topic. SourceArn *string `type:"string"` - // A unique statement identifier. + // A statement identifier that differentiates the statement from others in the + // same policy. // // StatementId is a required field StatementId *string `min:"1" type:"string" required:"true"` @@ -4328,9 +4299,7 @@ func (s *AddPermissionInput) SetStatementId(v string) *AddPermissionInput { type AddPermissionOutput struct { _ struct{} `type:"structure"` - // The permission statement you specified in the request. The response returns - // the same as a string using a backslash ("\") as an escape character in the - // JSON. + // The permission statement added to the function policy. Statement *string `type:"string"` } @@ -4350,29 +4319,27 @@ func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput { return s } -// Provides configuration information about a Lambda function version alias. +// Provides configuration information about a Lambda function alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). type AliasConfiguration struct { _ struct{} `type:"structure"` - // Lambda function ARN that is qualified using the alias name as the suffix. - // For example, if you create an alias called BETA that points to a helloworld - // function version, the ARN is arn:aws:lambda:aws-regions:acct-id:function:helloworld:BETA. + // The Amazon Resource Name (ARN) of the alias. AliasArn *string `type:"string"` - // Alias description. + // A description of the alias. Description *string `type:"string"` - // Function version to which the alias points. + // The function version that the alias invokes. FunctionVersion *string `min:"1" type:"string"` - // Alias name. + // The name of the alias. Name *string `min:"1" type:"string"` - // Represents the latest updated revision of the function or alias. + // A unique identifier that changes when you update the alias. RevisionId *string `type:"string"` - // Specifies an additional function versions the alias points to, allowing you - // to dictate what percentage of traffic will invoke each version. + // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) + // of the alias. RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -4422,7 +4389,7 @@ func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *Ali return s } -// The alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) +// A Lambda function alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) // configuration. type AliasRoutingConfiguration struct { _ struct{} `type:"structure"` @@ -4451,7 +4418,7 @@ func (s *AliasRoutingConfiguration) SetAdditionalVersionWeights(v map[string]*fl type CreateAliasInput struct { _ struct{} `type:"structure"` - // Description of the alias. + // A description of the alias. Description *string `type:"string"` // The name of the lambda function. @@ -4470,19 +4437,18 @@ type CreateAliasInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Lambda function version for which you are creating the alias. + // The function version that the alias invokes. // // FunctionVersion is a required field FunctionVersion *string `min:"1" type:"string" required:"true"` - // Name for the alias you are creating. + // The name of the alias. // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // Specifies an additional version your alias can point to, allowing you to - // dictate what percentage of traffic will invoke each version. For more information, - // see Traffic Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). + // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) + // of the alias. RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -4603,8 +4569,7 @@ type CreateEventSourceMappingInput struct { // for Amazon Kinesis streams. StartingPosition *string `type:"string" enum:"EventSourcePosition"` - // With StartingPosition set to AT_TIMESTAMP, the Unix time in seconds from - // which to start reading. + // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. StartingPositionTimestamp *time.Time `type:"timestamp"` } @@ -4699,11 +4664,11 @@ type CreateFunctionInput struct { // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function. // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // // The length constraint applies only to the full ARN. If you specify only the // function name, it is limited to 64 characters in length. @@ -4712,17 +4677,21 @@ type CreateFunctionInput struct { FunctionName *string `min:"1" type:"string" required:"true"` // The name of the method within your code that Lambda calls to execute your - // function. For more information, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). + // function. The format includes the filename and can also include namespaces + // and other qualifiers, depending on the runtime. For more information, see + // Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). // // Handler is a required field Handler *string `type:"string" required:"true"` - // The ARN of the KMS key used to encrypt your function's environment variables. - // If not provided, AWS Lambda will use a default service key. + // The ARN of the AWS Key Management Service key used to encrypt your function's + // environment variables. If not provided, AWS Lambda uses a default service + // key. KMSKeyArn *string `type:"string"` // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) - // to add to the function's execution environment. + // to add to the function's execution environment. Specify each layer by ARN, + // including the version. Layers []*string `type:"list"` // The amount of memory that your function has access to. Increasing the function's @@ -4733,19 +4702,18 @@ type CreateFunctionInput struct { // Set to true to publish the first version of the function during creation. Publish *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the function's execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role). + // The Amazon Resource Name (ARN) of the function's execution role. // // Role is a required field Role *string `type:"string" required:"true"` - // The runtime version for the function. + // The identifier of the function's runtime (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). // // Runtime is a required field Runtime *string `type:"string" required:"true" enum:"Runtime"` - // The list of tags (key-value pairs) assigned to the new function. For more - // information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // A list of tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) + // to apply to the function. Tags map[string]*string `type:"map"` // The amount of time that Lambda allows a function to run before terminating @@ -4756,10 +4724,10 @@ type CreateFunctionInput struct { // AWS X-Ray. TracingConfig *TracingConfig `type:"structure"` - // If your Lambda function accesses resources in a VPC, you provide this parameter - // identifying the list of security group IDs and subnet IDs. These must belong - // to the same VPC. You must provide at least one security group and one subnet - // ID. + // For network connectivity to AWS resources in a VPC, specify a list of security + // groups and subnets in the VPC. When you connect a function to a VPC, it can + // only access resources and the internet through that VPC. For more information, + // see VPC Settings (http://docs.aws.amazon.com/lambda/latest/dg/vpc.html). VpcConfig *VpcConfig `type:"structure"` } @@ -4952,7 +4920,7 @@ type DeleteAliasInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Name of the alias to delete. + // The name of the alias. // // Name is a required field Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"` @@ -5064,11 +5032,11 @@ type DeleteFunctionConcurrencyInput struct { // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function. // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // // The length constraint applies only to the full ARN. If you specify only the // function name, it is limited to 64 characters in length. @@ -5126,18 +5094,19 @@ func (s DeleteFunctionConcurrencyOutput) GoString() string { type DeleteFunctionInput struct { _ struct{} `type:"structure"` - // The name of the Lambda function. + // The name of the Lambda function or version. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:1 (with version). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5205,7 +5174,7 @@ func (s DeleteFunctionOutput) GoString() string { type DeleteLayerVersionInput struct { _ struct{} `type:"structure"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -5375,7 +5344,7 @@ type EventSourceMappingConfiguration struct { // The ARN of the Lambda function. FunctionArn *string `type:"string"` - // The date that the event source mapping was last updated, in Unix time seconds. + // The date that the event source mapping was last updated. LastModified *time.Time `type:"timestamp"` // The result of the last AWS Lambda invocation of your Lambda function. @@ -5450,12 +5419,13 @@ func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingC return s } -// The code for the Lambda function. You can specify either an S3 location, -// or upload a deployment package directly. +// The code for the Lambda function. You can specify either an object in Amazon +// S3, or upload a deployment package directly. type FunctionCode struct { _ struct{} `type:"structure"` - // An Amazon S3 bucket in the same region as your function. + // An Amazon S3 bucket in the same region as your function. The bucket can be + // in a different AWS account. S3Bucket *string `min:"3" type:"string"` // The Amazon S3 key of the deployment package. @@ -5464,8 +5434,8 @@ type FunctionCode struct { // For versioned objects, the version of the deployment package object to use. S3ObjectVersion *string `min:"1" type:"string"` - // The base64-encoded contents of your zip file containing your deployment package. - // AWS SDK and AWS CLI clients handle the encoding for you. + // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI + // clients handle the encoding for you. // // ZipFile is automatically base64 encoded/decoded by the SDK. ZipFile []byte `type:"blob" sensitive:"true"` @@ -5524,15 +5494,14 @@ func (s *FunctionCode) SetZipFile(v []byte) *FunctionCode { return s } -// The object for the Lambda function location. +// Details about a function's deployment package. type FunctionCodeLocation struct { _ struct{} `type:"structure"` - // The presigned URL you can use to download the function's .zip file that you - // previously uploaded. The URL is valid for up to 10 minutes. + // A pre-signed URL that you can use to download the deployment package. Location *string `type:"string"` - // The repository from which you can download the function. + // The service hosting the file. RepositoryType *string `type:"string"` } @@ -5558,7 +5527,7 @@ func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation return s } -// A Lambda function's configuration settings. +// Details about a function's configuration. type FunctionConfiguration struct { _ struct{} `type:"structure"` @@ -5577,7 +5546,7 @@ type FunctionConfiguration struct { // The function's environment variables. Environment *EnvironmentResponse `type:"structure"` - // The function's Amazon Resource Name. + // The function's Amazon Resource Name (ARN). FunctionArn *string `type:"string"` // The name of the function. @@ -5594,10 +5563,10 @@ type FunctionConfiguration struct { // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD). LastModified *string `type:"string"` - // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). + // The function's layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) Layers []*Layer `type:"list"` - // The ARN of the master function. + // For Lambda@Edge functions, the ARN of the master function. MasterArn *string `type:"string"` // The memory allocated to the function @@ -5821,7 +5790,7 @@ type GetAliasInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Name of the alias for which you want to retrieve information. + // The name of the alias. // // Name is a required field Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"` @@ -5915,18 +5884,19 @@ func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInp type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` - // The name of the Lambda function. + // The name of the Lambda function, version, or alias. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:v1 (with alias). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5980,18 +5950,19 @@ func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfi type GetFunctionInput struct { _ struct{} `type:"structure"` - // The name of the Lambda function. + // The name of the Lambda function, version, or alias. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:v1 (with alias). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6042,23 +6013,19 @@ func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput { return s } -// This response contains the object for the Lambda function location (see FunctionCodeLocation. type GetFunctionOutput struct { _ struct{} `type:"structure"` - // The function's code. + // The deployment package of the function or version. Code *FunctionCodeLocation `type:"structure"` - // The concurrent execution limit set for this function. For more information, - // see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). + // The function's reserved concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). Concurrency *PutFunctionConcurrencyOutput `type:"structure"` - // The function's configuration. + // The configuration of the function or version. Configuration *FunctionConfiguration `type:"structure"` - // Returns the list of tags associated with the function. For more information, - // see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // The function's tags (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html). Tags map[string]*string `type:"map"` } @@ -6099,7 +6066,7 @@ func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput { type GetLayerVersionInput struct { _ struct{} `type:"structure"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -6167,7 +6134,7 @@ type GetLayerVersionOutput struct { // The description of the version. Description *string `type:"string"` - // The Amazon Resource Name (ARN) of the function layer. + // The ARN of the layer. LayerArn *string `min:"1" type:"string"` // The ARN of the layer version. @@ -6241,7 +6208,7 @@ func (s *GetLayerVersionOutput) SetVersion(v int64) *GetLayerVersionOutput { type GetLayerVersionPolicyInput struct { _ struct{} `type:"structure"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -6328,26 +6295,24 @@ func (s *GetLayerVersionPolicyOutput) SetRevisionId(v string) *GetLayerVersionPo type GetPolicyInput struct { _ struct{} `type:"structure"` - // The name of the lambda function. + // The name of the Lambda function, version, or alias. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:v1 (with alias). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // You can specify this optional query parameter to specify a function version - // or an alias name in which case this API will return all permissions associated - // with the specific qualified ARN. If you don't provide this parameter, the - // API will return permissions that apply to the unqualified function ARN. + // Specify a version or alias to get the policy for that resource. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -6395,12 +6360,10 @@ func (s *GetPolicyInput) SetQualifier(v string) *GetPolicyInput { type GetPolicyOutput struct { _ struct{} `type:"structure"` - // The resource policy associated with the specified function. The response - // returns the same as a string using a backslash ("\") as an escape character - // in the JSON. + // The resource-based policy. Policy *string `type:"string"` - // Represents the latest updated revision of the function or alias. + // A unique identifier for the current revision of the policy. RevisionId *string `type:"string"` } @@ -6434,11 +6397,11 @@ type InvokeAsyncInput struct { // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function. // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // // The length constraint applies only to the full ARN. If you specify only the // function name, it is limited to 64 characters in length. @@ -6522,31 +6485,23 @@ func (s *InvokeAsyncOutput) SetStatus(v int64) *InvokeAsyncOutput { type InvokeInput struct { _ struct{} `type:"structure" payload:"Payload"` - // Using the ClientContext you can pass client-specific information to the Lambda - // function you are invoking. You can then process the client information in - // your Lambda function as you choose through the context variable. For an example - // of a ClientContext JSON, see PutEvents (http://docs.aws.amazon.com/mobileanalytics/latest/ug/PutEvents.html) - // in the Amazon Mobile Analytics API Reference and User Guide. - // - // The ClientContext JSON must be base64-encoded and has a maximum size of 3583 - // bytes. - // - // ClientContext information is returned only if you use the synchronous (RequestResponse) - // invocation type. + // Up to 3583 bytes of base64-encoded data about the invoking client to pass + // to the function in the context object. ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"` - // The name of the Lambda function. + // The name of the Lambda function, version, or alias. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:v1 (with alias). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6555,18 +6510,17 @@ type InvokeInput struct { // // * RequestResponse (default) - Invoke the function synchronously. Keep // the connection open until the function returns a response or times out. + // The API response includes the function response and additional data. // // * Event - Invoke the function asynchronously. Send events that fail multiple - // times to the function's dead-letter queue (if configured). + // times to the function's dead-letter queue (if configured). The API response + // only includes a status code. // // * DryRun - Validate parameter values and verify that the user or role // has permission to invoke the function. InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"` - // You can set this optional parameter to Tail in the request only if you specify - // the InvocationType parameter with value RequestResponse. In this case, AWS - // Lambda returns the base64-encoded last 4 KB of log data produced by your - // Lambda function in the x-amz-log-result header. + // Set to Tail to include the execution log in the response. LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"` // JSON that you want to provide to your Lambda function as input. @@ -6641,34 +6595,27 @@ func (s *InvokeInput) SetQualifier(v string) *InvokeInput { return s } -// Upon success, returns an empty response. Otherwise, throws an exception. type InvokeOutput struct { _ struct{} `type:"structure" payload:"Payload"` - // The function version that has been executed. This value is returned only - // if the invocation type is RequestResponse. For more information, see Traffic - // Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). + // The version of the function that executed. When you invoke a function with + // an alias, indicates which version the alias resolved to. ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"` - // Indicates whether an error occurred while executing the Lambda function. - // If an error occurred this field will have one of two values; Handled or Unhandled. - // Handled errors are errors that are reported by the function while the Unhandled - // errors are those detected and reported by AWS Lambda. Unhandled errors include - // out of memory errors and function timeouts. For information about how to - // report an Handled error, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html). + // If present, indicates that an error occured during function execution. Details + // about the error are included in the response payload. + // + // * Handled - The runtime caught an error thrown by the function and formatted + // it into a JSON document. + // + // * Unhandled - The runtime did not handle the error. For example, the function + // ran out of memory or timed out. FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"` - // It is the base64-encoded logs for the Lambda function invocation. This is - // present only if the invocation type is RequestResponse and the logs were - // requested. + // The last 4 KB of the execution log, base64 encoded. LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"` - // It is the JSON representation of the object returned by the Lambda function. - // This is present only if the invocation type is RequestResponse. - // - // In the event of a function error this field contains a message describing - // the error. For the Handled errors the Lambda function will report this message. - // For Unhandled errors AWS Lambda reports the message. + // The response from the function, or an error object. Payload []byte `type:"blob" sensitive:"true"` // The HTTP status code will be in the 200 range for successful request. For @@ -6718,7 +6665,7 @@ func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { return s } -// A function layer. +// An AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). type Layer struct { _ struct{} `type:"structure"` @@ -6751,8 +6698,8 @@ func (s *Layer) SetCodeSize(v int64) *Layer { return s } -// A ZIP archive that contains the contents of the function layer. You can specify -// either an Amazon S3 location, or upload a layer archive directly. +// A ZIP archive that contains the contents of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). +// You can specify either an Amazon S3 location, or upload a layer archive directly. type LayerVersionContentInput struct { _ struct{} `type:"structure"` @@ -6825,7 +6772,7 @@ func (s *LayerVersionContentInput) SetZipFile(v []byte) *LayerVersionContentInpu return s } -// Details about a layer version. +// Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). type LayerVersionContentOutput struct { _ struct{} `type:"structure"` @@ -6867,7 +6814,7 @@ func (s *LayerVersionContentOutput) SetLocation(v string) *LayerVersionContentOu return s } -// Details about a layer version. +// Details about a version of an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). type LayerVersionsListItem struct { _ struct{} `type:"structure"` @@ -6936,7 +6883,7 @@ func (s *LayerVersionsListItem) SetVersion(v int64) *LayerVersionsListItem { return s } -// Details about a function layer. +// Details about an AWS Lambda layer (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). type LayersListItem struct { _ struct{} `type:"structure"` @@ -6997,17 +6944,14 @@ type ListAliasesInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // If you specify this optional parameter, the API returns only the aliases - // that are pointing to the specific Lambda function version, otherwise the - // API returns all of the aliases created for the Lambda function. + // Specify a function version to only list aliases that invoke that version. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" min:"1" type:"string"` - // Optional string. An opaque pagination token returned from a previous ListAliases - // operation. If present, indicates where to continue the listing. + // Specify the pagination token returned by a previous request to retrieve the + // next page of results. Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // Optional integer. Specifies the maximum number of aliases to return in response. - // This parameter value must be greater than 0. + // Limit the number of aliases returned. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` } @@ -7073,7 +7017,7 @@ type ListAliasesOutput struct { // A list of aliases. Aliases []*AliasConfiguration `type:"list"` - // A string, present if there are more aliases. + // Pagination token included if more results are available. NextMarker *string `type:"string"` } @@ -7220,22 +7164,19 @@ func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSource type ListFunctionsInput struct { _ struct{} `type:"structure"` - // Set to ALL to list all published versions. If not specified, only the latest - // unpublished version ARN is returned. + // Set to ALL to include entries for all published versions of each function. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"` - // Optional string. An opaque pagination token returned from a previous ListFunctions - // operation. If present, indicates where to continue the listing. + // Specify the pagination token returned by a previous request to retrieve the + // next page of results. Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // Specify a region (e.g. us-east-2) to only list functions that were created - // in that region, or ALL to include functions replicated from any region. If - // specified, you also must specify the FunctionVersion. + // For Lambda@Edge functions, the region of the master function. For example, + // us-east-2 or ALL. If specified, you must set FunctionVersion to ALL. MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"` - // Optional integer. Specifies the maximum number of AWS Lambda functions to - // return in response. This parameter value must be greater than 0. The absolute - // maximum of AWS Lambda functions that can be returned is 50. + // Specify a value between 1 and 50 to limit the number of functions in the + // response. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` } @@ -7293,7 +7234,7 @@ type ListFunctionsOutput struct { // A list of Lambda functions. Functions []*FunctionConfiguration `type:"list"` - // A string, present if there are more functions. + // Pagination token included if more results are available. NextMarker *string `type:"string"` } @@ -7325,7 +7266,7 @@ type ListLayerVersionsInput struct { // A runtime identifier. For example, go1.x. CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -7511,9 +7452,7 @@ func (s *ListLayersOutput) SetNextMarker(v string) *ListLayersOutput { type ListTagsInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the function. For more information, see - // Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // The function's Amazon Resource Name (ARN). // // Resource is a required field Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` @@ -7554,9 +7493,7 @@ func (s *ListTagsInput) SetResource(v string) *ListTagsInput { type ListTagsOutput struct { _ struct{} `type:"structure"` - // The list of tags assigned to the function. For more information, see Tagging - // Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // The function's tags. Tags map[string]*string `type:"map"` } @@ -7595,12 +7532,11 @@ type ListVersionsByFunctionInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Optional string. An opaque pagination token returned from a previous ListVersionsByFunction - // operation. If present, indicates where to continue the listing. + // Specify the pagination token returned by a previous request to retrieve the + // next page of results. Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // Optional integer. Specifies the maximum number of AWS Lambda function versions - // to return in response. This parameter value must be greater than 0. + // Limit the number of versions returned. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` } @@ -7654,7 +7590,7 @@ func (s *ListVersionsByFunctionInput) SetMaxItems(v int64) *ListVersionsByFuncti type ListVersionsByFunctionOutput struct { _ struct{} `type:"structure"` - // A string, present if there are more function versions. + // Pagination token included if more results are available. NextMarker *string `type:"string"` // A list of Lambda function versions. @@ -7698,7 +7634,7 @@ type PublishLayerVersionInput struct { // The description of the version. Description *string `type:"string"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -7794,7 +7730,7 @@ type PublishLayerVersionOutput struct { // The description of the version. Description *string `type:"string"` - // The Amazon Resource Name (ARN) of the function layer. + // The ARN of the layer. LayerArn *string `min:"1" type:"string"` // The ARN of the layer version. @@ -7868,15 +7804,14 @@ func (s *PublishLayerVersionOutput) SetVersion(v int64) *PublishLayerVersionOutp type PublishVersionInput struct { _ struct{} `type:"structure"` - // The SHA256 hash of the deployment package you want to publish. This provides - // validation on the code you are publishing. If you provide this parameter, - // the value must match the SHA256 of the $LATEST version for the publication - // to succeed. You can use the DryRun parameter of UpdateFunctionCode to verify - // the hash value that will be returned before publishing your new version. + // Only publish a version if the hash matches the value specified. Use this + // option to avoid publishing a version if the function code has changed since + // you last updated it. You can get the hash for the version you uploaded from + // the output of UpdateFunctionCode. CodeSha256 *string `type:"string"` - // The description for the version you are publishing. If not provided, AWS - // Lambda copies the description from the $LATEST version. + // Specify a description for the version to override the description in the + // function configuration. Description *string `type:"string"` // The name of the lambda function. @@ -7895,11 +7830,9 @@ type PublishVersionInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // An optional value you can use to ensure you are updating the latest update - // of the function version or alias. If the RevisionID you pass doesn't match - // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you retrieve the latest function version or alias RevisionID - // using either GetFunction or GetAlias. + // Only update the function if the revision ID matches the ID specified. Use + // this option to avoid publishing a version if the function configuration has + // changed since you last updated it. RevisionId *string `type:"string"` } @@ -7960,11 +7893,11 @@ type PutFunctionConcurrencyInput struct { // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function. // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // // The length constraint applies only to the full ARN. If you specify only the // function name, it is limited to 64 characters in length. @@ -7972,7 +7905,7 @@ type PutFunctionConcurrencyInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // The concurrent execution limit reserved for this function. + // The number of simultaneous executions to reserve for the function. // // ReservedConcurrentExecutions is a required field ReservedConcurrentExecutions *int64 `type:"integer" required:"true"` @@ -8046,7 +7979,7 @@ func (s *PutFunctionConcurrencyOutput) SetReservedConcurrentExecutions(v int64) type RemoveLayerVersionPermissionInput struct { _ struct{} `type:"structure"` - // The name of the layer. + // The name or Amazon Resource Name (ARN) of the layer. // // LayerName is a required field LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` @@ -8142,18 +8075,19 @@ func (s RemoveLayerVersionPermissionOutput) GoString() string { type RemovePermissionInput struct { _ struct{} `type:"structure"` - // The name of the Lambda function. + // The name of the Lambda function, version, or alias. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function (name-only), my-function:v1 (with alias). // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // - // The length constraint applies only to the full ARN. If you specify only the - // function name, it is limited to 64 characters in length. + // You can append a version number or alias to any of the formats. The length + // constraint applies only to the full ARN. If you specify only the function + // name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -8162,11 +8096,8 @@ type RemovePermissionInput struct { // of the function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` - // An optional value you can use to ensure you are updating the latest update - // of the function version or alias. If the RevisionID you pass doesn't match - // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you to retrieve the latest function version or alias RevisionID - // using either GetFunction or GetAlias. + // Only update the policy if the revision ID matches the ID specified. Use this + // option to avoid modifying a policy that has changed since you last read it. RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` // Statement ID of the permission to remove. @@ -8251,16 +8182,12 @@ func (s RemovePermissionOutput) GoString() string { type TagResourceInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the Lambda function. For more information, - // see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // The function's Amazon Resource Name (ARN). // // Resource is a required field Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` - // The list of tags (key-value pairs) you are assigning to the Lambda function. - // For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // A list of tags to apply to the function. // // Tags is a required field Tags map[string]*string `type:"map" required:"true"` @@ -8372,16 +8299,12 @@ func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse { type UntagResourceInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the function. For more information, see - // Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // The function's Amazon Resource Name (ARN). // // Resource is a required field Resource *string `location:"uri" locationName:"ARN" type:"string" required:"true"` - // The list of tag keys to be deleted from the function. For more information, - // see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) - // in the AWS Lambda Developer Guide. + // A list of tag keys to remove from the function. // // TagKeys is a required field TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` @@ -8445,7 +8368,7 @@ func (s UntagResourceOutput) GoString() string { type UpdateAliasInput struct { _ struct{} `type:"structure"` - // You can change the description of the alias using this parameter. + // A description of the alias. Description *string `type:"string"` // The name of the lambda function. @@ -8464,25 +8387,20 @@ type UpdateAliasInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Using this parameter you can change the Lambda function version to which - // the alias points. + // The function version that the alias invokes. FunctionVersion *string `min:"1" type:"string"` - // The alias name. + // The name of the alias. // // Name is a required field Name *string `location:"uri" locationName:"Name" min:"1" type:"string" required:"true"` - // An optional value you can use to ensure you are updating the latest update - // of the function version or alias. If the RevisionID you pass doesn't match - // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you retrieve the latest function version or alias RevisionID - // using either GetFunction or GetAlias. + // Only update the alias if the revision ID matches the ID specified. Use this + // option to avoid modifying an alias that has changed since you last read it. RevisionId *string `type:"string"` - // Specifies an additional version your alias can point to, allowing you to - // dictate what percentage of traffic will invoke each version. For more information, - // see Traffic Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). + // The routing configuration (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) + // of the alias. RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -8653,23 +8571,19 @@ func (s *UpdateEventSourceMappingInput) SetUUID(v string) *UpdateEventSourceMapp type UpdateFunctionCodeInput struct { _ struct{} `type:"structure"` - // This boolean parameter can be used to test your request to AWS Lambda to - // update the Lambda function and publish a version as an atomic operation. - // It will do all necessary computation and validation of your code but will - // not upload it or a publish a version. Each time this operation is invoked, - // the CodeSha256 hash value of the provided code will also be computed and - // returned in the response. + // Set to true to validate the request parameters and access permissions without + // modifying the function code. DryRun *bool `type:"boolean"` // The name of the Lambda function. // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function. // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // // The length constraint applies only to the full ARN. If you specify only the // function name, it is limited to 64 characters in length. @@ -8677,33 +8591,27 @@ type UpdateFunctionCodeInput struct { // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // This boolean parameter can be used to request AWS Lambda to update the Lambda - // function and publish a version as an atomic operation. + // Set to true to publish a new version of the function after updating the code. + // This has the same effect as calling PublishVersion separately. Publish *bool `type:"boolean"` - // An optional value you can use to ensure you are updating the latest update - // of the function version or alias. If the RevisionID you pass doesn't match - // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you to retrieve the latest function version or alias RevisionID - // using either using using either GetFunction or GetAlias. + // Only update the function if the revision ID matches the ID specified. Use + // this option to avoid modifying a function that has changed since you last + // read it. RevisionId *string `type:"string"` - // Amazon S3 bucket name where the .zip file containing your deployment package - // is stored. This bucket must reside in the same AWS Region where you are creating - // the Lambda function. + // An Amazon S3 bucket in the same region as your function. The bucket can be + // in a different AWS account. S3Bucket *string `min:"3" type:"string"` - // The Amazon S3 object (the deployment package) key name you want to upload. + // The Amazon S3 key of the deployment package. S3Key *string `min:"1" type:"string"` - // The Amazon S3 object (the deployment package) version you want to upload. + // For versioned objects, the version of the deployment package object to use. S3ObjectVersion *string `min:"1" type:"string"` - // The contents of your zip file containing your deployment package. If you - // are using the web API directly, the contents of the zip file must be base64-encoded. - // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the - // encoding for you. For more information about creating a .zip file, see Execution - // Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html). + // The base64-encoded contents of the deployment package. AWS SDK and AWS CLI + // clients handle the encoding for you. // // ZipFile is automatically base64 encoded/decoded by the SDK. ZipFile []byte `type:"blob" sensitive:"true"` @@ -8811,11 +8719,11 @@ type UpdateFunctionConfigurationInput struct { // // Name formats // - // * Function name - MyFunction. + // * Function name - my-function. // - // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function. // - // * Partial ARN - 123456789012:function:MyFunction. + // * Partial ARN - 123456789012:function:my-function. // // The length constraint applies only to the full ARN. If you specify only the // function name, it is limited to 64 characters in length. @@ -8844,11 +8752,9 @@ type UpdateFunctionConfigurationInput struct { // MB. MemorySize *int64 `min:"128" type:"integer"` - // An optional value you can use to ensure you are updating the latest update - // of the function version or alias. If the RevisionID you pass doesn't match - // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you to retrieve the latest function version or alias RevisionID - // using either GetFunction or GetAlias. + // Only update the function if the revision ID matches the ID specified. Use + // this option to avoid modifying a function that has changed since you last + // read it. RevisionId *string `type:"string"` // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go index 4e12ca08f..935b7d91b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go @@ -136,8 +136,8 @@ const ( // "ResourceInUseException". // // The operation conflicts with the resource's availability. For example, you - // attempted to update an EventSoure Mapping in CREATING, or tried to delete - // a EventSoure mapping currently in the UPDATING state. + // attempted to update an EventSource Mapping in CREATING, or tried to delete + // a EventSource mapping currently in the UPDATING state. ErrCodeResourceInUseException = "ResourceInUseException" // ErrCodeResourceNotFoundException for service response error code @@ -163,7 +163,7 @@ const ( // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". // - // Request throughput limit exceeded + // Request throughput limit exceeded. ErrCodeTooManyRequestsException = "TooManyRequestsException" // ErrCodeUnsupportedMediaTypeException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go new file mode 100644 index 000000000..d292b8956 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/api.go @@ -0,0 +1,3443 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package licensemanager + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCreateLicenseConfiguration = "CreateLicenseConfiguration" + +// CreateLicenseConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the CreateLicenseConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLicenseConfiguration for more information on using the CreateLicenseConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLicenseConfigurationRequest method. +// req, resp := client.CreateLicenseConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/CreateLicenseConfiguration +func (c *LicenseManager) CreateLicenseConfigurationRequest(input *CreateLicenseConfigurationInput) (req *request.Request, output *CreateLicenseConfigurationOutput) { + op := &request.Operation{ + Name: opCreateLicenseConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLicenseConfigurationInput{} + } + + output = &CreateLicenseConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLicenseConfiguration API operation for AWS License Manager. +// +// Creates a new license configuration object. A license configuration is an +// abstraction of a customer license agreement that can be consumed and enforced +// by License Manager. Components include specifications for the license type +// (licensing by instance, socket, CPU, or VCPU), tenancy (shared tenancy, Amazon +// EC2 Dedicated Instance, Amazon EC2 Dedicated Host, or any of these), host +// affinity (how long a VM must be associated with a host), the number of licenses +// purchased and used. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation CreateLicenseConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/CreateLicenseConfiguration +func (c *LicenseManager) CreateLicenseConfiguration(input *CreateLicenseConfigurationInput) (*CreateLicenseConfigurationOutput, error) { + req, out := c.CreateLicenseConfigurationRequest(input) + return out, req.Send() +} + +// CreateLicenseConfigurationWithContext is the same as CreateLicenseConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLicenseConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) CreateLicenseConfigurationWithContext(ctx aws.Context, input *CreateLicenseConfigurationInput, opts ...request.Option) (*CreateLicenseConfigurationOutput, error) { + req, out := c.CreateLicenseConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteLicenseConfiguration = "DeleteLicenseConfiguration" + +// DeleteLicenseConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLicenseConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteLicenseConfiguration for more information on using the DeleteLicenseConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteLicenseConfigurationRequest method. +// req, resp := client.DeleteLicenseConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/DeleteLicenseConfiguration +func (c *LicenseManager) DeleteLicenseConfigurationRequest(input *DeleteLicenseConfigurationInput) (req *request.Request, output *DeleteLicenseConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteLicenseConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLicenseConfigurationInput{} + } + + output = &DeleteLicenseConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLicenseConfiguration API operation for AWS License Manager. +// +// Deletes an existing license configuration. This action fails if the configuration +// is in use. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation DeleteLicenseConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/DeleteLicenseConfiguration +func (c *LicenseManager) DeleteLicenseConfiguration(input *DeleteLicenseConfigurationInput) (*DeleteLicenseConfigurationOutput, error) { + req, out := c.DeleteLicenseConfigurationRequest(input) + return out, req.Send() +} + +// DeleteLicenseConfigurationWithContext is the same as DeleteLicenseConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLicenseConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) DeleteLicenseConfigurationWithContext(ctx aws.Context, input *DeleteLicenseConfigurationInput, opts ...request.Option) (*DeleteLicenseConfigurationOutput, error) { + req, out := c.DeleteLicenseConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLicenseConfiguration = "GetLicenseConfiguration" + +// GetLicenseConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetLicenseConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetLicenseConfiguration for more information on using the GetLicenseConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetLicenseConfigurationRequest method. +// req, resp := client.GetLicenseConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetLicenseConfiguration +func (c *LicenseManager) GetLicenseConfigurationRequest(input *GetLicenseConfigurationInput) (req *request.Request, output *GetLicenseConfigurationOutput) { + op := &request.Operation{ + Name: opGetLicenseConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLicenseConfigurationInput{} + } + + output = &GetLicenseConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLicenseConfiguration API operation for AWS License Manager. +// +// Returns a detailed description of a license configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation GetLicenseConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetLicenseConfiguration +func (c *LicenseManager) GetLicenseConfiguration(input *GetLicenseConfigurationInput) (*GetLicenseConfigurationOutput, error) { + req, out := c.GetLicenseConfigurationRequest(input) + return out, req.Send() +} + +// GetLicenseConfigurationWithContext is the same as GetLicenseConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetLicenseConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) GetLicenseConfigurationWithContext(ctx aws.Context, input *GetLicenseConfigurationInput, opts ...request.Option) (*GetLicenseConfigurationOutput, error) { + req, out := c.GetLicenseConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetServiceSettings = "GetServiceSettings" + +// GetServiceSettingsRequest generates a "aws/request.Request" representing the +// client's request for the GetServiceSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetServiceSettings for more information on using the GetServiceSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetServiceSettingsRequest method. +// req, resp := client.GetServiceSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetServiceSettings +func (c *LicenseManager) GetServiceSettingsRequest(input *GetServiceSettingsInput) (req *request.Request, output *GetServiceSettingsOutput) { + op := &request.Operation{ + Name: opGetServiceSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetServiceSettingsInput{} + } + + output = &GetServiceSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetServiceSettings API operation for AWS License Manager. +// +// Gets License Manager settings for a region. Exposes the configured S3 bucket, +// SNS topic, etc., for inspection. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation GetServiceSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/GetServiceSettings +func (c *LicenseManager) GetServiceSettings(input *GetServiceSettingsInput) (*GetServiceSettingsOutput, error) { + req, out := c.GetServiceSettingsRequest(input) + return out, req.Send() +} + +// GetServiceSettingsWithContext is the same as GetServiceSettings with the addition of +// the ability to pass a context and additional request options. +// +// See GetServiceSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) GetServiceSettingsWithContext(ctx aws.Context, input *GetServiceSettingsInput, opts ...request.Option) (*GetServiceSettingsOutput, error) { + req, out := c.GetServiceSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAssociationsForLicenseConfiguration = "ListAssociationsForLicenseConfiguration" + +// ListAssociationsForLicenseConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the ListAssociationsForLicenseConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAssociationsForLicenseConfiguration for more information on using the ListAssociationsForLicenseConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAssociationsForLicenseConfigurationRequest method. +// req, resp := client.ListAssociationsForLicenseConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListAssociationsForLicenseConfiguration +func (c *LicenseManager) ListAssociationsForLicenseConfigurationRequest(input *ListAssociationsForLicenseConfigurationInput) (req *request.Request, output *ListAssociationsForLicenseConfigurationOutput) { + op := &request.Operation{ + Name: opListAssociationsForLicenseConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAssociationsForLicenseConfigurationInput{} + } + + output = &ListAssociationsForLicenseConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAssociationsForLicenseConfiguration API operation for AWS License Manager. +// +// Lists the resource associations for a license configuration. Resource associations +// need not consume licenses from a license configuration. For example, an AMI +// or a stopped instance may not consume a license (depending on the license +// rules). Use this operation to find all resources associated with a license +// configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation ListAssociationsForLicenseConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" +// The request uses too many filters or too many filter values. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListAssociationsForLicenseConfiguration +func (c *LicenseManager) ListAssociationsForLicenseConfiguration(input *ListAssociationsForLicenseConfigurationInput) (*ListAssociationsForLicenseConfigurationOutput, error) { + req, out := c.ListAssociationsForLicenseConfigurationRequest(input) + return out, req.Send() +} + +// ListAssociationsForLicenseConfigurationWithContext is the same as ListAssociationsForLicenseConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See ListAssociationsForLicenseConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) ListAssociationsForLicenseConfigurationWithContext(ctx aws.Context, input *ListAssociationsForLicenseConfigurationInput, opts ...request.Option) (*ListAssociationsForLicenseConfigurationOutput, error) { + req, out := c.ListAssociationsForLicenseConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListLicenseConfigurations = "ListLicenseConfigurations" + +// ListLicenseConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListLicenseConfigurations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLicenseConfigurations for more information on using the ListLicenseConfigurations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLicenseConfigurationsRequest method. +// req, resp := client.ListLicenseConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseConfigurations +func (c *LicenseManager) ListLicenseConfigurationsRequest(input *ListLicenseConfigurationsInput) (req *request.Request, output *ListLicenseConfigurationsOutput) { + op := &request.Operation{ + Name: opListLicenseConfigurations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLicenseConfigurationsInput{} + } + + output = &ListLicenseConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLicenseConfigurations API operation for AWS License Manager. +// +// Lists license configuration objects for an account, each containing the name, +// description, license type, and other license terms modeled from a license +// agreement. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation ListLicenseConfigurations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" +// The request uses too many filters or too many filter values. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseConfigurations +func (c *LicenseManager) ListLicenseConfigurations(input *ListLicenseConfigurationsInput) (*ListLicenseConfigurationsOutput, error) { + req, out := c.ListLicenseConfigurationsRequest(input) + return out, req.Send() +} + +// ListLicenseConfigurationsWithContext is the same as ListLicenseConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListLicenseConfigurations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) ListLicenseConfigurationsWithContext(ctx aws.Context, input *ListLicenseConfigurationsInput, opts ...request.Option) (*ListLicenseConfigurationsOutput, error) { + req, out := c.ListLicenseConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListLicenseSpecificationsForResource = "ListLicenseSpecificationsForResource" + +// ListLicenseSpecificationsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListLicenseSpecificationsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLicenseSpecificationsForResource for more information on using the ListLicenseSpecificationsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLicenseSpecificationsForResourceRequest method. +// req, resp := client.ListLicenseSpecificationsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseSpecificationsForResource +func (c *LicenseManager) ListLicenseSpecificationsForResourceRequest(input *ListLicenseSpecificationsForResourceInput) (req *request.Request, output *ListLicenseSpecificationsForResourceOutput) { + op := &request.Operation{ + Name: opListLicenseSpecificationsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLicenseSpecificationsForResourceInput{} + } + + output = &ListLicenseSpecificationsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLicenseSpecificationsForResource API operation for AWS License Manager. +// +// Returns the license configuration for a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation ListLicenseSpecificationsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListLicenseSpecificationsForResource +func (c *LicenseManager) ListLicenseSpecificationsForResource(input *ListLicenseSpecificationsForResourceInput) (*ListLicenseSpecificationsForResourceOutput, error) { + req, out := c.ListLicenseSpecificationsForResourceRequest(input) + return out, req.Send() +} + +// ListLicenseSpecificationsForResourceWithContext is the same as ListLicenseSpecificationsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListLicenseSpecificationsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) ListLicenseSpecificationsForResourceWithContext(ctx aws.Context, input *ListLicenseSpecificationsForResourceInput, opts ...request.Option) (*ListLicenseSpecificationsForResourceOutput, error) { + req, out := c.ListLicenseSpecificationsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListResourceInventory = "ListResourceInventory" + +// ListResourceInventoryRequest generates a "aws/request.Request" representing the +// client's request for the ListResourceInventory operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResourceInventory for more information on using the ListResourceInventory +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResourceInventoryRequest method. +// req, resp := client.ListResourceInventoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListResourceInventory +func (c *LicenseManager) ListResourceInventoryRequest(input *ListResourceInventoryInput) (req *request.Request, output *ListResourceInventoryOutput) { + op := &request.Operation{ + Name: opListResourceInventory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListResourceInventoryInput{} + } + + output = &ListResourceInventoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResourceInventory API operation for AWS License Manager. +// +// Returns a detailed list of resources. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation ListResourceInventory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" +// The request uses too many filters or too many filter values. +// +// * ErrCodeFailedDependencyException "FailedDependencyException" +// A dependency required to run the API is missing. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListResourceInventory +func (c *LicenseManager) ListResourceInventory(input *ListResourceInventoryInput) (*ListResourceInventoryOutput, error) { + req, out := c.ListResourceInventoryRequest(input) + return out, req.Send() +} + +// ListResourceInventoryWithContext is the same as ListResourceInventory with the addition of +// the ability to pass a context and additional request options. +// +// See ListResourceInventory for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) ListResourceInventoryWithContext(ctx aws.Context, input *ListResourceInventoryInput, opts ...request.Option) (*ListResourceInventoryOutput, error) { + req, out := c.ListResourceInventoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListTagsForResource +func (c *LicenseManager) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS License Manager. +// +// Lists tags attached to a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListTagsForResource +func (c *LicenseManager) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListUsageForLicenseConfiguration = "ListUsageForLicenseConfiguration" + +// ListUsageForLicenseConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the ListUsageForLicenseConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListUsageForLicenseConfiguration for more information on using the ListUsageForLicenseConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListUsageForLicenseConfigurationRequest method. +// req, resp := client.ListUsageForLicenseConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListUsageForLicenseConfiguration +func (c *LicenseManager) ListUsageForLicenseConfigurationRequest(input *ListUsageForLicenseConfigurationInput) (req *request.Request, output *ListUsageForLicenseConfigurationOutput) { + op := &request.Operation{ + Name: opListUsageForLicenseConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListUsageForLicenseConfigurationInput{} + } + + output = &ListUsageForLicenseConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListUsageForLicenseConfiguration API operation for AWS License Manager. +// +// Lists all license usage records for a license configuration, displaying license +// consumption details by resource at a selected point in time. Use this action +// to audit the current license consumption for any license inventory and configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation ListUsageForLicenseConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeFilterLimitExceededException "FilterLimitExceededException" +// The request uses too many filters or too many filter values. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/ListUsageForLicenseConfiguration +func (c *LicenseManager) ListUsageForLicenseConfiguration(input *ListUsageForLicenseConfigurationInput) (*ListUsageForLicenseConfigurationOutput, error) { + req, out := c.ListUsageForLicenseConfigurationRequest(input) + return out, req.Send() +} + +// ListUsageForLicenseConfigurationWithContext is the same as ListUsageForLicenseConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See ListUsageForLicenseConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) ListUsageForLicenseConfigurationWithContext(ctx aws.Context, input *ListUsageForLicenseConfigurationInput, opts ...request.Option) (*ListUsageForLicenseConfigurationOutput, error) { + req, out := c.ListUsageForLicenseConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/TagResource +func (c *LicenseManager) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS License Manager. +// +// Attach one of more tags to any resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/TagResource +func (c *LicenseManager) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UntagResource +func (c *LicenseManager) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS License Manager. +// +// Remove tags from a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UntagResource +func (c *LicenseManager) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLicenseConfiguration = "UpdateLicenseConfiguration" + +// UpdateLicenseConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLicenseConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateLicenseConfiguration for more information on using the UpdateLicenseConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateLicenseConfigurationRequest method. +// req, resp := client.UpdateLicenseConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseConfiguration +func (c *LicenseManager) UpdateLicenseConfigurationRequest(input *UpdateLicenseConfigurationInput) (req *request.Request, output *UpdateLicenseConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateLicenseConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateLicenseConfigurationInput{} + } + + output = &UpdateLicenseConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateLicenseConfiguration API operation for AWS License Manager. +// +// Modifies the attributes of an existing license configuration object. A license +// configuration is an abstraction of a customer license agreement that can +// be consumed and enforced by License Manager. Components include specifications +// for the license type (Instances, cores, sockets, VCPUs), tenancy (shared +// or Dedicated Host), host affinity (how long a VM is associated with a host), +// the number of licenses purchased and used. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation UpdateLicenseConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseConfiguration +func (c *LicenseManager) UpdateLicenseConfiguration(input *UpdateLicenseConfigurationInput) (*UpdateLicenseConfigurationOutput, error) { + req, out := c.UpdateLicenseConfigurationRequest(input) + return out, req.Send() +} + +// UpdateLicenseConfigurationWithContext is the same as UpdateLicenseConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLicenseConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) UpdateLicenseConfigurationWithContext(ctx aws.Context, input *UpdateLicenseConfigurationInput, opts ...request.Option) (*UpdateLicenseConfigurationOutput, error) { + req, out := c.UpdateLicenseConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLicenseSpecificationsForResource = "UpdateLicenseSpecificationsForResource" + +// UpdateLicenseSpecificationsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLicenseSpecificationsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateLicenseSpecificationsForResource for more information on using the UpdateLicenseSpecificationsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateLicenseSpecificationsForResourceRequest method. +// req, resp := client.UpdateLicenseSpecificationsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseSpecificationsForResource +func (c *LicenseManager) UpdateLicenseSpecificationsForResourceRequest(input *UpdateLicenseSpecificationsForResourceInput) (req *request.Request, output *UpdateLicenseSpecificationsForResourceOutput) { + op := &request.Operation{ + Name: opUpdateLicenseSpecificationsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateLicenseSpecificationsForResourceInput{} + } + + output = &UpdateLicenseSpecificationsForResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateLicenseSpecificationsForResource API operation for AWS License Manager. +// +// Adds or removes license configurations for a specified AWS resource. This +// operation currently supports updating the license specifications of AMIs, +// instances, and hosts. Launch templates and AWS CloudFormation templates are +// not managed from this operation as those resources send the license configurations +// directly to a resource creation operation, such as RunInstances. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation UpdateLicenseSpecificationsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// License Manager cannot allocate a license to a resource because of its state. +// +// For example, you cannot allocate a license to an instance in the process +// of shutting down. +// +// * ErrCodeLicenseUsageException "LicenseUsageException" +// You do not have enough licenses available to support a new resource launch. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateLicenseSpecificationsForResource +func (c *LicenseManager) UpdateLicenseSpecificationsForResource(input *UpdateLicenseSpecificationsForResourceInput) (*UpdateLicenseSpecificationsForResourceOutput, error) { + req, out := c.UpdateLicenseSpecificationsForResourceRequest(input) + return out, req.Send() +} + +// UpdateLicenseSpecificationsForResourceWithContext is the same as UpdateLicenseSpecificationsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLicenseSpecificationsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) UpdateLicenseSpecificationsForResourceWithContext(ctx aws.Context, input *UpdateLicenseSpecificationsForResourceInput, opts ...request.Option) (*UpdateLicenseSpecificationsForResourceOutput, error) { + req, out := c.UpdateLicenseSpecificationsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateServiceSettings = "UpdateServiceSettings" + +// UpdateServiceSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateServiceSettings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateServiceSettings for more information on using the UpdateServiceSettings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateServiceSettingsRequest method. +// req, resp := client.UpdateServiceSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateServiceSettings +func (c *LicenseManager) UpdateServiceSettingsRequest(input *UpdateServiceSettingsInput) (req *request.Request, output *UpdateServiceSettingsOutput) { + op := &request.Operation{ + Name: opUpdateServiceSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateServiceSettingsInput{} + } + + output = &UpdateServiceSettingsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateServiceSettings API operation for AWS License Manager. +// +// Updates License Manager service settings. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager's +// API operation UpdateServiceSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One or more parameter values are not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The server experienced an internal error. Try again. +// +// * ErrCodeAuthorizationException "AuthorizationException" +// The AWS user account does not have permission to perform the action. Check +// the IAM policy associated with this account. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Access to resource denied. +// +// * ErrCodeRateLimitExceededException "RateLimitExceededException" +// Too many requests have been submitted. Try again after a brief wait. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01/UpdateServiceSettings +func (c *LicenseManager) UpdateServiceSettings(input *UpdateServiceSettingsInput) (*UpdateServiceSettingsOutput, error) { + req, out := c.UpdateServiceSettingsRequest(input) + return out, req.Send() +} + +// UpdateServiceSettingsWithContext is the same as UpdateServiceSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateServiceSettings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManager) UpdateServiceSettingsWithContext(ctx aws.Context, input *UpdateServiceSettingsInput, opts ...request.Option) (*UpdateServiceSettingsOutput, error) { + req, out := c.UpdateServiceSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Details about license consumption. +type ConsumedLicenseSummary struct { + _ struct{} `type:"structure"` + + // Number of licenses consumed by a resource. + ConsumedLicenses *int64 `type:"long"` + + // Resource type of the resource consuming a license (instance, host, or AMI). + ResourceType *string `type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s ConsumedLicenseSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConsumedLicenseSummary) GoString() string { + return s.String() +} + +// SetConsumedLicenses sets the ConsumedLicenses field's value. +func (s *ConsumedLicenseSummary) SetConsumedLicenses(v int64) *ConsumedLicenseSummary { + s.ConsumedLicenses = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ConsumedLicenseSummary) SetResourceType(v string) *ConsumedLicenseSummary { + s.ResourceType = &v + return s +} + +type CreateLicenseConfigurationInput struct { + _ struct{} `type:"structure"` + + // Human-friendly description of the license configuration. + Description *string `type:"string"` + + // Number of licenses managed by the license configuration. + LicenseCount *int64 `type:"long"` + + // Flag indicating whether hard or soft license enforcement is used. Exceeding + // a hard limit results in the blocked deployment of new instances. + LicenseCountHardLimit *bool `type:"boolean"` + + // Dimension to use to track the license inventory. + // + // LicenseCountingType is a required field + LicenseCountingType *string `type:"string" required:"true" enum:"LicenseCountingType"` + + // Array of configured License Manager rules. + LicenseRules []*string `type:"list"` + + // Name of the license configuration. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags . + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateLicenseConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLicenseConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLicenseConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLicenseConfigurationInput"} + if s.LicenseCountingType == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseCountingType")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateLicenseConfigurationInput) SetDescription(v string) *CreateLicenseConfigurationInput { + s.Description = &v + return s +} + +// SetLicenseCount sets the LicenseCount field's value. +func (s *CreateLicenseConfigurationInput) SetLicenseCount(v int64) *CreateLicenseConfigurationInput { + s.LicenseCount = &v + return s +} + +// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. +func (s *CreateLicenseConfigurationInput) SetLicenseCountHardLimit(v bool) *CreateLicenseConfigurationInput { + s.LicenseCountHardLimit = &v + return s +} + +// SetLicenseCountingType sets the LicenseCountingType field's value. +func (s *CreateLicenseConfigurationInput) SetLicenseCountingType(v string) *CreateLicenseConfigurationInput { + s.LicenseCountingType = &v + return s +} + +// SetLicenseRules sets the LicenseRules field's value. +func (s *CreateLicenseConfigurationInput) SetLicenseRules(v []*string) *CreateLicenseConfigurationInput { + s.LicenseRules = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateLicenseConfigurationInput) SetName(v string) *CreateLicenseConfigurationInput { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLicenseConfigurationInput) SetTags(v []*Tag) *CreateLicenseConfigurationInput { + s.Tags = v + return s +} + +type CreateLicenseConfigurationOutput struct { + _ struct{} `type:"structure"` + + // ARN of the license configuration object after its creation. + LicenseConfigurationArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateLicenseConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLicenseConfigurationOutput) GoString() string { + return s.String() +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *CreateLicenseConfigurationOutput) SetLicenseConfigurationArn(v string) *CreateLicenseConfigurationOutput { + s.LicenseConfigurationArn = &v + return s +} + +type DeleteLicenseConfigurationInput struct { + _ struct{} `type:"structure"` + + // Unique ID of the configuration object to delete. + // + // LicenseConfigurationArn is a required field + LicenseConfigurationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLicenseConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLicenseConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLicenseConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLicenseConfigurationInput"} + if s.LicenseConfigurationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *DeleteLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *DeleteLicenseConfigurationInput { + s.LicenseConfigurationArn = &v + return s +} + +type DeleteLicenseConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLicenseConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLicenseConfigurationOutput) GoString() string { + return s.String() +} + +// A filter name and value pair that is used to return a more specific list +// of results from a describe operation. Filters can be used to match a set +// of resources by specific criteria, such as tags, attributes, or IDs. The +// filters supported by a Describe operation are documented with the Describe +// operation. +type Filter struct { + _ struct{} `type:"structure"` + + // Name of the filter. Filter names are case-sensitive. + Name *string `type:"string"` + + // One or more filter values. Filter values are case-sensitive. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v + return s +} + +type GetLicenseConfigurationInput struct { + _ struct{} `type:"structure"` + + // ARN of the license configuration being requested. + // + // LicenseConfigurationArn is a required field + LicenseConfigurationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLicenseConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLicenseConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLicenseConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLicenseConfigurationInput"} + if s.LicenseConfigurationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *GetLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *GetLicenseConfigurationInput { + s.LicenseConfigurationArn = &v + return s +} + +type GetLicenseConfigurationOutput struct { + _ struct{} `type:"structure"` + + // List of summaries for consumed licenses used by various resources. + ConsumedLicenseSummaryList []*ConsumedLicenseSummary `type:"list"` + + // Number of licenses assigned to resources. + ConsumedLicenses *int64 `type:"long"` + + // Description of the license configuration. + Description *string `type:"string"` + + // ARN of the license configuration requested. + LicenseConfigurationArn *string `type:"string"` + + // Unique ID for the license configuration. + LicenseConfigurationId *string `type:"string"` + + // Number of available licenses. + LicenseCount *int64 `type:"long"` + + // Sets the number of available licenses as a hard limit. + LicenseCountHardLimit *bool `type:"boolean"` + + // Dimension on which the licenses are counted (for example, instances, cores, + // sockets, or VCPUs). + LicenseCountingType *string `type:"string" enum:"LicenseCountingType"` + + // List of flexible text strings designating license rules. + LicenseRules []*string `type:"list"` + + // List of summaries of managed resources. + ManagedResourceSummaryList []*ManagedResourceSummary `type:"list"` + + // Name of the license configuration. + Name *string `type:"string"` + + // Owner account ID for the license configuration. + OwnerAccountId *string `type:"string"` + + // License configuration status (active, etc.). + Status *string `type:"string"` + + // List of tags attached to the license configuration. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s GetLicenseConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLicenseConfigurationOutput) GoString() string { + return s.String() +} + +// SetConsumedLicenseSummaryList sets the ConsumedLicenseSummaryList field's value. +func (s *GetLicenseConfigurationOutput) SetConsumedLicenseSummaryList(v []*ConsumedLicenseSummary) *GetLicenseConfigurationOutput { + s.ConsumedLicenseSummaryList = v + return s +} + +// SetConsumedLicenses sets the ConsumedLicenses field's value. +func (s *GetLicenseConfigurationOutput) SetConsumedLicenses(v int64) *GetLicenseConfigurationOutput { + s.ConsumedLicenses = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetLicenseConfigurationOutput) SetDescription(v string) *GetLicenseConfigurationOutput { + s.Description = &v + return s +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *GetLicenseConfigurationOutput) SetLicenseConfigurationArn(v string) *GetLicenseConfigurationOutput { + s.LicenseConfigurationArn = &v + return s +} + +// SetLicenseConfigurationId sets the LicenseConfigurationId field's value. +func (s *GetLicenseConfigurationOutput) SetLicenseConfigurationId(v string) *GetLicenseConfigurationOutput { + s.LicenseConfigurationId = &v + return s +} + +// SetLicenseCount sets the LicenseCount field's value. +func (s *GetLicenseConfigurationOutput) SetLicenseCount(v int64) *GetLicenseConfigurationOutput { + s.LicenseCount = &v + return s +} + +// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. +func (s *GetLicenseConfigurationOutput) SetLicenseCountHardLimit(v bool) *GetLicenseConfigurationOutput { + s.LicenseCountHardLimit = &v + return s +} + +// SetLicenseCountingType sets the LicenseCountingType field's value. +func (s *GetLicenseConfigurationOutput) SetLicenseCountingType(v string) *GetLicenseConfigurationOutput { + s.LicenseCountingType = &v + return s +} + +// SetLicenseRules sets the LicenseRules field's value. +func (s *GetLicenseConfigurationOutput) SetLicenseRules(v []*string) *GetLicenseConfigurationOutput { + s.LicenseRules = v + return s +} + +// SetManagedResourceSummaryList sets the ManagedResourceSummaryList field's value. +func (s *GetLicenseConfigurationOutput) SetManagedResourceSummaryList(v []*ManagedResourceSummary) *GetLicenseConfigurationOutput { + s.ManagedResourceSummaryList = v + return s +} + +// SetName sets the Name field's value. +func (s *GetLicenseConfigurationOutput) SetName(v string) *GetLicenseConfigurationOutput { + s.Name = &v + return s +} + +// SetOwnerAccountId sets the OwnerAccountId field's value. +func (s *GetLicenseConfigurationOutput) SetOwnerAccountId(v string) *GetLicenseConfigurationOutput { + s.OwnerAccountId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetLicenseConfigurationOutput) SetStatus(v string) *GetLicenseConfigurationOutput { + s.Status = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetLicenseConfigurationOutput) SetTags(v []*Tag) *GetLicenseConfigurationOutput { + s.Tags = v + return s +} + +type GetServiceSettingsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetServiceSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceSettingsInput) GoString() string { + return s.String() +} + +type GetServiceSettingsOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether cross-account discovery has been enabled. + EnableCrossAccountsDiscovery *bool `type:"boolean"` + + // Indicates whether AWS Organizations has been integrated with License Manager + // for cross-account discovery. + OrganizationConfiguration *OrganizationConfiguration `type:"structure"` + + // Regional S3 bucket path for storing reports, license trail event data, discovery + // data, etc. + S3BucketArn *string `type:"string"` + + // SNS topic configured to receive notifications from License Manager. + SnsTopicArn *string `type:"string"` +} + +// String returns the string representation +func (s GetServiceSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceSettingsOutput) GoString() string { + return s.String() +} + +// SetEnableCrossAccountsDiscovery sets the EnableCrossAccountsDiscovery field's value. +func (s *GetServiceSettingsOutput) SetEnableCrossAccountsDiscovery(v bool) *GetServiceSettingsOutput { + s.EnableCrossAccountsDiscovery = &v + return s +} + +// SetOrganizationConfiguration sets the OrganizationConfiguration field's value. +func (s *GetServiceSettingsOutput) SetOrganizationConfiguration(v *OrganizationConfiguration) *GetServiceSettingsOutput { + s.OrganizationConfiguration = v + return s +} + +// SetS3BucketArn sets the S3BucketArn field's value. +func (s *GetServiceSettingsOutput) SetS3BucketArn(v string) *GetServiceSettingsOutput { + s.S3BucketArn = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *GetServiceSettingsOutput) SetSnsTopicArn(v string) *GetServiceSettingsOutput { + s.SnsTopicArn = &v + return s +} + +// An inventory filter object. +type InventoryFilter struct { + _ struct{} `type:"structure"` + + // The condition of the filter. + // + // Condition is a required field + Condition *string `type:"string" required:"true" enum:"InventoryFilterCondition"` + + // The name of the filter. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // Value of the filter. + Value *string `type:"string"` +} + +// String returns the string representation +func (s InventoryFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InventoryFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InventoryFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"} + if s.Condition == nil { + invalidParams.Add(request.NewErrParamRequired("Condition")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCondition sets the Condition field's value. +func (s *InventoryFilter) SetCondition(v string) *InventoryFilter { + s.Condition = &v + return s +} + +// SetName sets the Name field's value. +func (s *InventoryFilter) SetName(v string) *InventoryFilter { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *InventoryFilter) SetValue(v string) *InventoryFilter { + s.Value = &v + return s +} + +// A license configuration is an abstraction of a customer license agreement +// that can be consumed and enforced by License Manager. Components include +// specifications for the license type (licensing by instance, socket, CPU, +// or VCPU), tenancy (shared tenancy, Amazon EC2 Dedicated Instance, Amazon +// EC2 Dedicated Host, or any of these), host affinity (how long a VM must be +// associated with a host), the number of licenses purchased and used. +type LicenseConfiguration struct { + _ struct{} `type:"structure"` + + // List of summaries for licenses consumed by various resources. + ConsumedLicenseSummaryList []*ConsumedLicenseSummary `type:"list"` + + // Number of licenses consumed. + ConsumedLicenses *int64 `type:"long"` + + // Description of the license configuration. + Description *string `type:"string"` + + // ARN of the LicenseConfiguration object. + LicenseConfigurationArn *string `type:"string"` + + // Unique ID of the LicenseConfiguration object. + LicenseConfigurationId *string `type:"string"` + + // Number of licenses managed by the license configuration. + LicenseCount *int64 `type:"long"` + + // Sets the number of available licenses as a hard limit. + LicenseCountHardLimit *bool `type:"boolean"` + + // Dimension to use to track license inventory. + LicenseCountingType *string `type:"string" enum:"LicenseCountingType"` + + // Array of configured License Manager rules. + LicenseRules []*string `type:"list"` + + // List of summaries for managed resources. + ManagedResourceSummaryList []*ManagedResourceSummary `type:"list"` + + // Name of the license configuration. + Name *string `type:"string"` + + // Account ID of the license configuration's owner. + OwnerAccountId *string `type:"string"` + + // Status of the license configuration. + Status *string `type:"string"` +} + +// String returns the string representation +func (s LicenseConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LicenseConfiguration) GoString() string { + return s.String() +} + +// SetConsumedLicenseSummaryList sets the ConsumedLicenseSummaryList field's value. +func (s *LicenseConfiguration) SetConsumedLicenseSummaryList(v []*ConsumedLicenseSummary) *LicenseConfiguration { + s.ConsumedLicenseSummaryList = v + return s +} + +// SetConsumedLicenses sets the ConsumedLicenses field's value. +func (s *LicenseConfiguration) SetConsumedLicenses(v int64) *LicenseConfiguration { + s.ConsumedLicenses = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *LicenseConfiguration) SetDescription(v string) *LicenseConfiguration { + s.Description = &v + return s +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LicenseConfiguration) SetLicenseConfigurationArn(v string) *LicenseConfiguration { + s.LicenseConfigurationArn = &v + return s +} + +// SetLicenseConfigurationId sets the LicenseConfigurationId field's value. +func (s *LicenseConfiguration) SetLicenseConfigurationId(v string) *LicenseConfiguration { + s.LicenseConfigurationId = &v + return s +} + +// SetLicenseCount sets the LicenseCount field's value. +func (s *LicenseConfiguration) SetLicenseCount(v int64) *LicenseConfiguration { + s.LicenseCount = &v + return s +} + +// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. +func (s *LicenseConfiguration) SetLicenseCountHardLimit(v bool) *LicenseConfiguration { + s.LicenseCountHardLimit = &v + return s +} + +// SetLicenseCountingType sets the LicenseCountingType field's value. +func (s *LicenseConfiguration) SetLicenseCountingType(v string) *LicenseConfiguration { + s.LicenseCountingType = &v + return s +} + +// SetLicenseRules sets the LicenseRules field's value. +func (s *LicenseConfiguration) SetLicenseRules(v []*string) *LicenseConfiguration { + s.LicenseRules = v + return s +} + +// SetManagedResourceSummaryList sets the ManagedResourceSummaryList field's value. +func (s *LicenseConfiguration) SetManagedResourceSummaryList(v []*ManagedResourceSummary) *LicenseConfiguration { + s.ManagedResourceSummaryList = v + return s +} + +// SetName sets the Name field's value. +func (s *LicenseConfiguration) SetName(v string) *LicenseConfiguration { + s.Name = &v + return s +} + +// SetOwnerAccountId sets the OwnerAccountId field's value. +func (s *LicenseConfiguration) SetOwnerAccountId(v string) *LicenseConfiguration { + s.OwnerAccountId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *LicenseConfiguration) SetStatus(v string) *LicenseConfiguration { + s.Status = &v + return s +} + +// Describes a server resource that is associated with a license configuration. +type LicenseConfigurationAssociation struct { + _ struct{} `type:"structure"` + + // Time when the license configuration was associated with the resource. + AssociationTime *time.Time `type:"timestamp"` + + // ARN of the resource associated with the license configuration. + ResourceArn *string `type:"string"` + + // ID of the AWS account that owns the resource consuming licenses. + ResourceOwnerId *string `type:"string"` + + // Type of server resource. + ResourceType *string `type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s LicenseConfigurationAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LicenseConfigurationAssociation) GoString() string { + return s.String() +} + +// SetAssociationTime sets the AssociationTime field's value. +func (s *LicenseConfigurationAssociation) SetAssociationTime(v time.Time) *LicenseConfigurationAssociation { + s.AssociationTime = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *LicenseConfigurationAssociation) SetResourceArn(v string) *LicenseConfigurationAssociation { + s.ResourceArn = &v + return s +} + +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *LicenseConfigurationAssociation) SetResourceOwnerId(v string) *LicenseConfigurationAssociation { + s.ResourceOwnerId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *LicenseConfigurationAssociation) SetResourceType(v string) *LicenseConfigurationAssociation { + s.ResourceType = &v + return s +} + +// Contains details of the usage of each resource from the license pool. +type LicenseConfigurationUsage struct { + _ struct{} `type:"structure"` + + // Time when the license configuration was initially associated with a resource. + AssociationTime *time.Time `type:"timestamp"` + + // Number of licenses consumed out of the total provisioned in the license configuration. + ConsumedLicenses *int64 `type:"long"` + + // ARN of the resource associated with a license configuration. + ResourceArn *string `type:"string"` + + // ID of the account that owns a resource that is associated with the license + // configuration. + ResourceOwnerId *string `type:"string"` + + // Status of a resource associated with the license configuration. + ResourceStatus *string `type:"string"` + + // Type of resource associated with athe license configuration. + ResourceType *string `type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s LicenseConfigurationUsage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LicenseConfigurationUsage) GoString() string { + return s.String() +} + +// SetAssociationTime sets the AssociationTime field's value. +func (s *LicenseConfigurationUsage) SetAssociationTime(v time.Time) *LicenseConfigurationUsage { + s.AssociationTime = &v + return s +} + +// SetConsumedLicenses sets the ConsumedLicenses field's value. +func (s *LicenseConfigurationUsage) SetConsumedLicenses(v int64) *LicenseConfigurationUsage { + s.ConsumedLicenses = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *LicenseConfigurationUsage) SetResourceArn(v string) *LicenseConfigurationUsage { + s.ResourceArn = &v + return s +} + +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *LicenseConfigurationUsage) SetResourceOwnerId(v string) *LicenseConfigurationUsage { + s.ResourceOwnerId = &v + return s +} + +// SetResourceStatus sets the ResourceStatus field's value. +func (s *LicenseConfigurationUsage) SetResourceStatus(v string) *LicenseConfigurationUsage { + s.ResourceStatus = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *LicenseConfigurationUsage) SetResourceType(v string) *LicenseConfigurationUsage { + s.ResourceType = &v + return s +} + +// Object used for associating a license configuration with a resource. +type LicenseSpecification struct { + _ struct{} `type:"structure"` + + // ARN of the LicenseConfiguration object. + // + // LicenseConfigurationArn is a required field + LicenseConfigurationArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s LicenseSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LicenseSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LicenseSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LicenseSpecification"} + if s.LicenseConfigurationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LicenseSpecification) SetLicenseConfigurationArn(v string) *LicenseSpecification { + s.LicenseConfigurationArn = &v + return s +} + +type ListAssociationsForLicenseConfigurationInput struct { + _ struct{} `type:"structure"` + + // ARN of a LicenseConfiguration object. + // + // LicenseConfigurationArn is a required field + LicenseConfigurationArn *string `type:"string" required:"true"` + + // Maximum number of results to return in a single call. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAssociationsForLicenseConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAssociationsForLicenseConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAssociationsForLicenseConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAssociationsForLicenseConfigurationInput"} + if s.LicenseConfigurationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *ListAssociationsForLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *ListAssociationsForLicenseConfigurationInput { + s.LicenseConfigurationArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAssociationsForLicenseConfigurationInput) SetMaxResults(v int64) *ListAssociationsForLicenseConfigurationInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAssociationsForLicenseConfigurationInput) SetNextToken(v string) *ListAssociationsForLicenseConfigurationInput { + s.NextToken = &v + return s +} + +type ListAssociationsForLicenseConfigurationOutput struct { + _ struct{} `type:"structure"` + + // Lists association objects for the license configuration, each containing + // the association time, number of consumed licenses, resource ARN, resource + // ID, account ID that owns the resource, resource size, and resource type. + LicenseConfigurationAssociations []*LicenseConfigurationAssociation `type:"list"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAssociationsForLicenseConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAssociationsForLicenseConfigurationOutput) GoString() string { + return s.String() +} + +// SetLicenseConfigurationAssociations sets the LicenseConfigurationAssociations field's value. +func (s *ListAssociationsForLicenseConfigurationOutput) SetLicenseConfigurationAssociations(v []*LicenseConfigurationAssociation) *ListAssociationsForLicenseConfigurationOutput { + s.LicenseConfigurationAssociations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAssociationsForLicenseConfigurationOutput) SetNextToken(v string) *ListAssociationsForLicenseConfigurationOutput { + s.NextToken = &v + return s +} + +type ListLicenseConfigurationsInput struct { + _ struct{} `type:"structure"` + + // One or more filters. + Filters []*Filter `type:"list"` + + // An array of ARNs for the calling account’s license configurations. + LicenseConfigurationArns []*string `type:"list"` + + // Maximum number of results to return in a single call. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLicenseConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLicenseConfigurationsInput) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *ListLicenseConfigurationsInput) SetFilters(v []*Filter) *ListLicenseConfigurationsInput { + s.Filters = v + return s +} + +// SetLicenseConfigurationArns sets the LicenseConfigurationArns field's value. +func (s *ListLicenseConfigurationsInput) SetLicenseConfigurationArns(v []*string) *ListLicenseConfigurationsInput { + s.LicenseConfigurationArns = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLicenseConfigurationsInput) SetMaxResults(v int64) *ListLicenseConfigurationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLicenseConfigurationsInput) SetNextToken(v string) *ListLicenseConfigurationsInput { + s.NextToken = &v + return s +} + +type ListLicenseConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // Array of license configuration objects. + LicenseConfigurations []*LicenseConfiguration `type:"list"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLicenseConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLicenseConfigurationsOutput) GoString() string { + return s.String() +} + +// SetLicenseConfigurations sets the LicenseConfigurations field's value. +func (s *ListLicenseConfigurationsOutput) SetLicenseConfigurations(v []*LicenseConfiguration) *ListLicenseConfigurationsOutput { + s.LicenseConfigurations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLicenseConfigurationsOutput) SetNextToken(v string) *ListLicenseConfigurationsOutput { + s.NextToken = &v + return s +} + +type ListLicenseSpecificationsForResourceInput struct { + _ struct{} `type:"structure"` + + // Maximum number of results to return in a single call. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` + + // ARN of an AMI or Amazon EC2 instance that has an associated license configuration. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListLicenseSpecificationsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLicenseSpecificationsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLicenseSpecificationsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLicenseSpecificationsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLicenseSpecificationsForResourceInput) SetMaxResults(v int64) *ListLicenseSpecificationsForResourceInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLicenseSpecificationsForResourceInput) SetNextToken(v string) *ListLicenseSpecificationsForResourceInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListLicenseSpecificationsForResourceInput) SetResourceArn(v string) *ListLicenseSpecificationsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListLicenseSpecificationsForResourceOutput struct { + _ struct{} `type:"structure"` + + // License configurations associated with a resource. + LicenseSpecifications []*LicenseSpecification `type:"list"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLicenseSpecificationsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLicenseSpecificationsForResourceOutput) GoString() string { + return s.String() +} + +// SetLicenseSpecifications sets the LicenseSpecifications field's value. +func (s *ListLicenseSpecificationsForResourceOutput) SetLicenseSpecifications(v []*LicenseSpecification) *ListLicenseSpecificationsForResourceOutput { + s.LicenseSpecifications = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLicenseSpecificationsForResourceOutput) SetNextToken(v string) *ListLicenseSpecificationsForResourceOutput { + s.NextToken = &v + return s +} + +type ListResourceInventoryInput struct { + _ struct{} `type:"structure"` + + // One or more filters. + Filters []*InventoryFilter `type:"list"` + + // Maximum number of results to return in a single call. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListResourceInventoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceInventoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourceInventoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourceInventoryInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListResourceInventoryInput) SetFilters(v []*InventoryFilter) *ListResourceInventoryInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResourceInventoryInput) SetMaxResults(v int64) *ListResourceInventoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceInventoryInput) SetNextToken(v string) *ListResourceInventoryInput { + s.NextToken = &v + return s +} + +type ListResourceInventoryOutput struct { + _ struct{} `type:"structure"` + + // Token for the next set of results. + NextToken *string `type:"string"` + + // The detailed list of resources. + ResourceInventoryList []*ResourceInventory `type:"list"` +} + +// String returns the string representation +func (s ListResourceInventoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourceInventoryOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourceInventoryOutput) SetNextToken(v string) *ListResourceInventoryOutput { + s.NextToken = &v + return s +} + +// SetResourceInventoryList sets the ResourceInventoryList field's value. +func (s *ListResourceInventoryOutput) SetResourceInventoryList(v []*ResourceInventory) *ListResourceInventoryOutput { + s.ResourceInventoryList = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // ARN for the resource. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // List of tags attached to the resource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +type ListUsageForLicenseConfigurationInput struct { + _ struct{} `type:"structure"` + + // List of filters to apply. + Filters []*Filter `type:"list"` + + // ARN of the targeted LicenseConfiguration object. + // + // LicenseConfigurationArn is a required field + LicenseConfigurationArn *string `type:"string" required:"true"` + + // Maximum number of results to return in a single call. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListUsageForLicenseConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUsageForLicenseConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUsageForLicenseConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUsageForLicenseConfigurationInput"} + if s.LicenseConfigurationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListUsageForLicenseConfigurationInput) SetFilters(v []*Filter) *ListUsageForLicenseConfigurationInput { + s.Filters = v + return s +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *ListUsageForLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *ListUsageForLicenseConfigurationInput { + s.LicenseConfigurationArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListUsageForLicenseConfigurationInput) SetMaxResults(v int64) *ListUsageForLicenseConfigurationInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUsageForLicenseConfigurationInput) SetNextToken(v string) *ListUsageForLicenseConfigurationInput { + s.NextToken = &v + return s +} + +type ListUsageForLicenseConfigurationOutput struct { + _ struct{} `type:"structure"` + + // An array of LicenseConfigurationUsage objects. + LicenseConfigurationUsageList []*LicenseConfigurationUsage `type:"list"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListUsageForLicenseConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUsageForLicenseConfigurationOutput) GoString() string { + return s.String() +} + +// SetLicenseConfigurationUsageList sets the LicenseConfigurationUsageList field's value. +func (s *ListUsageForLicenseConfigurationOutput) SetLicenseConfigurationUsageList(v []*LicenseConfigurationUsage) *ListUsageForLicenseConfigurationOutput { + s.LicenseConfigurationUsageList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUsageForLicenseConfigurationOutput) SetNextToken(v string) *ListUsageForLicenseConfigurationOutput { + s.NextToken = &v + return s +} + +// Summary for a resource. +type ManagedResourceSummary struct { + _ struct{} `type:"structure"` + + // Number of resources associated with licenses. + AssociationCount *int64 `type:"long"` + + // Type of resource associated with a license (instance, host, or AMI). + ResourceType *string `type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s ManagedResourceSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ManagedResourceSummary) GoString() string { + return s.String() +} + +// SetAssociationCount sets the AssociationCount field's value. +func (s *ManagedResourceSummary) SetAssociationCount(v int64) *ManagedResourceSummary { + s.AssociationCount = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ManagedResourceSummary) SetResourceType(v string) *ManagedResourceSummary { + s.ResourceType = &v + return s +} + +// Object containing configuration information for AWS Organizations. +type OrganizationConfiguration struct { + _ struct{} `type:"structure"` + + // Flag to activate AWS Organization integration. + // + // EnableIntegration is a required field + EnableIntegration *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s OrganizationConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrganizationConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OrganizationConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OrganizationConfiguration"} + if s.EnableIntegration == nil { + invalidParams.Add(request.NewErrParamRequired("EnableIntegration")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnableIntegration sets the EnableIntegration field's value. +func (s *OrganizationConfiguration) SetEnableIntegration(v bool) *OrganizationConfiguration { + s.EnableIntegration = &v + return s +} + +// A set of attributes that describe a resource. +type ResourceInventory struct { + _ struct{} `type:"structure"` + + // The platform of the resource. + Platform *string `type:"string"` + + // Platform version of the resource in the inventory. + PlatformVersion *string `type:"string"` + + // The ARN of the resource. + ResourceArn *string `type:"string"` + + // Unique ID of the resource. + ResourceId *string `type:"string"` + + // Unique ID of the account that owns the resource. + ResourceOwningAccountId *string `type:"string"` + + // The type of resource. + ResourceType *string `type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s ResourceInventory) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceInventory) GoString() string { + return s.String() +} + +// SetPlatform sets the Platform field's value. +func (s *ResourceInventory) SetPlatform(v string) *ResourceInventory { + s.Platform = &v + return s +} + +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *ResourceInventory) SetPlatformVersion(v string) *ResourceInventory { + s.PlatformVersion = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ResourceInventory) SetResourceArn(v string) *ResourceInventory { + s.ResourceArn = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ResourceInventory) SetResourceId(v string) *ResourceInventory { + s.ResourceId = &v + return s +} + +// SetResourceOwningAccountId sets the ResourceOwningAccountId field's value. +func (s *ResourceInventory) SetResourceOwningAccountId(v string) *ResourceInventory { + s.ResourceOwningAccountId = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ResourceInventory) SetResourceType(v string) *ResourceInventory { + s.ResourceType = &v + return s +} + +// Tag for a resource in a key-value format. +type Tag struct { + _ struct{} `type:"structure"` + + // Key for the resource tag. + Key *string `type:"string"` + + // Value for the resource tag. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // Resource of the ARN to be tagged. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // Names of the tags to attach to the resource. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // ARN of the resource. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // List keys identifying tags to remove. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +type UpdateLicenseConfigurationInput struct { + _ struct{} `type:"structure"` + + // New human-friendly description of the license configuration. + Description *string `type:"string"` + + // ARN for a license configuration. + // + // LicenseConfigurationArn is a required field + LicenseConfigurationArn *string `type:"string" required:"true"` + + // New status of the license configuration (ACTIVE or INACTIVE). + LicenseConfigurationStatus *string `type:"string" enum:"LicenseConfigurationStatus"` + + // New number of licenses managed by the license configuration. + LicenseCount *int64 `type:"long"` + + // Sets the number of available licenses as a hard limit. + LicenseCountHardLimit *bool `type:"boolean"` + + // List of flexible text strings designating license rules. + LicenseRules []*string `type:"list"` + + // New name of the license configuration. + Name *string `type:"string"` +} + +// String returns the string representation +func (s UpdateLicenseConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLicenseConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLicenseConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLicenseConfigurationInput"} + if s.LicenseConfigurationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LicenseConfigurationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateLicenseConfigurationInput) SetDescription(v string) *UpdateLicenseConfigurationInput { + s.Description = &v + return s +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *UpdateLicenseConfigurationInput) SetLicenseConfigurationArn(v string) *UpdateLicenseConfigurationInput { + s.LicenseConfigurationArn = &v + return s +} + +// SetLicenseConfigurationStatus sets the LicenseConfigurationStatus field's value. +func (s *UpdateLicenseConfigurationInput) SetLicenseConfigurationStatus(v string) *UpdateLicenseConfigurationInput { + s.LicenseConfigurationStatus = &v + return s +} + +// SetLicenseCount sets the LicenseCount field's value. +func (s *UpdateLicenseConfigurationInput) SetLicenseCount(v int64) *UpdateLicenseConfigurationInput { + s.LicenseCount = &v + return s +} + +// SetLicenseCountHardLimit sets the LicenseCountHardLimit field's value. +func (s *UpdateLicenseConfigurationInput) SetLicenseCountHardLimit(v bool) *UpdateLicenseConfigurationInput { + s.LicenseCountHardLimit = &v + return s +} + +// SetLicenseRules sets the LicenseRules field's value. +func (s *UpdateLicenseConfigurationInput) SetLicenseRules(v []*string) *UpdateLicenseConfigurationInput { + s.LicenseRules = v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateLicenseConfigurationInput) SetName(v string) *UpdateLicenseConfigurationInput { + s.Name = &v + return s +} + +type UpdateLicenseConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateLicenseConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLicenseConfigurationOutput) GoString() string { + return s.String() +} + +type UpdateLicenseSpecificationsForResourceInput struct { + _ struct{} `type:"structure"` + + // License configuration ARNs to be added to a resource. + AddLicenseSpecifications []*LicenseSpecification `type:"list"` + + // License configuration ARNs to be removed from a resource. + RemoveLicenseSpecifications []*LicenseSpecification `type:"list"` + + // ARN for an AWS server resource. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateLicenseSpecificationsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLicenseSpecificationsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLicenseSpecificationsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLicenseSpecificationsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.AddLicenseSpecifications != nil { + for i, v := range s.AddLicenseSpecifications { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AddLicenseSpecifications", i), err.(request.ErrInvalidParams)) + } + } + } + if s.RemoveLicenseSpecifications != nil { + for i, v := range s.RemoveLicenseSpecifications { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RemoveLicenseSpecifications", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAddLicenseSpecifications sets the AddLicenseSpecifications field's value. +func (s *UpdateLicenseSpecificationsForResourceInput) SetAddLicenseSpecifications(v []*LicenseSpecification) *UpdateLicenseSpecificationsForResourceInput { + s.AddLicenseSpecifications = v + return s +} + +// SetRemoveLicenseSpecifications sets the RemoveLicenseSpecifications field's value. +func (s *UpdateLicenseSpecificationsForResourceInput) SetRemoveLicenseSpecifications(v []*LicenseSpecification) *UpdateLicenseSpecificationsForResourceInput { + s.RemoveLicenseSpecifications = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UpdateLicenseSpecificationsForResourceInput) SetResourceArn(v string) *UpdateLicenseSpecificationsForResourceInput { + s.ResourceArn = &v + return s +} + +type UpdateLicenseSpecificationsForResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateLicenseSpecificationsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLicenseSpecificationsForResourceOutput) GoString() string { + return s.String() +} + +type UpdateServiceSettingsInput struct { + _ struct{} `type:"structure"` + + // Activates cross-account discovery. + EnableCrossAccountsDiscovery *bool `type:"boolean"` + + // Integrates AWS Organizations with License Manager for cross-account discovery. + OrganizationConfiguration *OrganizationConfiguration `type:"structure"` + + // ARN of the Amazon S3 bucket where License Manager information is stored. + S3BucketArn *string `type:"string"` + + // ARN of the Amazon SNS topic used for License Manager alerts. + SnsTopicArn *string `type:"string"` +} + +// String returns the string representation +func (s UpdateServiceSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServiceSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServiceSettingsInput"} + if s.OrganizationConfiguration != nil { + if err := s.OrganizationConfiguration.Validate(); err != nil { + invalidParams.AddNested("OrganizationConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnableCrossAccountsDiscovery sets the EnableCrossAccountsDiscovery field's value. +func (s *UpdateServiceSettingsInput) SetEnableCrossAccountsDiscovery(v bool) *UpdateServiceSettingsInput { + s.EnableCrossAccountsDiscovery = &v + return s +} + +// SetOrganizationConfiguration sets the OrganizationConfiguration field's value. +func (s *UpdateServiceSettingsInput) SetOrganizationConfiguration(v *OrganizationConfiguration) *UpdateServiceSettingsInput { + s.OrganizationConfiguration = v + return s +} + +// SetS3BucketArn sets the S3BucketArn field's value. +func (s *UpdateServiceSettingsInput) SetS3BucketArn(v string) *UpdateServiceSettingsInput { + s.S3BucketArn = &v + return s +} + +// SetSnsTopicArn sets the SnsTopicArn field's value. +func (s *UpdateServiceSettingsInput) SetSnsTopicArn(v string) *UpdateServiceSettingsInput { + s.SnsTopicArn = &v + return s +} + +type UpdateServiceSettingsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateServiceSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceSettingsOutput) GoString() string { + return s.String() +} + +const ( + // InventoryFilterConditionEquals is a InventoryFilterCondition enum value + InventoryFilterConditionEquals = "EQUALS" + + // InventoryFilterConditionNotEquals is a InventoryFilterCondition enum value + InventoryFilterConditionNotEquals = "NOT_EQUALS" + + // InventoryFilterConditionBeginsWith is a InventoryFilterCondition enum value + InventoryFilterConditionBeginsWith = "BEGINS_WITH" + + // InventoryFilterConditionContains is a InventoryFilterCondition enum value + InventoryFilterConditionContains = "CONTAINS" +) + +const ( + // LicenseConfigurationStatusAvailable is a LicenseConfigurationStatus enum value + LicenseConfigurationStatusAvailable = "AVAILABLE" + + // LicenseConfigurationStatusDisabled is a LicenseConfigurationStatus enum value + LicenseConfigurationStatusDisabled = "DISABLED" +) + +const ( + // LicenseCountingTypeVCpu is a LicenseCountingType enum value + LicenseCountingTypeVCpu = "vCPU" + + // LicenseCountingTypeInstance is a LicenseCountingType enum value + LicenseCountingTypeInstance = "Instance" + + // LicenseCountingTypeCore is a LicenseCountingType enum value + LicenseCountingTypeCore = "Core" + + // LicenseCountingTypeSocket is a LicenseCountingType enum value + LicenseCountingTypeSocket = "Socket" +) + +const ( + // ResourceTypeEc2Instance is a ResourceType enum value + ResourceTypeEc2Instance = "EC2_INSTANCE" + + // ResourceTypeEc2Host is a ResourceType enum value + ResourceTypeEc2Host = "EC2_HOST" + + // ResourceTypeEc2Ami is a ResourceType enum value + ResourceTypeEc2Ami = "EC2_AMI" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go new file mode 100644 index 000000000..14e09f5e4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/doc.go @@ -0,0 +1,35 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package licensemanager provides the client and types for making API +// requests to AWS License Manager. +// +// This is the AWS License Manager API Reference. It provides descriptions, +// syntax, and usage examples for each of the actions and data types for License +// Manager. The topic for each action shows the Query API request parameters +// and the XML response. You can also view the XML request elements in the WSDL. +// +// Alternatively, you can use one of the AWS SDKs to access an API that's tailored +// to the programming language or platform that you're using. For more information, +// see AWS SDKs (http://aws.amazon.com/tools/#SDKs). +// +// See https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01 for more information on this service. +// +// See licensemanager package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanager/ +// +// Using the Client +// +// To contact AWS License Manager with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS License Manager client LicenseManager for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanager/#New +package licensemanager diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go new file mode 100644 index 000000000..7a6816be9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/errors.go @@ -0,0 +1,70 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package licensemanager + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // Access to resource denied. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeAuthorizationException for service response error code + // "AuthorizationException". + // + // The AWS user account does not have permission to perform the action. Check + // the IAM policy associated with this account. + ErrCodeAuthorizationException = "AuthorizationException" + + // ErrCodeFailedDependencyException for service response error code + // "FailedDependencyException". + // + // A dependency required to run the API is missing. + ErrCodeFailedDependencyException = "FailedDependencyException" + + // ErrCodeFilterLimitExceededException for service response error code + // "FilterLimitExceededException". + // + // The request uses too many filters or too many filter values. + ErrCodeFilterLimitExceededException = "FilterLimitExceededException" + + // ErrCodeInvalidParameterValueException for service response error code + // "InvalidParameterValueException". + // + // One or more parameter values are not valid. + ErrCodeInvalidParameterValueException = "InvalidParameterValueException" + + // ErrCodeInvalidResourceStateException for service response error code + // "InvalidResourceStateException". + // + // License Manager cannot allocate a license to a resource because of its state. + // + // For example, you cannot allocate a license to an instance in the process + // of shutting down. + ErrCodeInvalidResourceStateException = "InvalidResourceStateException" + + // ErrCodeLicenseUsageException for service response error code + // "LicenseUsageException". + // + // You do not have enough licenses available to support a new resource launch. + ErrCodeLicenseUsageException = "LicenseUsageException" + + // ErrCodeRateLimitExceededException for service response error code + // "RateLimitExceededException". + // + // Too many requests have been submitted. Try again after a brief wait. + ErrCodeRateLimitExceededException = "RateLimitExceededException" + + // ErrCodeResourceLimitExceededException for service response error code + // "ResourceLimitExceededException". + // + // Your resource limits have been exceeded. + ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" + + // ErrCodeServerInternalException for service response error code + // "ServerInternalException". + // + // The server experienced an internal error. Try again. + ErrCodeServerInternalException = "ServerInternalException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go new file mode 100644 index 000000000..5a8fc9965 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/licensemanager/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package licensemanager + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// LicenseManager provides the API operation methods for making requests to +// AWS License Manager. See this package's package overview docs +// for details on the service. +// +// LicenseManager methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type LicenseManager struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "License Manager" // Name of service. + EndpointsID = "license-manager" // ID to lookup a service endpoint with. + ServiceID = "License Manager" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the LicenseManager client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a LicenseManager client from just a session. +// svc := licensemanager.New(mySession) +// +// // Create a LicenseManager client with additional configuration +// svc := licensemanager.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *LicenseManager { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *LicenseManager { + svc := &LicenseManager{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-08-01", + JSONVersion: "1.1", + TargetPrefix: "AWSLicenseManager", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a LicenseManager operation and runs any +// custom request initialization. +func (c *LicenseManager) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 47e0f353d..c838d7734 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -1159,6 +1159,16 @@ func (c *Lightsail) CreateDiskSnapshotRequest(input *CreateDiskSnapshotInput) (r // snapshot. You may remount and use your disk while the snapshot status is // pending. // +// You can also use this operation to create a snapshot of an instance's system +// volume. You might want to do this, for example, to recover data from the +// system volume of a botched instance or to create a backup of the system volume +// like you would for a block storage disk. To create a snapshot of a system +// volume, just define the instance name parameter when issuing the snapshot +// command, and a snapshot of the defined instance's system volume will be created. +// After the snapshot is available, you can create a block storage disk from +// the snapshot and attach it to a running instance to access the data on the +// disk. +// // The create disk snapshot operation supports tag-based access control via // request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // @@ -4099,7 +4109,7 @@ func (c *Lightsail) ExportSnapshotRequest(input *ExportSnapshotInput) (req *requ // ExportSnapshot API operation for Amazon Lightsail. // -// Exports a Amazon Lightsail instance or block storage disk snapshot to Amazon +// Exports an Amazon Lightsail instance or block storage disk snapshot to Amazon // Elastic Compute Cloud (Amazon EC2). This operation results in an export snapshot // record that can be used with the create cloud formation stack operation to // create new Amazon EC2 instances. @@ -9287,10 +9297,7 @@ func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *requ // RebootInstance API operation for Amazon Lightsail. // -// Restarts a specific instance. When your Amazon Lightsail instance is finished -// rebooting, Lightsail assigns a new public IP address. To use the same IP -// address after restarting, create a static IP address and attach it to the -// instance. +// Restarts a specific instance. // // The reboot instance operation supports tag-based access control via resource // tags applied to the resource identified by instanceName. For more information, @@ -9613,6 +9620,11 @@ func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *reques // Starts a specific Amazon Lightsail instance from a stopped state. To restart // an instance, use the reboot instance operation. // +// When you start a stopped instance, Lightsail assigns a new public IP address +// to the instance. To use the same IP address after stopping and starting an +// instance, create a static IP address and attach it to the instance. For more +// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/lightsail-create-static-ip). +// // The start instance operation supports tag-based access control via resource // tags applied to the resource identified by instanceName. For more information, // see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). @@ -9830,6 +9842,11 @@ func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request. // // Stops a specific Amazon Lightsail instance that is currently running. // +// When you start a stopped instance, Lightsail assigns a new public IP address +// to the instance. To use the same IP address after stopping and starting an +// instance, create a static IP address and attach it to the instance. For more +// information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/lightsail-create-static-ip). +// // The stop instance operation supports tag-based access control via resource // tags applied to the resource identified by instanceName. For more information, // see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). @@ -12045,10 +12062,11 @@ func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { type CreateDiskSnapshotInput struct { _ struct{} `type:"structure"` - // The unique name of the source disk (e.g., my-source-disk). + // The unique name of the source disk (e.g., Disk-Virginia-1). // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // This parameter cannot be defined together with the instance name parameter. + // The disk name and instance name parameters are mutually exclusive. + DiskName *string `locationName:"diskName" type:"string"` // The name of the destination disk snapshot (e.g., my-disk-snapshot) based // on the source disk. @@ -12056,6 +12074,13 @@ type CreateDiskSnapshotInput struct { // DiskSnapshotName is a required field DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // The unique name of the source instance (e.g., Amazon_Linux-512MB-Virginia-1). + // When this is defined, a snapshot of the instance's system volume is created. + // + // This parameter cannot be defined together with the disk name parameter. The + // instance name and disk name parameters are mutually exclusive. + InstanceName *string `locationName:"instanceName" type:"string"` + // The tag keys and optional values to add to the resource during create. // // To tag a resource after it has been created, see the tag resource operation. @@ -12075,9 +12100,6 @@ func (s CreateDiskSnapshotInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateDiskSnapshotInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } if s.DiskSnapshotName == nil { invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) } @@ -12100,6 +12122,12 @@ func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnaps return s } +// SetInstanceName sets the InstanceName field's value. +func (s *CreateDiskSnapshotInput) SetInstanceName(v string) *CreateDiskSnapshotInput { + s.InstanceName = &v + return s +} + // SetTags sets the Tags field's value. func (s *CreateDiskSnapshotInput) SetTags(v []*Tag) *CreateDiskSnapshotInput { s.Tags = v @@ -14816,13 +14844,21 @@ type DiskSnapshot struct { // The date when the disk snapshot was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The Amazon Resource Name (ARN) of the source disk from which you are creating - // the disk snapshot. + // The Amazon Resource Name (ARN) of the source disk from which the disk snapshot + // was created. FromDiskArn *string `locationName:"fromDiskArn" type:"string"` - // The unique name of the source disk from which you are creating the disk snapshot. + // The unique name of the source disk from which the disk snapshot was created. FromDiskName *string `locationName:"fromDiskName" type:"string"` + // The Amazon Resource Name (ARN) of the source instance from which the disk + // (system volume) snapshot was created. + FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` + + // The unique name of the source instance from which the disk (system volume) + // snapshot was created. + FromInstanceName *string `locationName:"fromInstanceName" type:"string"` + // The AWS Region and Availability Zone where the disk snapshot was created. Location *ResourceLocation `locationName:"location" type:"structure"` @@ -14885,6 +14921,18 @@ func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { return s } +// SetFromInstanceArn sets the FromInstanceArn field's value. +func (s *DiskSnapshot) SetFromInstanceArn(v string) *DiskSnapshot { + s.FromInstanceArn = &v + return s +} + +// SetFromInstanceName sets the FromInstanceName field's value. +func (s *DiskSnapshot) SetFromInstanceName(v string) *DiskSnapshot { + s.FromInstanceName = &v + return s +} + // SetLocation sets the Location field's value. func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { s.Location = v @@ -19104,6 +19152,8 @@ type InstanceEntry struct { // // * NONE — Default to Amazon EC2. // + // * CLOSED — All ports closed. + // // PortInfoSource is a required field PortInfoSource *string `locationName:"portInfoSource" type:"string" required:"true" enum:"PortInfoSourceType"` @@ -23825,6 +23875,9 @@ const ( // PortInfoSourceTypeNone is a PortInfoSourceType enum value PortInfoSourceTypeNone = "NONE" + + // PortInfoSourceTypeClosed is a PortInfoSourceType enum value + PortInfoSourceTypeClosed = "CLOSED" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go new file mode 100644 index 000000000..9f5c8a306 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/api.go @@ -0,0 +1,4571 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediaconnect + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opAddFlowOutputs = "AddFlowOutputs" + +// AddFlowOutputsRequest generates a "aws/request.Request" representing the +// client's request for the AddFlowOutputs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddFlowOutputs for more information on using the AddFlowOutputs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddFlowOutputsRequest method. +// req, resp := client.AddFlowOutputsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowOutputs +func (c *MediaConnect) AddFlowOutputsRequest(input *AddFlowOutputsInput) (req *request.Request, output *AddFlowOutputsOutput) { + op := &request.Operation{ + Name: opAddFlowOutputs, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/{flowArn}/outputs", + } + + if input == nil { + input = &AddFlowOutputsInput{} + } + + output = &AddFlowOutputsOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddFlowOutputs API operation for AWS MediaConnect. +// +// Adds outputs to an existing flow. You can create up to 20 outputs per flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation AddFlowOutputs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAddFlowOutputs420Exception "AddFlowOutputs420Exception" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/AddFlowOutputs +func (c *MediaConnect) AddFlowOutputs(input *AddFlowOutputsInput) (*AddFlowOutputsOutput, error) { + req, out := c.AddFlowOutputsRequest(input) + return out, req.Send() +} + +// AddFlowOutputsWithContext is the same as AddFlowOutputs with the addition of +// the ability to pass a context and additional request options. +// +// See AddFlowOutputs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) AddFlowOutputsWithContext(ctx aws.Context, input *AddFlowOutputsInput, opts ...request.Option) (*AddFlowOutputsOutput, error) { + req, out := c.AddFlowOutputsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFlow = "CreateFlow" + +// CreateFlowRequest generates a "aws/request.Request" representing the +// client's request for the CreateFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFlow for more information on using the CreateFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFlowRequest method. +// req, resp := client.CreateFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/CreateFlow +func (c *MediaConnect) CreateFlowRequest(input *CreateFlowInput) (req *request.Request, output *CreateFlowOutput) { + op := &request.Operation{ + Name: opCreateFlow, + HTTPMethod: "POST", + HTTPPath: "/v1/flows", + } + + if input == nil { + input = &CreateFlowInput{} + } + + output = &CreateFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFlow API operation for AWS MediaConnect. +// +// Creates a new flow. The request must include one source. The request optionally +// can include outputs (up to 20) and entitlements (up to 50). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation CreateFlow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCreateFlow420Exception "CreateFlow420Exception" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/CreateFlow +func (c *MediaConnect) CreateFlow(input *CreateFlowInput) (*CreateFlowOutput, error) { + req, out := c.CreateFlowRequest(input) + return out, req.Send() +} + +// CreateFlowWithContext is the same as CreateFlow with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) CreateFlowWithContext(ctx aws.Context, input *CreateFlowInput, opts ...request.Option) (*CreateFlowOutput, error) { + req, out := c.CreateFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteFlow = "DeleteFlow" + +// DeleteFlowRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFlow for more information on using the DeleteFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFlowRequest method. +// req, resp := client.DeleteFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DeleteFlow +func (c *MediaConnect) DeleteFlowRequest(input *DeleteFlowInput) (req *request.Request, output *DeleteFlowOutput) { + op := &request.Operation{ + Name: opDeleteFlow, + HTTPMethod: "DELETE", + HTTPPath: "/v1/flows/{flowArn}", + } + + if input == nil { + input = &DeleteFlowInput{} + } + + output = &DeleteFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFlow API operation for AWS MediaConnect. +// +// Deletes a flow. Before you can delete a flow, you must stop the flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation DeleteFlow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DeleteFlow +func (c *MediaConnect) DeleteFlow(input *DeleteFlowInput) (*DeleteFlowOutput, error) { + req, out := c.DeleteFlowRequest(input) + return out, req.Send() +} + +// DeleteFlowWithContext is the same as DeleteFlow with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) DeleteFlowWithContext(ctx aws.Context, input *DeleteFlowInput, opts ...request.Option) (*DeleteFlowOutput, error) { + req, out := c.DeleteFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeFlow = "DescribeFlow" + +// DescribeFlowRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFlow for more information on using the DescribeFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFlowRequest method. +// req, resp := client.DescribeFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DescribeFlow +func (c *MediaConnect) DescribeFlowRequest(input *DescribeFlowInput) (req *request.Request, output *DescribeFlowOutput) { + op := &request.Operation{ + Name: opDescribeFlow, + HTTPMethod: "GET", + HTTPPath: "/v1/flows/{flowArn}", + } + + if input == nil { + input = &DescribeFlowInput{} + } + + output = &DescribeFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFlow API operation for AWS MediaConnect. +// +// Displays the details of a flow. The response includes the flow ARN, name, +// and Availability Zone, as well as details about the source, outputs, and +// entitlements. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation DescribeFlow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/DescribeFlow +func (c *MediaConnect) DescribeFlow(input *DescribeFlowInput) (*DescribeFlowOutput, error) { + req, out := c.DescribeFlowRequest(input) + return out, req.Send() +} + +// DescribeFlowWithContext is the same as DescribeFlow with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) DescribeFlowWithContext(ctx aws.Context, input *DescribeFlowInput, opts ...request.Option) (*DescribeFlowOutput, error) { + req, out := c.DescribeFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGrantFlowEntitlements = "GrantFlowEntitlements" + +// GrantFlowEntitlementsRequest generates a "aws/request.Request" representing the +// client's request for the GrantFlowEntitlements operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GrantFlowEntitlements for more information on using the GrantFlowEntitlements +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GrantFlowEntitlementsRequest method. +// req, resp := client.GrantFlowEntitlementsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/GrantFlowEntitlements +func (c *MediaConnect) GrantFlowEntitlementsRequest(input *GrantFlowEntitlementsInput) (req *request.Request, output *GrantFlowEntitlementsOutput) { + op := &request.Operation{ + Name: opGrantFlowEntitlements, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/{flowArn}/entitlements", + } + + if input == nil { + input = &GrantFlowEntitlementsInput{} + } + + output = &GrantFlowEntitlementsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GrantFlowEntitlements API operation for AWS MediaConnect. +// +// Grants entitlements to an existing flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation GrantFlowEntitlements for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGrantFlowEntitlements420Exception "GrantFlowEntitlements420Exception" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/GrantFlowEntitlements +func (c *MediaConnect) GrantFlowEntitlements(input *GrantFlowEntitlementsInput) (*GrantFlowEntitlementsOutput, error) { + req, out := c.GrantFlowEntitlementsRequest(input) + return out, req.Send() +} + +// GrantFlowEntitlementsWithContext is the same as GrantFlowEntitlements with the addition of +// the ability to pass a context and additional request options. +// +// See GrantFlowEntitlements for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) GrantFlowEntitlementsWithContext(ctx aws.Context, input *GrantFlowEntitlementsInput, opts ...request.Option) (*GrantFlowEntitlementsOutput, error) { + req, out := c.GrantFlowEntitlementsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListEntitlements = "ListEntitlements" + +// ListEntitlementsRequest generates a "aws/request.Request" representing the +// client's request for the ListEntitlements operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEntitlements for more information on using the ListEntitlements +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEntitlementsRequest method. +// req, resp := client.ListEntitlementsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListEntitlements +func (c *MediaConnect) ListEntitlementsRequest(input *ListEntitlementsInput) (req *request.Request, output *ListEntitlementsOutput) { + op := &request.Operation{ + Name: opListEntitlements, + HTTPMethod: "GET", + HTTPPath: "/v1/entitlements", + } + + if input == nil { + input = &ListEntitlementsInput{} + } + + output = &ListEntitlementsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEntitlements API operation for AWS MediaConnect. +// +// Displays a list of all entitlements that have been granted to this account. +// This request returns 20 results per page. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation ListEntitlements for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListEntitlements +func (c *MediaConnect) ListEntitlements(input *ListEntitlementsInput) (*ListEntitlementsOutput, error) { + req, out := c.ListEntitlementsRequest(input) + return out, req.Send() +} + +// ListEntitlementsWithContext is the same as ListEntitlements with the addition of +// the ability to pass a context and additional request options. +// +// See ListEntitlements for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) ListEntitlementsWithContext(ctx aws.Context, input *ListEntitlementsInput, opts ...request.Option) (*ListEntitlementsOutput, error) { + req, out := c.ListEntitlementsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListFlows = "ListFlows" + +// ListFlowsRequest generates a "aws/request.Request" representing the +// client's request for the ListFlows operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFlows for more information on using the ListFlows +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListFlowsRequest method. +// req, resp := client.ListFlowsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListFlows +func (c *MediaConnect) ListFlowsRequest(input *ListFlowsInput) (req *request.Request, output *ListFlowsOutput) { + op := &request.Operation{ + Name: opListFlows, + HTTPMethod: "GET", + HTTPPath: "/v1/flows", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListFlowsInput{} + } + + output = &ListFlowsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFlows API operation for AWS MediaConnect. +// +// Displays a list of flows that are associated with this account. This request +// returns a paginated result. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation ListFlows for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListFlows +func (c *MediaConnect) ListFlows(input *ListFlowsInput) (*ListFlowsOutput, error) { + req, out := c.ListFlowsRequest(input) + return out, req.Send() +} + +// ListFlowsWithContext is the same as ListFlows with the addition of +// the ability to pass a context and additional request options. +// +// See ListFlows for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) ListFlowsWithContext(ctx aws.Context, input *ListFlowsInput, opts ...request.Option) (*ListFlowsOutput, error) { + req, out := c.ListFlowsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListFlowsPages iterates over the pages of a ListFlows operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListFlows method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListFlows operation. +// pageNum := 0 +// err := client.ListFlowsPages(params, +// func(page *ListFlowsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConnect) ListFlowsPages(input *ListFlowsInput, fn func(*ListFlowsOutput, bool) bool) error { + return c.ListFlowsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListFlowsPagesWithContext same as ListFlowsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) ListFlowsPagesWithContext(ctx aws.Context, input *ListFlowsInput, fn func(*ListFlowsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListFlowsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListFlowsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListFlowsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListTagsForResource +func (c *MediaConnect) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS MediaConnect. +// +// Lists all tags associated with the resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/ListTagsForResource +func (c *MediaConnect) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveFlowOutput = "RemoveFlowOutput" + +// RemoveFlowOutputRequest generates a "aws/request.Request" representing the +// client's request for the RemoveFlowOutput operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveFlowOutput for more information on using the RemoveFlowOutput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveFlowOutputRequest method. +// req, resp := client.RemoveFlowOutputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowOutput +func (c *MediaConnect) RemoveFlowOutputRequest(input *RemoveFlowOutputInput) (req *request.Request, output *RemoveFlowOutputOutput) { + op := &request.Operation{ + Name: opRemoveFlowOutput, + HTTPMethod: "DELETE", + HTTPPath: "/v1/flows/{flowArn}/outputs/{outputArn}", + } + + if input == nil { + input = &RemoveFlowOutputInput{} + } + + output = &RemoveFlowOutputOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveFlowOutput API operation for AWS MediaConnect. +// +// Removes an output from an existing flow. This request can be made only on +// an output that does not have an entitlement associated with it. If the output +// has an entitlement, you must revoke the entitlement instead. When an entitlement +// is revoked from a flow, the service automatically removes the associated +// output. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation RemoveFlowOutput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RemoveFlowOutput +func (c *MediaConnect) RemoveFlowOutput(input *RemoveFlowOutputInput) (*RemoveFlowOutputOutput, error) { + req, out := c.RemoveFlowOutputRequest(input) + return out, req.Send() +} + +// RemoveFlowOutputWithContext is the same as RemoveFlowOutput with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveFlowOutput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) RemoveFlowOutputWithContext(ctx aws.Context, input *RemoveFlowOutputInput, opts ...request.Option) (*RemoveFlowOutputOutput, error) { + req, out := c.RemoveFlowOutputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRevokeFlowEntitlement = "RevokeFlowEntitlement" + +// RevokeFlowEntitlementRequest generates a "aws/request.Request" representing the +// client's request for the RevokeFlowEntitlement operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RevokeFlowEntitlement for more information on using the RevokeFlowEntitlement +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RevokeFlowEntitlementRequest method. +// req, resp := client.RevokeFlowEntitlementRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement +func (c *MediaConnect) RevokeFlowEntitlementRequest(input *RevokeFlowEntitlementInput) (req *request.Request, output *RevokeFlowEntitlementOutput) { + op := &request.Operation{ + Name: opRevokeFlowEntitlement, + HTTPMethod: "DELETE", + HTTPPath: "/v1/flows/{flowArn}/entitlements/{entitlementArn}", + } + + if input == nil { + input = &RevokeFlowEntitlementInput{} + } + + output = &RevokeFlowEntitlementOutput{} + req = c.newRequest(op, input, output) + return +} + +// RevokeFlowEntitlement API operation for AWS MediaConnect. +// +// Revokes an entitlement from a flow. Once an entitlement is revoked, the content +// becomes unavailable to the subscriber and the associated output is removed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation RevokeFlowEntitlement for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/RevokeFlowEntitlement +func (c *MediaConnect) RevokeFlowEntitlement(input *RevokeFlowEntitlementInput) (*RevokeFlowEntitlementOutput, error) { + req, out := c.RevokeFlowEntitlementRequest(input) + return out, req.Send() +} + +// RevokeFlowEntitlementWithContext is the same as RevokeFlowEntitlement with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeFlowEntitlement for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) RevokeFlowEntitlementWithContext(ctx aws.Context, input *RevokeFlowEntitlementInput, opts ...request.Option) (*RevokeFlowEntitlementOutput, error) { + req, out := c.RevokeFlowEntitlementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartFlow = "StartFlow" + +// StartFlowRequest generates a "aws/request.Request" representing the +// client's request for the StartFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartFlow for more information on using the StartFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartFlowRequest method. +// req, resp := client.StartFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow +func (c *MediaConnect) StartFlowRequest(input *StartFlowInput) (req *request.Request, output *StartFlowOutput) { + op := &request.Operation{ + Name: opStartFlow, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/start/{flowArn}", + } + + if input == nil { + input = &StartFlowInput{} + } + + output = &StartFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartFlow API operation for AWS MediaConnect. +// +// Starts a flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation StartFlow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StartFlow +func (c *MediaConnect) StartFlow(input *StartFlowInput) (*StartFlowOutput, error) { + req, out := c.StartFlowRequest(input) + return out, req.Send() +} + +// StartFlowWithContext is the same as StartFlow with the addition of +// the ability to pass a context and additional request options. +// +// See StartFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) StartFlowWithContext(ctx aws.Context, input *StartFlowInput, opts ...request.Option) (*StartFlowOutput, error) { + req, out := c.StartFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopFlow = "StopFlow" + +// StopFlowRequest generates a "aws/request.Request" representing the +// client's request for the StopFlow operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopFlow for more information on using the StopFlow +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopFlowRequest method. +// req, resp := client.StopFlowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow +func (c *MediaConnect) StopFlowRequest(input *StopFlowInput) (req *request.Request, output *StopFlowOutput) { + op := &request.Operation{ + Name: opStopFlow, + HTTPMethod: "POST", + HTTPPath: "/v1/flows/stop/{flowArn}", + } + + if input == nil { + input = &StopFlowInput{} + } + + output = &StopFlowOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopFlow API operation for AWS MediaConnect. +// +// Stops a flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation StopFlow for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/StopFlow +func (c *MediaConnect) StopFlow(input *StopFlowInput) (*StopFlowOutput, error) { + req, out := c.StopFlowRequest(input) + return out, req.Send() +} + +// StopFlowWithContext is the same as StopFlow with the addition of +// the ability to pass a context and additional request options. +// +// See StopFlow for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) StopFlowWithContext(ctx aws.Context, input *StopFlowInput, opts ...request.Option) (*StopFlowOutput, error) { + req, out := c.StopFlowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/TagResource +func (c *MediaConnect) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS MediaConnect. +// +// Associates the specified tags to a resource. If the request does not mention +// an existing tag associated with the resource, that tag is not changed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/TagResource +func (c *MediaConnect) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UntagResource +func (c *MediaConnect) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS MediaConnect. +// +// Deletes the specified tags from a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UntagResource +func (c *MediaConnect) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFlowEntitlement = "UpdateFlowEntitlement" + +// UpdateFlowEntitlementRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFlowEntitlement operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFlowEntitlement for more information on using the UpdateFlowEntitlement +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFlowEntitlementRequest method. +// req, resp := client.UpdateFlowEntitlementRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowEntitlement +func (c *MediaConnect) UpdateFlowEntitlementRequest(input *UpdateFlowEntitlementInput) (req *request.Request, output *UpdateFlowEntitlementOutput) { + op := &request.Operation{ + Name: opUpdateFlowEntitlement, + HTTPMethod: "PUT", + HTTPPath: "/v1/flows/{flowArn}/entitlements/{entitlementArn}", + } + + if input == nil { + input = &UpdateFlowEntitlementInput{} + } + + output = &UpdateFlowEntitlementOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFlowEntitlement API operation for AWS MediaConnect. +// +// You can change an entitlement's description, subscribers, and encryption. +// If you change the subscribers, the service will remove the outputs that are +// are used by the subscribers that are removed. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation UpdateFlowEntitlement for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowEntitlement +func (c *MediaConnect) UpdateFlowEntitlement(input *UpdateFlowEntitlementInput) (*UpdateFlowEntitlementOutput, error) { + req, out := c.UpdateFlowEntitlementRequest(input) + return out, req.Send() +} + +// UpdateFlowEntitlementWithContext is the same as UpdateFlowEntitlement with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFlowEntitlement for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) UpdateFlowEntitlementWithContext(ctx aws.Context, input *UpdateFlowEntitlementInput, opts ...request.Option) (*UpdateFlowEntitlementOutput, error) { + req, out := c.UpdateFlowEntitlementRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFlowOutput = "UpdateFlowOutput" + +// UpdateFlowOutputRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFlowOutput operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFlowOutput for more information on using the UpdateFlowOutput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFlowOutputRequest method. +// req, resp := client.UpdateFlowOutputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowOutput +func (c *MediaConnect) UpdateFlowOutputRequest(input *UpdateFlowOutputInput) (req *request.Request, output *UpdateFlowOutputOutput) { + op := &request.Operation{ + Name: opUpdateFlowOutput, + HTTPMethod: "PUT", + HTTPPath: "/v1/flows/{flowArn}/outputs/{outputArn}", + } + + if input == nil { + input = &UpdateFlowOutputInput{} + } + + output = &UpdateFlowOutputOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFlowOutput API operation for AWS MediaConnect. +// +// Updates an existing flow output. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation UpdateFlowOutput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowOutput +func (c *MediaConnect) UpdateFlowOutput(input *UpdateFlowOutputInput) (*UpdateFlowOutputOutput, error) { + req, out := c.UpdateFlowOutputRequest(input) + return out, req.Send() +} + +// UpdateFlowOutputWithContext is the same as UpdateFlowOutput with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFlowOutput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) UpdateFlowOutputWithContext(ctx aws.Context, input *UpdateFlowOutputInput, opts ...request.Option) (*UpdateFlowOutputOutput, error) { + req, out := c.UpdateFlowOutputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFlowSource = "UpdateFlowSource" + +// UpdateFlowSourceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFlowSource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFlowSource for more information on using the UpdateFlowSource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFlowSourceRequest method. +// req, resp := client.UpdateFlowSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowSource +func (c *MediaConnect) UpdateFlowSourceRequest(input *UpdateFlowSourceInput) (req *request.Request, output *UpdateFlowSourceOutput) { + op := &request.Operation{ + Name: opUpdateFlowSource, + HTTPMethod: "PUT", + HTTPPath: "/v1/flows/{flowArn}/source/{sourceArn}", + } + + if input == nil { + input = &UpdateFlowSourceInput{} + } + + output = &UpdateFlowSourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFlowSource API operation for AWS MediaConnect. +// +// Updates the source of a flow. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS MediaConnect's +// API operation UpdateFlowSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeNotFoundException "NotFoundException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/UpdateFlowSource +func (c *MediaConnect) UpdateFlowSource(input *UpdateFlowSourceInput) (*UpdateFlowSourceOutput, error) { + req, out := c.UpdateFlowSourceRequest(input) + return out, req.Send() +} + +// UpdateFlowSourceWithContext is the same as UpdateFlowSource with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFlowSource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConnect) UpdateFlowSourceWithContext(ctx aws.Context, input *UpdateFlowSourceInput, opts ...request.Option) (*UpdateFlowSourceOutput, error) { + req, out := c.UpdateFlowSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Adds outputs to an existing flow. You can create up to 20 outputs per flow. +type AddFlowOutputsInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // A list of outputs that you want to add. + // + // Outputs is a required field + Outputs []*AddOutputRequest `locationName:"outputs" type:"list" required:"true"` +} + +// String returns the string representation +func (s AddFlowOutputsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddFlowOutputsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddFlowOutputsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddFlowOutputsInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.Outputs == nil { + invalidParams.Add(request.NewErrParamRequired("Outputs")) + } + if s.Outputs != nil { + for i, v := range s.Outputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *AddFlowOutputsInput) SetFlowArn(v string) *AddFlowOutputsInput { + s.FlowArn = &v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *AddFlowOutputsInput) SetOutputs(v []*AddOutputRequest) *AddFlowOutputsInput { + s.Outputs = v + return s +} + +// The result of a successful AddOutput request. The response includes the details +// of the newly added outputs. +type AddFlowOutputsOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that these outputs were added to. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The details of the newly added outputs. + Outputs []*Output `locationName:"outputs" type:"list"` +} + +// String returns the string representation +func (s AddFlowOutputsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddFlowOutputsOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *AddFlowOutputsOutput) SetFlowArn(v string) *AddFlowOutputsOutput { + s.FlowArn = &v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *AddFlowOutputsOutput) SetOutputs(v []*Output) *AddFlowOutputsOutput { + s.Outputs = v + return s +} + +// The output that you want to add to this flow. +type AddOutputRequest struct { + _ struct{} `type:"structure"` + + // A description of the output. This description appears only on the AWS Elemental + // MediaConnect console and will not be seen by the end user. + Description *string `locationName:"description" type:"string"` + + // The IP address from which video will be sent to output destinations. + // + // Destination is a required field + Destination *string `locationName:"destination" type:"string" required:"true"` + + // The type of key used for the encryption. If no keyType is provided, the service + // will use the default setting (static-key). + Encryption *Encryption `locationName:"encryption" type:"structure"` + + // The maximum latency in milliseconds for Zixi-based streams. + MaxLatency *int64 `locationName:"maxLatency" type:"integer"` + + // The name of the output. This value must be unique within the current flow. + Name *string `locationName:"name" type:"string"` + + // The port to use when content is distributed to this output. + // + // Port is a required field + Port *int64 `locationName:"port" type:"integer" required:"true"` + + // The protocol to use for the output. + // + // Protocol is a required field + Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"Protocol"` + + // The smoothing latency in milliseconds for RTP and RTP-FEC streams. + SmoothingLatency *int64 `locationName:"smoothingLatency" type:"integer"` + + // The stream ID that you want to use for this transport. This parameter applies + // only to Zixi-based streams. + StreamId *string `locationName:"streamId" type:"string"` +} + +// String returns the string representation +func (s AddOutputRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddOutputRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddOutputRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddOutputRequest"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.Port == nil { + invalidParams.Add(request.NewErrParamRequired("Port")) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *AddOutputRequest) SetDescription(v string) *AddOutputRequest { + s.Description = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *AddOutputRequest) SetDestination(v string) *AddOutputRequest { + s.Destination = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *AddOutputRequest) SetEncryption(v *Encryption) *AddOutputRequest { + s.Encryption = v + return s +} + +// SetMaxLatency sets the MaxLatency field's value. +func (s *AddOutputRequest) SetMaxLatency(v int64) *AddOutputRequest { + s.MaxLatency = &v + return s +} + +// SetName sets the Name field's value. +func (s *AddOutputRequest) SetName(v string) *AddOutputRequest { + s.Name = &v + return s +} + +// SetPort sets the Port field's value. +func (s *AddOutputRequest) SetPort(v int64) *AddOutputRequest { + s.Port = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *AddOutputRequest) SetProtocol(v string) *AddOutputRequest { + s.Protocol = &v + return s +} + +// SetSmoothingLatency sets the SmoothingLatency field's value. +func (s *AddOutputRequest) SetSmoothingLatency(v int64) *AddOutputRequest { + s.SmoothingLatency = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *AddOutputRequest) SetStreamId(v string) *AddOutputRequest { + s.StreamId = &v + return s +} + +// Creates a new flow. The request must include one source. The request optionally +// can include outputs (up to 20) and one entitlement. +type CreateFlowInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone that you want to create the flow in. These options + // are limited to the Availability Zones within the current AWS Region. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The entitlements that you want to grant on a flow. + Entitlements []*GrantEntitlementRequest `locationName:"entitlements" type:"list"` + + // The name of the flow. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The outputs that you want to add to this flow. + Outputs []*AddOutputRequest `locationName:"outputs" type:"list"` + + // The settings for the source of the flow. + // + // Source is a required field + Source *SetSourceRequest `locationName:"source" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateFlowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFlowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFlowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFlowInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + if s.Entitlements != nil { + for i, v := range s.Entitlements { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entitlements", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Outputs != nil { + for i, v := range s.Outputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Source != nil { + if err := s.Source.Validate(); err != nil { + invalidParams.AddNested("Source", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateFlowInput) SetAvailabilityZone(v string) *CreateFlowInput { + s.AvailabilityZone = &v + return s +} + +// SetEntitlements sets the Entitlements field's value. +func (s *CreateFlowInput) SetEntitlements(v []*GrantEntitlementRequest) *CreateFlowInput { + s.Entitlements = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateFlowInput) SetName(v string) *CreateFlowInput { + s.Name = &v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *CreateFlowInput) SetOutputs(v []*AddOutputRequest) *CreateFlowInput { + s.Outputs = v + return s +} + +// SetSource sets the Source field's value. +func (s *CreateFlowInput) SetSource(v *SetSourceRequest) *CreateFlowInput { + s.Source = v + return s +} + +// The result of a successful CreateFlow request. +type CreateFlowOutput struct { + _ struct{} `type:"structure"` + + // The settings for a flow, including its source, outputs, and entitlements. + Flow *Flow `locationName:"flow" type:"structure"` +} + +// String returns the string representation +func (s CreateFlowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFlowOutput) GoString() string { + return s.String() +} + +// SetFlow sets the Flow field's value. +func (s *CreateFlowOutput) SetFlow(v *Flow) *CreateFlowOutput { + s.Flow = v + return s +} + +type DeleteFlowInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFlowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFlowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFlowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFlowInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *DeleteFlowInput) SetFlowArn(v string) *DeleteFlowInput { + s.FlowArn = &v + return s +} + +// The result of a successful DeleteFlow request. +type DeleteFlowOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that was deleted. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The status of the flow when the DeleteFlow process begins. + Status *string `locationName:"status" type:"string" enum:"Status"` +} + +// String returns the string representation +func (s DeleteFlowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFlowOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *DeleteFlowOutput) SetFlowArn(v string) *DeleteFlowOutput { + s.FlowArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DeleteFlowOutput) SetStatus(v string) *DeleteFlowOutput { + s.Status = &v + return s +} + +type DescribeFlowInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeFlowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFlowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFlowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFlowInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *DescribeFlowInput) SetFlowArn(v string) *DescribeFlowInput { + s.FlowArn = &v + return s +} + +// The result of a successful DescribeFlow request. +type DescribeFlowOutput struct { + _ struct{} `type:"structure"` + + // The settings for a flow, including its source, outputs, and entitlements. + Flow *Flow `locationName:"flow" type:"structure"` + + // Messages that provide the state of the flow. + Messages *Messages `locationName:"messages" type:"structure"` +} + +// String returns the string representation +func (s DescribeFlowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFlowOutput) GoString() string { + return s.String() +} + +// SetFlow sets the Flow field's value. +func (s *DescribeFlowOutput) SetFlow(v *Flow) *DescribeFlowOutput { + s.Flow = v + return s +} + +// SetMessages sets the Messages field's value. +func (s *DescribeFlowOutput) SetMessages(v *Messages) *DescribeFlowOutput { + s.Messages = v + return s +} + +// Information about the encryption of the flow. +type Encryption struct { + _ struct{} `type:"structure"` + + // The type of algorithm that is used for the encryption (such as aes128, aes192, + // or aes256). + // + // Algorithm is a required field + Algorithm *string `locationName:"algorithm" type:"string" required:"true" enum:"Algorithm"` + + // The type of key that is used for the encryption. If no keyType is provided, + // the service will use the default setting (static-key). + KeyType *string `locationName:"keyType" type:"string" enum:"KeyType"` + + // The ARN of the role that you created during setup (when you set up AWS Elemental + // MediaConnect as a trusted entity). + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The ARN that was assigned to the secret that you created in AWS Secrets Manager + // to store the encryption key. + // + // SecretArn is a required field + SecretArn *string `locationName:"secretArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s Encryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Encryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Encryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Encryption"} + if s.Algorithm == nil { + invalidParams.Add(request.NewErrParamRequired("Algorithm")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.SecretArn == nil { + invalidParams.Add(request.NewErrParamRequired("SecretArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithm sets the Algorithm field's value. +func (s *Encryption) SetAlgorithm(v string) *Encryption { + s.Algorithm = &v + return s +} + +// SetKeyType sets the KeyType field's value. +func (s *Encryption) SetKeyType(v string) *Encryption { + s.KeyType = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *Encryption) SetRoleArn(v string) *Encryption { + s.RoleArn = &v + return s +} + +// SetSecretArn sets the SecretArn field's value. +func (s *Encryption) SetSecretArn(v string) *Encryption { + s.SecretArn = &v + return s +} + +// The settings for a flow entitlement. +type Entitlement struct { + _ struct{} `type:"structure"` + + // A description of the entitlement. + Description *string `locationName:"description" type:"string"` + + // The type of encryption that will be used on the output that is associated + // with this entitlement. + Encryption *Encryption `locationName:"encryption" type:"structure"` + + // The ARN of the entitlement. + // + // EntitlementArn is a required field + EntitlementArn *string `locationName:"entitlementArn" type:"string" required:"true"` + + // The name of the entitlement. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The AWS account IDs that you want to share your content with. The receiving + // accounts (subscribers) will be allowed to create their own flow using your + // content as the source. + // + // Subscribers is a required field + Subscribers []*string `locationName:"subscribers" type:"list" required:"true"` +} + +// String returns the string representation +func (s Entitlement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Entitlement) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *Entitlement) SetDescription(v string) *Entitlement { + s.Description = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *Entitlement) SetEncryption(v *Encryption) *Entitlement { + s.Encryption = v + return s +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *Entitlement) SetEntitlementArn(v string) *Entitlement { + s.EntitlementArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *Entitlement) SetName(v string) *Entitlement { + s.Name = &v + return s +} + +// SetSubscribers sets the Subscribers field's value. +func (s *Entitlement) SetSubscribers(v []*string) *Entitlement { + s.Subscribers = v + return s +} + +// The settings for a flow, including its source, outputs, and entitlements. +type Flow struct { + _ struct{} `type:"structure"` + + // The Availability Zone that you want to create the flow in. These options + // are limited to the Availability Zones within the current AWS. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // A description of the flow. This value is not used or seen outside of the + // current AWS Elemental MediaConnect account. + Description *string `locationName:"description" type:"string"` + + // The IP address from which video will be sent to output destinations. + EgressIp *string `locationName:"egressIp" type:"string"` + + // The entitlements in this flow. + // + // Entitlements is a required field + Entitlements []*Entitlement `locationName:"entitlements" type:"list" required:"true"` + + // The Amazon Resource Name (ARN), a unique identifier for any AWS resource, + // of the flow. + // + // FlowArn is a required field + FlowArn *string `locationName:"flowArn" type:"string" required:"true"` + + // The name of the flow. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The outputs in this flow. + // + // Outputs is a required field + Outputs []*Output `locationName:"outputs" type:"list" required:"true"` + + // The settings for the source of the flow. + // + // Source is a required field + Source *Source `locationName:"source" type:"structure" required:"true"` + + // The current status of the flow. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"Status"` +} + +// String returns the string representation +func (s Flow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Flow) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Flow) SetAvailabilityZone(v string) *Flow { + s.AvailabilityZone = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Flow) SetDescription(v string) *Flow { + s.Description = &v + return s +} + +// SetEgressIp sets the EgressIp field's value. +func (s *Flow) SetEgressIp(v string) *Flow { + s.EgressIp = &v + return s +} + +// SetEntitlements sets the Entitlements field's value. +func (s *Flow) SetEntitlements(v []*Entitlement) *Flow { + s.Entitlements = v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *Flow) SetFlowArn(v string) *Flow { + s.FlowArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *Flow) SetName(v string) *Flow { + s.Name = &v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *Flow) SetOutputs(v []*Output) *Flow { + s.Outputs = v + return s +} + +// SetSource sets the Source field's value. +func (s *Flow) SetSource(v *Source) *Flow { + s.Source = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Flow) SetStatus(v string) *Flow { + s.Status = &v + return s +} + +// The entitlements that you want to grant on a flow. +type GrantEntitlementRequest struct { + _ struct{} `type:"structure"` + + // A description of the entitlement. This description appears only on the AWS + // Elemental MediaConnect console and will not be seen by the subscriber or + // end user. + Description *string `locationName:"description" type:"string"` + + // The type of encryption that will be used on the output that is associated + // with this entitlement. + Encryption *Encryption `locationName:"encryption" type:"structure"` + + // The name of the entitlement. This value must be unique within the current + // flow. + Name *string `locationName:"name" type:"string"` + + // The AWS account IDs that you want to share your content with. The receiving + // accounts (subscribers) will be allowed to create their own flows using your + // content as the source. + // + // Subscribers is a required field + Subscribers []*string `locationName:"subscribers" type:"list" required:"true"` +} + +// String returns the string representation +func (s GrantEntitlementRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GrantEntitlementRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GrantEntitlementRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GrantEntitlementRequest"} + if s.Subscribers == nil { + invalidParams.Add(request.NewErrParamRequired("Subscribers")) + } + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *GrantEntitlementRequest) SetDescription(v string) *GrantEntitlementRequest { + s.Description = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *GrantEntitlementRequest) SetEncryption(v *Encryption) *GrantEntitlementRequest { + s.Encryption = v + return s +} + +// SetName sets the Name field's value. +func (s *GrantEntitlementRequest) SetName(v string) *GrantEntitlementRequest { + s.Name = &v + return s +} + +// SetSubscribers sets the Subscribers field's value. +func (s *GrantEntitlementRequest) SetSubscribers(v []*string) *GrantEntitlementRequest { + s.Subscribers = v + return s +} + +// Grants an entitlement on a flow. +type GrantFlowEntitlementsInput struct { + _ struct{} `type:"structure"` + + // The list of entitlements that you want to grant. + // + // Entitlements is a required field + Entitlements []*GrantEntitlementRequest `locationName:"entitlements" type:"list" required:"true"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s GrantFlowEntitlementsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GrantFlowEntitlementsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GrantFlowEntitlementsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GrantFlowEntitlementsInput"} + if s.Entitlements == nil { + invalidParams.Add(request.NewErrParamRequired("Entitlements")) + } + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.Entitlements != nil { + for i, v := range s.Entitlements { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Entitlements", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntitlements sets the Entitlements field's value. +func (s *GrantFlowEntitlementsInput) SetEntitlements(v []*GrantEntitlementRequest) *GrantFlowEntitlementsInput { + s.Entitlements = v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *GrantFlowEntitlementsInput) SetFlowArn(v string) *GrantFlowEntitlementsInput { + s.FlowArn = &v + return s +} + +// The entitlements that were just granted. +type GrantFlowEntitlementsOutput struct { + _ struct{} `type:"structure"` + + // The entitlements that were just granted. + Entitlements []*Entitlement `locationName:"entitlements" type:"list"` + + // The ARN of the flow that these entitlements were granted to. + FlowArn *string `locationName:"flowArn" type:"string"` +} + +// String returns the string representation +func (s GrantFlowEntitlementsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GrantFlowEntitlementsOutput) GoString() string { + return s.String() +} + +// SetEntitlements sets the Entitlements field's value. +func (s *GrantFlowEntitlementsOutput) SetEntitlements(v []*Entitlement) *GrantFlowEntitlementsOutput { + s.Entitlements = v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *GrantFlowEntitlementsOutput) SetFlowArn(v string) *GrantFlowEntitlementsOutput { + s.FlowArn = &v + return s +} + +type ListEntitlementsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListEntitlementsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEntitlementsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEntitlementsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEntitlementsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListEntitlementsInput) SetMaxResults(v int64) *ListEntitlementsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEntitlementsInput) SetNextToken(v string) *ListEntitlementsInput { + s.NextToken = &v + return s +} + +// The result of a successful ListEntitlements request. The response includes +// the ARN of each entitlement, the name of the associated flow, and the NextToken +// to use in a subsequent ListEntitlements request. +type ListEntitlementsOutput struct { + _ struct{} `type:"structure"` + + // A list of entitlements that have been granted to you from other AWS accounts. + Entitlements []*ListedEntitlement `locationName:"entitlements" type:"list"` + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListEntitlements request with MaxResults set at 5. + // The service returns the first batch of results (up to 5) and a NextToken + // value. To see the next batch of results, you can submit the ListEntitlements + // request a second time and specify the NextToken value. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListEntitlementsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEntitlementsOutput) GoString() string { + return s.String() +} + +// SetEntitlements sets the Entitlements field's value. +func (s *ListEntitlementsOutput) SetEntitlements(v []*ListedEntitlement) *ListEntitlementsOutput { + s.Entitlements = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEntitlementsOutput) SetNextToken(v string) *ListEntitlementsOutput { + s.NextToken = &v + return s +} + +type ListFlowsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFlowsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFlowsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFlowsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFlowsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFlowsInput) SetMaxResults(v int64) *ListFlowsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFlowsInput) SetNextToken(v string) *ListFlowsInput { + s.NextToken = &v + return s +} + +// The result of a successful ListFlows request. The response includes flow +// summaries and the NextToken to use in a subsequent ListFlows request. +type ListFlowsOutput struct { + _ struct{} `type:"structure"` + + // A list of flow summaries. + Flows []*ListedFlow `locationName:"flows" type:"list"` + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListFlows request with MaxResults set at 5. The service + // returns the first batch of results (up to 5) and a NextToken value. To see + // the next batch of results, you can submit the ListFlows request a second + // time and specify the NextToken value. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFlowsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFlowsOutput) GoString() string { + return s.String() +} + +// SetFlows sets the Flows field's value. +func (s *ListFlowsOutput) SetFlows(v []*ListedFlow) *ListFlowsOutput { + s.Flows = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFlowsOutput) SetNextToken(v string) *ListFlowsOutput { + s.NextToken = &v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +// AWS Elemental MediaConnect listed the tags associated with the resource. +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // A map from tag keys to values. Tag keys can have a maximum character length + // of 128 characters, and tag values can have a maximum length of 256 characters. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// An entitlement that has been granted to you from other AWS accounts. +type ListedEntitlement struct { + _ struct{} `type:"structure"` + + // The ARN of the entitlement. + // + // EntitlementArn is a required field + EntitlementArn *string `locationName:"entitlementArn" type:"string" required:"true"` + + // The name of the entitlement. + // + // EntitlementName is a required field + EntitlementName *string `locationName:"entitlementName" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListedEntitlement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListedEntitlement) GoString() string { + return s.String() +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *ListedEntitlement) SetEntitlementArn(v string) *ListedEntitlement { + s.EntitlementArn = &v + return s +} + +// SetEntitlementName sets the EntitlementName field's value. +func (s *ListedEntitlement) SetEntitlementName(v string) *ListedEntitlement { + s.EntitlementName = &v + return s +} + +// Provides a summary of a flow, including its ARN, Availability Zone, and source +// type. +type ListedFlow struct { + _ struct{} `type:"structure"` + + // The Availability Zone that the flow was created in. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // A description of the flow. + // + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` + + // The ARN of the flow. + // + // FlowArn is a required field + FlowArn *string `locationName:"flowArn" type:"string" required:"true"` + + // The name of the flow. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The type of source. This value is either owned (originated somewhere other + // than an AWS Elemental MediaConnect flow owned by another AWS account) or + // entitled (originated at an AWS Elemental MediaConnect flow owned by another + // AWS account). + // + // SourceType is a required field + SourceType *string `locationName:"sourceType" type:"string" required:"true" enum:"SourceType"` + + // The current status of the flow. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"Status"` +} + +// String returns the string representation +func (s ListedFlow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListedFlow) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ListedFlow) SetAvailabilityZone(v string) *ListedFlow { + s.AvailabilityZone = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ListedFlow) SetDescription(v string) *ListedFlow { + s.Description = &v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *ListedFlow) SetFlowArn(v string) *ListedFlow { + s.FlowArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListedFlow) SetName(v string) *ListedFlow { + s.Name = &v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *ListedFlow) SetSourceType(v string) *ListedFlow { + s.SourceType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ListedFlow) SetStatus(v string) *ListedFlow { + s.Status = &v + return s +} + +// Messages that provide the state of the flow. +type Messages struct { + _ struct{} `type:"structure"` + + // A list of errors that might have been generated from processes on this flow. + // + // Errors is a required field + Errors []*string `locationName:"errors" type:"list" required:"true"` +} + +// String returns the string representation +func (s Messages) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Messages) GoString() string { + return s.String() +} + +// SetErrors sets the Errors field's value. +func (s *Messages) SetErrors(v []*string) *Messages { + s.Errors = v + return s +} + +// The settings for an output. +type Output struct { + _ struct{} `type:"structure"` + + // A description of the output. + Description *string `locationName:"description" type:"string"` + + // The address where you want to send the output. + Destination *string `locationName:"destination" type:"string"` + + // The type of key used for the encryption. If no keyType is provided, the service + // will use the default setting (static-key). + Encryption *Encryption `locationName:"encryption" type:"structure"` + + // The ARN of the entitlement on the originator''s flow. This value is relevant + // only on entitled flows. + EntitlementArn *string `locationName:"entitlementArn" type:"string"` + + // The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant + // only for outputs that were added by creating a MediaLive input. + MediaLiveInputArn *string `locationName:"mediaLiveInputArn" type:"string"` + + // The name of the output. This value must be unique within the current flow. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The ARN of the output. + // + // OutputArn is a required field + OutputArn *string `locationName:"outputArn" type:"string" required:"true"` + + // The port to use when content is distributed to this output. + Port *int64 `locationName:"port" type:"integer"` + + // Attributes related to the transport stream that are used in the output. + Transport *Transport `locationName:"transport" type:"structure"` +} + +// String returns the string representation +func (s Output) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Output) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *Output) SetDescription(v string) *Output { + s.Description = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *Output) SetDestination(v string) *Output { + s.Destination = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *Output) SetEncryption(v *Encryption) *Output { + s.Encryption = v + return s +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *Output) SetEntitlementArn(v string) *Output { + s.EntitlementArn = &v + return s +} + +// SetMediaLiveInputArn sets the MediaLiveInputArn field's value. +func (s *Output) SetMediaLiveInputArn(v string) *Output { + s.MediaLiveInputArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *Output) SetName(v string) *Output { + s.Name = &v + return s +} + +// SetOutputArn sets the OutputArn field's value. +func (s *Output) SetOutputArn(v string) *Output { + s.OutputArn = &v + return s +} + +// SetPort sets the Port field's value. +func (s *Output) SetPort(v int64) *Output { + s.Port = &v + return s +} + +// SetTransport sets the Transport field's value. +func (s *Output) SetTransport(v *Transport) *Output { + s.Transport = v + return s +} + +type RemoveFlowOutputInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // OutputArn is a required field + OutputArn *string `location:"uri" locationName:"outputArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveFlowOutputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFlowOutputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveFlowOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveFlowOutputInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.OutputArn == nil { + invalidParams.Add(request.NewErrParamRequired("OutputArn")) + } + if s.OutputArn != nil && len(*s.OutputArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OutputArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RemoveFlowOutputInput) SetFlowArn(v string) *RemoveFlowOutputInput { + s.FlowArn = &v + return s +} + +// SetOutputArn sets the OutputArn field's value. +func (s *RemoveFlowOutputInput) SetOutputArn(v string) *RemoveFlowOutputInput { + s.OutputArn = &v + return s +} + +// The result of a successful RemoveFlowOutput request including the flow ARN +// and the output ARN that was removed. +type RemoveFlowOutputOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that is associated with the output you removed. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The ARN of the output that was removed. + OutputArn *string `locationName:"outputArn" type:"string"` +} + +// String returns the string representation +func (s RemoveFlowOutputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFlowOutputOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RemoveFlowOutputOutput) SetFlowArn(v string) *RemoveFlowOutputOutput { + s.FlowArn = &v + return s +} + +// SetOutputArn sets the OutputArn field's value. +func (s *RemoveFlowOutputOutput) SetOutputArn(v string) *RemoveFlowOutputOutput { + s.OutputArn = &v + return s +} + +type RevokeFlowEntitlementInput struct { + _ struct{} `type:"structure"` + + // EntitlementArn is a required field + EntitlementArn *string `location:"uri" locationName:"entitlementArn" type:"string" required:"true"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s RevokeFlowEntitlementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeFlowEntitlementInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeFlowEntitlementInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeFlowEntitlementInput"} + if s.EntitlementArn == nil { + invalidParams.Add(request.NewErrParamRequired("EntitlementArn")) + } + if s.EntitlementArn != nil && len(*s.EntitlementArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntitlementArn", 1)) + } + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *RevokeFlowEntitlementInput) SetEntitlementArn(v string) *RevokeFlowEntitlementInput { + s.EntitlementArn = &v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RevokeFlowEntitlementInput) SetFlowArn(v string) *RevokeFlowEntitlementInput { + s.FlowArn = &v + return s +} + +// The result of a successful RevokeFlowEntitlement request. The response includes +// the ARN of the flow that was updated and the ARN of the entitlement that +// was revoked. +type RevokeFlowEntitlementOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the entitlement that was revoked. + EntitlementArn *string `locationName:"entitlementArn" type:"string"` + + // The ARN of the flow that the entitlement was revoked from. + FlowArn *string `locationName:"flowArn" type:"string"` +} + +// String returns the string representation +func (s RevokeFlowEntitlementOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeFlowEntitlementOutput) GoString() string { + return s.String() +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *RevokeFlowEntitlementOutput) SetEntitlementArn(v string) *RevokeFlowEntitlementOutput { + s.EntitlementArn = &v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *RevokeFlowEntitlementOutput) SetFlowArn(v string) *RevokeFlowEntitlementOutput { + s.FlowArn = &v + return s +} + +// The settings for the source of the flow. +type SetSourceRequest struct { + _ struct{} `type:"structure"` + + // The type of encryption that is used on the content ingested from this source. + Decryption *Encryption `locationName:"decryption" type:"structure"` + + // A description for the source. This value is not used or seen outside of the + // current AWS Elemental MediaConnect account. + Description *string `locationName:"description" type:"string"` + + // The ARN of the entitlement that allows you to subscribe to this flow. The + // entitlement is set by the flow originator, and the ARN is generated as part + // of the originator's flow. + EntitlementArn *string `locationName:"entitlementArn" type:"string"` + + // The port that the flow will be listening on for incoming content. + IngestPort *int64 `locationName:"ingestPort" type:"integer"` + + // The smoothing max bitrate for RTP and RTP-FEC streams. + MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` + + // The maximum latency in milliseconds for Zixi-based streams. + MaxLatency *int64 `locationName:"maxLatency" type:"integer"` + + // The name of the source. + Name *string `locationName:"name" type:"string"` + + // The protocol that is used by the source. + Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` + + // The stream ID that you want to use for this transport. This parameter applies + // only to Zixi-based streams. + StreamId *string `locationName:"streamId" type:"string"` + + // The range of IP addresses that should be allowed to contribute content to + // your source. These IP addresses should in the form of a Classless Inter-Domain + // Routing (CIDR) block; for example, 10.0.0.0/16. + WhitelistCidr *string `locationName:"whitelistCidr" type:"string"` +} + +// String returns the string representation +func (s SetSourceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetSourceRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SetSourceRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SetSourceRequest"} + if s.Decryption != nil { + if err := s.Decryption.Validate(); err != nil { + invalidParams.AddNested("Decryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDecryption sets the Decryption field's value. +func (s *SetSourceRequest) SetDecryption(v *Encryption) *SetSourceRequest { + s.Decryption = v + return s +} + +// SetDescription sets the Description field's value. +func (s *SetSourceRequest) SetDescription(v string) *SetSourceRequest { + s.Description = &v + return s +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *SetSourceRequest) SetEntitlementArn(v string) *SetSourceRequest { + s.EntitlementArn = &v + return s +} + +// SetIngestPort sets the IngestPort field's value. +func (s *SetSourceRequest) SetIngestPort(v int64) *SetSourceRequest { + s.IngestPort = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *SetSourceRequest) SetMaxBitrate(v int64) *SetSourceRequest { + s.MaxBitrate = &v + return s +} + +// SetMaxLatency sets the MaxLatency field's value. +func (s *SetSourceRequest) SetMaxLatency(v int64) *SetSourceRequest { + s.MaxLatency = &v + return s +} + +// SetName sets the Name field's value. +func (s *SetSourceRequest) SetName(v string) *SetSourceRequest { + s.Name = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *SetSourceRequest) SetProtocol(v string) *SetSourceRequest { + s.Protocol = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *SetSourceRequest) SetStreamId(v string) *SetSourceRequest { + s.StreamId = &v + return s +} + +// SetWhitelistCidr sets the WhitelistCidr field's value. +func (s *SetSourceRequest) SetWhitelistCidr(v string) *SetSourceRequest { + s.WhitelistCidr = &v + return s +} + +// The settings for the source of the flow. +type Source struct { + _ struct{} `type:"structure"` + + // The type of encryption that is used on the content ingested from this source. + Decryption *Encryption `locationName:"decryption" type:"structure"` + + // A description for the source. This value is not used or seen outside of the + // current AWS Elemental MediaConnect account. + Description *string `locationName:"description" type:"string"` + + // The ARN of the entitlement that allows you to subscribe to content that comes + // from another AWS account. The entitlement is set by the content originator + // and the ARN is generated as part of the originator's flow. + EntitlementArn *string `locationName:"entitlementArn" type:"string"` + + // The IP address that the flow will be listening on for incoming content. + IngestIp *string `locationName:"ingestIp" type:"string"` + + // The port that the flow will be listening on for incoming content. + IngestPort *int64 `locationName:"ingestPort" type:"integer"` + + // The name of the source. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The ARN of the source. + // + // SourceArn is a required field + SourceArn *string `locationName:"sourceArn" type:"string" required:"true"` + + // Attributes related to the transport stream that are used in the source. + Transport *Transport `locationName:"transport" type:"structure"` + + // The range of IP addresses that should be allowed to contribute content to + // your source. These IP addresses should in the form of a Classless Inter-Domain + // Routing (CIDR) block; for example, 10.0.0.0/16. + WhitelistCidr *string `locationName:"whitelistCidr" type:"string"` +} + +// String returns the string representation +func (s Source) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Source) GoString() string { + return s.String() +} + +// SetDecryption sets the Decryption field's value. +func (s *Source) SetDecryption(v *Encryption) *Source { + s.Decryption = v + return s +} + +// SetDescription sets the Description field's value. +func (s *Source) SetDescription(v string) *Source { + s.Description = &v + return s +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *Source) SetEntitlementArn(v string) *Source { + s.EntitlementArn = &v + return s +} + +// SetIngestIp sets the IngestIp field's value. +func (s *Source) SetIngestIp(v string) *Source { + s.IngestIp = &v + return s +} + +// SetIngestPort sets the IngestPort field's value. +func (s *Source) SetIngestPort(v int64) *Source { + s.IngestPort = &v + return s +} + +// SetName sets the Name field's value. +func (s *Source) SetName(v string) *Source { + s.Name = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *Source) SetSourceArn(v string) *Source { + s.SourceArn = &v + return s +} + +// SetTransport sets the Transport field's value. +func (s *Source) SetTransport(v *Transport) *Source { + s.Transport = v + return s +} + +// SetWhitelistCidr sets the WhitelistCidr field's value. +func (s *Source) SetWhitelistCidr(v string) *Source { + s.WhitelistCidr = &v + return s +} + +type StartFlowInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartFlowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartFlowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartFlowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartFlowInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *StartFlowInput) SetFlowArn(v string) *StartFlowInput { + s.FlowArn = &v + return s +} + +// The result of a successful StartFlow request. +type StartFlowOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that you started. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The status of the flow when the StartFlow process begins. + Status *string `locationName:"status" type:"string" enum:"Status"` +} + +// String returns the string representation +func (s StartFlowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartFlowOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *StartFlowOutput) SetFlowArn(v string) *StartFlowOutput { + s.FlowArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *StartFlowOutput) SetStatus(v string) *StartFlowOutput { + s.Status = &v + return s +} + +type StopFlowInput struct { + _ struct{} `type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopFlowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopFlowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopFlowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopFlowInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFlowArn sets the FlowArn field's value. +func (s *StopFlowInput) SetFlowArn(v string) *StopFlowInput { + s.FlowArn = &v + return s +} + +// The result of a successful StopFlow request. +type StopFlowOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that you stopped. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The status of the flow when the StopFlow process begins. + Status *string `locationName:"status" type:"string" enum:"Status"` +} + +// String returns the string representation +func (s StopFlowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopFlowOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *StopFlowOutput) SetFlowArn(v string) *StopFlowOutput { + s.FlowArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *StopFlowOutput) SetStatus(v string) *StopFlowOutput { + s.Status = &v + return s +} + +// The tags to add to the resource. Tag keys can have a maximum character length +// of 128 characters, and tag values can have a maximum length of 256 characters. +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // A map from tag keys to values. Tag keys can have a maximum character length + // of 128 characters, and tag values can have a maximum length of 256 characters. + // + // Tags is a required field + Tags map[string]*string `locationName:"tags" type:"map" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// Attributes related to the transport stream that are used in a source or output. +type Transport struct { + _ struct{} `type:"structure"` + + // The smoothing max bitrate for RTP and RTP-FEC streams. + MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` + + // The maximum latency in milliseconds for Zixi-based streams. + MaxLatency *int64 `locationName:"maxLatency" type:"integer"` + + // The protocol that is used by the source or output. + // + // Protocol is a required field + Protocol *string `locationName:"protocol" type:"string" required:"true" enum:"Protocol"` + + // The smoothing latency in milliseconds for RTP and RTP-FEC streams. + SmoothingLatency *int64 `locationName:"smoothingLatency" type:"integer"` + + // The stream ID that you want to use for this transport. This parameter applies + // only to Zixi-based streams. + StreamId *string `locationName:"streamId" type:"string"` +} + +// String returns the string representation +func (s Transport) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Transport) GoString() string { + return s.String() +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *Transport) SetMaxBitrate(v int64) *Transport { + s.MaxBitrate = &v + return s +} + +// SetMaxLatency sets the MaxLatency field's value. +func (s *Transport) SetMaxLatency(v int64) *Transport { + s.MaxLatency = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *Transport) SetProtocol(v string) *Transport { + s.Protocol = &v + return s +} + +// SetSmoothingLatency sets the SmoothingLatency field's value. +func (s *Transport) SetSmoothingLatency(v int64) *Transport { + s.SmoothingLatency = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *Transport) SetStreamId(v string) *Transport { + s.StreamId = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// Information about the encryption of the flow. +type UpdateEncryption struct { + _ struct{} `type:"structure"` + + // The type of algorithm that is used for the encryption (such as aes128, aes192, + // or aes256). + Algorithm *string `locationName:"algorithm" type:"string" enum:"Algorithm"` + + // The type of key that is used for the encryption. If no keyType is provided, + // the service will use the default setting (static-key). + KeyType *string `locationName:"keyType" type:"string" enum:"KeyType"` + + // The ARN of the role that you created during setup (when you set up AWS Elemental + // MediaConnect as a trusted entity). + RoleArn *string `locationName:"roleArn" type:"string"` + + // The ARN that was assigned to the secret that you created in AWS Secrets Manager + // to store the encryption key. + SecretArn *string `locationName:"secretArn" type:"string"` +} + +// String returns the string representation +func (s UpdateEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEncryption) GoString() string { + return s.String() +} + +// SetAlgorithm sets the Algorithm field's value. +func (s *UpdateEncryption) SetAlgorithm(v string) *UpdateEncryption { + s.Algorithm = &v + return s +} + +// SetKeyType sets the KeyType field's value. +func (s *UpdateEncryption) SetKeyType(v string) *UpdateEncryption { + s.KeyType = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *UpdateEncryption) SetRoleArn(v string) *UpdateEncryption { + s.RoleArn = &v + return s +} + +// SetSecretArn sets the SecretArn field's value. +func (s *UpdateEncryption) SetSecretArn(v string) *UpdateEncryption { + s.SecretArn = &v + return s +} + +// The updates that you want to make to a specific entitlement. +type UpdateFlowEntitlementInput struct { + _ struct{} `type:"structure"` + + // A description of the entitlement. This description appears only on the AWS + // Elemental MediaConnect console and will not be seen by the subscriber or + // end user. + Description *string `locationName:"description" type:"string"` + + // The type of encryption that will be used on the output associated with this + // entitlement. + Encryption *UpdateEncryption `locationName:"encryption" type:"structure"` + + // EntitlementArn is a required field + EntitlementArn *string `location:"uri" locationName:"entitlementArn" type:"string" required:"true"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // The AWS account IDs that you want to share your content with. The receiving + // accounts (subscribers) will be allowed to create their own flow using your + // content as the source. + Subscribers []*string `locationName:"subscribers" type:"list"` +} + +// String returns the string representation +func (s UpdateFlowEntitlementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowEntitlementInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFlowEntitlementInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFlowEntitlementInput"} + if s.EntitlementArn == nil { + invalidParams.Add(request.NewErrParamRequired("EntitlementArn")) + } + if s.EntitlementArn != nil && len(*s.EntitlementArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EntitlementArn", 1)) + } + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateFlowEntitlementInput) SetDescription(v string) *UpdateFlowEntitlementInput { + s.Description = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *UpdateFlowEntitlementInput) SetEncryption(v *UpdateEncryption) *UpdateFlowEntitlementInput { + s.Encryption = v + return s +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *UpdateFlowEntitlementInput) SetEntitlementArn(v string) *UpdateFlowEntitlementInput { + s.EntitlementArn = &v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowEntitlementInput) SetFlowArn(v string) *UpdateFlowEntitlementInput { + s.FlowArn = &v + return s +} + +// SetSubscribers sets the Subscribers field's value. +func (s *UpdateFlowEntitlementInput) SetSubscribers(v []*string) *UpdateFlowEntitlementInput { + s.Subscribers = v + return s +} + +// The result of a successful UpdateFlowEntitlement request. The response includes +// the ARN of the flow that was updated and the updated entitlement configuration. +type UpdateFlowEntitlementOutput struct { + _ struct{} `type:"structure"` + + // The settings for a flow entitlement. + Entitlement *Entitlement `locationName:"entitlement" type:"structure"` + + // The ARN of the flow that this entitlement was granted on. + FlowArn *string `locationName:"flowArn" type:"string"` +} + +// String returns the string representation +func (s UpdateFlowEntitlementOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowEntitlementOutput) GoString() string { + return s.String() +} + +// SetEntitlement sets the Entitlement field's value. +func (s *UpdateFlowEntitlementOutput) SetEntitlement(v *Entitlement) *UpdateFlowEntitlementOutput { + s.Entitlement = v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowEntitlementOutput) SetFlowArn(v string) *UpdateFlowEntitlementOutput { + s.FlowArn = &v + return s +} + +// The updates that you want to make to an existing output of an existing flow. +type UpdateFlowOutputInput struct { + _ struct{} `type:"structure"` + + // A description of the output. This description appears only on the AWS Elemental + // MediaConnect console and will not be seen by the end user. + Description *string `locationName:"description" type:"string"` + + // The IP address where you want to send the output. + Destination *string `locationName:"destination" type:"string"` + + // The type of key used for the encryption. If no keyType is provided, the service + // will use the default setting (static-key). + Encryption *UpdateEncryption `locationName:"encryption" type:"structure"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // The maximum latency in milliseconds for Zixi-based streams. + MaxLatency *int64 `locationName:"maxLatency" type:"integer"` + + // OutputArn is a required field + OutputArn *string `location:"uri" locationName:"outputArn" type:"string" required:"true"` + + // The port to use when content is distributed to this output. + Port *int64 `locationName:"port" type:"integer"` + + // The protocol to use for the output. + Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` + + // The smoothing latency in milliseconds for RTP and RTP-FEC streams. + SmoothingLatency *int64 `locationName:"smoothingLatency" type:"integer"` + + // The stream ID that you want to use for this transport. This parameter applies + // only to Zixi-based streams. + StreamId *string `locationName:"streamId" type:"string"` +} + +// String returns the string representation +func (s UpdateFlowOutputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowOutputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFlowOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFlowOutputInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.OutputArn == nil { + invalidParams.Add(request.NewErrParamRequired("OutputArn")) + } + if s.OutputArn != nil && len(*s.OutputArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OutputArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateFlowOutputInput) SetDescription(v string) *UpdateFlowOutputInput { + s.Description = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *UpdateFlowOutputInput) SetDestination(v string) *UpdateFlowOutputInput { + s.Destination = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *UpdateFlowOutputInput) SetEncryption(v *UpdateEncryption) *UpdateFlowOutputInput { + s.Encryption = v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowOutputInput) SetFlowArn(v string) *UpdateFlowOutputInput { + s.FlowArn = &v + return s +} + +// SetMaxLatency sets the MaxLatency field's value. +func (s *UpdateFlowOutputInput) SetMaxLatency(v int64) *UpdateFlowOutputInput { + s.MaxLatency = &v + return s +} + +// SetOutputArn sets the OutputArn field's value. +func (s *UpdateFlowOutputInput) SetOutputArn(v string) *UpdateFlowOutputInput { + s.OutputArn = &v + return s +} + +// SetPort sets the Port field's value. +func (s *UpdateFlowOutputInput) SetPort(v int64) *UpdateFlowOutputInput { + s.Port = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *UpdateFlowOutputInput) SetProtocol(v string) *UpdateFlowOutputInput { + s.Protocol = &v + return s +} + +// SetSmoothingLatency sets the SmoothingLatency field's value. +func (s *UpdateFlowOutputInput) SetSmoothingLatency(v int64) *UpdateFlowOutputInput { + s.SmoothingLatency = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *UpdateFlowOutputInput) SetStreamId(v string) *UpdateFlowOutputInput { + s.StreamId = &v + return s +} + +// The result of a successful UpdateFlowOutput request including the flow ARN +// and the updated output. +type UpdateFlowOutputOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that is associated with the updated output. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The settings for an output. + Output *Output `locationName:"output" type:"structure"` +} + +// String returns the string representation +func (s UpdateFlowOutputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowOutputOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowOutputOutput) SetFlowArn(v string) *UpdateFlowOutputOutput { + s.FlowArn = &v + return s +} + +// SetOutput sets the Output field's value. +func (s *UpdateFlowOutputOutput) SetOutput(v *Output) *UpdateFlowOutputOutput { + s.Output = v + return s +} + +// The settings for the updated source of the flow. +type UpdateFlowSourceInput struct { + _ struct{} `type:"structure"` + + // The type of encryption used on the content ingested from this source. + Decryption *UpdateEncryption `locationName:"decryption" type:"structure"` + + // A description for the source. This value is not used or seen outside of the + // current AWS Elemental MediaConnect account. + Description *string `locationName:"description" type:"string"` + + // The ARN of the entitlement that allows you to subscribe to this flow. The + // entitlement is set by the flow originator, and the ARN is generated as part + // of the originator's flow. + EntitlementArn *string `locationName:"entitlementArn" type:"string"` + + // FlowArn is a required field + FlowArn *string `location:"uri" locationName:"flowArn" type:"string" required:"true"` + + // The port that the flow will be listening on for incoming content. + IngestPort *int64 `locationName:"ingestPort" type:"integer"` + + // The smoothing max bitrate for RTP and RTP-FEC streams. + MaxBitrate *int64 `locationName:"maxBitrate" type:"integer"` + + // The maximum latency in milliseconds for Zixi-based streams. + MaxLatency *int64 `locationName:"maxLatency" type:"integer"` + + // The protocol that is used by the source. + Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` + + // SourceArn is a required field + SourceArn *string `location:"uri" locationName:"sourceArn" type:"string" required:"true"` + + // The stream ID that you want to use for this transport. This parameter applies + // only to Zixi-based streams. + StreamId *string `locationName:"streamId" type:"string"` + + // The range of IP addresses that should be allowed to contribute content to + // your source. These IP addresses should in the form of a Classless Inter-Domain + // Routing (CIDR) block; for example, 10.0.0.0/16. + WhitelistCidr *string `locationName:"whitelistCidr" type:"string"` +} + +// String returns the string representation +func (s UpdateFlowSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFlowSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFlowSourceInput"} + if s.FlowArn == nil { + invalidParams.Add(request.NewErrParamRequired("FlowArn")) + } + if s.FlowArn != nil && len(*s.FlowArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FlowArn", 1)) + } + if s.SourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("SourceArn")) + } + if s.SourceArn != nil && len(*s.SourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDecryption sets the Decryption field's value. +func (s *UpdateFlowSourceInput) SetDecryption(v *UpdateEncryption) *UpdateFlowSourceInput { + s.Decryption = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateFlowSourceInput) SetDescription(v string) *UpdateFlowSourceInput { + s.Description = &v + return s +} + +// SetEntitlementArn sets the EntitlementArn field's value. +func (s *UpdateFlowSourceInput) SetEntitlementArn(v string) *UpdateFlowSourceInput { + s.EntitlementArn = &v + return s +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowSourceInput) SetFlowArn(v string) *UpdateFlowSourceInput { + s.FlowArn = &v + return s +} + +// SetIngestPort sets the IngestPort field's value. +func (s *UpdateFlowSourceInput) SetIngestPort(v int64) *UpdateFlowSourceInput { + s.IngestPort = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *UpdateFlowSourceInput) SetMaxBitrate(v int64) *UpdateFlowSourceInput { + s.MaxBitrate = &v + return s +} + +// SetMaxLatency sets the MaxLatency field's value. +func (s *UpdateFlowSourceInput) SetMaxLatency(v int64) *UpdateFlowSourceInput { + s.MaxLatency = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *UpdateFlowSourceInput) SetProtocol(v string) *UpdateFlowSourceInput { + s.Protocol = &v + return s +} + +// SetSourceArn sets the SourceArn field's value. +func (s *UpdateFlowSourceInput) SetSourceArn(v string) *UpdateFlowSourceInput { + s.SourceArn = &v + return s +} + +// SetStreamId sets the StreamId field's value. +func (s *UpdateFlowSourceInput) SetStreamId(v string) *UpdateFlowSourceInput { + s.StreamId = &v + return s +} + +// SetWhitelistCidr sets the WhitelistCidr field's value. +func (s *UpdateFlowSourceInput) SetWhitelistCidr(v string) *UpdateFlowSourceInput { + s.WhitelistCidr = &v + return s +} + +// The result of a successful UpdateFlowSource request. The response includes +// the ARN of the flow that was updated and the updated source configuration. +type UpdateFlowSourceOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the flow that you want to update. + FlowArn *string `locationName:"flowArn" type:"string"` + + // The settings for the source of the flow. + Source *Source `locationName:"source" type:"structure"` +} + +// String returns the string representation +func (s UpdateFlowSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFlowSourceOutput) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *UpdateFlowSourceOutput) SetFlowArn(v string) *UpdateFlowSourceOutput { + s.FlowArn = &v + return s +} + +// SetSource sets the Source field's value. +func (s *UpdateFlowSourceOutput) SetSource(v *Source) *UpdateFlowSourceOutput { + s.Source = v + return s +} + +const ( + // AlgorithmAes128 is a Algorithm enum value + AlgorithmAes128 = "aes128" + + // AlgorithmAes192 is a Algorithm enum value + AlgorithmAes192 = "aes192" + + // AlgorithmAes256 is a Algorithm enum value + AlgorithmAes256 = "aes256" +) + +const ( + // KeyTypeStaticKey is a KeyType enum value + KeyTypeStaticKey = "static-key" +) + +const ( + // ProtocolZixiPush is a Protocol enum value + ProtocolZixiPush = "zixi-push" + + // ProtocolRtpFec is a Protocol enum value + ProtocolRtpFec = "rtp-fec" + + // ProtocolRtp is a Protocol enum value + ProtocolRtp = "rtp" +) + +const ( + // SourceTypeOwned is a SourceType enum value + SourceTypeOwned = "OWNED" + + // SourceTypeEntitled is a SourceType enum value + SourceTypeEntitled = "ENTITLED" +) + +const ( + // StatusStandby is a Status enum value + StatusStandby = "STANDBY" + + // StatusActive is a Status enum value + StatusActive = "ACTIVE" + + // StatusUpdating is a Status enum value + StatusUpdating = "UPDATING" + + // StatusDeleting is a Status enum value + StatusDeleting = "DELETING" + + // StatusStarting is a Status enum value + StatusStarting = "STARTING" + + // StatusStopping is a Status enum value + StatusStopping = "STOPPING" + + // StatusError is a Status enum value + StatusError = "ERROR" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go new file mode 100644 index 000000000..95de09e77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package mediaconnect provides the client and types for making API +// requests to AWS MediaConnect. +// +// API for AWS Elemental MediaConnect +// +// See https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14 for more information on this service. +// +// See mediaconnect package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconnect/ +// +// Using the Client +// +// To contact AWS MediaConnect with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS MediaConnect client MediaConnect for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconnect/#New +package mediaconnect diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go new file mode 100644 index 000000000..c6f36c1e5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/errors.go @@ -0,0 +1,78 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediaconnect + +const ( + + // ErrCodeAddFlowOutputs420Exception for service response error code + // "AddFlowOutputs420Exception". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeAddFlowOutputs420Exception = "AddFlowOutputs420Exception" + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeCreateFlow420Exception for service response error code + // "CreateFlow420Exception". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeCreateFlow420Exception = "CreateFlow420Exception" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeGrantFlowEntitlements420Exception for service response error code + // "GrantFlowEntitlements420Exception". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeGrantFlowEntitlements420Exception = "GrantFlowEntitlements420Exception" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // Exception raised by AWS Elemental MediaConnect. See the error message and + // documentation for the operation for more information on the cause of this + // exception. + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go new file mode 100644 index 000000000..4cafa7df3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconnect/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediaconnect + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// MediaConnect provides the API operation methods for making requests to +// AWS MediaConnect. See this package's package overview docs +// for details on the service. +// +// MediaConnect methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type MediaConnect struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "MediaConnect" // Name of service. + EndpointsID = "mediaconnect" // ID to lookup a service endpoint with. + ServiceID = "MediaConnect" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the MediaConnect client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a MediaConnect client from just a session. +// svc := mediaconnect.New(mySession) +// +// // Create a MediaConnect client with additional configuration +// svc := mediaconnect.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaConnect { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediaconnect" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaConnect { + svc := &MediaConnect{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-11-14", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a MediaConnect operation and runs any +// custom request initialization. +func (c *MediaConnect) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go new file mode 100644 index 000000000..34ec0e7d9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/api.go @@ -0,0 +1,19194 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediaconvert + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opAssociateCertificate = "AssociateCertificate" + +// AssociateCertificateRequest generates a "aws/request.Request" representing the +// client's request for the AssociateCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateCertificate for more information on using the AssociateCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateCertificateRequest method. +// req, resp := client.AssociateCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AssociateCertificate +func (c *MediaConvert) AssociateCertificateRequest(input *AssociateCertificateInput) (req *request.Request, output *AssociateCertificateOutput) { + op := &request.Operation{ + Name: opAssociateCertificate, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/certificates", + } + + if input == nil { + input = &AssociateCertificateInput{} + } + + output = &AssociateCertificateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateCertificate API operation for AWS Elemental MediaConvert. +// +// Associates an AWS Certificate Manager (ACM) Amazon Resource Name (ARN) with +// AWS Elemental MediaConvert. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation AssociateCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AssociateCertificate +func (c *MediaConvert) AssociateCertificate(input *AssociateCertificateInput) (*AssociateCertificateOutput, error) { + req, out := c.AssociateCertificateRequest(input) + return out, req.Send() +} + +// AssociateCertificateWithContext is the same as AssociateCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) AssociateCertificateWithContext(ctx aws.Context, input *AssociateCertificateInput, opts ...request.Option) (*AssociateCertificateOutput, error) { + req, out := c.AssociateCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelJob = "CancelJob" + +// CancelJobRequest generates a "aws/request.Request" representing the +// client's request for the CancelJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CancelJob for more information on using the CancelJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CancelJobRequest method. +// req, resp := client.CancelJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CancelJob +func (c *MediaConvert) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput) { + op := &request.Operation{ + Name: opCancelJob, + HTTPMethod: "DELETE", + HTTPPath: "/2017-08-29/jobs/{id}", + } + + if input == nil { + input = &CancelJobInput{} + } + + output = &CancelJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// CancelJob API operation for AWS Elemental MediaConvert. +// +// Permanently remove a job from a queue. Once you have canceled a job, you +// can't start it again. You can't delete a running job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation CancelJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CancelJob +func (c *MediaConvert) CancelJob(input *CancelJobInput) (*CancelJobOutput, error) { + req, out := c.CancelJobRequest(input) + return out, req.Send() +} + +// CancelJobWithContext is the same as CancelJob with the addition of +// the ability to pass a context and additional request options. +// +// See CancelJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error) { + req, out := c.CancelJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateJob = "CreateJob" + +// CreateJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateJob for more information on using the CreateJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateJobRequest method. +// req, resp := client.CreateJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJob +func (c *MediaConvert) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput) { + op := &request.Operation{ + Name: opCreateJob, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/jobs", + } + + if input == nil { + input = &CreateJobInput{} + } + + output = &CreateJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateJob API operation for AWS Elemental MediaConvert. +// +// Create a new transcoding job. For information about jobs and job settings, +// see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation CreateJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJob +func (c *MediaConvert) CreateJob(input *CreateJobInput) (*CreateJobOutput, error) { + req, out := c.CreateJobRequest(input) + return out, req.Send() +} + +// CreateJobWithContext is the same as CreateJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobOutput, error) { + req, out := c.CreateJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateJobTemplate = "CreateJobTemplate" + +// CreateJobTemplateRequest generates a "aws/request.Request" representing the +// client's request for the CreateJobTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateJobTemplate for more information on using the CreateJobTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateJobTemplateRequest method. +// req, resp := client.CreateJobTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobTemplate +func (c *MediaConvert) CreateJobTemplateRequest(input *CreateJobTemplateInput) (req *request.Request, output *CreateJobTemplateOutput) { + op := &request.Operation{ + Name: opCreateJobTemplate, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/jobTemplates", + } + + if input == nil { + input = &CreateJobTemplateInput{} + } + + output = &CreateJobTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateJobTemplate API operation for AWS Elemental MediaConvert. +// +// Create a new job template. For information about job templates see the User +// Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation CreateJobTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobTemplate +func (c *MediaConvert) CreateJobTemplate(input *CreateJobTemplateInput) (*CreateJobTemplateOutput, error) { + req, out := c.CreateJobTemplateRequest(input) + return out, req.Send() +} + +// CreateJobTemplateWithContext is the same as CreateJobTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See CreateJobTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) CreateJobTemplateWithContext(ctx aws.Context, input *CreateJobTemplateInput, opts ...request.Option) (*CreateJobTemplateOutput, error) { + req, out := c.CreateJobTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePreset = "CreatePreset" + +// CreatePresetRequest generates a "aws/request.Request" representing the +// client's request for the CreatePreset operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePreset for more information on using the CreatePreset +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePresetRequest method. +// req, resp := client.CreatePresetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreatePreset +func (c *MediaConvert) CreatePresetRequest(input *CreatePresetInput) (req *request.Request, output *CreatePresetOutput) { + op := &request.Operation{ + Name: opCreatePreset, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/presets", + } + + if input == nil { + input = &CreatePresetInput{} + } + + output = &CreatePresetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePreset API operation for AWS Elemental MediaConvert. +// +// Create a new preset. For information about job templates see the User Guide +// at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation CreatePreset for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreatePreset +func (c *MediaConvert) CreatePreset(input *CreatePresetInput) (*CreatePresetOutput, error) { + req, out := c.CreatePresetRequest(input) + return out, req.Send() +} + +// CreatePresetWithContext is the same as CreatePreset with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePreset for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) CreatePresetWithContext(ctx aws.Context, input *CreatePresetInput, opts ...request.Option) (*CreatePresetOutput, error) { + req, out := c.CreatePresetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateQueue = "CreateQueue" + +// CreateQueueRequest generates a "aws/request.Request" representing the +// client's request for the CreateQueue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateQueue for more information on using the CreateQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateQueueRequest method. +// req, resp := client.CreateQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateQueue +func (c *MediaConvert) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, output *CreateQueueOutput) { + op := &request.Operation{ + Name: opCreateQueue, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/queues", + } + + if input == nil { + input = &CreateQueueInput{} + } + + output = &CreateQueueOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateQueue API operation for AWS Elemental MediaConvert. +// +// Create a new transcoding queue. For information about queues, see Working +// With Queues in the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation CreateQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateQueue +func (c *MediaConvert) CreateQueue(input *CreateQueueInput) (*CreateQueueOutput, error) { + req, out := c.CreateQueueRequest(input) + return out, req.Send() +} + +// CreateQueueWithContext is the same as CreateQueue with the addition of +// the ability to pass a context and additional request options. +// +// See CreateQueue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) CreateQueueWithContext(ctx aws.Context, input *CreateQueueInput, opts ...request.Option) (*CreateQueueOutput, error) { + req, out := c.CreateQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteJobTemplate = "DeleteJobTemplate" + +// DeleteJobTemplateRequest generates a "aws/request.Request" representing the +// client's request for the DeleteJobTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteJobTemplate for more information on using the DeleteJobTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteJobTemplateRequest method. +// req, resp := client.DeleteJobTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplate +func (c *MediaConvert) DeleteJobTemplateRequest(input *DeleteJobTemplateInput) (req *request.Request, output *DeleteJobTemplateOutput) { + op := &request.Operation{ + Name: opDeleteJobTemplate, + HTTPMethod: "DELETE", + HTTPPath: "/2017-08-29/jobTemplates/{name}", + } + + if input == nil { + input = &DeleteJobTemplateInput{} + } + + output = &DeleteJobTemplateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteJobTemplate API operation for AWS Elemental MediaConvert. +// +// Permanently delete a job template you have created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation DeleteJobTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplate +func (c *MediaConvert) DeleteJobTemplate(input *DeleteJobTemplateInput) (*DeleteJobTemplateOutput, error) { + req, out := c.DeleteJobTemplateRequest(input) + return out, req.Send() +} + +// DeleteJobTemplateWithContext is the same as DeleteJobTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteJobTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DeleteJobTemplateWithContext(ctx aws.Context, input *DeleteJobTemplateInput, opts ...request.Option) (*DeleteJobTemplateOutput, error) { + req, out := c.DeleteJobTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeletePreset = "DeletePreset" + +// DeletePresetRequest generates a "aws/request.Request" representing the +// client's request for the DeletePreset operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePreset for more information on using the DeletePreset +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePresetRequest method. +// req, resp := client.DeletePresetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeletePreset +func (c *MediaConvert) DeletePresetRequest(input *DeletePresetInput) (req *request.Request, output *DeletePresetOutput) { + op := &request.Operation{ + Name: opDeletePreset, + HTTPMethod: "DELETE", + HTTPPath: "/2017-08-29/presets/{name}", + } + + if input == nil { + input = &DeletePresetInput{} + } + + output = &DeletePresetOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePreset API operation for AWS Elemental MediaConvert. +// +// Permanently delete a preset you have created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation DeletePreset for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeletePreset +func (c *MediaConvert) DeletePreset(input *DeletePresetInput) (*DeletePresetOutput, error) { + req, out := c.DeletePresetRequest(input) + return out, req.Send() +} + +// DeletePresetWithContext is the same as DeletePreset with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePreset for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DeletePresetWithContext(ctx aws.Context, input *DeletePresetInput, opts ...request.Option) (*DeletePresetOutput, error) { + req, out := c.DeletePresetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteQueue = "DeleteQueue" + +// DeleteQueueRequest generates a "aws/request.Request" representing the +// client's request for the DeleteQueue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteQueue for more information on using the DeleteQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteQueueRequest method. +// req, resp := client.DeleteQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueue +func (c *MediaConvert) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, output *DeleteQueueOutput) { + op := &request.Operation{ + Name: opDeleteQueue, + HTTPMethod: "DELETE", + HTTPPath: "/2017-08-29/queues/{name}", + } + + if input == nil { + input = &DeleteQueueInput{} + } + + output = &DeleteQueueOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteQueue API operation for AWS Elemental MediaConvert. +// +// Permanently delete a queue you have created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation DeleteQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueue +func (c *MediaConvert) DeleteQueue(input *DeleteQueueInput) (*DeleteQueueOutput, error) { + req, out := c.DeleteQueueRequest(input) + return out, req.Send() +} + +// DeleteQueueWithContext is the same as DeleteQueue with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteQueue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DeleteQueueWithContext(ctx aws.Context, input *DeleteQueueInput, opts ...request.Option) (*DeleteQueueOutput, error) { + req, out := c.DeleteQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEndpoints = "DescribeEndpoints" + +// DescribeEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEndpoints for more information on using the DescribeEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEndpointsRequest method. +// req, resp := client.DescribeEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DescribeEndpoints +func (c *MediaConvert) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeEndpoints, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/endpoints", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeEndpointsInput{} + } + + output = &DescribeEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpoints API operation for AWS Elemental MediaConvert. +// +// Send an request with an empty body to the regional API endpoint to get your +// account API endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation DescribeEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DescribeEndpoints +func (c *MediaConvert) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + return out, req.Send() +} + +// DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error) { + req, out := c.DescribeEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeEndpointsPages iterates over the pages of a DescribeEndpoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeEndpoints method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeEndpoints operation. +// pageNum := 0 +// err := client.DescribeEndpointsPages(params, +// func(page *DescribeEndpointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) DescribeEndpointsPages(input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool) error { + return c.DescribeEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeEndpointsPagesWithContext same as DescribeEndpointsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DescribeEndpointsPagesWithContext(ctx aws.Context, input *DescribeEndpointsInput, fn func(*DescribeEndpointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeEndpointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEndpointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeEndpointsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDisassociateCertificate = "DisassociateCertificate" + +// DisassociateCertificateRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateCertificate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateCertificate for more information on using the DisassociateCertificate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateCertificateRequest method. +// req, resp := client.DisassociateCertificateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DisassociateCertificate +func (c *MediaConvert) DisassociateCertificateRequest(input *DisassociateCertificateInput) (req *request.Request, output *DisassociateCertificateOutput) { + op := &request.Operation{ + Name: opDisassociateCertificate, + HTTPMethod: "DELETE", + HTTPPath: "/2017-08-29/certificates/{arn}", + } + + if input == nil { + input = &DisassociateCertificateInput{} + } + + output = &DisassociateCertificateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateCertificate API operation for AWS Elemental MediaConvert. +// +// Removes an association between the Amazon Resource Name (ARN) of an AWS Certificate +// Manager (ACM) certificate and an AWS Elemental MediaConvert resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation DisassociateCertificate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DisassociateCertificate +func (c *MediaConvert) DisassociateCertificate(input *DisassociateCertificateInput) (*DisassociateCertificateOutput, error) { + req, out := c.DisassociateCertificateRequest(input) + return out, req.Send() +} + +// DisassociateCertificateWithContext is the same as DisassociateCertificate with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateCertificate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) DisassociateCertificateWithContext(ctx aws.Context, input *DisassociateCertificateInput, opts ...request.Option) (*DisassociateCertificateOutput, error) { + req, out := c.DisassociateCertificateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetJob = "GetJob" + +// GetJobRequest generates a "aws/request.Request" representing the +// client's request for the GetJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetJob for more information on using the GetJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetJobRequest method. +// req, resp := client.GetJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJob +func (c *MediaConvert) GetJobRequest(input *GetJobInput) (req *request.Request, output *GetJobOutput) { + op := &request.Operation{ + Name: opGetJob, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/jobs/{id}", + } + + if input == nil { + input = &GetJobInput{} + } + + output = &GetJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetJob API operation for AWS Elemental MediaConvert. +// +// Retrieve the JSON for a specific completed transcoding job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation GetJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJob +func (c *MediaConvert) GetJob(input *GetJobInput) (*GetJobOutput, error) { + req, out := c.GetJobRequest(input) + return out, req.Send() +} + +// GetJobWithContext is the same as GetJob with the addition of +// the ability to pass a context and additional request options. +// +// See GetJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) GetJobWithContext(ctx aws.Context, input *GetJobInput, opts ...request.Option) (*GetJobOutput, error) { + req, out := c.GetJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetJobTemplate = "GetJobTemplate" + +// GetJobTemplateRequest generates a "aws/request.Request" representing the +// client's request for the GetJobTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetJobTemplate for more information on using the GetJobTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetJobTemplateRequest method. +// req, resp := client.GetJobTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplate +func (c *MediaConvert) GetJobTemplateRequest(input *GetJobTemplateInput) (req *request.Request, output *GetJobTemplateOutput) { + op := &request.Operation{ + Name: opGetJobTemplate, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/jobTemplates/{name}", + } + + if input == nil { + input = &GetJobTemplateInput{} + } + + output = &GetJobTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetJobTemplate API operation for AWS Elemental MediaConvert. +// +// Retrieve the JSON for a specific job template. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation GetJobTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplate +func (c *MediaConvert) GetJobTemplate(input *GetJobTemplateInput) (*GetJobTemplateOutput, error) { + req, out := c.GetJobTemplateRequest(input) + return out, req.Send() +} + +// GetJobTemplateWithContext is the same as GetJobTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See GetJobTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) GetJobTemplateWithContext(ctx aws.Context, input *GetJobTemplateInput, opts ...request.Option) (*GetJobTemplateOutput, error) { + req, out := c.GetJobTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPreset = "GetPreset" + +// GetPresetRequest generates a "aws/request.Request" representing the +// client's request for the GetPreset operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetPreset for more information on using the GetPreset +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetPresetRequest method. +// req, resp := client.GetPresetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPreset +func (c *MediaConvert) GetPresetRequest(input *GetPresetInput) (req *request.Request, output *GetPresetOutput) { + op := &request.Operation{ + Name: opGetPreset, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/presets/{name}", + } + + if input == nil { + input = &GetPresetInput{} + } + + output = &GetPresetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPreset API operation for AWS Elemental MediaConvert. +// +// Retrieve the JSON for a specific preset. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation GetPreset for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPreset +func (c *MediaConvert) GetPreset(input *GetPresetInput) (*GetPresetOutput, error) { + req, out := c.GetPresetRequest(input) + return out, req.Send() +} + +// GetPresetWithContext is the same as GetPreset with the addition of +// the ability to pass a context and additional request options. +// +// See GetPreset for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) GetPresetWithContext(ctx aws.Context, input *GetPresetInput, opts ...request.Option) (*GetPresetOutput, error) { + req, out := c.GetPresetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetQueue = "GetQueue" + +// GetQueueRequest generates a "aws/request.Request" representing the +// client's request for the GetQueue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetQueue for more information on using the GetQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetQueueRequest method. +// req, resp := client.GetQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueue +func (c *MediaConvert) GetQueueRequest(input *GetQueueInput) (req *request.Request, output *GetQueueOutput) { + op := &request.Operation{ + Name: opGetQueue, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/queues/{name}", + } + + if input == nil { + input = &GetQueueInput{} + } + + output = &GetQueueOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetQueue API operation for AWS Elemental MediaConvert. +// +// Retrieve the JSON for a specific queue. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation GetQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueue +func (c *MediaConvert) GetQueue(input *GetQueueInput) (*GetQueueOutput, error) { + req, out := c.GetQueueRequest(input) + return out, req.Send() +} + +// GetQueueWithContext is the same as GetQueue with the addition of +// the ability to pass a context and additional request options. +// +// See GetQueue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) GetQueueWithContext(ctx aws.Context, input *GetQueueInput, opts ...request.Option) (*GetQueueOutput, error) { + req, out := c.GetQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListJobTemplates = "ListJobTemplates" + +// ListJobTemplatesRequest generates a "aws/request.Request" representing the +// client's request for the ListJobTemplates operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListJobTemplates for more information on using the ListJobTemplates +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListJobTemplatesRequest method. +// req, resp := client.ListJobTemplatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobTemplates +func (c *MediaConvert) ListJobTemplatesRequest(input *ListJobTemplatesInput) (req *request.Request, output *ListJobTemplatesOutput) { + op := &request.Operation{ + Name: opListJobTemplates, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/jobTemplates", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListJobTemplatesInput{} + } + + output = &ListJobTemplatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListJobTemplates API operation for AWS Elemental MediaConvert. +// +// Retrieve a JSON array of up to twenty of your job templates. This will return +// the templates themselves, not just a list of them. To retrieve the next twenty +// templates, use the nextToken string returned with the array +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation ListJobTemplates for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobTemplates +func (c *MediaConvert) ListJobTemplates(input *ListJobTemplatesInput) (*ListJobTemplatesOutput, error) { + req, out := c.ListJobTemplatesRequest(input) + return out, req.Send() +} + +// ListJobTemplatesWithContext is the same as ListJobTemplates with the addition of +// the ability to pass a context and additional request options. +// +// See ListJobTemplates for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListJobTemplatesWithContext(ctx aws.Context, input *ListJobTemplatesInput, opts ...request.Option) (*ListJobTemplatesOutput, error) { + req, out := c.ListJobTemplatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListJobTemplatesPages iterates over the pages of a ListJobTemplates operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListJobTemplates method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListJobTemplates operation. +// pageNum := 0 +// err := client.ListJobTemplatesPages(params, +// func(page *ListJobTemplatesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListJobTemplatesPages(input *ListJobTemplatesInput, fn func(*ListJobTemplatesOutput, bool) bool) error { + return c.ListJobTemplatesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListJobTemplatesPagesWithContext same as ListJobTemplatesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListJobTemplatesPagesWithContext(ctx aws.Context, input *ListJobTemplatesInput, fn func(*ListJobTemplatesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListJobTemplatesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListJobTemplatesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListJobTemplatesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListJobs = "ListJobs" + +// ListJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListJobs for more information on using the ListJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListJobsRequest method. +// req, resp := client.ListJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobs +func (c *MediaConvert) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput) { + op := &request.Operation{ + Name: opListJobs, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/jobs", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListJobsInput{} + } + + output = &ListJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListJobs API operation for AWS Elemental MediaConvert. +// +// Retrieve a JSON array of up to twenty of your most recently created jobs. +// This array includes in-process, completed, and errored jobs. This will return +// the jobs themselves, not just a list of the jobs. To retrieve the twenty +// next most recent jobs, use the nextToken string returned with the array. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation ListJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListJobs +func (c *MediaConvert) ListJobs(input *ListJobsInput) (*ListJobsOutput, error) { + req, out := c.ListJobsRequest(input) + return out, req.Send() +} + +// ListJobsWithContext is the same as ListJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error) { + req, out := c.ListJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListJobsPages iterates over the pages of a ListJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListJobs operation. +// pageNum := 0 +// err := client.ListJobsPages(params, +// func(page *ListJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListJobsPages(input *ListJobsInput, fn func(*ListJobsOutput, bool) bool) error { + return c.ListJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListJobsPagesWithContext same as ListJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, fn func(*ListJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPresets = "ListPresets" + +// ListPresetsRequest generates a "aws/request.Request" representing the +// client's request for the ListPresets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPresets for more information on using the ListPresets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPresetsRequest method. +// req, resp := client.ListPresetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListPresets +func (c *MediaConvert) ListPresetsRequest(input *ListPresetsInput) (req *request.Request, output *ListPresetsOutput) { + op := &request.Operation{ + Name: opListPresets, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/presets", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPresetsInput{} + } + + output = &ListPresetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPresets API operation for AWS Elemental MediaConvert. +// +// Retrieve a JSON array of up to twenty of your presets. This will return the +// presets themselves, not just a list of them. To retrieve the next twenty +// presets, use the nextToken string returned with the array. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation ListPresets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListPresets +func (c *MediaConvert) ListPresets(input *ListPresetsInput) (*ListPresetsOutput, error) { + req, out := c.ListPresetsRequest(input) + return out, req.Send() +} + +// ListPresetsWithContext is the same as ListPresets with the addition of +// the ability to pass a context and additional request options. +// +// See ListPresets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListPresetsWithContext(ctx aws.Context, input *ListPresetsInput, opts ...request.Option) (*ListPresetsOutput, error) { + req, out := c.ListPresetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPresetsPages iterates over the pages of a ListPresets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPresets method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPresets operation. +// pageNum := 0 +// err := client.ListPresetsPages(params, +// func(page *ListPresetsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListPresetsPages(input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool) error { + return c.ListPresetsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPresetsPagesWithContext same as ListPresetsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListPresetsPagesWithContext(ctx aws.Context, input *ListPresetsInput, fn func(*ListPresetsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPresetsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPresetsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPresetsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListQueues = "ListQueues" + +// ListQueuesRequest generates a "aws/request.Request" representing the +// client's request for the ListQueues operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListQueues for more information on using the ListQueues +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListQueuesRequest method. +// req, resp := client.ListQueuesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueues +func (c *MediaConvert) ListQueuesRequest(input *ListQueuesInput) (req *request.Request, output *ListQueuesOutput) { + op := &request.Operation{ + Name: opListQueues, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/queues", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListQueuesInput{} + } + + output = &ListQueuesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListQueues API operation for AWS Elemental MediaConvert. +// +// Retrieve a JSON array of up to twenty of your queues. This will return the +// queues themselves, not just a list of them. To retrieve the next twenty queues, +// use the nextToken string returned with the array. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation ListQueues for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueues +func (c *MediaConvert) ListQueues(input *ListQueuesInput) (*ListQueuesOutput, error) { + req, out := c.ListQueuesRequest(input) + return out, req.Send() +} + +// ListQueuesWithContext is the same as ListQueues with the addition of +// the ability to pass a context and additional request options. +// +// See ListQueues for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListQueuesWithContext(ctx aws.Context, input *ListQueuesInput, opts ...request.Option) (*ListQueuesOutput, error) { + req, out := c.ListQueuesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListQueuesPages iterates over the pages of a ListQueues operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListQueues method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListQueues operation. +// pageNum := 0 +// err := client.ListQueuesPages(params, +// func(page *ListQueuesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaConvert) ListQueuesPages(input *ListQueuesInput, fn func(*ListQueuesOutput, bool) bool) error { + return c.ListQueuesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListQueuesPagesWithContext same as ListQueuesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListQueuesPagesWithContext(ctx aws.Context, input *ListQueuesInput, fn func(*ListQueuesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListQueuesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListQueuesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListQueuesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListTagsForResource +func (c *MediaConvert) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/2017-08-29/tags/{arn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Elemental MediaConvert. +// +// Retrieve the tags for a MediaConvert resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListTagsForResource +func (c *MediaConvert) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TagResource +func (c *MediaConvert) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/2017-08-29/tags", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Elemental MediaConvert. +// +// Add tags to a MediaConvert queue, preset, or job template. For information +// about tagging, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/tagging-resources.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TagResource +func (c *MediaConvert) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UntagResource +func (c *MediaConvert) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "PUT", + HTTPPath: "/2017-08-29/tags/{arn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Elemental MediaConvert. +// +// Remove tags from a MediaConvert queue, preset, or job template. For information +// about tagging, see the User Guide at https://docs.aws.amazon.com/mediaconvert/latest/ug/tagging-resources.html +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UntagResource +func (c *MediaConvert) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateJobTemplate = "UpdateJobTemplate" + +// UpdateJobTemplateRequest generates a "aws/request.Request" representing the +// client's request for the UpdateJobTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateJobTemplate for more information on using the UpdateJobTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateJobTemplateRequest method. +// req, resp := client.UpdateJobTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateJobTemplate +func (c *MediaConvert) UpdateJobTemplateRequest(input *UpdateJobTemplateInput) (req *request.Request, output *UpdateJobTemplateOutput) { + op := &request.Operation{ + Name: opUpdateJobTemplate, + HTTPMethod: "PUT", + HTTPPath: "/2017-08-29/jobTemplates/{name}", + } + + if input == nil { + input = &UpdateJobTemplateInput{} + } + + output = &UpdateJobTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateJobTemplate API operation for AWS Elemental MediaConvert. +// +// Modify one of your existing job templates. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation UpdateJobTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateJobTemplate +func (c *MediaConvert) UpdateJobTemplate(input *UpdateJobTemplateInput) (*UpdateJobTemplateOutput, error) { + req, out := c.UpdateJobTemplateRequest(input) + return out, req.Send() +} + +// UpdateJobTemplateWithContext is the same as UpdateJobTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateJobTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) UpdateJobTemplateWithContext(ctx aws.Context, input *UpdateJobTemplateInput, opts ...request.Option) (*UpdateJobTemplateOutput, error) { + req, out := c.UpdateJobTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdatePreset = "UpdatePreset" + +// UpdatePresetRequest generates a "aws/request.Request" representing the +// client's request for the UpdatePreset operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdatePreset for more information on using the UpdatePreset +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdatePresetRequest method. +// req, resp := client.UpdatePresetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdatePreset +func (c *MediaConvert) UpdatePresetRequest(input *UpdatePresetInput) (req *request.Request, output *UpdatePresetOutput) { + op := &request.Operation{ + Name: opUpdatePreset, + HTTPMethod: "PUT", + HTTPPath: "/2017-08-29/presets/{name}", + } + + if input == nil { + input = &UpdatePresetInput{} + } + + output = &UpdatePresetOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdatePreset API operation for AWS Elemental MediaConvert. +// +// Modify one of your existing presets. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation UpdatePreset for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdatePreset +func (c *MediaConvert) UpdatePreset(input *UpdatePresetInput) (*UpdatePresetOutput, error) { + req, out := c.UpdatePresetRequest(input) + return out, req.Send() +} + +// UpdatePresetWithContext is the same as UpdatePreset with the addition of +// the ability to pass a context and additional request options. +// +// See UpdatePreset for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) UpdatePresetWithContext(ctx aws.Context, input *UpdatePresetInput, opts ...request.Option) (*UpdatePresetOutput, error) { + req, out := c.UpdatePresetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateQueue = "UpdateQueue" + +// UpdateQueueRequest generates a "aws/request.Request" representing the +// client's request for the UpdateQueue operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateQueue for more information on using the UpdateQueue +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateQueueRequest method. +// req, resp := client.UpdateQueueRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateQueue +func (c *MediaConvert) UpdateQueueRequest(input *UpdateQueueInput) (req *request.Request, output *UpdateQueueOutput) { + op := &request.Operation{ + Name: opUpdateQueue, + HTTPMethod: "PUT", + HTTPPath: "/2017-08-29/queues/{name}", + } + + if input == nil { + input = &UpdateQueueInput{} + } + + output = &UpdateQueueOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateQueue API operation for AWS Elemental MediaConvert. +// +// Modify one of your existing queues. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaConvert's +// API operation UpdateQueue for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateQueue +func (c *MediaConvert) UpdateQueue(input *UpdateQueueInput) (*UpdateQueueOutput, error) { + req, out := c.UpdateQueueRequest(input) + return out, req.Send() +} + +// UpdateQueueWithContext is the same as UpdateQueue with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateQueue for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaConvert) UpdateQueueWithContext(ctx aws.Context, input *UpdateQueueInput, opts ...request.Option) (*UpdateQueueOutput, error) { + req, out := c.UpdateQueueRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to +// the value AAC. The service accepts one of two mutually exclusive groups of +// AAC settings--VBR and CBR. To select one of these modes, set the value of +// Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you +// control the audio quality with the setting VBR quality (vbrQuality). In CBR +// mode, you use the setting Bitrate (bitrate). Defaults and valid values depend +// on the rate control mode. +type AacSettings struct { + _ struct{} `type:"structure"` + + // Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio + // + audio description (AD) as a stereo pair. The value for AudioType will be + // set to 3, which signals to downstream systems that this stream contains "broadcaster + // mixed AD". Note that the input received by the encoder must contain pre-mixed + // audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, + // the encoder ignores any values you provide in AudioType and FollowInputAudioType. + // Choose NORMAL when the input does not contain pre-mixed audio + audio description + // (AD). In this case, the encoder will use any values you provide for AudioType + // and FollowInputAudioType. + AudioDescriptionBroadcasterMix *string `locationName:"audioDescriptionBroadcasterMix" type:"string" enum:"AacAudioDescriptionBroadcasterMix"` + + // Average bitrate in bits/second. The set of valid values for this setting + // is: 6000, 8000, 10000, 12000, 14000, 16000, 20000, 24000, 28000, 32000, 40000, + // 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, + // 256000, 288000, 320000, 384000, 448000, 512000, 576000, 640000, 768000, 896000, + // 1024000. The value you set is also constrained by the values you choose for + // Profile (codecProfile), Bitrate control mode (codingMode), and Sample rate + // (sampleRate). Default values depend on Bitrate control mode and Profile. + Bitrate *int64 `locationName:"bitrate" min:"6000" type:"integer"` + + // AAC Profile. + CodecProfile *string `locationName:"codecProfile" type:"string" enum:"AacCodecProfile"` + + // Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values + // depend on rate control mode and profile. "1.0 - Audio Description (Receiver + // Mix)" setting receives a stereo description plus control track and emits + // a mono AAC encode of the description track, with control data emitted in + // the PES header as per ETSI TS 101 154 Annex E. + CodingMode *string `locationName:"codingMode" type:"string" enum:"AacCodingMode"` + + // Rate Control Mode. + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"AacRateControlMode"` + + // Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, + // you must choose "No container" for the output container. + RawFormat *string `locationName:"rawFormat" type:"string" enum:"AacRawFormat"` + + // Sample rate in Hz. Valid values depend on rate control mode and profile. + SampleRate *int64 `locationName:"sampleRate" min:"8000" type:"integer"` + + // Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream + // containers. + Specification *string `locationName:"specification" type:"string" enum:"AacSpecification"` + + // VBR Quality Level - Only used if rate_control_mode is VBR. + VbrQuality *string `locationName:"vbrQuality" type:"string" enum:"AacVbrQuality"` +} + +// String returns the string representation +func (s AacSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AacSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AacSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AacSettings"} + if s.Bitrate != nil && *s.Bitrate < 6000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 6000)) + } + if s.SampleRate != nil && *s.SampleRate < 8000 { + invalidParams.Add(request.NewErrParamMinValue("SampleRate", 8000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioDescriptionBroadcasterMix sets the AudioDescriptionBroadcasterMix field's value. +func (s *AacSettings) SetAudioDescriptionBroadcasterMix(v string) *AacSettings { + s.AudioDescriptionBroadcasterMix = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *AacSettings) SetBitrate(v int64) *AacSettings { + s.Bitrate = &v + return s +} + +// SetCodecProfile sets the CodecProfile field's value. +func (s *AacSettings) SetCodecProfile(v string) *AacSettings { + s.CodecProfile = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *AacSettings) SetCodingMode(v string) *AacSettings { + s.CodingMode = &v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *AacSettings) SetRateControlMode(v string) *AacSettings { + s.RateControlMode = &v + return s +} + +// SetRawFormat sets the RawFormat field's value. +func (s *AacSettings) SetRawFormat(v string) *AacSettings { + s.RawFormat = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *AacSettings) SetSampleRate(v int64) *AacSettings { + s.SampleRate = &v + return s +} + +// SetSpecification sets the Specification field's value. +func (s *AacSettings) SetSpecification(v string) *AacSettings { + s.Specification = &v + return s +} + +// SetVbrQuality sets the VbrQuality field's value. +func (s *AacSettings) SetVbrQuality(v string) *AacSettings { + s.VbrQuality = &v + return s +} + +// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to +// the value AC3. +type Ac3Settings struct { + _ struct{} `type:"structure"` + + // Average bitrate in bits/second. Valid bitrates depend on the coding mode. + Bitrate *int64 `locationName:"bitrate" min:"64000" type:"integer"` + + // Specifies the "Bitstream Mode" (bsmod) for the emitted AC-3 stream. See ATSC + // A/52-2012 for background on these values. + BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Ac3BitstreamMode"` + + // Dolby Digital coding mode. Determines number of channels. + CodingMode *string `locationName:"codingMode" type:"string" enum:"Ac3CodingMode"` + + // Sets the dialnorm for the output. If blank and input audio is Dolby Digital, + // dialnorm will be passed through. + Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` + + // If set to FILM_STANDARD, adds dynamic range compression signaling to the + // output bitstream as defined in the Dolby Digital specification. + DynamicRangeCompressionProfile *string `locationName:"dynamicRangeCompressionProfile" type:"string" enum:"Ac3DynamicRangeCompressionProfile"` + + // Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only + // valid with 3_2_LFE coding mode. + LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Ac3LfeFilter"` + + // When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, + // or DolbyE decoder that supplied this audio data. If audio was not supplied + // from one of these streams, then the static metadata settings will be used. + MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Ac3MetadataControl"` + + // Sample rate in hz. Sample rate is always 48000. + SampleRate *int64 `locationName:"sampleRate" min:"48000" type:"integer"` +} + +// String returns the string representation +func (s Ac3Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Ac3Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Ac3Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Ac3Settings"} + if s.Bitrate != nil && *s.Bitrate < 64000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 64000)) + } + if s.Dialnorm != nil && *s.Dialnorm < 1 { + invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) + } + if s.SampleRate != nil && *s.SampleRate < 48000 { + invalidParams.Add(request.NewErrParamMinValue("SampleRate", 48000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBitrate sets the Bitrate field's value. +func (s *Ac3Settings) SetBitrate(v int64) *Ac3Settings { + s.Bitrate = &v + return s +} + +// SetBitstreamMode sets the BitstreamMode field's value. +func (s *Ac3Settings) SetBitstreamMode(v string) *Ac3Settings { + s.BitstreamMode = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *Ac3Settings) SetCodingMode(v string) *Ac3Settings { + s.CodingMode = &v + return s +} + +// SetDialnorm sets the Dialnorm field's value. +func (s *Ac3Settings) SetDialnorm(v int64) *Ac3Settings { + s.Dialnorm = &v + return s +} + +// SetDynamicRangeCompressionProfile sets the DynamicRangeCompressionProfile field's value. +func (s *Ac3Settings) SetDynamicRangeCompressionProfile(v string) *Ac3Settings { + s.DynamicRangeCompressionProfile = &v + return s +} + +// SetLfeFilter sets the LfeFilter field's value. +func (s *Ac3Settings) SetLfeFilter(v string) *Ac3Settings { + s.LfeFilter = &v + return s +} + +// SetMetadataControl sets the MetadataControl field's value. +func (s *Ac3Settings) SetMetadataControl(v string) *Ac3Settings { + s.MetadataControl = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *Ac3Settings) SetSampleRate(v int64) *Ac3Settings { + s.SampleRate = &v + return s +} + +// Acceleration settings for job execution. +type AccelerationSettings struct { + _ struct{} `type:"structure"` + + // Acceleration configuration for the job. + // + // Mode is a required field + Mode *string `locationName:"mode" type:"string" required:"true" enum:"AccelerationMode"` +} + +// String returns the string representation +func (s AccelerationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccelerationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AccelerationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AccelerationSettings"} + if s.Mode == nil { + invalidParams.Add(request.NewErrParamRequired("Mode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMode sets the Mode field's value. +func (s *AccelerationSettings) SetMode(v string) *AccelerationSettings { + s.Mode = &v + return s +} + +// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to +// the value AIFF. +type AiffSettings struct { + _ struct{} `type:"structure"` + + // Specify Bit depth (BitDepth), in bits per sample, to choose the encoding + // quality for this audio track. + BitDepth *int64 `locationName:"bitDepth" min:"16" type:"integer"` + + // Set Channels to specify the number of channels in this output audio track. + // Choosing Mono in the console will give you 1 output channel; choosing Stereo + // will give you 2. In the API, valid values are 1 and 2. + Channels *int64 `locationName:"channels" min:"1" type:"integer"` + + // Sample rate in hz. + SampleRate *int64 `locationName:"sampleRate" min:"8000" type:"integer"` +} + +// String returns the string representation +func (s AiffSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AiffSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AiffSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AiffSettings"} + if s.BitDepth != nil && *s.BitDepth < 16 { + invalidParams.Add(request.NewErrParamMinValue("BitDepth", 16)) + } + if s.Channels != nil && *s.Channels < 1 { + invalidParams.Add(request.NewErrParamMinValue("Channels", 1)) + } + if s.SampleRate != nil && *s.SampleRate < 8000 { + invalidParams.Add(request.NewErrParamMinValue("SampleRate", 8000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBitDepth sets the BitDepth field's value. +func (s *AiffSettings) SetBitDepth(v int64) *AiffSettings { + s.BitDepth = &v + return s +} + +// SetChannels sets the Channels field's value. +func (s *AiffSettings) SetChannels(v int64) *AiffSettings { + s.Channels = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *AiffSettings) SetSampleRate(v int64) *AiffSettings { + s.SampleRate = &v + return s +} + +// Settings for ancillary captions source. +type AncillarySourceSettings struct { + _ struct{} `type:"structure"` + + // Specifies the 608 channel number in the ancillary data track from which to + // extract captions. Unused for passthrough. + SourceAncillaryChannelNumber *int64 `locationName:"sourceAncillaryChannelNumber" min:"1" type:"integer"` +} + +// String returns the string representation +func (s AncillarySourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AncillarySourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AncillarySourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AncillarySourceSettings"} + if s.SourceAncillaryChannelNumber != nil && *s.SourceAncillaryChannelNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("SourceAncillaryChannelNumber", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceAncillaryChannelNumber sets the SourceAncillaryChannelNumber field's value. +func (s *AncillarySourceSettings) SetSourceAncillaryChannelNumber(v int64) *AncillarySourceSettings { + s.SourceAncillaryChannelNumber = &v + return s +} + +// Associates the Amazon Resource Name (ARN) of an AWS Certificate Manager (ACM) +// certificate with an AWS Elemental MediaConvert resource. +type AssociateCertificateInput struct { + _ struct{} `type:"structure"` + + // The ARN of the ACM certificate that you want to associate with your MediaConvert + // resource. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateCertificateInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *AssociateCertificateInput) SetArn(v string) *AssociateCertificateInput { + s.Arn = &v + return s +} + +// Successful association of Certificate Manager Amazon Resource Name (ARN) +// with Mediaconvert returns an OK message. +type AssociateCertificateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateCertificateOutput) GoString() string { + return s.String() +} + +// Audio codec settings (CodecSettings) under (AudioDescriptions) contains the +// group of settings related to audio encoding. The settings in this group vary +// depending on the value you choose for Audio codec (Codec). For each codec +// enum you choose, define the corresponding settings object. The following +// lists the codec enum, settings object pairs. * AAC, AacSettings * MP2, Mp2Settings +// * WAV, WavSettings * AIFF, AiffSettings * AC3, Ac3Settings * EAC3, Eac3Settings +type AudioCodecSettings struct { + _ struct{} `type:"structure"` + + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to + // the value AAC. The service accepts one of two mutually exclusive groups of + // AAC settings--VBR and CBR. To select one of these modes, set the value of + // Bitrate control mode (rateControlMode) to "VBR" or "CBR". In VBR mode, you + // control the audio quality with the setting VBR quality (vbrQuality). In CBR + // mode, you use the setting Bitrate (bitrate). Defaults and valid values depend + // on the rate control mode. + AacSettings *AacSettings `locationName:"aacSettings" type:"structure"` + + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to + // the value AC3. + Ac3Settings *Ac3Settings `locationName:"ac3Settings" type:"structure"` + + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to + // the value AIFF. + AiffSettings *AiffSettings `locationName:"aiffSettings" type:"structure"` + + // Type of Audio codec. + Codec *string `locationName:"codec" type:"string" enum:"AudioCodec"` + + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to + // the value EAC3. + Eac3Settings *Eac3Settings `locationName:"eac3Settings" type:"structure"` + + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to + // the value MP2. + Mp2Settings *Mp2Settings `locationName:"mp2Settings" type:"structure"` + + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to + // the value WAV. + WavSettings *WavSettings `locationName:"wavSettings" type:"structure"` +} + +// String returns the string representation +func (s AudioCodecSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioCodecSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioCodecSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioCodecSettings"} + if s.AacSettings != nil { + if err := s.AacSettings.Validate(); err != nil { + invalidParams.AddNested("AacSettings", err.(request.ErrInvalidParams)) + } + } + if s.Ac3Settings != nil { + if err := s.Ac3Settings.Validate(); err != nil { + invalidParams.AddNested("Ac3Settings", err.(request.ErrInvalidParams)) + } + } + if s.AiffSettings != nil { + if err := s.AiffSettings.Validate(); err != nil { + invalidParams.AddNested("AiffSettings", err.(request.ErrInvalidParams)) + } + } + if s.Eac3Settings != nil { + if err := s.Eac3Settings.Validate(); err != nil { + invalidParams.AddNested("Eac3Settings", err.(request.ErrInvalidParams)) + } + } + if s.Mp2Settings != nil { + if err := s.Mp2Settings.Validate(); err != nil { + invalidParams.AddNested("Mp2Settings", err.(request.ErrInvalidParams)) + } + } + if s.WavSettings != nil { + if err := s.WavSettings.Validate(); err != nil { + invalidParams.AddNested("WavSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAacSettings sets the AacSettings field's value. +func (s *AudioCodecSettings) SetAacSettings(v *AacSettings) *AudioCodecSettings { + s.AacSettings = v + return s +} + +// SetAc3Settings sets the Ac3Settings field's value. +func (s *AudioCodecSettings) SetAc3Settings(v *Ac3Settings) *AudioCodecSettings { + s.Ac3Settings = v + return s +} + +// SetAiffSettings sets the AiffSettings field's value. +func (s *AudioCodecSettings) SetAiffSettings(v *AiffSettings) *AudioCodecSettings { + s.AiffSettings = v + return s +} + +// SetCodec sets the Codec field's value. +func (s *AudioCodecSettings) SetCodec(v string) *AudioCodecSettings { + s.Codec = &v + return s +} + +// SetEac3Settings sets the Eac3Settings field's value. +func (s *AudioCodecSettings) SetEac3Settings(v *Eac3Settings) *AudioCodecSettings { + s.Eac3Settings = v + return s +} + +// SetMp2Settings sets the Mp2Settings field's value. +func (s *AudioCodecSettings) SetMp2Settings(v *Mp2Settings) *AudioCodecSettings { + s.Mp2Settings = v + return s +} + +// SetWavSettings sets the WavSettings field's value. +func (s *AudioCodecSettings) SetWavSettings(v *WavSettings) *AudioCodecSettings { + s.WavSettings = v + return s +} + +// Description of audio output +type AudioDescription struct { + _ struct{} `type:"structure"` + + // Advanced audio normalization settings. + AudioNormalizationSettings *AudioNormalizationSettings `locationName:"audioNormalizationSettings" type:"structure"` + + // Specifies which audio data to use from each input. In the simplest case, + // specify an "Audio Selector":#inputs-audio_selector by name based on its order + // within each input. For example if you specify "Audio Selector 3", then the + // third audio selector will be used from each input. If an input does not have + // an "Audio Selector 3", then the audio selector marked as "default" in that + // input will be used. If there is no audio selector marked as "default", silence + // will be inserted for the duration of that input. Alternatively, an "Audio + // Selector Group":#inputs-audio_selector_group name may be specified, with + // similar default/silence behavior. If no audio_source_name is specified, then + // "Audio Selector 1" will be chosen automatically. + AudioSourceName *string `locationName:"audioSourceName" type:"string"` + + // Applies only if Follow Input Audio Type is unchecked (false). A number between + // 0 and 255. The following are defined in ISO-IEC 13818-1: 0 = Undefined, 1 + // = Clean Effects, 2 = Hearing Impaired, 3 = Visually Impaired Commentary, + // 4-255 = Reserved. + AudioType *int64 `locationName:"audioType" type:"integer"` + + // When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then + // that value is passed through to the output. If the input contains no ISO + // 639 audio_type, the value in Audio Type is included in the output. Otherwise + // the value in Audio Type is included in the output. Note that this field and + // audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD. + AudioTypeControl *string `locationName:"audioTypeControl" type:"string" enum:"AudioTypeControl"` + + // Audio codec settings (CodecSettings) under (AudioDescriptions) contains the + // group of settings related to audio encoding. The settings in this group vary + // depending on the value you choose for Audio codec (Codec). For each codec + // enum you choose, define the corresponding settings object. The following + // lists the codec enum, settings object pairs. * AAC, AacSettings * MP2, Mp2Settings + // * WAV, WavSettings * AIFF, AiffSettings * AC3, Ac3Settings * EAC3, Eac3Settings + CodecSettings *AudioCodecSettings `locationName:"codecSettings" type:"structure"` + + // Specify the language for this audio output track, using the ISO 639-2 or + // ISO 639-3 three-letter language code. The language specified will be used + // when 'Follow Input Language Code' is not selected or when 'Follow Input Language + // Code' is selected but there is no ISO 639 language code specified by the + // input. + CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` + + // Indicates the language of the audio output track. The ISO 639 language specified + // in the 'Language Code' drop down will be used when 'Follow Input Language + // Code' is not selected or when 'Follow Input Language Code' is selected but + // there is no ISO 639 language code specified by the input. + LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` + + // Choosing FOLLOW_INPUT will cause the ISO 639 language code of the output + // to follow the ISO 639 language code of the input. The language specified + // for languageCode' will be used when USE_CONFIGURED is selected or when FOLLOW_INPUT + // is selected but there is no ISO 639 language code specified by the input. + LanguageCodeControl *string `locationName:"languageCodeControl" type:"string" enum:"AudioLanguageCodeControl"` + + // Advanced audio remixing settings. + RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"` + + // Used for MS Smooth and Apple HLS outputs. Indicates the name displayed by + // the player (eg. English, or Director Commentary). Alphanumeric characters, + // spaces, and underscore are legal. + StreamName *string `locationName:"streamName" type:"string"` +} + +// String returns the string representation +func (s AudioDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioDescription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioDescription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioDescription"} + if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) + } + if s.AudioNormalizationSettings != nil { + if err := s.AudioNormalizationSettings.Validate(); err != nil { + invalidParams.AddNested("AudioNormalizationSettings", err.(request.ErrInvalidParams)) + } + } + if s.CodecSettings != nil { + if err := s.CodecSettings.Validate(); err != nil { + invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) + } + } + if s.RemixSettings != nil { + if err := s.RemixSettings.Validate(); err != nil { + invalidParams.AddNested("RemixSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioNormalizationSettings sets the AudioNormalizationSettings field's value. +func (s *AudioDescription) SetAudioNormalizationSettings(v *AudioNormalizationSettings) *AudioDescription { + s.AudioNormalizationSettings = v + return s +} + +// SetAudioSourceName sets the AudioSourceName field's value. +func (s *AudioDescription) SetAudioSourceName(v string) *AudioDescription { + s.AudioSourceName = &v + return s +} + +// SetAudioType sets the AudioType field's value. +func (s *AudioDescription) SetAudioType(v int64) *AudioDescription { + s.AudioType = &v + return s +} + +// SetAudioTypeControl sets the AudioTypeControl field's value. +func (s *AudioDescription) SetAudioTypeControl(v string) *AudioDescription { + s.AudioTypeControl = &v + return s +} + +// SetCodecSettings sets the CodecSettings field's value. +func (s *AudioDescription) SetCodecSettings(v *AudioCodecSettings) *AudioDescription { + s.CodecSettings = v + return s +} + +// SetCustomLanguageCode sets the CustomLanguageCode field's value. +func (s *AudioDescription) SetCustomLanguageCode(v string) *AudioDescription { + s.CustomLanguageCode = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *AudioDescription) SetLanguageCode(v string) *AudioDescription { + s.LanguageCode = &v + return s +} + +// SetLanguageCodeControl sets the LanguageCodeControl field's value. +func (s *AudioDescription) SetLanguageCodeControl(v string) *AudioDescription { + s.LanguageCodeControl = &v + return s +} + +// SetRemixSettings sets the RemixSettings field's value. +func (s *AudioDescription) SetRemixSettings(v *RemixSettings) *AudioDescription { + s.RemixSettings = v + return s +} + +// SetStreamName sets the StreamName field's value. +func (s *AudioDescription) SetStreamName(v string) *AudioDescription { + s.StreamName = &v + return s +} + +// Advanced audio normalization settings. +type AudioNormalizationSettings struct { + _ struct{} `type:"structure"` + + // Audio normalization algorithm to use. 1770-1 conforms to the CALM Act specification, + // 1770-2 conforms to the EBU R-128 specification. + Algorithm *string `locationName:"algorithm" type:"string" enum:"AudioNormalizationAlgorithm"` + + // When enabled the output audio is corrected using the chosen algorithm. If + // disabled, the audio will be measured but not adjusted. + AlgorithmControl *string `locationName:"algorithmControl" type:"string" enum:"AudioNormalizationAlgorithmControl"` + + // Content measuring above this level will be corrected to the target level. + // Content measuring below this level will not be corrected. Gating only applies + // when not using real_time_correction. + CorrectionGateLevel *int64 `locationName:"correctionGateLevel" type:"integer"` + + // If set to LOG, log each output's audio track loudness to a CSV file. + LoudnessLogging *string `locationName:"loudnessLogging" type:"string" enum:"AudioNormalizationLoudnessLogging"` + + // If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio + // track loudness. + PeakCalculation *string `locationName:"peakCalculation" type:"string" enum:"AudioNormalizationPeakCalculation"` + + // Target LKFS(loudness) to adjust volume to. If no value is entered, a default + // value will be used according to the chosen algorithm. The CALM Act (1770-1) + // recommends a target of -24 LKFS. The EBU R-128 specification (1770-2) recommends + // a target of -23 LKFS. + TargetLkfs *float64 `locationName:"targetLkfs" type:"double"` +} + +// String returns the string representation +func (s AudioNormalizationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioNormalizationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioNormalizationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioNormalizationSettings"} + if s.CorrectionGateLevel != nil && *s.CorrectionGateLevel < -70 { + invalidParams.Add(request.NewErrParamMinValue("CorrectionGateLevel", -70)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithm sets the Algorithm field's value. +func (s *AudioNormalizationSettings) SetAlgorithm(v string) *AudioNormalizationSettings { + s.Algorithm = &v + return s +} + +// SetAlgorithmControl sets the AlgorithmControl field's value. +func (s *AudioNormalizationSettings) SetAlgorithmControl(v string) *AudioNormalizationSettings { + s.AlgorithmControl = &v + return s +} + +// SetCorrectionGateLevel sets the CorrectionGateLevel field's value. +func (s *AudioNormalizationSettings) SetCorrectionGateLevel(v int64) *AudioNormalizationSettings { + s.CorrectionGateLevel = &v + return s +} + +// SetLoudnessLogging sets the LoudnessLogging field's value. +func (s *AudioNormalizationSettings) SetLoudnessLogging(v string) *AudioNormalizationSettings { + s.LoudnessLogging = &v + return s +} + +// SetPeakCalculation sets the PeakCalculation field's value. +func (s *AudioNormalizationSettings) SetPeakCalculation(v string) *AudioNormalizationSettings { + s.PeakCalculation = &v + return s +} + +// SetTargetLkfs sets the TargetLkfs field's value. +func (s *AudioNormalizationSettings) SetTargetLkfs(v float64) *AudioNormalizationSettings { + s.TargetLkfs = &v + return s +} + +// Selector for Audio +type AudioSelector struct { + _ struct{} `type:"structure"` + + // Selects a specific language code from within an audio source, using the ISO + // 639-2 or ISO 639-3 three-letter language code + CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` + + // Enable this setting on one audio selector to set it as the default for the + // job. The service uses this default for outputs where it can't find the specified + // input audio. If you don't set a default, those outputs have no audio. + DefaultSelection *string `locationName:"defaultSelection" type:"string" enum:"AudioDefaultSelection"` + + // Specifies audio data from an external file source. + ExternalAudioFileInput *string `locationName:"externalAudioFileInput" type:"string"` + + // Selects a specific language code from within an audio source. + LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` + + // Specifies a time delta in milliseconds to offset the audio from the input + // video. + Offset *int64 `locationName:"offset" type:"integer"` + + // Selects a specific PID from within an audio source (e.g. 257 selects PID + // 0x101). + Pids []*int64 `locationName:"pids" type:"list"` + + // Use this setting for input streams that contain Dolby E, to have the service + // extract specific program data from the track. To select multiple programs, + // create multiple selectors with the same Track and different Program numbers. + // In the console, this setting is visible when you set Selector type to Track. + // Choose the program number from the dropdown list. If you are sending a JSON + // file, provide the program ID, which is part of the audio metadata. If your + // input file has incorrect metadata, you can choose All channels instead of + // a program number to have the service ignore the program IDs and include all + // the programs in the track. + ProgramSelection *int64 `locationName:"programSelection" type:"integer"` + + // Use these settings to reorder the audio channels of one input to match those + // of another input. This allows you to combine the two files into a single + // output, one after the other. + RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"` + + // Specifies the type of the audio selector. + SelectorType *string `locationName:"selectorType" type:"string" enum:"AudioSelectorType"` + + // Identify a track from the input audio to include in this selector by entering + // the track index number. To include several tracks in a single audio selector, + // specify multiple tracks as follows. Using the console, enter a comma-separated + // list. For examle, type "1,2,3" to include tracks 1 through 3. Specifying + // directly in your JSON job file, provide the track numbers in an array. For + // example, "tracks": [1,2,3]. + Tracks []*int64 `locationName:"tracks" type:"list"` +} + +// String returns the string representation +func (s AudioSelector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioSelector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioSelector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioSelector"} + if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) + } + if s.Offset != nil && *s.Offset < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("Offset", -2.147483648e+09)) + } + if s.RemixSettings != nil { + if err := s.RemixSettings.Validate(); err != nil { + invalidParams.AddNested("RemixSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomLanguageCode sets the CustomLanguageCode field's value. +func (s *AudioSelector) SetCustomLanguageCode(v string) *AudioSelector { + s.CustomLanguageCode = &v + return s +} + +// SetDefaultSelection sets the DefaultSelection field's value. +func (s *AudioSelector) SetDefaultSelection(v string) *AudioSelector { + s.DefaultSelection = &v + return s +} + +// SetExternalAudioFileInput sets the ExternalAudioFileInput field's value. +func (s *AudioSelector) SetExternalAudioFileInput(v string) *AudioSelector { + s.ExternalAudioFileInput = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *AudioSelector) SetLanguageCode(v string) *AudioSelector { + s.LanguageCode = &v + return s +} + +// SetOffset sets the Offset field's value. +func (s *AudioSelector) SetOffset(v int64) *AudioSelector { + s.Offset = &v + return s +} + +// SetPids sets the Pids field's value. +func (s *AudioSelector) SetPids(v []*int64) *AudioSelector { + s.Pids = v + return s +} + +// SetProgramSelection sets the ProgramSelection field's value. +func (s *AudioSelector) SetProgramSelection(v int64) *AudioSelector { + s.ProgramSelection = &v + return s +} + +// SetRemixSettings sets the RemixSettings field's value. +func (s *AudioSelector) SetRemixSettings(v *RemixSettings) *AudioSelector { + s.RemixSettings = v + return s +} + +// SetSelectorType sets the SelectorType field's value. +func (s *AudioSelector) SetSelectorType(v string) *AudioSelector { + s.SelectorType = &v + return s +} + +// SetTracks sets the Tracks field's value. +func (s *AudioSelector) SetTracks(v []*int64) *AudioSelector { + s.Tracks = v + return s +} + +// Group of Audio Selectors +type AudioSelectorGroup struct { + _ struct{} `type:"structure"` + + // Name of an Audio Selector within the same input to include in the group. + // Audio selector names are standardized, based on their order within the input + // (e.g., "Audio Selector 1"). The audio selector name parameter can be repeated + // to add any number of audio selectors to the group. + AudioSelectorNames []*string `locationName:"audioSelectorNames" type:"list"` +} + +// String returns the string representation +func (s AudioSelectorGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioSelectorGroup) GoString() string { + return s.String() +} + +// SetAudioSelectorNames sets the AudioSelectorNames field's value. +func (s *AudioSelectorGroup) SetAudioSelectorNames(v []*string) *AudioSelectorGroup { + s.AudioSelectorNames = v + return s +} + +// Settings for Avail Blanking +type AvailBlanking struct { + _ struct{} `type:"structure"` + + // Blanking image to be used. Leave empty for solid black. Only bmp and png + // images are supported. + AvailBlankingImage *string `locationName:"availBlankingImage" min:"14" type:"string"` +} + +// String returns the string representation +func (s AvailBlanking) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailBlanking) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AvailBlanking) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AvailBlanking"} + if s.AvailBlankingImage != nil && len(*s.AvailBlankingImage) < 14 { + invalidParams.Add(request.NewErrParamMinLen("AvailBlankingImage", 14)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailBlankingImage sets the AvailBlankingImage field's value. +func (s *AvailBlanking) SetAvailBlankingImage(v string) *AvailBlanking { + s.AvailBlankingImage = &v + return s +} + +// Burn-In Destination Settings. +type BurninDestinationSettings struct { + _ struct{} `type:"structure"` + + // If no explicit x_position or y_position is provided, setting alignment to + // centered will place the captions at the bottom center of the output. Similarly, + // setting a left alignment will align captions to the bottom left of the output. + // If x and y positions are given in conjunction with the alignment parameter, + // the font will be justified (either left or centered) relative to those coordinates. + // This option is not valid for source captions that are STL, 608/embedded or + // teletext. These source settings are already pre-defined by the caption stream. + // All burn-in and DVB-Sub font settings must match. + Alignment *string `locationName:"alignment" type:"string" enum:"BurninSubtitleAlignment"` + + // Specifies the color of the rectangle behind the captions.All burn-in and + // DVB-Sub font settings must match. + BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"BurninSubtitleBackgroundColor"` + + // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. + // Leaving this parameter blank is equivalent to setting it to 0 (transparent). + // All burn-in and DVB-Sub font settings must match. + BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` + + // Specifies the color of the burned-in captions. This option is not valid for + // source captions that are STL, 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + FontColor *string `locationName:"fontColor" type:"string" enum:"BurninSubtitleFontColor"` + + // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent.All + // burn-in and DVB-Sub font settings must match. + FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` + + // Font resolution in DPI (dots per inch); default is 96 dpi.All burn-in and + // DVB-Sub font settings must match. + FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` + + // Provide the font script, using an ISO 15924 script code, if the LanguageCode + // is not sufficient for determining the script type. Where LanguageCode or + // CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset. This is + // used to help determine the appropriate font for rendering burn-in captions. + FontScript *string `locationName:"fontScript" type:"string" enum:"FontScript"` + + // A positive integer indicates the exact font size in points. Set to 0 for + // automatic font size selection. All burn-in and DVB-Sub font settings must + // match. + FontSize *int64 `locationName:"fontSize" type:"integer"` + + // Specifies font outline color. This option is not valid for source captions + // that are either 608/embedded or teletext. These source settings are already + // pre-defined by the caption stream. All burn-in and DVB-Sub font settings + // must match. + OutlineColor *string `locationName:"outlineColor" type:"string" enum:"BurninSubtitleOutlineColor"` + + // Specifies font outline size in pixels. This option is not valid for source + // captions that are either 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + OutlineSize *int64 `locationName:"outlineSize" type:"integer"` + + // Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub + // font settings must match. + ShadowColor *string `locationName:"shadowColor" type:"string" enum:"BurninSubtitleShadowColor"` + + // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving + // this parameter blank is equivalent to setting it to 0 (transparent). All + // burn-in and DVB-Sub font settings must match. + ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` + + // Specifies the horizontal offset of the shadow relative to the captions in + // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. + // All burn-in and DVB-Sub font settings must match. + ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` + + // Specifies the vertical offset of the shadow relative to the captions in pixels. + // A value of -2 would result in a shadow offset 2 pixels above the text. All + // burn-in and DVB-Sub font settings must match. + ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` + + // Only applies to jobs with input captions in Teletext or STL formats. Specify + // whether the spacing between letters in your captions is set by the captions + // grid or varies depending on letter width. Choose fixed grid to conform to + // the spacing specified in the captions file more accurately. Choose proportional + // to make the text easier to read if the captions are closed caption. + TeletextSpacing *string `locationName:"teletextSpacing" type:"string" enum:"BurninSubtitleTeletextSpacing"` + + // Specifies the horizontal position of the caption relative to the left side + // of the output in pixels. A value of 10 would result in the captions starting + // 10 pixels from the left of the output. If no explicit x_position is provided, + // the horizontal caption position will be determined by the alignment parameter. + // This option is not valid for source captions that are STL, 608/embedded or + // teletext. These source settings are already pre-defined by the caption stream. + // All burn-in and DVB-Sub font settings must match. + XPosition *int64 `locationName:"xPosition" type:"integer"` + + // Specifies the vertical position of the caption relative to the top of the + // output in pixels. A value of 10 would result in the captions starting 10 + // pixels from the top of the output. If no explicit y_position is provided, + // the caption will be positioned towards the bottom of the output. This option + // is not valid for source captions that are STL, 608/embedded or teletext. + // These source settings are already pre-defined by the caption stream. All + // burn-in and DVB-Sub font settings must match. + YPosition *int64 `locationName:"yPosition" type:"integer"` +} + +// String returns the string representation +func (s BurninDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BurninDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BurninDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BurninDestinationSettings"} + if s.FontResolution != nil && *s.FontResolution < 96 { + invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) + } + if s.ShadowXOffset != nil && *s.ShadowXOffset < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("ShadowXOffset", -2.147483648e+09)) + } + if s.ShadowYOffset != nil && *s.ShadowYOffset < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("ShadowYOffset", -2.147483648e+09)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlignment sets the Alignment field's value. +func (s *BurninDestinationSettings) SetAlignment(v string) *BurninDestinationSettings { + s.Alignment = &v + return s +} + +// SetBackgroundColor sets the BackgroundColor field's value. +func (s *BurninDestinationSettings) SetBackgroundColor(v string) *BurninDestinationSettings { + s.BackgroundColor = &v + return s +} + +// SetBackgroundOpacity sets the BackgroundOpacity field's value. +func (s *BurninDestinationSettings) SetBackgroundOpacity(v int64) *BurninDestinationSettings { + s.BackgroundOpacity = &v + return s +} + +// SetFontColor sets the FontColor field's value. +func (s *BurninDestinationSettings) SetFontColor(v string) *BurninDestinationSettings { + s.FontColor = &v + return s +} + +// SetFontOpacity sets the FontOpacity field's value. +func (s *BurninDestinationSettings) SetFontOpacity(v int64) *BurninDestinationSettings { + s.FontOpacity = &v + return s +} + +// SetFontResolution sets the FontResolution field's value. +func (s *BurninDestinationSettings) SetFontResolution(v int64) *BurninDestinationSettings { + s.FontResolution = &v + return s +} + +// SetFontScript sets the FontScript field's value. +func (s *BurninDestinationSettings) SetFontScript(v string) *BurninDestinationSettings { + s.FontScript = &v + return s +} + +// SetFontSize sets the FontSize field's value. +func (s *BurninDestinationSettings) SetFontSize(v int64) *BurninDestinationSettings { + s.FontSize = &v + return s +} + +// SetOutlineColor sets the OutlineColor field's value. +func (s *BurninDestinationSettings) SetOutlineColor(v string) *BurninDestinationSettings { + s.OutlineColor = &v + return s +} + +// SetOutlineSize sets the OutlineSize field's value. +func (s *BurninDestinationSettings) SetOutlineSize(v int64) *BurninDestinationSettings { + s.OutlineSize = &v + return s +} + +// SetShadowColor sets the ShadowColor field's value. +func (s *BurninDestinationSettings) SetShadowColor(v string) *BurninDestinationSettings { + s.ShadowColor = &v + return s +} + +// SetShadowOpacity sets the ShadowOpacity field's value. +func (s *BurninDestinationSettings) SetShadowOpacity(v int64) *BurninDestinationSettings { + s.ShadowOpacity = &v + return s +} + +// SetShadowXOffset sets the ShadowXOffset field's value. +func (s *BurninDestinationSettings) SetShadowXOffset(v int64) *BurninDestinationSettings { + s.ShadowXOffset = &v + return s +} + +// SetShadowYOffset sets the ShadowYOffset field's value. +func (s *BurninDestinationSettings) SetShadowYOffset(v int64) *BurninDestinationSettings { + s.ShadowYOffset = &v + return s +} + +// SetTeletextSpacing sets the TeletextSpacing field's value. +func (s *BurninDestinationSettings) SetTeletextSpacing(v string) *BurninDestinationSettings { + s.TeletextSpacing = &v + return s +} + +// SetXPosition sets the XPosition field's value. +func (s *BurninDestinationSettings) SetXPosition(v int64) *BurninDestinationSettings { + s.XPosition = &v + return s +} + +// SetYPosition sets the YPosition field's value. +func (s *BurninDestinationSettings) SetYPosition(v int64) *BurninDestinationSettings { + s.YPosition = &v + return s +} + +// Cancel a job by sending a request with the job ID +type CancelJobInput struct { + _ struct{} `type:"structure"` + + // The Job ID of the job to be cancelled. + // + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelJobInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *CancelJobInput) SetId(v string) *CancelJobInput { + s.Id = &v + return s +} + +// A cancel job request will receive a response with an empty body. +type CancelJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CancelJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelJobOutput) GoString() string { + return s.String() +} + +// Description of Caption output +type CaptionDescription struct { + _ struct{} `type:"structure"` + + // Specifies which "Caption Selector":#inputs-caption_selector to use from each + // input when generating captions. The name should be of the format "Caption + // Selector ", which denotes that the Nth Caption Selector will be used from + // each input. + CaptionSelectorName *string `locationName:"captionSelectorName" min:"1" type:"string"` + + // Indicates the language of the caption output track, using the ISO 639-2 or + // ISO 639-3 three-letter language code. For most captions output formats, the + // encoder puts this language information in the output captions metadata. If + // your output captions format is DVB-Sub or Burn in, the encoder uses this + // language information to choose the font language for rendering the captions + // text. + CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` + + // Specific settings required by destination type. Note that burnin_destination_settings + // are not available if the source of the caption data is Embedded or Teletext. + DestinationSettings *CaptionDestinationSettings `locationName:"destinationSettings" type:"structure"` + + // Specify the language of this captions output track. For most captions output + // formats, the encoder puts this language information in the output captions + // metadata. If your output captions format is DVB-Sub or Burn in, the encoder + // uses this language information to choose the font language for rendering + // the captions text. + LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` + + // Human readable information to indicate captions available for players (eg. + // English, or Spanish). Alphanumeric characters, spaces, and underscore are + // legal. + LanguageDescription *string `locationName:"languageDescription" type:"string"` +} + +// String returns the string representation +func (s CaptionDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionDescription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionDescription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionDescription"} + if s.CaptionSelectorName != nil && len(*s.CaptionSelectorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CaptionSelectorName", 1)) + } + if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) + } + if s.DestinationSettings != nil { + if err := s.DestinationSettings.Validate(); err != nil { + invalidParams.AddNested("DestinationSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCaptionSelectorName sets the CaptionSelectorName field's value. +func (s *CaptionDescription) SetCaptionSelectorName(v string) *CaptionDescription { + s.CaptionSelectorName = &v + return s +} + +// SetCustomLanguageCode sets the CustomLanguageCode field's value. +func (s *CaptionDescription) SetCustomLanguageCode(v string) *CaptionDescription { + s.CustomLanguageCode = &v + return s +} + +// SetDestinationSettings sets the DestinationSettings field's value. +func (s *CaptionDescription) SetDestinationSettings(v *CaptionDestinationSettings) *CaptionDescription { + s.DestinationSettings = v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CaptionDescription) SetLanguageCode(v string) *CaptionDescription { + s.LanguageCode = &v + return s +} + +// SetLanguageDescription sets the LanguageDescription field's value. +func (s *CaptionDescription) SetLanguageDescription(v string) *CaptionDescription { + s.LanguageDescription = &v + return s +} + +// Caption Description for preset +type CaptionDescriptionPreset struct { + _ struct{} `type:"structure"` + + // Indicates the language of the caption output track, using the ISO 639-2 or + // ISO 639-3 three-letter language code. For most captions output formats, the + // encoder puts this language information in the output captions metadata. If + // your output captions format is DVB-Sub or Burn in, the encoder uses this + // language information to choose the font language for rendering the captions + // text. + CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` + + // Specific settings required by destination type. Note that burnin_destination_settings + // are not available if the source of the caption data is Embedded or Teletext. + DestinationSettings *CaptionDestinationSettings `locationName:"destinationSettings" type:"structure"` + + // Specify the language of this captions output track. For most captions output + // formats, the encoder puts this language information in the output captions + // metadata. If your output captions format is DVB-Sub or Burn in, the encoder + // uses this language information to choose the font language for rendering + // the captions text. + LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` + + // Human readable information to indicate captions available for players (eg. + // English, or Spanish). Alphanumeric characters, spaces, and underscore are + // legal. + LanguageDescription *string `locationName:"languageDescription" type:"string"` +} + +// String returns the string representation +func (s CaptionDescriptionPreset) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionDescriptionPreset) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionDescriptionPreset) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionDescriptionPreset"} + if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) + } + if s.DestinationSettings != nil { + if err := s.DestinationSettings.Validate(); err != nil { + invalidParams.AddNested("DestinationSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomLanguageCode sets the CustomLanguageCode field's value. +func (s *CaptionDescriptionPreset) SetCustomLanguageCode(v string) *CaptionDescriptionPreset { + s.CustomLanguageCode = &v + return s +} + +// SetDestinationSettings sets the DestinationSettings field's value. +func (s *CaptionDescriptionPreset) SetDestinationSettings(v *CaptionDestinationSettings) *CaptionDescriptionPreset { + s.DestinationSettings = v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CaptionDescriptionPreset) SetLanguageCode(v string) *CaptionDescriptionPreset { + s.LanguageCode = &v + return s +} + +// SetLanguageDescription sets the LanguageDescription field's value. +func (s *CaptionDescriptionPreset) SetLanguageDescription(v string) *CaptionDescriptionPreset { + s.LanguageDescription = &v + return s +} + +// Specific settings required by destination type. Note that burnin_destination_settings +// are not available if the source of the caption data is Embedded or Teletext. +type CaptionDestinationSettings struct { + _ struct{} `type:"structure"` + + // Burn-In Destination Settings. + BurninDestinationSettings *BurninDestinationSettings `locationName:"burninDestinationSettings" type:"structure"` + + // Specify the format for this set of captions on this output. The default format + // is embedded without SCTE-20. Other options are embedded with SCTE-20, burn-in, + // DVB-sub, SCC, SRT, teletext, TTML, and web-VTT. If you are using SCTE-20, + // choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED) to create an output that + // complies with the SCTE-43 spec. To create a non-compliant output where the + // embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20). + DestinationType *string `locationName:"destinationType" type:"string" enum:"CaptionDestinationType"` + + // DVB-Sub Destination Settings + DvbSubDestinationSettings *DvbSubDestinationSettings `locationName:"dvbSubDestinationSettings" type:"structure"` + + // Settings specific to embedded/ancillary caption outputs, including 608/708 + // Channel destination number. + EmbeddedDestinationSettings *EmbeddedDestinationSettings `locationName:"embeddedDestinationSettings" type:"structure"` + + // Settings for SCC caption output. + SccDestinationSettings *SccDestinationSettings `locationName:"sccDestinationSettings" type:"structure"` + + // Settings for Teletext caption output + TeletextDestinationSettings *TeletextDestinationSettings `locationName:"teletextDestinationSettings" type:"structure"` + + // Settings specific to TTML caption outputs, including Pass style information + // (TtmlStylePassthrough). + TtmlDestinationSettings *TtmlDestinationSettings `locationName:"ttmlDestinationSettings" type:"structure"` +} + +// String returns the string representation +func (s CaptionDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionDestinationSettings"} + if s.BurninDestinationSettings != nil { + if err := s.BurninDestinationSettings.Validate(); err != nil { + invalidParams.AddNested("BurninDestinationSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbSubDestinationSettings != nil { + if err := s.DvbSubDestinationSettings.Validate(); err != nil { + invalidParams.AddNested("DvbSubDestinationSettings", err.(request.ErrInvalidParams)) + } + } + if s.EmbeddedDestinationSettings != nil { + if err := s.EmbeddedDestinationSettings.Validate(); err != nil { + invalidParams.AddNested("EmbeddedDestinationSettings", err.(request.ErrInvalidParams)) + } + } + if s.TeletextDestinationSettings != nil { + if err := s.TeletextDestinationSettings.Validate(); err != nil { + invalidParams.AddNested("TeletextDestinationSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBurninDestinationSettings sets the BurninDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetBurninDestinationSettings(v *BurninDestinationSettings) *CaptionDestinationSettings { + s.BurninDestinationSettings = v + return s +} + +// SetDestinationType sets the DestinationType field's value. +func (s *CaptionDestinationSettings) SetDestinationType(v string) *CaptionDestinationSettings { + s.DestinationType = &v + return s +} + +// SetDvbSubDestinationSettings sets the DvbSubDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetDvbSubDestinationSettings(v *DvbSubDestinationSettings) *CaptionDestinationSettings { + s.DvbSubDestinationSettings = v + return s +} + +// SetEmbeddedDestinationSettings sets the EmbeddedDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetEmbeddedDestinationSettings(v *EmbeddedDestinationSettings) *CaptionDestinationSettings { + s.EmbeddedDestinationSettings = v + return s +} + +// SetSccDestinationSettings sets the SccDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetSccDestinationSettings(v *SccDestinationSettings) *CaptionDestinationSettings { + s.SccDestinationSettings = v + return s +} + +// SetTeletextDestinationSettings sets the TeletextDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetTeletextDestinationSettings(v *TeletextDestinationSettings) *CaptionDestinationSettings { + s.TeletextDestinationSettings = v + return s +} + +// SetTtmlDestinationSettings sets the TtmlDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetTtmlDestinationSettings(v *TtmlDestinationSettings) *CaptionDestinationSettings { + s.TtmlDestinationSettings = v + return s +} + +// Set up captions in your outputs by first selecting them from your input here. +type CaptionSelector struct { + _ struct{} `type:"structure"` + + // The specific language to extract from source, using the ISO 639-2 or ISO + // 639-3 three-letter language code. If input is SCTE-27, complete this field + // and/or PID to select the caption language to extract. If input is DVB-Sub + // and output is Burn-in or SMPTE-TT, complete this field and/or PID to select + // the caption language to extract. If input is DVB-Sub that is being passed + // through, omit this field (and PID field); there is no way to extract a specific + // language with pass-through captions. + CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` + + // The specific language to extract from source. If input is SCTE-27, complete + // this field and/or PID to select the caption language to extract. If input + // is DVB-Sub and output is Burn-in or SMPTE-TT, complete this field and/or + // PID to select the caption language to extract. If input is DVB-Sub that is + // being passed through, omit this field (and PID field); there is no way to + // extract a specific language with pass-through captions. + LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` + + // Source settings (SourceSettings) contains the group of settings for captions + // in the input. + SourceSettings *CaptionSourceSettings `locationName:"sourceSettings" type:"structure"` +} + +// String returns the string representation +func (s CaptionSelector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionSelector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionSelector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionSelector"} + if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) + } + if s.SourceSettings != nil { + if err := s.SourceSettings.Validate(); err != nil { + invalidParams.AddNested("SourceSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomLanguageCode sets the CustomLanguageCode field's value. +func (s *CaptionSelector) SetCustomLanguageCode(v string) *CaptionSelector { + s.CustomLanguageCode = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CaptionSelector) SetLanguageCode(v string) *CaptionSelector { + s.LanguageCode = &v + return s +} + +// SetSourceSettings sets the SourceSettings field's value. +func (s *CaptionSelector) SetSourceSettings(v *CaptionSourceSettings) *CaptionSelector { + s.SourceSettings = v + return s +} + +// Source settings (SourceSettings) contains the group of settings for captions +// in the input. +type CaptionSourceSettings struct { + _ struct{} `type:"structure"` + + // Settings for ancillary captions source. + AncillarySourceSettings *AncillarySourceSettings `locationName:"ancillarySourceSettings" type:"structure"` + + // DVB Sub Source Settings + DvbSubSourceSettings *DvbSubSourceSettings `locationName:"dvbSubSourceSettings" type:"structure"` + + // Settings for embedded captions Source + EmbeddedSourceSettings *EmbeddedSourceSettings `locationName:"embeddedSourceSettings" type:"structure"` + + // Settings for File-based Captions in Source + FileSourceSettings *FileSourceSettings `locationName:"fileSourceSettings" type:"structure"` + + // Use Source (SourceType) to identify the format of your input captions. The + // service cannot auto-detect caption format. + SourceType *string `locationName:"sourceType" type:"string" enum:"CaptionSourceType"` + + // Settings specific to Teletext caption sources, including Page number. + TeletextSourceSettings *TeletextSourceSettings `locationName:"teletextSourceSettings" type:"structure"` + + // Settings specific to caption sources that are specfied by track number. Sources + // include IMSC in IMF. + TrackSourceSettings *TrackSourceSettings `locationName:"trackSourceSettings" type:"structure"` +} + +// String returns the string representation +func (s CaptionSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionSourceSettings"} + if s.AncillarySourceSettings != nil { + if err := s.AncillarySourceSettings.Validate(); err != nil { + invalidParams.AddNested("AncillarySourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbSubSourceSettings != nil { + if err := s.DvbSubSourceSettings.Validate(); err != nil { + invalidParams.AddNested("DvbSubSourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.EmbeddedSourceSettings != nil { + if err := s.EmbeddedSourceSettings.Validate(); err != nil { + invalidParams.AddNested("EmbeddedSourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.FileSourceSettings != nil { + if err := s.FileSourceSettings.Validate(); err != nil { + invalidParams.AddNested("FileSourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.TeletextSourceSettings != nil { + if err := s.TeletextSourceSettings.Validate(); err != nil { + invalidParams.AddNested("TeletextSourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.TrackSourceSettings != nil { + if err := s.TrackSourceSettings.Validate(); err != nil { + invalidParams.AddNested("TrackSourceSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAncillarySourceSettings sets the AncillarySourceSettings field's value. +func (s *CaptionSourceSettings) SetAncillarySourceSettings(v *AncillarySourceSettings) *CaptionSourceSettings { + s.AncillarySourceSettings = v + return s +} + +// SetDvbSubSourceSettings sets the DvbSubSourceSettings field's value. +func (s *CaptionSourceSettings) SetDvbSubSourceSettings(v *DvbSubSourceSettings) *CaptionSourceSettings { + s.DvbSubSourceSettings = v + return s +} + +// SetEmbeddedSourceSettings sets the EmbeddedSourceSettings field's value. +func (s *CaptionSourceSettings) SetEmbeddedSourceSettings(v *EmbeddedSourceSettings) *CaptionSourceSettings { + s.EmbeddedSourceSettings = v + return s +} + +// SetFileSourceSettings sets the FileSourceSettings field's value. +func (s *CaptionSourceSettings) SetFileSourceSettings(v *FileSourceSettings) *CaptionSourceSettings { + s.FileSourceSettings = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *CaptionSourceSettings) SetSourceType(v string) *CaptionSourceSettings { + s.SourceType = &v + return s +} + +// SetTeletextSourceSettings sets the TeletextSourceSettings field's value. +func (s *CaptionSourceSettings) SetTeletextSourceSettings(v *TeletextSourceSettings) *CaptionSourceSettings { + s.TeletextSourceSettings = v + return s +} + +// SetTrackSourceSettings sets the TrackSourceSettings field's value. +func (s *CaptionSourceSettings) SetTrackSourceSettings(v *TrackSourceSettings) *CaptionSourceSettings { + s.TrackSourceSettings = v + return s +} + +// Channel mapping (ChannelMapping) contains the group of fields that hold the +// remixing value for each channel. Units are in dB. Acceptable values are within +// the range from -60 (mute) through 6. A setting of 0 passes the input channel +// unchanged to the output channel (no attenuation or amplification). +type ChannelMapping struct { + _ struct{} `type:"structure"` + + // List of output channels + OutputChannels []*OutputChannelMapping `locationName:"outputChannels" type:"list"` +} + +// String returns the string representation +func (s ChannelMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelMapping) GoString() string { + return s.String() +} + +// SetOutputChannels sets the OutputChannels field's value. +func (s *ChannelMapping) SetOutputChannels(v []*OutputChannelMapping) *ChannelMapping { + s.OutputChannels = v + return s +} + +// Settings for CMAF encryption +type CmafEncryptionSettings struct { + _ struct{} `type:"structure"` + + // This is a 128-bit, 16-byte hex value represented by a 32-character text string. + // If this parameter is not set then the Initialization Vector will follow the + // segment number by default. + ConstantInitializationVector *string `locationName:"constantInitializationVector" min:"32" type:"string"` + + // Encrypts the segments with the given encryption scheme. Leave blank to disable. + // Selecting 'Disabled' in the web interface also disables encryption. + EncryptionMethod *string `locationName:"encryptionMethod" type:"string" enum:"CmafEncryptionType"` + + // The Initialization Vector is a 128-bit number used in conjunction with the + // key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed + // in the manifest. Otherwise Initialization Vector is not in the manifest. + InitializationVectorInManifest *string `locationName:"initializationVectorInManifest" type:"string" enum:"CmafInitializationVectorInManifest"` + + // Use these settings to set up encryption with a static key provider. + StaticKeyProvider *StaticKeyProvider `locationName:"staticKeyProvider" type:"structure"` + + // Indicates which type of key provider is used for encryption. + Type *string `locationName:"type" type:"string" enum:"CmafKeyProviderType"` +} + +// String returns the string representation +func (s CmafEncryptionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafEncryptionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CmafEncryptionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CmafEncryptionSettings"} + if s.ConstantInitializationVector != nil && len(*s.ConstantInitializationVector) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ConstantInitializationVector", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConstantInitializationVector sets the ConstantInitializationVector field's value. +func (s *CmafEncryptionSettings) SetConstantInitializationVector(v string) *CmafEncryptionSettings { + s.ConstantInitializationVector = &v + return s +} + +// SetEncryptionMethod sets the EncryptionMethod field's value. +func (s *CmafEncryptionSettings) SetEncryptionMethod(v string) *CmafEncryptionSettings { + s.EncryptionMethod = &v + return s +} + +// SetInitializationVectorInManifest sets the InitializationVectorInManifest field's value. +func (s *CmafEncryptionSettings) SetInitializationVectorInManifest(v string) *CmafEncryptionSettings { + s.InitializationVectorInManifest = &v + return s +} + +// SetStaticKeyProvider sets the StaticKeyProvider field's value. +func (s *CmafEncryptionSettings) SetStaticKeyProvider(v *StaticKeyProvider) *CmafEncryptionSettings { + s.StaticKeyProvider = v + return s +} + +// SetType sets the Type field's value. +func (s *CmafEncryptionSettings) SetType(v string) *CmafEncryptionSettings { + s.Type = &v + return s +} + +// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to +// CMAF_GROUP_SETTINGS. Each output in a CMAF Output Group may only contain +// a single video, audio, or caption output. +type CmafGroupSettings struct { + _ struct{} `type:"structure"` + + // A partial URI prefix that will be put in the manifest file at the top level + // BaseURL element. Can be used if streams are delivered from a different URL + // than the manifest file. + BaseUrl *string `locationName:"baseUrl" type:"string"` + + // When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client + // from saving media segments for later replay. + ClientCache *string `locationName:"clientCache" type:"string" enum:"CmafClientCache"` + + // Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist + // generation. + CodecSpecification *string `locationName:"codecSpecification" type:"string" enum:"CmafCodecSpecification"` + + // Use Destination (Destination) to specify the S3 output location and the output + // filename base. Destination accepts format identifiers. If you do not specify + // the base filename in the URI, the service will use the filename of the input + // file. If your job has multiple inputs, the service uses the filename of the + // first input file. + Destination *string `locationName:"destination" type:"string"` + + // DRM settings. + Encryption *CmafEncryptionSettings `locationName:"encryption" type:"structure"` + + // Length of fragments to generate (in seconds). Fragment length must be compatible + // with GOP size and Framerate. Note that fragments will end on the next keyframe + // after this number of seconds, so actual fragment length may be longer. When + // Emit Single File is checked, the fragmentation is internal to a single output + // file and it does not cause the creation of many output files as in other + // output types. + FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` + + // When set to GZIP, compresses HLS playlist. + ManifestCompression *string `locationName:"manifestCompression" type:"string" enum:"CmafManifestCompression"` + + // Indicates whether the output manifest should use floating point values for + // segment duration. + ManifestDurationFormat *string `locationName:"manifestDurationFormat" type:"string" enum:"CmafManifestDurationFormat"` + + // Minimum time of initially buffered media that is needed to ensure smooth + // playout. + MinBufferTime *int64 `locationName:"minBufferTime" type:"integer"` + + // Keep this setting at the default value of 0, unless you are troubleshooting + // a problem with how devices play back the end of your video asset. If you + // know that player devices are hanging on the final segment of your video because + // the length of your final segment is too short, use this setting to specify + // a minimum final segment length, in seconds. Choose a value that is greater + // than or equal to 1 and less than your segment length. When you specify a + // value for this setting, the encoder will combine any final segment that is + // shorter than the length that you specify with the previous segment. For example, + // your segment length is 3 seconds and your final segment is .5 seconds without + // a minimum final segment length; when you set the minimum final segment length + // to 1, your final segment is 3.5 seconds. + MinFinalSegmentLength *float64 `locationName:"minFinalSegmentLength" type:"double"` + + // When set to SINGLE_FILE, a single output file is generated, which is internally + // segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, + // separate segment files will be created. + SegmentControl *string `locationName:"segmentControl" type:"string" enum:"CmafSegmentControl"` + + // Use this setting to specify the length, in seconds, of each individual CMAF + // segment. This value applies to the whole package; that is, to every output + // in the output group. Note that segments end on the first keyframe after this + // number of seconds, so the actual segment length might be slightly longer. + // If you set Segment control (CmafSegmentControl) to single file, the service + // puts the content of each output in a single file that has metadata that marks + // these segments. If you set it to segmented files, the service creates multiple + // files for each output, each with the content of one segment. + SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` + + // Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag + // of variant manifest. + StreamInfResolution *string `locationName:"streamInfResolution" type:"string" enum:"CmafStreamInfResolution"` + + // When set to ENABLED, a DASH MPD manifest will be generated for this output. + WriteDashManifest *string `locationName:"writeDashManifest" type:"string" enum:"CmafWriteDASHManifest"` + + // When set to ENABLED, an Apple HLS manifest will be generated for this output. + WriteHlsManifest *string `locationName:"writeHlsManifest" type:"string" enum:"CmafWriteHLSManifest"` +} + +// String returns the string representation +func (s CmafGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CmafGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CmafGroupSettings"} + if s.FragmentLength != nil && *s.FragmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) + } + if s.SegmentLength != nil && *s.SegmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) + } + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBaseUrl sets the BaseUrl field's value. +func (s *CmafGroupSettings) SetBaseUrl(v string) *CmafGroupSettings { + s.BaseUrl = &v + return s +} + +// SetClientCache sets the ClientCache field's value. +func (s *CmafGroupSettings) SetClientCache(v string) *CmafGroupSettings { + s.ClientCache = &v + return s +} + +// SetCodecSpecification sets the CodecSpecification field's value. +func (s *CmafGroupSettings) SetCodecSpecification(v string) *CmafGroupSettings { + s.CodecSpecification = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *CmafGroupSettings) SetDestination(v string) *CmafGroupSettings { + s.Destination = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *CmafGroupSettings) SetEncryption(v *CmafEncryptionSettings) *CmafGroupSettings { + s.Encryption = v + return s +} + +// SetFragmentLength sets the FragmentLength field's value. +func (s *CmafGroupSettings) SetFragmentLength(v int64) *CmafGroupSettings { + s.FragmentLength = &v + return s +} + +// SetManifestCompression sets the ManifestCompression field's value. +func (s *CmafGroupSettings) SetManifestCompression(v string) *CmafGroupSettings { + s.ManifestCompression = &v + return s +} + +// SetManifestDurationFormat sets the ManifestDurationFormat field's value. +func (s *CmafGroupSettings) SetManifestDurationFormat(v string) *CmafGroupSettings { + s.ManifestDurationFormat = &v + return s +} + +// SetMinBufferTime sets the MinBufferTime field's value. +func (s *CmafGroupSettings) SetMinBufferTime(v int64) *CmafGroupSettings { + s.MinBufferTime = &v + return s +} + +// SetMinFinalSegmentLength sets the MinFinalSegmentLength field's value. +func (s *CmafGroupSettings) SetMinFinalSegmentLength(v float64) *CmafGroupSettings { + s.MinFinalSegmentLength = &v + return s +} + +// SetSegmentControl sets the SegmentControl field's value. +func (s *CmafGroupSettings) SetSegmentControl(v string) *CmafGroupSettings { + s.SegmentControl = &v + return s +} + +// SetSegmentLength sets the SegmentLength field's value. +func (s *CmafGroupSettings) SetSegmentLength(v int64) *CmafGroupSettings { + s.SegmentLength = &v + return s +} + +// SetStreamInfResolution sets the StreamInfResolution field's value. +func (s *CmafGroupSettings) SetStreamInfResolution(v string) *CmafGroupSettings { + s.StreamInfResolution = &v + return s +} + +// SetWriteDashManifest sets the WriteDashManifest field's value. +func (s *CmafGroupSettings) SetWriteDashManifest(v string) *CmafGroupSettings { + s.WriteDashManifest = &v + return s +} + +// SetWriteHlsManifest sets the WriteHlsManifest field's value. +func (s *CmafGroupSettings) SetWriteHlsManifest(v string) *CmafGroupSettings { + s.WriteHlsManifest = &v + return s +} + +// Settings for color correction. +type ColorCorrector struct { + _ struct{} `type:"structure"` + + // Brightness level. + Brightness *int64 `locationName:"brightness" min:"1" type:"integer"` + + // Determines if colorspace conversion will be performed. If set to _None_, + // no conversion will be performed. If _Force 601_ or _Force 709_ are selected, + // conversion will be performed for inputs with differing colorspaces. An input's + // colorspace can be specified explicitly in the "Video Selector":#inputs-video_selector + // if necessary. + ColorSpaceConversion *string `locationName:"colorSpaceConversion" type:"string" enum:"ColorSpaceConversion"` + + // Contrast level. + Contrast *int64 `locationName:"contrast" min:"1" type:"integer"` + + // Use the HDR master display (Hdr10Metadata) settings to correct HDR metadata + // or to provide missing metadata. Note that these settings are not color correction. + Hdr10Metadata *Hdr10Metadata `locationName:"hdr10Metadata" type:"structure"` + + // Hue in degrees. + Hue *int64 `locationName:"hue" type:"integer"` + + // Saturation level. + Saturation *int64 `locationName:"saturation" min:"1" type:"integer"` +} + +// String returns the string representation +func (s ColorCorrector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ColorCorrector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ColorCorrector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ColorCorrector"} + if s.Brightness != nil && *s.Brightness < 1 { + invalidParams.Add(request.NewErrParamMinValue("Brightness", 1)) + } + if s.Contrast != nil && *s.Contrast < 1 { + invalidParams.Add(request.NewErrParamMinValue("Contrast", 1)) + } + if s.Hue != nil && *s.Hue < -180 { + invalidParams.Add(request.NewErrParamMinValue("Hue", -180)) + } + if s.Saturation != nil && *s.Saturation < 1 { + invalidParams.Add(request.NewErrParamMinValue("Saturation", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBrightness sets the Brightness field's value. +func (s *ColorCorrector) SetBrightness(v int64) *ColorCorrector { + s.Brightness = &v + return s +} + +// SetColorSpaceConversion sets the ColorSpaceConversion field's value. +func (s *ColorCorrector) SetColorSpaceConversion(v string) *ColorCorrector { + s.ColorSpaceConversion = &v + return s +} + +// SetContrast sets the Contrast field's value. +func (s *ColorCorrector) SetContrast(v int64) *ColorCorrector { + s.Contrast = &v + return s +} + +// SetHdr10Metadata sets the Hdr10Metadata field's value. +func (s *ColorCorrector) SetHdr10Metadata(v *Hdr10Metadata) *ColorCorrector { + s.Hdr10Metadata = v + return s +} + +// SetHue sets the Hue field's value. +func (s *ColorCorrector) SetHue(v int64) *ColorCorrector { + s.Hue = &v + return s +} + +// SetSaturation sets the Saturation field's value. +func (s *ColorCorrector) SetSaturation(v int64) *ColorCorrector { + s.Saturation = &v + return s +} + +// Container specific settings. +type ContainerSettings struct { + _ struct{} `type:"structure"` + + // Container for this output. Some containers require a container settings object. + // If not specified, the default object will be created. + Container *string `locationName:"container" type:"string" enum:"ContainerType"` + + // Settings for F4v container + F4vSettings *F4vSettings `locationName:"f4vSettings" type:"structure"` + + // Settings for M2TS Container. + M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"` + + // Settings for TS segments in HLS + M3u8Settings *M3u8Settings `locationName:"m3u8Settings" type:"structure"` + + // Settings for MOV Container. + MovSettings *MovSettings `locationName:"movSettings" type:"structure"` + + // Settings for MP4 Container + Mp4Settings *Mp4Settings `locationName:"mp4Settings" type:"structure"` +} + +// String returns the string representation +func (s ContainerSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContainerSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContainerSettings"} + if s.M2tsSettings != nil { + if err := s.M2tsSettings.Validate(); err != nil { + invalidParams.AddNested("M2tsSettings", err.(request.ErrInvalidParams)) + } + } + if s.M3u8Settings != nil { + if err := s.M3u8Settings.Validate(); err != nil { + invalidParams.AddNested("M3u8Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainer sets the Container field's value. +func (s *ContainerSettings) SetContainer(v string) *ContainerSettings { + s.Container = &v + return s +} + +// SetF4vSettings sets the F4vSettings field's value. +func (s *ContainerSettings) SetF4vSettings(v *F4vSettings) *ContainerSettings { + s.F4vSettings = v + return s +} + +// SetM2tsSettings sets the M2tsSettings field's value. +func (s *ContainerSettings) SetM2tsSettings(v *M2tsSettings) *ContainerSettings { + s.M2tsSettings = v + return s +} + +// SetM3u8Settings sets the M3u8Settings field's value. +func (s *ContainerSettings) SetM3u8Settings(v *M3u8Settings) *ContainerSettings { + s.M3u8Settings = v + return s +} + +// SetMovSettings sets the MovSettings field's value. +func (s *ContainerSettings) SetMovSettings(v *MovSettings) *ContainerSettings { + s.MovSettings = v + return s +} + +// SetMp4Settings sets the Mp4Settings field's value. +func (s *ContainerSettings) SetMp4Settings(v *Mp4Settings) *ContainerSettings { + s.Mp4Settings = v + return s +} + +// Send your create job request with your job settings and IAM role. Optionally, +// include user metadata and the ARN for the queue. +type CreateJobInput struct { + _ struct{} `type:"structure"` + + // This is a beta feature. If you are interested in using this feature, please + // contact AWS customer support. + AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` + + // Optional. Choose a tag type that AWS Billing and Cost Management will use + // to sort your AWS Elemental MediaConvert costs on any billing report that + // you set up. Any transcoding outputs that don't have an associated tag will + // appear in your billing report unsorted. If you don't choose a valid value + // for this field, your job outputs will appear on the billing report unsorted. + BillingTagsSource *string `locationName:"billingTagsSource" type:"string" enum:"BillingTagsSource"` + + // Idempotency token for CreateJob operation. + ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` + + // When you create a job, you can either specify a job template or specify the + // transcoding settings individually + JobTemplate *string `locationName:"jobTemplate" type:"string"` + + // Optional. When you create a job, you can specify a queue to send it to. If + // you don't specify, the job will go to the default queue. For more about queues, + // see the User Guide topic at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html. + Queue *string `locationName:"queue" type:"string"` + + // Required. The IAM role you use for creating this job. For details about permissions, + // see the User Guide topic at the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html. + // + // Role is a required field + Role *string `locationName:"role" type:"string" required:"true"` + + // JobSettings contains all the transcode settings for a job. + // + // Settings is a required field + Settings *JobSettings `locationName:"settings" type:"structure" required:"true"` + + // User-defined metadata that you want to associate with an MediaConvert job. + // You specify metadata in key/value pairs. + UserMetadata map[string]*string `locationName:"userMetadata" type:"map"` +} + +// String returns the string representation +func (s CreateJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateJobInput"} + if s.Role == nil { + invalidParams.Add(request.NewErrParamRequired("Role")) + } + if s.Settings == nil { + invalidParams.Add(request.NewErrParamRequired("Settings")) + } + if s.AccelerationSettings != nil { + if err := s.AccelerationSettings.Validate(); err != nil { + invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) + } + } + if s.Settings != nil { + if err := s.Settings.Validate(); err != nil { + invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccelerationSettings sets the AccelerationSettings field's value. +func (s *CreateJobInput) SetAccelerationSettings(v *AccelerationSettings) *CreateJobInput { + s.AccelerationSettings = v + return s +} + +// SetBillingTagsSource sets the BillingTagsSource field's value. +func (s *CreateJobInput) SetBillingTagsSource(v string) *CreateJobInput { + s.BillingTagsSource = &v + return s +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateJobInput) SetClientRequestToken(v string) *CreateJobInput { + s.ClientRequestToken = &v + return s +} + +// SetJobTemplate sets the JobTemplate field's value. +func (s *CreateJobInput) SetJobTemplate(v string) *CreateJobInput { + s.JobTemplate = &v + return s +} + +// SetQueue sets the Queue field's value. +func (s *CreateJobInput) SetQueue(v string) *CreateJobInput { + s.Queue = &v + return s +} + +// SetRole sets the Role field's value. +func (s *CreateJobInput) SetRole(v string) *CreateJobInput { + s.Role = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *CreateJobInput) SetSettings(v *JobSettings) *CreateJobInput { + s.Settings = v + return s +} + +// SetUserMetadata sets the UserMetadata field's value. +func (s *CreateJobInput) SetUserMetadata(v map[string]*string) *CreateJobInput { + s.UserMetadata = v + return s +} + +// Successful create job requests will return the job JSON. +type CreateJobOutput struct { + _ struct{} `type:"structure"` + + // Each job converts an input file into an output file or files. For more information, + // see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html + Job *Job `locationName:"job" type:"structure"` +} + +// String returns the string representation +func (s CreateJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateJobOutput) GoString() string { + return s.String() +} + +// SetJob sets the Job field's value. +func (s *CreateJobOutput) SetJob(v *Job) *CreateJobOutput { + s.Job = v + return s +} + +// Send your create job template request with the name of the template and the +// JSON for the template. The template JSON should include everything in a valid +// job, except for input location and filename, IAM role, and user metadata. +type CreateJobTemplateInput struct { + _ struct{} `type:"structure"` + + // This is a beta feature. If you are interested in using this feature please + // contact AWS customer support. + AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` + + // Optional. A category for the job template you are creating + Category *string `locationName:"category" type:"string"` + + // Optional. A description of the job template you are creating. + Description *string `locationName:"description" type:"string"` + + // The name of the job template you are creating. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Optional. The queue that jobs created from this template are assigned to. + // If you don't specify this, jobs will go to the default queue. + Queue *string `locationName:"queue" type:"string"` + + // JobTemplateSettings contains all the transcode settings saved in the template + // that will be applied to jobs created from it. + // + // Settings is a required field + Settings *JobTemplateSettings `locationName:"settings" type:"structure" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateJobTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateJobTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateJobTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateJobTemplateInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Settings == nil { + invalidParams.Add(request.NewErrParamRequired("Settings")) + } + if s.AccelerationSettings != nil { + if err := s.AccelerationSettings.Validate(); err != nil { + invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) + } + } + if s.Settings != nil { + if err := s.Settings.Validate(); err != nil { + invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccelerationSettings sets the AccelerationSettings field's value. +func (s *CreateJobTemplateInput) SetAccelerationSettings(v *AccelerationSettings) *CreateJobTemplateInput { + s.AccelerationSettings = v + return s +} + +// SetCategory sets the Category field's value. +func (s *CreateJobTemplateInput) SetCategory(v string) *CreateJobTemplateInput { + s.Category = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateJobTemplateInput) SetDescription(v string) *CreateJobTemplateInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateJobTemplateInput) SetName(v string) *CreateJobTemplateInput { + s.Name = &v + return s +} + +// SetQueue sets the Queue field's value. +func (s *CreateJobTemplateInput) SetQueue(v string) *CreateJobTemplateInput { + s.Queue = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *CreateJobTemplateInput) SetSettings(v *JobTemplateSettings) *CreateJobTemplateInput { + s.Settings = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateJobTemplateInput) SetTags(v map[string]*string) *CreateJobTemplateInput { + s.Tags = v + return s +} + +// Successful create job template requests will return the template JSON. +type CreateJobTemplateOutput struct { + _ struct{} `type:"structure"` + + // A job template is a pre-made set of encoding instructions that you can use + // to quickly create a job. + JobTemplate *JobTemplate `locationName:"jobTemplate" type:"structure"` +} + +// String returns the string representation +func (s CreateJobTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateJobTemplateOutput) GoString() string { + return s.String() +} + +// SetJobTemplate sets the JobTemplate field's value. +func (s *CreateJobTemplateOutput) SetJobTemplate(v *JobTemplate) *CreateJobTemplateOutput { + s.JobTemplate = v + return s +} + +// Send your create preset request with the name of the preset and the JSON +// for the output settings specified by the preset. +type CreatePresetInput struct { + _ struct{} `type:"structure"` + + // Optional. A category for the preset you are creating. + Category *string `locationName:"category" type:"string"` + + // Optional. A description of the preset you are creating. + Description *string `locationName:"description" type:"string"` + + // The name of the preset you are creating. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Settings for preset + // + // Settings is a required field + Settings *PresetSettings `locationName:"settings" type:"structure" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreatePresetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePresetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePresetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePresetInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Settings == nil { + invalidParams.Add(request.NewErrParamRequired("Settings")) + } + if s.Settings != nil { + if err := s.Settings.Validate(); err != nil { + invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *CreatePresetInput) SetCategory(v string) *CreatePresetInput { + s.Category = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreatePresetInput) SetDescription(v string) *CreatePresetInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreatePresetInput) SetName(v string) *CreatePresetInput { + s.Name = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *CreatePresetInput) SetSettings(v *PresetSettings) *CreatePresetInput { + s.Settings = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreatePresetInput) SetTags(v map[string]*string) *CreatePresetInput { + s.Tags = v + return s +} + +// Successful create preset requests will return the preset JSON. +type CreatePresetOutput struct { + _ struct{} `type:"structure"` + + // A preset is a collection of preconfigured media conversion settings that + // you want MediaConvert to apply to the output during the conversion process. + Preset *Preset `locationName:"preset" type:"structure"` +} + +// String returns the string representation +func (s CreatePresetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePresetOutput) GoString() string { + return s.String() +} + +// SetPreset sets the Preset field's value. +func (s *CreatePresetOutput) SetPreset(v *Preset) *CreatePresetOutput { + s.Preset = v + return s +} + +// Create an on-demand queue by sending a CreateQueue request with the name +// of the queue. Create a reserved queue by sending a CreateQueue request with +// the pricing plan set to RESERVED and with values specified for the settings +// under reservationPlanSettings. When you create a reserved queue, you enter +// into a 12-month commitment to purchase the RTS that you specify. You can't +// cancel this commitment. +type CreateQueueInput struct { + _ struct{} `type:"structure"` + + // Optional. A description of the queue that you are creating. + Description *string `locationName:"description" type:"string"` + + // The name of the queue that you are creating. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Specifies whether the pricing plan for the queue is on-demand or reserved. + // For on-demand, you pay per minute, billed in increments of .01 minute. For + // reserved, you pay for the transcoding capacity of the entire queue, regardless + // of how much or how little you use it. Reserved pricing requires a 12-month + // commitment. When you use the API to create a queue, the default is on-demand. + PricingPlan *string `locationName:"pricingPlan" type:"string" enum:"PricingPlan"` + + // Details about the pricing plan for your reserved queue. Required for reserved + // queues and not applicable to on-demand queues. + ReservationPlanSettings *ReservationPlanSettings `locationName:"reservationPlanSettings" type:"structure"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateQueueInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.ReservationPlanSettings != nil { + if err := s.ReservationPlanSettings.Validate(); err != nil { + invalidParams.AddNested("ReservationPlanSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateQueueInput) SetDescription(v string) *CreateQueueInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateQueueInput) SetName(v string) *CreateQueueInput { + s.Name = &v + return s +} + +// SetPricingPlan sets the PricingPlan field's value. +func (s *CreateQueueInput) SetPricingPlan(v string) *CreateQueueInput { + s.PricingPlan = &v + return s +} + +// SetReservationPlanSettings sets the ReservationPlanSettings field's value. +func (s *CreateQueueInput) SetReservationPlanSettings(v *ReservationPlanSettings) *CreateQueueInput { + s.ReservationPlanSettings = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateQueueInput) SetTags(v map[string]*string) *CreateQueueInput { + s.Tags = v + return s +} + +// Successful create queue requests return the name of the queue that you just +// created and information about it. +type CreateQueueOutput struct { + _ struct{} `type:"structure"` + + // You can use queues to manage the resources that are available to your AWS + // account for running multiple transcoding jobs at the same time. If you don't + // specify a queue, the service sends all jobs through the default queue. For + // more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. + Queue *Queue `locationName:"queue" type:"structure"` +} + +// String returns the string representation +func (s CreateQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateQueueOutput) GoString() string { + return s.String() +} + +// SetQueue sets the Queue field's value. +func (s *CreateQueueOutput) SetQueue(v *Queue) *CreateQueueOutput { + s.Queue = v + return s +} + +// Specifies DRM settings for DASH outputs. +type DashIsoEncryptionSettings struct { + _ struct{} `type:"structure"` + + // Settings for use with a SPEKE key provider + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure"` +} + +// String returns the string representation +func (s DashIsoEncryptionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DashIsoEncryptionSettings) GoString() string { + return s.String() +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *DashIsoEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *DashIsoEncryptionSettings { + s.SpekeKeyProvider = v + return s +} + +// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to +// DASH_ISO_GROUP_SETTINGS. +type DashIsoGroupSettings struct { + _ struct{} `type:"structure"` + + // A partial URI prefix that will be put in the manifest (.mpd) file at the + // top level BaseURL element. Can be used if streams are delivered from a different + // URL than the manifest file. + BaseUrl *string `locationName:"baseUrl" type:"string"` + + // Use Destination (Destination) to specify the S3 output location and the output + // filename base. Destination accepts format identifiers. If you do not specify + // the base filename in the URI, the service will use the filename of the input + // file. If your job has multiple inputs, the service uses the filename of the + // first input file. + Destination *string `locationName:"destination" type:"string"` + + // DRM settings. + Encryption *DashIsoEncryptionSettings `locationName:"encryption" type:"structure"` + + // Length of fragments to generate (in seconds). Fragment length must be compatible + // with GOP size and Framerate. Note that fragments will end on the next keyframe + // after this number of seconds, so actual fragment length may be longer. When + // Emit Single File is checked, the fragmentation is internal to a single output + // file and it does not cause the creation of many output files as in other + // output types. + FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` + + // Supports HbbTV specification as indicated + HbbtvCompliance *string `locationName:"hbbtvCompliance" type:"string" enum:"DashIsoHbbtvCompliance"` + + // Minimum time of initially buffered media that is needed to ensure smooth + // playout. + MinBufferTime *int64 `locationName:"minBufferTime" type:"integer"` + + // When set to SINGLE_FILE, a single output file is generated, which is internally + // segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, + // separate segment files will be created. + SegmentControl *string `locationName:"segmentControl" type:"string" enum:"DashIsoSegmentControl"` + + // Length of mpd segments to create (in seconds). Note that segments will end + // on the next keyframe after this number of seconds, so actual segment length + // may be longer. When Emit Single File is checked, the segmentation is internal + // to a single output file and it does not cause the creation of many output + // files as in other output types. + SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` + + // When you enable Precise segment duration in manifests (writeSegmentTimelineInRepresentation), + // your DASH manifest shows precise segment durations. The segment duration + // information appears inside the SegmentTimeline element, inside SegmentTemplate + // at the Representation level. When this feature isn't enabled, the segment + // durations in your DASH manifest are approximate. The segment duration information + // appears in the duration attribute of the SegmentTemplate element. + WriteSegmentTimelineInRepresentation *string `locationName:"writeSegmentTimelineInRepresentation" type:"string" enum:"DashIsoWriteSegmentTimelineInRepresentation"` +} + +// String returns the string representation +func (s DashIsoGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DashIsoGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DashIsoGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DashIsoGroupSettings"} + if s.FragmentLength != nil && *s.FragmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) + } + if s.SegmentLength != nil && *s.SegmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBaseUrl sets the BaseUrl field's value. +func (s *DashIsoGroupSettings) SetBaseUrl(v string) *DashIsoGroupSettings { + s.BaseUrl = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *DashIsoGroupSettings) SetDestination(v string) *DashIsoGroupSettings { + s.Destination = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *DashIsoGroupSettings) SetEncryption(v *DashIsoEncryptionSettings) *DashIsoGroupSettings { + s.Encryption = v + return s +} + +// SetFragmentLength sets the FragmentLength field's value. +func (s *DashIsoGroupSettings) SetFragmentLength(v int64) *DashIsoGroupSettings { + s.FragmentLength = &v + return s +} + +// SetHbbtvCompliance sets the HbbtvCompliance field's value. +func (s *DashIsoGroupSettings) SetHbbtvCompliance(v string) *DashIsoGroupSettings { + s.HbbtvCompliance = &v + return s +} + +// SetMinBufferTime sets the MinBufferTime field's value. +func (s *DashIsoGroupSettings) SetMinBufferTime(v int64) *DashIsoGroupSettings { + s.MinBufferTime = &v + return s +} + +// SetSegmentControl sets the SegmentControl field's value. +func (s *DashIsoGroupSettings) SetSegmentControl(v string) *DashIsoGroupSettings { + s.SegmentControl = &v + return s +} + +// SetSegmentLength sets the SegmentLength field's value. +func (s *DashIsoGroupSettings) SetSegmentLength(v int64) *DashIsoGroupSettings { + s.SegmentLength = &v + return s +} + +// SetWriteSegmentTimelineInRepresentation sets the WriteSegmentTimelineInRepresentation field's value. +func (s *DashIsoGroupSettings) SetWriteSegmentTimelineInRepresentation(v string) *DashIsoGroupSettings { + s.WriteSegmentTimelineInRepresentation = &v + return s +} + +// Settings for deinterlacer +type Deinterlacer struct { + _ struct{} `type:"structure"` + + // Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) + // or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces + // sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) + // OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling + // headline at the bottom of the frame. + Algorithm *string `locationName:"algorithm" type:"string" enum:"DeinterlaceAlgorithm"` + + // - When set to NORMAL (default), the deinterlacer does not convert frames + // that are tagged in metadata as progressive. It will only convert those that + // are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer + // converts every frame to progressive - even those that are already tagged + // as progressive. Turn Force mode on only if there is a good chance that the + // metadata has tagged frames as progressive when they are not progressive. + // Do not turn on otherwise; processing frames that are already progressive + // into progressive will probably result in lower quality video. + Control *string `locationName:"control" type:"string" enum:"DeinterlacerControl"` + + // Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. + // Default is Deinterlace. - Deinterlace converts interlaced to progressive. + // - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. + // - Adaptive auto-detects and converts to progressive. + Mode *string `locationName:"mode" type:"string" enum:"DeinterlacerMode"` +} + +// String returns the string representation +func (s Deinterlacer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Deinterlacer) GoString() string { + return s.String() +} + +// SetAlgorithm sets the Algorithm field's value. +func (s *Deinterlacer) SetAlgorithm(v string) *Deinterlacer { + s.Algorithm = &v + return s +} + +// SetControl sets the Control field's value. +func (s *Deinterlacer) SetControl(v string) *Deinterlacer { + s.Control = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *Deinterlacer) SetMode(v string) *Deinterlacer { + s.Mode = &v + return s +} + +// Delete a job template by sending a request with the job template name +type DeleteJobTemplateInput struct { + _ struct{} `type:"structure"` + + // The name of the job template to be deleted. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteJobTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteJobTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteJobTemplateInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteJobTemplateInput) SetName(v string) *DeleteJobTemplateInput { + s.Name = &v + return s +} + +// Delete job template requests will return an OK message or error message with +// an empty body. +type DeleteJobTemplateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteJobTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteJobTemplateOutput) GoString() string { + return s.String() +} + +// Delete a preset by sending a request with the preset name +type DeletePresetInput struct { + _ struct{} `type:"structure"` + + // The name of the preset to be deleted. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePresetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePresetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePresetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePresetInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeletePresetInput) SetName(v string) *DeletePresetInput { + s.Name = &v + return s +} + +// Delete preset requests will return an OK message or error message with an +// empty body. +type DeletePresetOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePresetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePresetOutput) GoString() string { + return s.String() +} + +// Delete a queue by sending a request with the queue name. You can't delete +// a queue with an active pricing plan or one that has unprocessed jobs in it. +type DeleteQueueInput struct { + _ struct{} `type:"structure"` + + // The name of the queue that you want to delete. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteQueueInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteQueueInput) SetName(v string) *DeleteQueueInput { + s.Name = &v + return s +} + +// Delete queue requests return an OK message or error message with an empty +// body. +type DeleteQueueOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteQueueOutput) GoString() string { + return s.String() +} + +// Send an request with an empty body to the regional API endpoint to get your +// account API endpoint. +type DescribeEndpointsInput struct { + _ struct{} `type:"structure"` + + // Optional. Max number of endpoints, up to twenty, that will be returned at + // one time. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to + // return your endpoints if any exist, or to create an endpoint for you and + // return it if one doesn't already exist. Specify GET_ONLY to return your endpoints + // if any exist, or an empty list if none exist. + Mode *string `locationName:"mode" type:"string" enum:"DescribeEndpointsMode"` + + // Use this string, provided with the response to a previous request, to request + // the next batch of endpoints. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeEndpointsInput) SetMaxResults(v int64) *DescribeEndpointsInput { + s.MaxResults = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *DescribeEndpointsInput) SetMode(v string) *DescribeEndpointsInput { + s.Mode = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEndpointsInput) SetNextToken(v string) *DescribeEndpointsInput { + s.NextToken = &v + return s +} + +// Successful describe endpoints requests will return your account API endpoint. +type DescribeEndpointsOutput struct { + _ struct{} `type:"structure"` + + // List of endpoints + Endpoints []*Endpoint `locationName:"endpoints" type:"list"` + + // Use this string to request the next batch of endpoints. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpoints sets the Endpoints field's value. +func (s *DescribeEndpointsOutput) SetEndpoints(v []*Endpoint) *DescribeEndpointsOutput { + s.Endpoints = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeEndpointsOutput) SetNextToken(v string) *DescribeEndpointsOutput { + s.NextToken = &v + return s +} + +// Removes an association between the Amazon Resource Name (ARN) of an AWS Certificate +// Manager (ACM) certificate and an AWS Elemental MediaConvert resource. +type DisassociateCertificateInput struct { + _ struct{} `type:"structure"` + + // The ARN of the ACM certificate that you want to disassociate from your MediaConvert + // resource. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateCertificateInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DisassociateCertificateInput) SetArn(v string) *DisassociateCertificateInput { + s.Arn = &v + return s +} + +// Successful disassociation of Certificate Manager Amazon Resource Name (ARN) +// with Mediaconvert returns an OK message. +type DisassociateCertificateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateCertificateOutput) GoString() string { + return s.String() +} + +// Inserts DVB Network Information Table (NIT) at the specified table repetition +// interval. +type DvbNitSettings struct { + _ struct{} `type:"structure"` + + // The numeric value placed in the Network Information Table (NIT). + NetworkId *int64 `locationName:"networkId" type:"integer"` + + // The network name text placed in the network_name_descriptor inside the Network + // Information Table. Maximum length is 256 characters. + NetworkName *string `locationName:"networkName" min:"1" type:"string"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + NitInterval *int64 `locationName:"nitInterval" min:"25" type:"integer"` +} + +// String returns the string representation +func (s DvbNitSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbNitSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbNitSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbNitSettings"} + if s.NetworkName != nil && len(*s.NetworkName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NetworkName", 1)) + } + if s.NitInterval != nil && *s.NitInterval < 25 { + invalidParams.Add(request.NewErrParamMinValue("NitInterval", 25)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNetworkId sets the NetworkId field's value. +func (s *DvbNitSettings) SetNetworkId(v int64) *DvbNitSettings { + s.NetworkId = &v + return s +} + +// SetNetworkName sets the NetworkName field's value. +func (s *DvbNitSettings) SetNetworkName(v string) *DvbNitSettings { + s.NetworkName = &v + return s +} + +// SetNitInterval sets the NitInterval field's value. +func (s *DvbNitSettings) SetNitInterval(v int64) *DvbNitSettings { + s.NitInterval = &v + return s +} + +// Inserts DVB Service Description Table (NIT) at the specified table repetition +// interval. +type DvbSdtSettings struct { + _ struct{} `type:"structure"` + + // Selects method of inserting SDT information into output stream. "Follow input + // SDT" copies SDT information from input stream to output stream. "Follow input + // SDT if present" copies SDT information from input stream to output stream + // if SDT information is present in the input, otherwise it will fall back on + // the user-defined values. Enter "SDT Manually" means user will enter the SDT + // information. "No SDT" means output stream will not contain SDT information. + OutputSdt *string `locationName:"outputSdt" type:"string" enum:"OutputSdt"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + SdtInterval *int64 `locationName:"sdtInterval" min:"25" type:"integer"` + + // The service name placed in the service_descriptor in the Service Description + // Table. Maximum length is 256 characters. + ServiceName *string `locationName:"serviceName" min:"1" type:"string"` + + // The service provider name placed in the service_descriptor in the Service + // Description Table. Maximum length is 256 characters. + ServiceProviderName *string `locationName:"serviceProviderName" min:"1" type:"string"` +} + +// String returns the string representation +func (s DvbSdtSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbSdtSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbSdtSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbSdtSettings"} + if s.SdtInterval != nil && *s.SdtInterval < 25 { + invalidParams.Add(request.NewErrParamMinValue("SdtInterval", 25)) + } + if s.ServiceName != nil && len(*s.ServiceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceName", 1)) + } + if s.ServiceProviderName != nil && len(*s.ServiceProviderName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceProviderName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOutputSdt sets the OutputSdt field's value. +func (s *DvbSdtSettings) SetOutputSdt(v string) *DvbSdtSettings { + s.OutputSdt = &v + return s +} + +// SetSdtInterval sets the SdtInterval field's value. +func (s *DvbSdtSettings) SetSdtInterval(v int64) *DvbSdtSettings { + s.SdtInterval = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *DvbSdtSettings) SetServiceName(v string) *DvbSdtSettings { + s.ServiceName = &v + return s +} + +// SetServiceProviderName sets the ServiceProviderName field's value. +func (s *DvbSdtSettings) SetServiceProviderName(v string) *DvbSdtSettings { + s.ServiceProviderName = &v + return s +} + +// DVB-Sub Destination Settings +type DvbSubDestinationSettings struct { + _ struct{} `type:"structure"` + + // If no explicit x_position or y_position is provided, setting alignment to + // centered will place the captions at the bottom center of the output. Similarly, + // setting a left alignment will align captions to the bottom left of the output. + // If x and y positions are given in conjunction with the alignment parameter, + // the font will be justified (either left or centered) relative to those coordinates. + // This option is not valid for source captions that are STL, 608/embedded or + // teletext. These source settings are already pre-defined by the caption stream. + // All burn-in and DVB-Sub font settings must match. + Alignment *string `locationName:"alignment" type:"string" enum:"DvbSubtitleAlignment"` + + // Specifies the color of the rectangle behind the captions.All burn-in and + // DVB-Sub font settings must match. + BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"DvbSubtitleBackgroundColor"` + + // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. + // Leaving this parameter blank is equivalent to setting it to 0 (transparent). + // All burn-in and DVB-Sub font settings must match. + BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` + + // Specifies the color of the burned-in captions. This option is not valid for + // source captions that are STL, 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + FontColor *string `locationName:"fontColor" type:"string" enum:"DvbSubtitleFontColor"` + + // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent.All + // burn-in and DVB-Sub font settings must match. + FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` + + // Font resolution in DPI (dots per inch); default is 96 dpi.All burn-in and + // DVB-Sub font settings must match. + FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` + + // Provide the font script, using an ISO 15924 script code, if the LanguageCode + // is not sufficient for determining the script type. Where LanguageCode or + // CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset. This is + // used to help determine the appropriate font for rendering DVB-Sub captions. + FontScript *string `locationName:"fontScript" type:"string" enum:"FontScript"` + + // A positive integer indicates the exact font size in points. Set to 0 for + // automatic font size selection. All burn-in and DVB-Sub font settings must + // match. + FontSize *int64 `locationName:"fontSize" type:"integer"` + + // Specifies font outline color. This option is not valid for source captions + // that are either 608/embedded or teletext. These source settings are already + // pre-defined by the caption stream. All burn-in and DVB-Sub font settings + // must match. + OutlineColor *string `locationName:"outlineColor" type:"string" enum:"DvbSubtitleOutlineColor"` + + // Specifies font outline size in pixels. This option is not valid for source + // captions that are either 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + OutlineSize *int64 `locationName:"outlineSize" type:"integer"` + + // Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub + // font settings must match. + ShadowColor *string `locationName:"shadowColor" type:"string" enum:"DvbSubtitleShadowColor"` + + // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving + // this parameter blank is equivalent to setting it to 0 (transparent). All + // burn-in and DVB-Sub font settings must match. + ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` + + // Specifies the horizontal offset of the shadow relative to the captions in + // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. + // All burn-in and DVB-Sub font settings must match. + ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` + + // Specifies the vertical offset of the shadow relative to the captions in pixels. + // A value of -2 would result in a shadow offset 2 pixels above the text. All + // burn-in and DVB-Sub font settings must match. + ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` + + // Only applies to jobs with input captions in Teletext or STL formats. Specify + // whether the spacing between letters in your captions is set by the captions + // grid or varies depending on letter width. Choose fixed grid to conform to + // the spacing specified in the captions file more accurately. Choose proportional + // to make the text easier to read if the captions are closed caption. + TeletextSpacing *string `locationName:"teletextSpacing" type:"string" enum:"DvbSubtitleTeletextSpacing"` + + // Specifies the horizontal position of the caption relative to the left side + // of the output in pixels. A value of 10 would result in the captions starting + // 10 pixels from the left of the output. If no explicit x_position is provided, + // the horizontal caption position will be determined by the alignment parameter. + // This option is not valid for source captions that are STL, 608/embedded or + // teletext. These source settings are already pre-defined by the caption stream. + // All burn-in and DVB-Sub font settings must match. + XPosition *int64 `locationName:"xPosition" type:"integer"` + + // Specifies the vertical position of the caption relative to the top of the + // output in pixels. A value of 10 would result in the captions starting 10 + // pixels from the top of the output. If no explicit y_position is provided, + // the caption will be positioned towards the bottom of the output. This option + // is not valid for source captions that are STL, 608/embedded or teletext. + // These source settings are already pre-defined by the caption stream. All + // burn-in and DVB-Sub font settings must match. + YPosition *int64 `locationName:"yPosition" type:"integer"` +} + +// String returns the string representation +func (s DvbSubDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbSubDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbSubDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbSubDestinationSettings"} + if s.FontResolution != nil && *s.FontResolution < 96 { + invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) + } + if s.ShadowXOffset != nil && *s.ShadowXOffset < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("ShadowXOffset", -2.147483648e+09)) + } + if s.ShadowYOffset != nil && *s.ShadowYOffset < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("ShadowYOffset", -2.147483648e+09)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlignment sets the Alignment field's value. +func (s *DvbSubDestinationSettings) SetAlignment(v string) *DvbSubDestinationSettings { + s.Alignment = &v + return s +} + +// SetBackgroundColor sets the BackgroundColor field's value. +func (s *DvbSubDestinationSettings) SetBackgroundColor(v string) *DvbSubDestinationSettings { + s.BackgroundColor = &v + return s +} + +// SetBackgroundOpacity sets the BackgroundOpacity field's value. +func (s *DvbSubDestinationSettings) SetBackgroundOpacity(v int64) *DvbSubDestinationSettings { + s.BackgroundOpacity = &v + return s +} + +// SetFontColor sets the FontColor field's value. +func (s *DvbSubDestinationSettings) SetFontColor(v string) *DvbSubDestinationSettings { + s.FontColor = &v + return s +} + +// SetFontOpacity sets the FontOpacity field's value. +func (s *DvbSubDestinationSettings) SetFontOpacity(v int64) *DvbSubDestinationSettings { + s.FontOpacity = &v + return s +} + +// SetFontResolution sets the FontResolution field's value. +func (s *DvbSubDestinationSettings) SetFontResolution(v int64) *DvbSubDestinationSettings { + s.FontResolution = &v + return s +} + +// SetFontScript sets the FontScript field's value. +func (s *DvbSubDestinationSettings) SetFontScript(v string) *DvbSubDestinationSettings { + s.FontScript = &v + return s +} + +// SetFontSize sets the FontSize field's value. +func (s *DvbSubDestinationSettings) SetFontSize(v int64) *DvbSubDestinationSettings { + s.FontSize = &v + return s +} + +// SetOutlineColor sets the OutlineColor field's value. +func (s *DvbSubDestinationSettings) SetOutlineColor(v string) *DvbSubDestinationSettings { + s.OutlineColor = &v + return s +} + +// SetOutlineSize sets the OutlineSize field's value. +func (s *DvbSubDestinationSettings) SetOutlineSize(v int64) *DvbSubDestinationSettings { + s.OutlineSize = &v + return s +} + +// SetShadowColor sets the ShadowColor field's value. +func (s *DvbSubDestinationSettings) SetShadowColor(v string) *DvbSubDestinationSettings { + s.ShadowColor = &v + return s +} + +// SetShadowOpacity sets the ShadowOpacity field's value. +func (s *DvbSubDestinationSettings) SetShadowOpacity(v int64) *DvbSubDestinationSettings { + s.ShadowOpacity = &v + return s +} + +// SetShadowXOffset sets the ShadowXOffset field's value. +func (s *DvbSubDestinationSettings) SetShadowXOffset(v int64) *DvbSubDestinationSettings { + s.ShadowXOffset = &v + return s +} + +// SetShadowYOffset sets the ShadowYOffset field's value. +func (s *DvbSubDestinationSettings) SetShadowYOffset(v int64) *DvbSubDestinationSettings { + s.ShadowYOffset = &v + return s +} + +// SetTeletextSpacing sets the TeletextSpacing field's value. +func (s *DvbSubDestinationSettings) SetTeletextSpacing(v string) *DvbSubDestinationSettings { + s.TeletextSpacing = &v + return s +} + +// SetXPosition sets the XPosition field's value. +func (s *DvbSubDestinationSettings) SetXPosition(v int64) *DvbSubDestinationSettings { + s.XPosition = &v + return s +} + +// SetYPosition sets the YPosition field's value. +func (s *DvbSubDestinationSettings) SetYPosition(v int64) *DvbSubDestinationSettings { + s.YPosition = &v + return s +} + +// DVB Sub Source Settings +type DvbSubSourceSettings struct { + _ struct{} `type:"structure"` + + // When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source + // content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, + // regardless of selectors. + Pid *int64 `locationName:"pid" min:"1" type:"integer"` +} + +// String returns the string representation +func (s DvbSubSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbSubSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbSubSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbSubSourceSettings"} + if s.Pid != nil && *s.Pid < 1 { + invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPid sets the Pid field's value. +func (s *DvbSubSourceSettings) SetPid(v int64) *DvbSubSourceSettings { + s.Pid = &v + return s +} + +// Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. +type DvbTdtSettings struct { + _ struct{} `type:"structure"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + TdtInterval *int64 `locationName:"tdtInterval" min:"1000" type:"integer"` +} + +// String returns the string representation +func (s DvbTdtSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbTdtSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbTdtSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbTdtSettings"} + if s.TdtInterval != nil && *s.TdtInterval < 1000 { + invalidParams.Add(request.NewErrParamMinValue("TdtInterval", 1000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTdtInterval sets the TdtInterval field's value. +func (s *DvbTdtSettings) SetTdtInterval(v int64) *DvbTdtSettings { + s.TdtInterval = &v + return s +} + +// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to +// the value EAC3. +type Eac3Settings struct { + _ struct{} `type:"structure"` + + // If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. + // Only used for 3/2 coding mode. + AttenuationControl *string `locationName:"attenuationControl" type:"string" enum:"Eac3AttenuationControl"` + + // Average bitrate in bits/second. Valid bitrates depend on the coding mode. + Bitrate *int64 `locationName:"bitrate" min:"64000" type:"integer"` + + // Specifies the "Bitstream Mode" (bsmod) for the emitted E-AC-3 stream. See + // ATSC A/52-2012 (Annex E) for background on these values. + BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Eac3BitstreamMode"` + + // Dolby Digital Plus coding mode. Determines number of channels. + CodingMode *string `locationName:"codingMode" type:"string" enum:"Eac3CodingMode"` + + // Activates a DC highpass filter for all input channels. + DcFilter *string `locationName:"dcFilter" type:"string" enum:"Eac3DcFilter"` + + // Sets the dialnorm for the output. If blank and input audio is Dolby Digital + // Plus, dialnorm will be passed through. + Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` + + // Enables Dynamic Range Compression that restricts the absolute peak level + // for a signal. + DynamicRangeCompressionLine *string `locationName:"dynamicRangeCompressionLine" type:"string" enum:"Eac3DynamicRangeCompressionLine"` + + // Enables Heavy Dynamic Range Compression, ensures that the instantaneous signal + // peaks do not exceed specified levels. + DynamicRangeCompressionRf *string `locationName:"dynamicRangeCompressionRf" type:"string" enum:"Eac3DynamicRangeCompressionRf"` + + // When encoding 3/2 audio, controls whether the LFE channel is enabled + LfeControl *string `locationName:"lfeControl" type:"string" enum:"Eac3LfeControl"` + + // Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only + // valid with 3_2_LFE coding mode. + LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Eac3LfeFilter"` + + // Left only/Right only center mix level. Only used for 3/2 coding mode.Valid + // values: 3.0, 1.5, 0.0, -1.5 -3.0 -4.5 -6.0 -60 + LoRoCenterMixLevel *float64 `locationName:"loRoCenterMixLevel" type:"double"` + + // Left only/Right only surround mix level. Only used for 3/2 coding mode.Valid + // values: -1.5 -3.0 -4.5 -6.0 -60 + LoRoSurroundMixLevel *float64 `locationName:"loRoSurroundMixLevel" type:"double"` + + // Left total/Right total center mix level. Only used for 3/2 coding mode.Valid + // values: 3.0, 1.5, 0.0, -1.5 -3.0 -4.5 -6.0 -60 + LtRtCenterMixLevel *float64 `locationName:"ltRtCenterMixLevel" type:"double"` + + // Left total/Right total surround mix level. Only used for 3/2 coding mode.Valid + // values: -1.5 -3.0 -4.5 -6.0 -60 + LtRtSurroundMixLevel *float64 `locationName:"ltRtSurroundMixLevel" type:"double"` + + // When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, + // or DolbyE decoder that supplied this audio data. If audio was not supplied + // from one of these streams, then the static metadata settings will be used. + MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Eac3MetadataControl"` + + // When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is + // present on the input. this detection is dynamic over the life of the transcode. + // Inputs that alternate between DD+ and non-DD+ content will have a consistent + // DD+ output as the system alternates between passthrough and encoding. + PassthroughControl *string `locationName:"passthroughControl" type:"string" enum:"Eac3PassthroughControl"` + + // Controls the amount of phase-shift applied to the surround channels. Only + // used for 3/2 coding mode. + PhaseControl *string `locationName:"phaseControl" type:"string" enum:"Eac3PhaseControl"` + + // Sample rate in hz. Sample rate is always 48000. + SampleRate *int64 `locationName:"sampleRate" min:"48000" type:"integer"` + + // Stereo downmix preference. Only used for 3/2 coding mode. + StereoDownmix *string `locationName:"stereoDownmix" type:"string" enum:"Eac3StereoDownmix"` + + // When encoding 3/2 audio, sets whether an extra center back surround channel + // is matrix encoded into the left and right surround channels. + SurroundExMode *string `locationName:"surroundExMode" type:"string" enum:"Eac3SurroundExMode"` + + // When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into + // the two channels. + SurroundMode *string `locationName:"surroundMode" type:"string" enum:"Eac3SurroundMode"` +} + +// String returns the string representation +func (s Eac3Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Eac3Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Eac3Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Eac3Settings"} + if s.Bitrate != nil && *s.Bitrate < 64000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 64000)) + } + if s.Dialnorm != nil && *s.Dialnorm < 1 { + invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) + } + if s.SampleRate != nil && *s.SampleRate < 48000 { + invalidParams.Add(request.NewErrParamMinValue("SampleRate", 48000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttenuationControl sets the AttenuationControl field's value. +func (s *Eac3Settings) SetAttenuationControl(v string) *Eac3Settings { + s.AttenuationControl = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *Eac3Settings) SetBitrate(v int64) *Eac3Settings { + s.Bitrate = &v + return s +} + +// SetBitstreamMode sets the BitstreamMode field's value. +func (s *Eac3Settings) SetBitstreamMode(v string) *Eac3Settings { + s.BitstreamMode = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *Eac3Settings) SetCodingMode(v string) *Eac3Settings { + s.CodingMode = &v + return s +} + +// SetDcFilter sets the DcFilter field's value. +func (s *Eac3Settings) SetDcFilter(v string) *Eac3Settings { + s.DcFilter = &v + return s +} + +// SetDialnorm sets the Dialnorm field's value. +func (s *Eac3Settings) SetDialnorm(v int64) *Eac3Settings { + s.Dialnorm = &v + return s +} + +// SetDynamicRangeCompressionLine sets the DynamicRangeCompressionLine field's value. +func (s *Eac3Settings) SetDynamicRangeCompressionLine(v string) *Eac3Settings { + s.DynamicRangeCompressionLine = &v + return s +} + +// SetDynamicRangeCompressionRf sets the DynamicRangeCompressionRf field's value. +func (s *Eac3Settings) SetDynamicRangeCompressionRf(v string) *Eac3Settings { + s.DynamicRangeCompressionRf = &v + return s +} + +// SetLfeControl sets the LfeControl field's value. +func (s *Eac3Settings) SetLfeControl(v string) *Eac3Settings { + s.LfeControl = &v + return s +} + +// SetLfeFilter sets the LfeFilter field's value. +func (s *Eac3Settings) SetLfeFilter(v string) *Eac3Settings { + s.LfeFilter = &v + return s +} + +// SetLoRoCenterMixLevel sets the LoRoCenterMixLevel field's value. +func (s *Eac3Settings) SetLoRoCenterMixLevel(v float64) *Eac3Settings { + s.LoRoCenterMixLevel = &v + return s +} + +// SetLoRoSurroundMixLevel sets the LoRoSurroundMixLevel field's value. +func (s *Eac3Settings) SetLoRoSurroundMixLevel(v float64) *Eac3Settings { + s.LoRoSurroundMixLevel = &v + return s +} + +// SetLtRtCenterMixLevel sets the LtRtCenterMixLevel field's value. +func (s *Eac3Settings) SetLtRtCenterMixLevel(v float64) *Eac3Settings { + s.LtRtCenterMixLevel = &v + return s +} + +// SetLtRtSurroundMixLevel sets the LtRtSurroundMixLevel field's value. +func (s *Eac3Settings) SetLtRtSurroundMixLevel(v float64) *Eac3Settings { + s.LtRtSurroundMixLevel = &v + return s +} + +// SetMetadataControl sets the MetadataControl field's value. +func (s *Eac3Settings) SetMetadataControl(v string) *Eac3Settings { + s.MetadataControl = &v + return s +} + +// SetPassthroughControl sets the PassthroughControl field's value. +func (s *Eac3Settings) SetPassthroughControl(v string) *Eac3Settings { + s.PassthroughControl = &v + return s +} + +// SetPhaseControl sets the PhaseControl field's value. +func (s *Eac3Settings) SetPhaseControl(v string) *Eac3Settings { + s.PhaseControl = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *Eac3Settings) SetSampleRate(v int64) *Eac3Settings { + s.SampleRate = &v + return s +} + +// SetStereoDownmix sets the StereoDownmix field's value. +func (s *Eac3Settings) SetStereoDownmix(v string) *Eac3Settings { + s.StereoDownmix = &v + return s +} + +// SetSurroundExMode sets the SurroundExMode field's value. +func (s *Eac3Settings) SetSurroundExMode(v string) *Eac3Settings { + s.SurroundExMode = &v + return s +} + +// SetSurroundMode sets the SurroundMode field's value. +func (s *Eac3Settings) SetSurroundMode(v string) *Eac3Settings { + s.SurroundMode = &v + return s +} + +// Settings specific to embedded/ancillary caption outputs, including 608/708 +// Channel destination number. +type EmbeddedDestinationSettings struct { + _ struct{} `type:"structure"` + + // Ignore this setting unless your input captions are SCC format and your output + // container is MXF. With this combination of input captions format and output + // container, you can optionally use this setting to replace the input channel + // number with the track number that you specify. If you don't specify an output + // track number, the system uses the input channel number for the output channel + // number. This setting applies to each output individually. Channels must be + // unique and may only be combined in the following combinations: (1+3, 2+4, + // 1+4, 2+3). + Destination608ChannelNumber *int64 `locationName:"destination608ChannelNumber" min:"1" type:"integer"` +} + +// String returns the string representation +func (s EmbeddedDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmbeddedDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EmbeddedDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EmbeddedDestinationSettings"} + if s.Destination608ChannelNumber != nil && *s.Destination608ChannelNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("Destination608ChannelNumber", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination608ChannelNumber sets the Destination608ChannelNumber field's value. +func (s *EmbeddedDestinationSettings) SetDestination608ChannelNumber(v int64) *EmbeddedDestinationSettings { + s.Destination608ChannelNumber = &v + return s +} + +// Settings for embedded captions Source +type EmbeddedSourceSettings struct { + _ struct{} `type:"structure"` + + // When set to UPCONVERT, 608 data is both passed through via the "608 compatibility + // bytes" fields of the 708 wrapper as well as translated into 708. 708 data + // present in the source content will be discarded. + Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"EmbeddedConvert608To708"` + + // Specifies the 608/708 channel number within the video track from which to + // extract captions. Unused for passthrough. + Source608ChannelNumber *int64 `locationName:"source608ChannelNumber" min:"1" type:"integer"` + + // Specifies the video track index used for extracting captions. The system + // only supports one input video track, so this should always be set to '1'. + Source608TrackNumber *int64 `locationName:"source608TrackNumber" min:"1" type:"integer"` +} + +// String returns the string representation +func (s EmbeddedSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmbeddedSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EmbeddedSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EmbeddedSourceSettings"} + if s.Source608ChannelNumber != nil && *s.Source608ChannelNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("Source608ChannelNumber", 1)) + } + if s.Source608TrackNumber != nil && *s.Source608TrackNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("Source608TrackNumber", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConvert608To708 sets the Convert608To708 field's value. +func (s *EmbeddedSourceSettings) SetConvert608To708(v string) *EmbeddedSourceSettings { + s.Convert608To708 = &v + return s +} + +// SetSource608ChannelNumber sets the Source608ChannelNumber field's value. +func (s *EmbeddedSourceSettings) SetSource608ChannelNumber(v int64) *EmbeddedSourceSettings { + s.Source608ChannelNumber = &v + return s +} + +// SetSource608TrackNumber sets the Source608TrackNumber field's value. +func (s *EmbeddedSourceSettings) SetSource608TrackNumber(v int64) *EmbeddedSourceSettings { + s.Source608TrackNumber = &v + return s +} + +// Describes an account-specific API endpoint. +type Endpoint struct { + _ struct{} `type:"structure"` + + // URL of endpoint + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s Endpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Endpoint) GoString() string { + return s.String() +} + +// SetUrl sets the Url field's value. +func (s *Endpoint) SetUrl(v string) *Endpoint { + s.Url = &v + return s +} + +// Settings for F4v container +type F4vSettings struct { + _ struct{} `type:"structure"` + + // If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning + // of the archive as required for progressive downloading. Otherwise it is placed + // normally at the end. + MoovPlacement *string `locationName:"moovPlacement" type:"string" enum:"F4vMoovPlacement"` +} + +// String returns the string representation +func (s F4vSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s F4vSettings) GoString() string { + return s.String() +} + +// SetMoovPlacement sets the MoovPlacement field's value. +func (s *F4vSettings) SetMoovPlacement(v string) *F4vSettings { + s.MoovPlacement = &v + return s +} + +// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to +// FILE_GROUP_SETTINGS. +type FileGroupSettings struct { + _ struct{} `type:"structure"` + + // Use Destination (Destination) to specify the S3 output location and the output + // filename base. Destination accepts format identifiers. If you do not specify + // the base filename in the URI, the service will use the filename of the input + // file. If your job has multiple inputs, the service uses the filename of the + // first input file. + Destination *string `locationName:"destination" type:"string"` +} + +// String returns the string representation +func (s FileGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileGroupSettings) GoString() string { + return s.String() +} + +// SetDestination sets the Destination field's value. +func (s *FileGroupSettings) SetDestination(v string) *FileGroupSettings { + s.Destination = &v + return s +} + +// Settings for File-based Captions in Source +type FileSourceSettings struct { + _ struct{} `type:"structure"` + + // If set to UPCONVERT, 608 caption data is both passed through via the "608 + // compatibility bytes" fields of the 708 wrapper as well as translated into + // 708. 708 data present in the source content will be discarded. + Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"FileSourceConvert608To708"` + + // External caption file used for loading captions. Accepted file extensions + // are 'scc', 'ttml', 'dfxp', 'stl', 'srt', and 'smi'. + SourceFile *string `locationName:"sourceFile" min:"14" type:"string"` + + // Specifies a time delta in seconds to offset the captions from the source + // file. + TimeDelta *int64 `locationName:"timeDelta" type:"integer"` +} + +// String returns the string representation +func (s FileSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FileSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FileSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FileSourceSettings"} + if s.SourceFile != nil && len(*s.SourceFile) < 14 { + invalidParams.Add(request.NewErrParamMinLen("SourceFile", 14)) + } + if s.TimeDelta != nil && *s.TimeDelta < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("TimeDelta", -2.147483648e+09)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConvert608To708 sets the Convert608To708 field's value. +func (s *FileSourceSettings) SetConvert608To708(v string) *FileSourceSettings { + s.Convert608To708 = &v + return s +} + +// SetSourceFile sets the SourceFile field's value. +func (s *FileSourceSettings) SetSourceFile(v string) *FileSourceSettings { + s.SourceFile = &v + return s +} + +// SetTimeDelta sets the TimeDelta field's value. +func (s *FileSourceSettings) SetTimeDelta(v int64) *FileSourceSettings { + s.TimeDelta = &v + return s +} + +// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to +// the value FRAME_CAPTURE. +type FrameCaptureSettings struct { + _ struct{} `type:"structure"` + + // Frame capture will encode the first frame of the output stream, then one + // frame every framerateDenominator/framerateNumerator seconds. For example, + // settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of + // 1/3 frame per second) will capture the first frame, then 1 frame every 3s. + // Files will be named as filename.n.jpg where n is the 0-based sequence number + // of each Capture. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // Frame capture will encode the first frame of the output stream, then one + // frame every framerateDenominator/framerateNumerator seconds. For example, + // settings of framerateNumerator = 1 and framerateDenominator = 3 (a rate of + // 1/3 frame per second) will capture the first frame, then 1 frame every 3s. + // Files will be named as filename.NNNNNNN.jpg where N is the 0-based frame + // sequence number zero padded to 7 decimal places. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` + + // Maximum number of captures (encoded jpg output files). + MaxCaptures *int64 `locationName:"maxCaptures" min:"1" type:"integer"` + + // JPEG Quality - a higher value equals higher quality. + Quality *int64 `locationName:"quality" min:"1" type:"integer"` +} + +// String returns the string representation +func (s FrameCaptureSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FrameCaptureSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FrameCaptureSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FrameCaptureSettings"} + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + if s.MaxCaptures != nil && *s.MaxCaptures < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxCaptures", 1)) + } + if s.Quality != nil && *s.Quality < 1 { + invalidParams.Add(request.NewErrParamMinValue("Quality", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *FrameCaptureSettings) SetFramerateDenominator(v int64) *FrameCaptureSettings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *FrameCaptureSettings) SetFramerateNumerator(v int64) *FrameCaptureSettings { + s.FramerateNumerator = &v + return s +} + +// SetMaxCaptures sets the MaxCaptures field's value. +func (s *FrameCaptureSettings) SetMaxCaptures(v int64) *FrameCaptureSettings { + s.MaxCaptures = &v + return s +} + +// SetQuality sets the Quality field's value. +func (s *FrameCaptureSettings) SetQuality(v int64) *FrameCaptureSettings { + s.Quality = &v + return s +} + +// Query a job by sending a request with the job ID. +type GetJobInput struct { + _ struct{} `type:"structure"` + + // the job ID of the job. + // + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetJobInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *GetJobInput) SetId(v string) *GetJobInput { + s.Id = &v + return s +} + +// Successful get job requests will return an OK message and the job JSON. +type GetJobOutput struct { + _ struct{} `type:"structure"` + + // Each job converts an input file into an output file or files. For more information, + // see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html + Job *Job `locationName:"job" type:"structure"` +} + +// String returns the string representation +func (s GetJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetJobOutput) GoString() string { + return s.String() +} + +// SetJob sets the Job field's value. +func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { + s.Job = v + return s +} + +// Query a job template by sending a request with the job template name. +type GetJobTemplateInput struct { + _ struct{} `type:"structure"` + + // The name of the job template. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetJobTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetJobTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetJobTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetJobTemplateInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetJobTemplateInput) SetName(v string) *GetJobTemplateInput { + s.Name = &v + return s +} + +// Successful get job template requests will return an OK message and the job +// template JSON. +type GetJobTemplateOutput struct { + _ struct{} `type:"structure"` + + // A job template is a pre-made set of encoding instructions that you can use + // to quickly create a job. + JobTemplate *JobTemplate `locationName:"jobTemplate" type:"structure"` +} + +// String returns the string representation +func (s GetJobTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetJobTemplateOutput) GoString() string { + return s.String() +} + +// SetJobTemplate sets the JobTemplate field's value. +func (s *GetJobTemplateOutput) SetJobTemplate(v *JobTemplate) *GetJobTemplateOutput { + s.JobTemplate = v + return s +} + +// Query a preset by sending a request with the preset name. +type GetPresetInput struct { + _ struct{} `type:"structure"` + + // The name of the preset. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPresetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPresetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPresetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPresetInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetPresetInput) SetName(v string) *GetPresetInput { + s.Name = &v + return s +} + +// Successful get preset requests will return an OK message and the preset JSON. +type GetPresetOutput struct { + _ struct{} `type:"structure"` + + // A preset is a collection of preconfigured media conversion settings that + // you want MediaConvert to apply to the output during the conversion process. + Preset *Preset `locationName:"preset" type:"structure"` +} + +// String returns the string representation +func (s GetPresetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPresetOutput) GoString() string { + return s.String() +} + +// SetPreset sets the Preset field's value. +func (s *GetPresetOutput) SetPreset(v *Preset) *GetPresetOutput { + s.Preset = v + return s +} + +// Get information about a queue by sending a request with the queue name. +type GetQueueInput struct { + _ struct{} `type:"structure"` + + // The name of the queue that you want information about. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueueInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GetQueueInput) SetName(v string) *GetQueueInput { + s.Name = &v + return s +} + +// Successful get queue requests return an OK message and information about +// the queue in JSON. +type GetQueueOutput struct { + _ struct{} `type:"structure"` + + // You can use queues to manage the resources that are available to your AWS + // account for running multiple transcoding jobs at the same time. If you don't + // specify a queue, the service sends all jobs through the default queue. For + // more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. + Queue *Queue `locationName:"queue" type:"structure"` +} + +// String returns the string representation +func (s GetQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueueOutput) GoString() string { + return s.String() +} + +// SetQueue sets the Queue field's value. +func (s *GetQueueOutput) SetQueue(v *Queue) *GetQueueOutput { + s.Queue = v + return s +} + +// Settings for quality-defined variable bitrate encoding with the H.264 codec. +// Required when you set Rate control mode to QVBR. Not valid when you set Rate +// control mode to a value other than QVBR, or when you don't define Rate control +// mode. +type H264QvbrSettings struct { + _ struct{} `type:"structure"` + + // Use this setting only when Rate control mode is QVBR and Quality tuning level + // is Multi-pass HQ. For Max average bitrate values suited to the complexity + // of your input video, the service limits the average bitrate of the video + // part of this output to the value you choose. That is, the total size of the + // video element is less than or equal to the value you set multiplied by the + // number of seconds of encoded output. + MaxAverageBitrate *int64 `locationName:"maxAverageBitrate" min:"1000" type:"integer"` + + // Required when you use QVBR rate control mode. That is, when you specify qvbrSettings + // within h264Settings. Specify the target quality level for this output, from + // 1 to 10. Use higher numbers for greater quality. Level 10 results in nearly + // lossless compression. The quality level for most broadcast-quality transcodes + // is between 6 and 9. + QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` +} + +// String returns the string representation +func (s H264QvbrSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s H264QvbrSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *H264QvbrSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "H264QvbrSettings"} + if s.MaxAverageBitrate != nil && *s.MaxAverageBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxAverageBitrate", 1000)) + } + if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { + invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxAverageBitrate sets the MaxAverageBitrate field's value. +func (s *H264QvbrSettings) SetMaxAverageBitrate(v int64) *H264QvbrSettings { + s.MaxAverageBitrate = &v + return s +} + +// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. +func (s *H264QvbrSettings) SetQvbrQualityLevel(v int64) *H264QvbrSettings { + s.QvbrQualityLevel = &v + return s +} + +// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to +// the value H_264. +type H264Settings struct { + _ struct{} `type:"structure"` + + // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual + // quality. + AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H264AdaptiveQuantization"` + + // Average bitrate in bits/second. Required for VBR and CBR. For MS Smooth outputs, + // bitrates must be unique when rounded down to the nearest multiple of 1000. + Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` + + // Specify an H.264 level that is consistent with your output video settings. + // If you aren't sure what level to specify, choose Auto (AUTO). + CodecLevel *string `locationName:"codecLevel" type:"string" enum:"H264CodecLevel"` + + // H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the + // AVC-I License. + CodecProfile *string `locationName:"codecProfile" type:"string" enum:"H264CodecProfile"` + + // Choose Adaptive to improve subjective video quality for high-motion content. + // This will cause the service to use fewer B-frames (which infer information + // based on other frames) for high-motion portions of the video and more B-frames + // for low-motion portions. The maximum number of B-frames is limited by the + // value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). + DynamicSubGop *string `locationName:"dynamicSubGop" type:"string" enum:"H264DynamicSubGop"` + + // Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC. + EntropyEncoding *string `locationName:"entropyEncoding" type:"string" enum:"H264EntropyEncoding"` + + // Choosing FORCE_FIELD disables PAFF encoding for interlaced outputs. + FieldEncoding *string `locationName:"fieldEncoding" type:"string" enum:"H264FieldEncoding"` + + // Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. + FlickerAdaptiveQuantization *string `locationName:"flickerAdaptiveQuantization" type:"string" enum:"H264FlickerAdaptiveQuantization"` + + // If you are using the console, use the Framerate setting to specify the frame + // rate for this output. If you want to keep the same frame rate as the input + // video, choose Follow source. If you want to do frame rate conversion, choose + // a frame rate from the dropdown list or choose Custom. The framerates shown + // in the dropdown list are decimal approximations of fractions. If you choose + // Custom, specify your frame rate as a fraction. If you are creating your transcoding + // job specification as a JSON file without the console, use FramerateControl + // to specify which value the service uses for the frame rate for this output. + // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate + // from the input. Choose SPECIFIED if you want the service to use the frame + // rate you specify in the settings FramerateNumerator and FramerateDenominator. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H264FramerateControl"` + + // When set to INTERPOLATE, produces smoother motion during frame rate conversion. + FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"H264FramerateConversionAlgorithm"` + + // When you use the API for transcode jobs that use frame rate conversion, specify + // the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use + // FramerateDenominator to specify the denominator of this fraction. In this + // example, use 1001 for the value of FramerateDenominator. When you use the + // console for transcode jobs that use frame rate conversion, provide the value + // as a decimal number for Framerate. In this example, specify 23.976. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // Frame rate numerator - frame rate is a fraction, e.g. 24000 / 1001 = 23.976 + // fps. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` + + // If enable, use reference B frames for GOP structures that have B frames > + // 1. + GopBReference *string `locationName:"gopBReference" type:"string" enum:"H264GopBReference"` + + // Frequency of closed GOPs. In streaming applications, it is recommended that + // this be set to 1 so a decoder joining mid-stream will receive an IDR frame + // as quickly as possible. Setting this value to 0 will break output segmenting. + GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` + + // GOP Length (keyframe interval) in frames or seconds. Must be greater than + // zero. + GopSize *float64 `locationName:"gopSize" type:"double"` + + // Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds + // the system will convert the GOP Size into a frame count at run time. + GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"H264GopSizeUnits"` + + // Percentage of the buffer that should initially be filled (HRD buffer model). + HrdBufferInitialFillPercentage *int64 `locationName:"hrdBufferInitialFillPercentage" type:"integer"` + + // Size of buffer (HRD buffer model) in bits. For example, enter five megabits + // as 5000000. + HrdBufferSize *int64 `locationName:"hrdBufferSize" type:"integer"` + + // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. + // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce + // interlaced output with the entire output having the same field polarity (top + // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default + // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, + // behavior depends on the input scan type, as follows. - If the source is interlaced, + // the output will be interlaced with the same polarity as the source (it will + // follow the source). The output could therefore be a mix of "top field first" + // and "bottom field first". - If the source is progressive, the output will + // be interlaced with "top field first" or "bottom field first" polarity, depending + // on which of the Follow options you chose. + InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"H264InterlaceMode"` + + // Maximum bitrate in bits/second. For example, enter five megabits per second + // as 5000000. Required when Rate control mode is QVBR. + MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` + + // Enforces separation between repeated (cadence) I-frames and I-frames inserted + // by Scene Change Detection. If a scene change I-frame is within I-interval + // frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene + // change I-frame. GOP stretch requires enabling lookahead as well as setting + // I-interval. The normal cadence resumes for the next GOP. This setting is + // only used when Scene Change Detect is enabled. Note: Maximum GOP stretch + // = GOP size + Min-I-interval - 1 + MinIInterval *int64 `locationName:"minIInterval" type:"integer"` + + // Number of B-frames between reference frames. + NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" type:"integer"` + + // Number of reference frames to use. The encoder may use more than requested + // if using B-frames and/or interlaced encoding. + NumberReferenceFrames *int64 `locationName:"numberReferenceFrames" min:"1" type:"integer"` + + // Using the API, enable ParFollowSource if you want the service to use the + // pixel aspect ratio from the input. Using the console, do this by choosing + // Follow source for Pixel aspect ratio. + ParControl *string `locationName:"parControl" type:"string" enum:"H264ParControl"` + + // Pixel Aspect Ratio denominator. + ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` + + // Pixel Aspect Ratio numerator. + ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` + + // Use Quality tuning level (H264QualityTuningLevel) to specifiy whether to + // use fast single-pass, high-quality singlepass, or high-quality multipass + // video encoding. + QualityTuningLevel *string `locationName:"qualityTuningLevel" type:"string" enum:"H264QualityTuningLevel"` + + // Settings for quality-defined variable bitrate encoding with the H.264 codec. + // Required when you set Rate control mode to QVBR. Not valid when you set Rate + // control mode to a value other than QVBR, or when you don't define Rate control + // mode. + QvbrSettings *H264QvbrSettings `locationName:"qvbrSettings" type:"structure"` + + // Use this setting to specify whether this output has a variable bitrate (VBR), + // constant bitrate (CBR) or quality-defined variable bitrate (QVBR). + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H264RateControlMode"` + + // Places a PPS header on each encoded picture, even if repeated. + RepeatPps *string `locationName:"repeatPps" type:"string" enum:"H264RepeatPps"` + + // Scene change detection (inserts I-frames on scene changes). + SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H264SceneChangeDetect"` + + // Number of slices per picture. Must be less than or equal to the number of + // macroblock rows for progressive pictures, and less than or equal to half + // the number of macroblock rows for interlaced pictures. + Slices *int64 `locationName:"slices" min:"1" type:"integer"` + + // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled + // as 25fps, and audio is sped up correspondingly. + SlowPal *string `locationName:"slowPal" type:"string" enum:"H264SlowPal"` + + // Softness. Selects quantizer matrix, larger values reduce high-frequency content + // in the encoded image. + Softness *int64 `locationName:"softness" type:"integer"` + + // Adjust quantization within each frame based on spatial variation of content + // complexity. + SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"H264SpatialAdaptiveQuantization"` + + // Produces a bitstream compliant with SMPTE RP-2027. + Syntax *string `locationName:"syntax" type:"string" enum:"H264Syntax"` + + // This field applies only if the Streams > Advanced > Framerate (framerate) + // field is set to 29.970. This field works with the Streams > Advanced > Preprocessors + // > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced + // Mode field (interlace_mode) to identify the scan type for the output: Progressive, + // Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output + // from 23.976 input. - Soft: produces 23.976; the player converts this output + // to 29.97i. + Telecine *string `locationName:"telecine" type:"string" enum:"H264Telecine"` + + // Adjust quantization within each frame based on temporal variation of content + // complexity. + TemporalAdaptiveQuantization *string `locationName:"temporalAdaptiveQuantization" type:"string" enum:"H264TemporalAdaptiveQuantization"` + + // Inserts timecode for each frame as 4 bytes of an unregistered SEI message. + UnregisteredSeiTimecode *string `locationName:"unregisteredSeiTimecode" type:"string" enum:"H264UnregisteredSeiTimecode"` +} + +// String returns the string representation +func (s H264Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s H264Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *H264Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "H264Settings"} + if s.Bitrate != nil && *s.Bitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) + } + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) + } + if s.NumberReferenceFrames != nil && *s.NumberReferenceFrames < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberReferenceFrames", 1)) + } + if s.ParDenominator != nil && *s.ParDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) + } + if s.ParNumerator != nil && *s.ParNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) + } + if s.Slices != nil && *s.Slices < 1 { + invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) + } + if s.QvbrSettings != nil { + if err := s.QvbrSettings.Validate(); err != nil { + invalidParams.AddNested("QvbrSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. +func (s *H264Settings) SetAdaptiveQuantization(v string) *H264Settings { + s.AdaptiveQuantization = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *H264Settings) SetBitrate(v int64) *H264Settings { + s.Bitrate = &v + return s +} + +// SetCodecLevel sets the CodecLevel field's value. +func (s *H264Settings) SetCodecLevel(v string) *H264Settings { + s.CodecLevel = &v + return s +} + +// SetCodecProfile sets the CodecProfile field's value. +func (s *H264Settings) SetCodecProfile(v string) *H264Settings { + s.CodecProfile = &v + return s +} + +// SetDynamicSubGop sets the DynamicSubGop field's value. +func (s *H264Settings) SetDynamicSubGop(v string) *H264Settings { + s.DynamicSubGop = &v + return s +} + +// SetEntropyEncoding sets the EntropyEncoding field's value. +func (s *H264Settings) SetEntropyEncoding(v string) *H264Settings { + s.EntropyEncoding = &v + return s +} + +// SetFieldEncoding sets the FieldEncoding field's value. +func (s *H264Settings) SetFieldEncoding(v string) *H264Settings { + s.FieldEncoding = &v + return s +} + +// SetFlickerAdaptiveQuantization sets the FlickerAdaptiveQuantization field's value. +func (s *H264Settings) SetFlickerAdaptiveQuantization(v string) *H264Settings { + s.FlickerAdaptiveQuantization = &v + return s +} + +// SetFramerateControl sets the FramerateControl field's value. +func (s *H264Settings) SetFramerateControl(v string) *H264Settings { + s.FramerateControl = &v + return s +} + +// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. +func (s *H264Settings) SetFramerateConversionAlgorithm(v string) *H264Settings { + s.FramerateConversionAlgorithm = &v + return s +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *H264Settings) SetFramerateDenominator(v int64) *H264Settings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *H264Settings) SetFramerateNumerator(v int64) *H264Settings { + s.FramerateNumerator = &v + return s +} + +// SetGopBReference sets the GopBReference field's value. +func (s *H264Settings) SetGopBReference(v string) *H264Settings { + s.GopBReference = &v + return s +} + +// SetGopClosedCadence sets the GopClosedCadence field's value. +func (s *H264Settings) SetGopClosedCadence(v int64) *H264Settings { + s.GopClosedCadence = &v + return s +} + +// SetGopSize sets the GopSize field's value. +func (s *H264Settings) SetGopSize(v float64) *H264Settings { + s.GopSize = &v + return s +} + +// SetGopSizeUnits sets the GopSizeUnits field's value. +func (s *H264Settings) SetGopSizeUnits(v string) *H264Settings { + s.GopSizeUnits = &v + return s +} + +// SetHrdBufferInitialFillPercentage sets the HrdBufferInitialFillPercentage field's value. +func (s *H264Settings) SetHrdBufferInitialFillPercentage(v int64) *H264Settings { + s.HrdBufferInitialFillPercentage = &v + return s +} + +// SetHrdBufferSize sets the HrdBufferSize field's value. +func (s *H264Settings) SetHrdBufferSize(v int64) *H264Settings { + s.HrdBufferSize = &v + return s +} + +// SetInterlaceMode sets the InterlaceMode field's value. +func (s *H264Settings) SetInterlaceMode(v string) *H264Settings { + s.InterlaceMode = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *H264Settings) SetMaxBitrate(v int64) *H264Settings { + s.MaxBitrate = &v + return s +} + +// SetMinIInterval sets the MinIInterval field's value. +func (s *H264Settings) SetMinIInterval(v int64) *H264Settings { + s.MinIInterval = &v + return s +} + +// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. +func (s *H264Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *H264Settings { + s.NumberBFramesBetweenReferenceFrames = &v + return s +} + +// SetNumberReferenceFrames sets the NumberReferenceFrames field's value. +func (s *H264Settings) SetNumberReferenceFrames(v int64) *H264Settings { + s.NumberReferenceFrames = &v + return s +} + +// SetParControl sets the ParControl field's value. +func (s *H264Settings) SetParControl(v string) *H264Settings { + s.ParControl = &v + return s +} + +// SetParDenominator sets the ParDenominator field's value. +func (s *H264Settings) SetParDenominator(v int64) *H264Settings { + s.ParDenominator = &v + return s +} + +// SetParNumerator sets the ParNumerator field's value. +func (s *H264Settings) SetParNumerator(v int64) *H264Settings { + s.ParNumerator = &v + return s +} + +// SetQualityTuningLevel sets the QualityTuningLevel field's value. +func (s *H264Settings) SetQualityTuningLevel(v string) *H264Settings { + s.QualityTuningLevel = &v + return s +} + +// SetQvbrSettings sets the QvbrSettings field's value. +func (s *H264Settings) SetQvbrSettings(v *H264QvbrSettings) *H264Settings { + s.QvbrSettings = v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *H264Settings) SetRateControlMode(v string) *H264Settings { + s.RateControlMode = &v + return s +} + +// SetRepeatPps sets the RepeatPps field's value. +func (s *H264Settings) SetRepeatPps(v string) *H264Settings { + s.RepeatPps = &v + return s +} + +// SetSceneChangeDetect sets the SceneChangeDetect field's value. +func (s *H264Settings) SetSceneChangeDetect(v string) *H264Settings { + s.SceneChangeDetect = &v + return s +} + +// SetSlices sets the Slices field's value. +func (s *H264Settings) SetSlices(v int64) *H264Settings { + s.Slices = &v + return s +} + +// SetSlowPal sets the SlowPal field's value. +func (s *H264Settings) SetSlowPal(v string) *H264Settings { + s.SlowPal = &v + return s +} + +// SetSoftness sets the Softness field's value. +func (s *H264Settings) SetSoftness(v int64) *H264Settings { + s.Softness = &v + return s +} + +// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. +func (s *H264Settings) SetSpatialAdaptiveQuantization(v string) *H264Settings { + s.SpatialAdaptiveQuantization = &v + return s +} + +// SetSyntax sets the Syntax field's value. +func (s *H264Settings) SetSyntax(v string) *H264Settings { + s.Syntax = &v + return s +} + +// SetTelecine sets the Telecine field's value. +func (s *H264Settings) SetTelecine(v string) *H264Settings { + s.Telecine = &v + return s +} + +// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. +func (s *H264Settings) SetTemporalAdaptiveQuantization(v string) *H264Settings { + s.TemporalAdaptiveQuantization = &v + return s +} + +// SetUnregisteredSeiTimecode sets the UnregisteredSeiTimecode field's value. +func (s *H264Settings) SetUnregisteredSeiTimecode(v string) *H264Settings { + s.UnregisteredSeiTimecode = &v + return s +} + +// Settings for quality-defined variable bitrate encoding with the H.265 codec. +// Required when you set Rate control mode to QVBR. Not valid when you set Rate +// control mode to a value other than QVBR, or when you don't define Rate control +// mode. +type H265QvbrSettings struct { + _ struct{} `type:"structure"` + + // Use this setting only when Rate control mode is QVBR and Quality tuning level + // is Multi-pass HQ. For Max average bitrate values suited to the complexity + // of your input video, the service limits the average bitrate of the video + // part of this output to the value you choose. That is, the total size of the + // video element is less than or equal to the value you set multiplied by the + // number of seconds of encoded output. + MaxAverageBitrate *int64 `locationName:"maxAverageBitrate" min:"1000" type:"integer"` + + // Required when you use QVBR rate control mode. That is, when you specify qvbrSettings + // within h265Settings. Specify the target quality level for this output, from + // 1 to 10. Use higher numbers for greater quality. Level 10 results in nearly + // lossless compression. The quality level for most broadcast-quality transcodes + // is between 6 and 9. + QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` +} + +// String returns the string representation +func (s H265QvbrSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s H265QvbrSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *H265QvbrSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "H265QvbrSettings"} + if s.MaxAverageBitrate != nil && *s.MaxAverageBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxAverageBitrate", 1000)) + } + if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { + invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxAverageBitrate sets the MaxAverageBitrate field's value. +func (s *H265QvbrSettings) SetMaxAverageBitrate(v int64) *H265QvbrSettings { + s.MaxAverageBitrate = &v + return s +} + +// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. +func (s *H265QvbrSettings) SetQvbrQualityLevel(v int64) *H265QvbrSettings { + s.QvbrQualityLevel = &v + return s +} + +// Settings for H265 codec +type H265Settings struct { + _ struct{} `type:"structure"` + + // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual + // quality. + AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H265AdaptiveQuantization"` + + // Enables Alternate Transfer Function SEI message for outputs using Hybrid + // Log Gamma (HLG) Electro-Optical Transfer Function (EOTF). + AlternateTransferFunctionSei *string `locationName:"alternateTransferFunctionSei" type:"string" enum:"H265AlternateTransferFunctionSei"` + + // Average bitrate in bits/second. Required for VBR and CBR. For MS Smooth outputs, + // bitrates must be unique when rounded down to the nearest multiple of 1000. + Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` + + // H.265 Level. + CodecLevel *string `locationName:"codecLevel" type:"string" enum:"H265CodecLevel"` + + // Represents the Profile and Tier, per the HEVC (H.265) specification. Selections + // are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile + // with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License. + CodecProfile *string `locationName:"codecProfile" type:"string" enum:"H265CodecProfile"` + + // Choose Adaptive to improve subjective video quality for high-motion content. + // This will cause the service to use fewer B-frames (which infer information + // based on other frames) for high-motion portions of the video and more B-frames + // for low-motion portions. The maximum number of B-frames is limited by the + // value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). + DynamicSubGop *string `locationName:"dynamicSubGop" type:"string" enum:"H265DynamicSubGop"` + + // Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. + FlickerAdaptiveQuantization *string `locationName:"flickerAdaptiveQuantization" type:"string" enum:"H265FlickerAdaptiveQuantization"` + + // If you are using the console, use the Framerate setting to specify the frame + // rate for this output. If you want to keep the same frame rate as the input + // video, choose Follow source. If you want to do frame rate conversion, choose + // a frame rate from the dropdown list or choose Custom. The framerates shown + // in the dropdown list are decimal approximations of fractions. If you choose + // Custom, specify your frame rate as a fraction. If you are creating your transcoding + // job sepecification as a JSON file without the console, use FramerateControl + // to specify which value the service uses for the frame rate for this output. + // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate + // from the input. Choose SPECIFIED if you want the service to use the frame + // rate you specify in the settings FramerateNumerator and FramerateDenominator. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H265FramerateControl"` + + // When set to INTERPOLATE, produces smoother motion during frame rate conversion. + FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"H265FramerateConversionAlgorithm"` + + // Frame rate denominator. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // Frame rate numerator - frame rate is a fraction, e.g. 24000 / 1001 = 23.976 + // fps. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` + + // If enable, use reference B frames for GOP structures that have B frames > + // 1. + GopBReference *string `locationName:"gopBReference" type:"string" enum:"H265GopBReference"` + + // Frequency of closed GOPs. In streaming applications, it is recommended that + // this be set to 1 so a decoder joining mid-stream will receive an IDR frame + // as quickly as possible. Setting this value to 0 will break output segmenting. + GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` + + // GOP Length (keyframe interval) in frames or seconds. Must be greater than + // zero. + GopSize *float64 `locationName:"gopSize" type:"double"` + + // Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds + // the system will convert the GOP Size into a frame count at run time. + GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"H265GopSizeUnits"` + + // Percentage of the buffer that should initially be filled (HRD buffer model). + HrdBufferInitialFillPercentage *int64 `locationName:"hrdBufferInitialFillPercentage" type:"integer"` + + // Size of buffer (HRD buffer model) in bits. For example, enter five megabits + // as 5000000. + HrdBufferSize *int64 `locationName:"hrdBufferSize" type:"integer"` + + // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. + // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce + // interlaced output with the entire output having the same field polarity (top + // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default + // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, + // behavior depends on the input scan type. - If the source is interlaced, the + // output will be interlaced with the same polarity as the source (it will follow + // the source). The output could therefore be a mix of "top field first" and + // "bottom field first". - If the source is progressive, the output will be + // interlaced with "top field first" or "bottom field first" polarity, depending + // on which of the Follow options you chose. + InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"H265InterlaceMode"` + + // Maximum bitrate in bits/second. For example, enter five megabits per second + // as 5000000. Required when Rate control mode is QVBR. + MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` + + // Enforces separation between repeated (cadence) I-frames and I-frames inserted + // by Scene Change Detection. If a scene change I-frame is within I-interval + // frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene + // change I-frame. GOP stretch requires enabling lookahead as well as setting + // I-interval. The normal cadence resumes for the next GOP. This setting is + // only used when Scene Change Detect is enabled. Note: Maximum GOP stretch + // = GOP size + Min-I-interval - 1 + MinIInterval *int64 `locationName:"minIInterval" type:"integer"` + + // Number of B-frames between reference frames. + NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" type:"integer"` + + // Number of reference frames to use. The encoder may use more than requested + // if using B-frames and/or interlaced encoding. + NumberReferenceFrames *int64 `locationName:"numberReferenceFrames" min:"1" type:"integer"` + + // Using the API, enable ParFollowSource if you want the service to use the + // pixel aspect ratio from the input. Using the console, do this by choosing + // Follow source for Pixel aspect ratio. + ParControl *string `locationName:"parControl" type:"string" enum:"H265ParControl"` + + // Pixel Aspect Ratio denominator. + ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` + + // Pixel Aspect Ratio numerator. + ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` + + // Use Quality tuning level (H265QualityTuningLevel) to specifiy whether to + // use fast single-pass, high-quality singlepass, or high-quality multipass + // video encoding. + QualityTuningLevel *string `locationName:"qualityTuningLevel" type:"string" enum:"H265QualityTuningLevel"` + + // Settings for quality-defined variable bitrate encoding with the H.265 codec. + // Required when you set Rate control mode to QVBR. Not valid when you set Rate + // control mode to a value other than QVBR, or when you don't define Rate control + // mode. + QvbrSettings *H265QvbrSettings `locationName:"qvbrSettings" type:"structure"` + + // Use this setting to specify whether this output has a variable bitrate (VBR), + // constant bitrate (CBR) or quality-defined variable bitrate (QVBR). + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H265RateControlMode"` + + // Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically + // selects best strength based on content + SampleAdaptiveOffsetFilterMode *string `locationName:"sampleAdaptiveOffsetFilterMode" type:"string" enum:"H265SampleAdaptiveOffsetFilterMode"` + + // Scene change detection (inserts I-frames on scene changes). + SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H265SceneChangeDetect"` + + // Number of slices per picture. Must be less than or equal to the number of + // macroblock rows for progressive pictures, and less than or equal to half + // the number of macroblock rows for interlaced pictures. + Slices *int64 `locationName:"slices" min:"1" type:"integer"` + + // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled + // as 25fps, and audio is sped up correspondingly. + SlowPal *string `locationName:"slowPal" type:"string" enum:"H265SlowPal"` + + // Adjust quantization within each frame based on spatial variation of content + // complexity. + SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"H265SpatialAdaptiveQuantization"` + + // This field applies only if the Streams > Advanced > Framerate (framerate) + // field is set to 29.970. This field works with the Streams > Advanced > Preprocessors + // > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced + // Mode field (interlace_mode) to identify the scan type for the output: Progressive, + // Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output + // from 23.976 input. - Soft: produces 23.976; the player converts this output + // to 29.97i. + Telecine *string `locationName:"telecine" type:"string" enum:"H265Telecine"` + + // Adjust quantization within each frame based on temporal variation of content + // complexity. + TemporalAdaptiveQuantization *string `locationName:"temporalAdaptiveQuantization" type:"string" enum:"H265TemporalAdaptiveQuantization"` + + // Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers + // are supported depending on GOP structure: I- and P-frames form one layer, + // reference B-frames can form a second layer and non-reference b-frames can + // form a third layer. Decoders can optionally decode only the lower temporal + // layers to generate a lower frame rate output. For example, given a bitstream + // with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder + // could decode all the frames for full frame rate output or only the I and + // P frames (lowest temporal layer) for a half frame rate output. + TemporalIds *string `locationName:"temporalIds" type:"string" enum:"H265TemporalIds"` + + // Enable use of tiles, allowing horizontal as well as vertical subdivision + // of the encoded pictures. + Tiles *string `locationName:"tiles" type:"string" enum:"H265Tiles"` + + // Inserts timecode for each frame as 4 bytes of an unregistered SEI message. + UnregisteredSeiTimecode *string `locationName:"unregisteredSeiTimecode" type:"string" enum:"H265UnregisteredSeiTimecode"` + + // If HVC1, output that is H.265 will be marked as HVC1 and adhere to the ISO-IECJTC1-SC29_N13798_Text_ISOIEC_FDIS_14496-15_3rd_E + // spec which states that parameter set NAL units will be stored in the sample + // headers but not in the samples directly. If HEV1, then H.265 will be marked + // as HEV1 and parameter set NAL units will be written into the samples. + WriteMp4PackagingType *string `locationName:"writeMp4PackagingType" type:"string" enum:"H265WriteMp4PackagingType"` +} + +// String returns the string representation +func (s H265Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s H265Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *H265Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "H265Settings"} + if s.Bitrate != nil && *s.Bitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) + } + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) + } + if s.NumberReferenceFrames != nil && *s.NumberReferenceFrames < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberReferenceFrames", 1)) + } + if s.ParDenominator != nil && *s.ParDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) + } + if s.ParNumerator != nil && *s.ParNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) + } + if s.Slices != nil && *s.Slices < 1 { + invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) + } + if s.QvbrSettings != nil { + if err := s.QvbrSettings.Validate(); err != nil { + invalidParams.AddNested("QvbrSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. +func (s *H265Settings) SetAdaptiveQuantization(v string) *H265Settings { + s.AdaptiveQuantization = &v + return s +} + +// SetAlternateTransferFunctionSei sets the AlternateTransferFunctionSei field's value. +func (s *H265Settings) SetAlternateTransferFunctionSei(v string) *H265Settings { + s.AlternateTransferFunctionSei = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *H265Settings) SetBitrate(v int64) *H265Settings { + s.Bitrate = &v + return s +} + +// SetCodecLevel sets the CodecLevel field's value. +func (s *H265Settings) SetCodecLevel(v string) *H265Settings { + s.CodecLevel = &v + return s +} + +// SetCodecProfile sets the CodecProfile field's value. +func (s *H265Settings) SetCodecProfile(v string) *H265Settings { + s.CodecProfile = &v + return s +} + +// SetDynamicSubGop sets the DynamicSubGop field's value. +func (s *H265Settings) SetDynamicSubGop(v string) *H265Settings { + s.DynamicSubGop = &v + return s +} + +// SetFlickerAdaptiveQuantization sets the FlickerAdaptiveQuantization field's value. +func (s *H265Settings) SetFlickerAdaptiveQuantization(v string) *H265Settings { + s.FlickerAdaptiveQuantization = &v + return s +} + +// SetFramerateControl sets the FramerateControl field's value. +func (s *H265Settings) SetFramerateControl(v string) *H265Settings { + s.FramerateControl = &v + return s +} + +// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. +func (s *H265Settings) SetFramerateConversionAlgorithm(v string) *H265Settings { + s.FramerateConversionAlgorithm = &v + return s +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *H265Settings) SetFramerateDenominator(v int64) *H265Settings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *H265Settings) SetFramerateNumerator(v int64) *H265Settings { + s.FramerateNumerator = &v + return s +} + +// SetGopBReference sets the GopBReference field's value. +func (s *H265Settings) SetGopBReference(v string) *H265Settings { + s.GopBReference = &v + return s +} + +// SetGopClosedCadence sets the GopClosedCadence field's value. +func (s *H265Settings) SetGopClosedCadence(v int64) *H265Settings { + s.GopClosedCadence = &v + return s +} + +// SetGopSize sets the GopSize field's value. +func (s *H265Settings) SetGopSize(v float64) *H265Settings { + s.GopSize = &v + return s +} + +// SetGopSizeUnits sets the GopSizeUnits field's value. +func (s *H265Settings) SetGopSizeUnits(v string) *H265Settings { + s.GopSizeUnits = &v + return s +} + +// SetHrdBufferInitialFillPercentage sets the HrdBufferInitialFillPercentage field's value. +func (s *H265Settings) SetHrdBufferInitialFillPercentage(v int64) *H265Settings { + s.HrdBufferInitialFillPercentage = &v + return s +} + +// SetHrdBufferSize sets the HrdBufferSize field's value. +func (s *H265Settings) SetHrdBufferSize(v int64) *H265Settings { + s.HrdBufferSize = &v + return s +} + +// SetInterlaceMode sets the InterlaceMode field's value. +func (s *H265Settings) SetInterlaceMode(v string) *H265Settings { + s.InterlaceMode = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *H265Settings) SetMaxBitrate(v int64) *H265Settings { + s.MaxBitrate = &v + return s +} + +// SetMinIInterval sets the MinIInterval field's value. +func (s *H265Settings) SetMinIInterval(v int64) *H265Settings { + s.MinIInterval = &v + return s +} + +// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. +func (s *H265Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *H265Settings { + s.NumberBFramesBetweenReferenceFrames = &v + return s +} + +// SetNumberReferenceFrames sets the NumberReferenceFrames field's value. +func (s *H265Settings) SetNumberReferenceFrames(v int64) *H265Settings { + s.NumberReferenceFrames = &v + return s +} + +// SetParControl sets the ParControl field's value. +func (s *H265Settings) SetParControl(v string) *H265Settings { + s.ParControl = &v + return s +} + +// SetParDenominator sets the ParDenominator field's value. +func (s *H265Settings) SetParDenominator(v int64) *H265Settings { + s.ParDenominator = &v + return s +} + +// SetParNumerator sets the ParNumerator field's value. +func (s *H265Settings) SetParNumerator(v int64) *H265Settings { + s.ParNumerator = &v + return s +} + +// SetQualityTuningLevel sets the QualityTuningLevel field's value. +func (s *H265Settings) SetQualityTuningLevel(v string) *H265Settings { + s.QualityTuningLevel = &v + return s +} + +// SetQvbrSettings sets the QvbrSettings field's value. +func (s *H265Settings) SetQvbrSettings(v *H265QvbrSettings) *H265Settings { + s.QvbrSettings = v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *H265Settings) SetRateControlMode(v string) *H265Settings { + s.RateControlMode = &v + return s +} + +// SetSampleAdaptiveOffsetFilterMode sets the SampleAdaptiveOffsetFilterMode field's value. +func (s *H265Settings) SetSampleAdaptiveOffsetFilterMode(v string) *H265Settings { + s.SampleAdaptiveOffsetFilterMode = &v + return s +} + +// SetSceneChangeDetect sets the SceneChangeDetect field's value. +func (s *H265Settings) SetSceneChangeDetect(v string) *H265Settings { + s.SceneChangeDetect = &v + return s +} + +// SetSlices sets the Slices field's value. +func (s *H265Settings) SetSlices(v int64) *H265Settings { + s.Slices = &v + return s +} + +// SetSlowPal sets the SlowPal field's value. +func (s *H265Settings) SetSlowPal(v string) *H265Settings { + s.SlowPal = &v + return s +} + +// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. +func (s *H265Settings) SetSpatialAdaptiveQuantization(v string) *H265Settings { + s.SpatialAdaptiveQuantization = &v + return s +} + +// SetTelecine sets the Telecine field's value. +func (s *H265Settings) SetTelecine(v string) *H265Settings { + s.Telecine = &v + return s +} + +// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. +func (s *H265Settings) SetTemporalAdaptiveQuantization(v string) *H265Settings { + s.TemporalAdaptiveQuantization = &v + return s +} + +// SetTemporalIds sets the TemporalIds field's value. +func (s *H265Settings) SetTemporalIds(v string) *H265Settings { + s.TemporalIds = &v + return s +} + +// SetTiles sets the Tiles field's value. +func (s *H265Settings) SetTiles(v string) *H265Settings { + s.Tiles = &v + return s +} + +// SetUnregisteredSeiTimecode sets the UnregisteredSeiTimecode field's value. +func (s *H265Settings) SetUnregisteredSeiTimecode(v string) *H265Settings { + s.UnregisteredSeiTimecode = &v + return s +} + +// SetWriteMp4PackagingType sets the WriteMp4PackagingType field's value. +func (s *H265Settings) SetWriteMp4PackagingType(v string) *H265Settings { + s.WriteMp4PackagingType = &v + return s +} + +// Use the "HDR master display information" (Hdr10Metadata) settings to correct +// HDR metadata or to provide missing metadata. These values vary depending +// on the input video and must be provided by a color grader. Range is 0 to +// 50,000; each increment represents 0.00002 in CIE1931 color coordinate. Note +// that these settings are not color correction. Note that if you are creating +// HDR outputs inside of an HLS CMAF package, to comply with the Apple specification, +// you must use the following settings. Set "MP4 packaging type" (writeMp4PackagingType) +// to HVC1 (HVC1). Set "Profile" (H265Settings > codecProfile) to Main10/High +// (MAIN10_HIGH). Set "Level" (H265Settings > codecLevel) to 5 (LEVEL_5). +type Hdr10Metadata struct { + _ struct{} `type:"structure"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + BluePrimaryX *int64 `locationName:"bluePrimaryX" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + BluePrimaryY *int64 `locationName:"bluePrimaryY" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + GreenPrimaryX *int64 `locationName:"greenPrimaryX" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + GreenPrimaryY *int64 `locationName:"greenPrimaryY" type:"integer"` + + // Maximum light level among all samples in the coded video sequence, in units + // of candelas per square meter. + MaxContentLightLevel *int64 `locationName:"maxContentLightLevel" type:"integer"` + + // Maximum average light level of any frame in the coded video sequence, in + // units of candelas per square meter. + MaxFrameAverageLightLevel *int64 `locationName:"maxFrameAverageLightLevel" type:"integer"` + + // Nominal maximum mastering display luminance in units of of 0.0001 candelas + // per square meter. + MaxLuminance *int64 `locationName:"maxLuminance" type:"integer"` + + // Nominal minimum mastering display luminance in units of of 0.0001 candelas + // per square meter + MinLuminance *int64 `locationName:"minLuminance" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + RedPrimaryX *int64 `locationName:"redPrimaryX" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + RedPrimaryY *int64 `locationName:"redPrimaryY" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + WhitePointX *int64 `locationName:"whitePointX" type:"integer"` + + // HDR Master Display Information must be provided by a color grader, using + // color grading tools. Range is 0 to 50,000, each increment represents 0.00002 + // in CIE1931 color coordinate. Note that this setting is not for color correction. + WhitePointY *int64 `locationName:"whitePointY" type:"integer"` +} + +// String returns the string representation +func (s Hdr10Metadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Hdr10Metadata) GoString() string { + return s.String() +} + +// SetBluePrimaryX sets the BluePrimaryX field's value. +func (s *Hdr10Metadata) SetBluePrimaryX(v int64) *Hdr10Metadata { + s.BluePrimaryX = &v + return s +} + +// SetBluePrimaryY sets the BluePrimaryY field's value. +func (s *Hdr10Metadata) SetBluePrimaryY(v int64) *Hdr10Metadata { + s.BluePrimaryY = &v + return s +} + +// SetGreenPrimaryX sets the GreenPrimaryX field's value. +func (s *Hdr10Metadata) SetGreenPrimaryX(v int64) *Hdr10Metadata { + s.GreenPrimaryX = &v + return s +} + +// SetGreenPrimaryY sets the GreenPrimaryY field's value. +func (s *Hdr10Metadata) SetGreenPrimaryY(v int64) *Hdr10Metadata { + s.GreenPrimaryY = &v + return s +} + +// SetMaxContentLightLevel sets the MaxContentLightLevel field's value. +func (s *Hdr10Metadata) SetMaxContentLightLevel(v int64) *Hdr10Metadata { + s.MaxContentLightLevel = &v + return s +} + +// SetMaxFrameAverageLightLevel sets the MaxFrameAverageLightLevel field's value. +func (s *Hdr10Metadata) SetMaxFrameAverageLightLevel(v int64) *Hdr10Metadata { + s.MaxFrameAverageLightLevel = &v + return s +} + +// SetMaxLuminance sets the MaxLuminance field's value. +func (s *Hdr10Metadata) SetMaxLuminance(v int64) *Hdr10Metadata { + s.MaxLuminance = &v + return s +} + +// SetMinLuminance sets the MinLuminance field's value. +func (s *Hdr10Metadata) SetMinLuminance(v int64) *Hdr10Metadata { + s.MinLuminance = &v + return s +} + +// SetRedPrimaryX sets the RedPrimaryX field's value. +func (s *Hdr10Metadata) SetRedPrimaryX(v int64) *Hdr10Metadata { + s.RedPrimaryX = &v + return s +} + +// SetRedPrimaryY sets the RedPrimaryY field's value. +func (s *Hdr10Metadata) SetRedPrimaryY(v int64) *Hdr10Metadata { + s.RedPrimaryY = &v + return s +} + +// SetWhitePointX sets the WhitePointX field's value. +func (s *Hdr10Metadata) SetWhitePointX(v int64) *Hdr10Metadata { + s.WhitePointX = &v + return s +} + +// SetWhitePointY sets the WhitePointY field's value. +func (s *Hdr10Metadata) SetWhitePointY(v int64) *Hdr10Metadata { + s.WhitePointY = &v + return s +} + +// Caption Language Mapping +type HlsCaptionLanguageMapping struct { + _ struct{} `type:"structure"` + + // Caption channel. + CaptionChannel *int64 `locationName:"captionChannel" type:"integer"` + + // Specify the language for this caption channel, using the ISO 639-2 or ISO + // 639-3 three-letter language code + CustomLanguageCode *string `locationName:"customLanguageCode" min:"3" type:"string"` + + // Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php. + LanguageCode *string `locationName:"languageCode" type:"string" enum:"LanguageCode"` + + // Caption language description. + LanguageDescription *string `locationName:"languageDescription" type:"string"` +} + +// String returns the string representation +func (s HlsCaptionLanguageMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsCaptionLanguageMapping) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsCaptionLanguageMapping) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsCaptionLanguageMapping"} + if s.CaptionChannel != nil && *s.CaptionChannel < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("CaptionChannel", -2.147483648e+09)) + } + if s.CustomLanguageCode != nil && len(*s.CustomLanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("CustomLanguageCode", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCaptionChannel sets the CaptionChannel field's value. +func (s *HlsCaptionLanguageMapping) SetCaptionChannel(v int64) *HlsCaptionLanguageMapping { + s.CaptionChannel = &v + return s +} + +// SetCustomLanguageCode sets the CustomLanguageCode field's value. +func (s *HlsCaptionLanguageMapping) SetCustomLanguageCode(v string) *HlsCaptionLanguageMapping { + s.CustomLanguageCode = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *HlsCaptionLanguageMapping) SetLanguageCode(v string) *HlsCaptionLanguageMapping { + s.LanguageCode = &v + return s +} + +// SetLanguageDescription sets the LanguageDescription field's value. +func (s *HlsCaptionLanguageMapping) SetLanguageDescription(v string) *HlsCaptionLanguageMapping { + s.LanguageDescription = &v + return s +} + +// Settings for HLS encryption +type HlsEncryptionSettings struct { + _ struct{} `type:"structure"` + + // This is a 128-bit, 16-byte hex value represented by a 32-character text string. + // If this parameter is not set then the Initialization Vector will follow the + // segment number by default. + ConstantInitializationVector *string `locationName:"constantInitializationVector" min:"32" type:"string"` + + // Encrypts the segments with the given encryption scheme. Leave blank to disable. + // Selecting 'Disabled' in the web interface also disables encryption. + EncryptionMethod *string `locationName:"encryptionMethod" type:"string" enum:"HlsEncryptionType"` + + // The Initialization Vector is a 128-bit number used in conjunction with the + // key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed + // in the manifest. Otherwise Initialization Vector is not in the manifest. + InitializationVectorInManifest *string `locationName:"initializationVectorInManifest" type:"string" enum:"HlsInitializationVectorInManifest"` + + // Settings for use with a SPEKE key provider + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure"` + + // Use these settings to set up encryption with a static key provider. + StaticKeyProvider *StaticKeyProvider `locationName:"staticKeyProvider" type:"structure"` + + // Indicates which type of key provider is used for encryption. + Type *string `locationName:"type" type:"string" enum:"HlsKeyProviderType"` +} + +// String returns the string representation +func (s HlsEncryptionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsEncryptionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsEncryptionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsEncryptionSettings"} + if s.ConstantInitializationVector != nil && len(*s.ConstantInitializationVector) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ConstantInitializationVector", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConstantInitializationVector sets the ConstantInitializationVector field's value. +func (s *HlsEncryptionSettings) SetConstantInitializationVector(v string) *HlsEncryptionSettings { + s.ConstantInitializationVector = &v + return s +} + +// SetEncryptionMethod sets the EncryptionMethod field's value. +func (s *HlsEncryptionSettings) SetEncryptionMethod(v string) *HlsEncryptionSettings { + s.EncryptionMethod = &v + return s +} + +// SetInitializationVectorInManifest sets the InitializationVectorInManifest field's value. +func (s *HlsEncryptionSettings) SetInitializationVectorInManifest(v string) *HlsEncryptionSettings { + s.InitializationVectorInManifest = &v + return s +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *HlsEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *HlsEncryptionSettings { + s.SpekeKeyProvider = v + return s +} + +// SetStaticKeyProvider sets the StaticKeyProvider field's value. +func (s *HlsEncryptionSettings) SetStaticKeyProvider(v *StaticKeyProvider) *HlsEncryptionSettings { + s.StaticKeyProvider = v + return s +} + +// SetType sets the Type field's value. +func (s *HlsEncryptionSettings) SetType(v string) *HlsEncryptionSettings { + s.Type = &v + return s +} + +// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to +// HLS_GROUP_SETTINGS. +type HlsGroupSettings struct { + _ struct{} `type:"structure"` + + // Choose one or more ad marker types to pass SCTE35 signals through to this + // group of Apple HLS outputs. + AdMarkers []*string `locationName:"adMarkers" type:"list"` + + // A partial URI prefix that will be prepended to each output in the media .m3u8 + // file. Can be used if base manifest is delivered from a different URL than + // the main .m3u8 file. + BaseUrl *string `locationName:"baseUrl" type:"string"` + + // Language to be used on Caption outputs + CaptionLanguageMappings []*HlsCaptionLanguageMapping `locationName:"captionLanguageMappings" type:"list"` + + // Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS + // lines in the manifest. Specify at least one language in the CC1 Language + // Code field. One CLOSED-CAPTION line is added for each Language Code you specify. + // Make sure to specify the languages in the order in which they appear in the + // original source (if the source is embedded format) or the order of the caption + // selectors (if the source is other than embedded). Otherwise, languages in + // the manifest will not match up properly with the output captions. None: Include + // CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS + // line from the manifest. + CaptionLanguageSetting *string `locationName:"captionLanguageSetting" type:"string" enum:"HlsCaptionLanguageSetting"` + + // When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client + // from saving media segments for later replay. + ClientCache *string `locationName:"clientCache" type:"string" enum:"HlsClientCache"` + + // Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist + // generation. + CodecSpecification *string `locationName:"codecSpecification" type:"string" enum:"HlsCodecSpecification"` + + // Use Destination (Destination) to specify the S3 output location and the output + // filename base. Destination accepts format identifiers. If you do not specify + // the base filename in the URI, the service will use the filename of the input + // file. If your job has multiple inputs, the service uses the filename of the + // first input file. + Destination *string `locationName:"destination" type:"string"` + + // Indicates whether segments should be placed in subdirectories. + DirectoryStructure *string `locationName:"directoryStructure" type:"string" enum:"HlsDirectoryStructure"` + + // DRM settings. + Encryption *HlsEncryptionSettings `locationName:"encryption" type:"structure"` + + // When set to GZIP, compresses HLS playlist. + ManifestCompression *string `locationName:"manifestCompression" type:"string" enum:"HlsManifestCompression"` + + // Indicates whether the output manifest should use floating point values for + // segment duration. + ManifestDurationFormat *string `locationName:"manifestDurationFormat" type:"string" enum:"HlsManifestDurationFormat"` + + // Keep this setting at the default value of 0, unless you are troubleshooting + // a problem with how devices play back the end of your video asset. If you + // know that player devices are hanging on the final segment of your video because + // the length of your final segment is too short, use this setting to specify + // a minimum final segment length, in seconds. Choose a value that is greater + // than or equal to 1 and less than your segment length. When you specify a + // value for this setting, the encoder will combine any final segment that is + // shorter than the length that you specify with the previous segment. For example, + // your segment length is 3 seconds and your final segment is .5 seconds without + // a minimum final segment length; when you set the minimum final segment length + // to 1, your final segment is 3.5 seconds. + MinFinalSegmentLength *float64 `locationName:"minFinalSegmentLength" type:"double"` + + // When set, Minimum Segment Size is enforced by looking ahead and back within + // the specified range for a nearby avail and extending the segment size if + // needed. + MinSegmentLength *int64 `locationName:"minSegmentLength" type:"integer"` + + // Indicates whether the .m3u8 manifest file should be generated for this HLS + // output group. + OutputSelection *string `locationName:"outputSelection" type:"string" enum:"HlsOutputSelection"` + + // Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. + // The value is calculated as follows: either the program date and time are + // initialized using the input timecode source, or the time is initialized using + // the input timecode source and the date is initialized using the timestamp_offset. + ProgramDateTime *string `locationName:"programDateTime" type:"string" enum:"HlsProgramDateTime"` + + // Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds. + ProgramDateTimePeriod *int64 `locationName:"programDateTimePeriod" type:"integer"` + + // When set to SINGLE_FILE, emits program as a single media resource (.ts) file, + // uses #EXT-X-BYTERANGE tags to index segment for playback. + SegmentControl *string `locationName:"segmentControl" type:"string" enum:"HlsSegmentControl"` + + // Length of MPEG-2 Transport Stream segments to create (in seconds). Note that + // segments will end on the next keyframe after this number of seconds, so actual + // segment length may be longer. + SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` + + // Number of segments to write to a subdirectory before starting a new one. + // directoryStructure must be SINGLE_DIRECTORY for this setting to have an effect. + SegmentsPerSubdirectory *int64 `locationName:"segmentsPerSubdirectory" min:"1" type:"integer"` + + // Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag + // of variant manifest. + StreamInfResolution *string `locationName:"streamInfResolution" type:"string" enum:"HlsStreamInfResolution"` + + // Indicates ID3 frame that has the timecode. + TimedMetadataId3Frame *string `locationName:"timedMetadataId3Frame" type:"string" enum:"HlsTimedMetadataId3Frame"` + + // Timed Metadata interval in seconds. + TimedMetadataId3Period *int64 `locationName:"timedMetadataId3Period" type:"integer"` + + // Provides an extra millisecond delta offset to fine tune the timestamps. + TimestampDeltaMilliseconds *int64 `locationName:"timestampDeltaMilliseconds" type:"integer"` +} + +// String returns the string representation +func (s HlsGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsGroupSettings"} + if s.SegmentLength != nil && *s.SegmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) + } + if s.SegmentsPerSubdirectory != nil && *s.SegmentsPerSubdirectory < 1 { + invalidParams.Add(request.NewErrParamMinValue("SegmentsPerSubdirectory", 1)) + } + if s.TimedMetadataId3Period != nil && *s.TimedMetadataId3Period < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("TimedMetadataId3Period", -2.147483648e+09)) + } + if s.TimestampDeltaMilliseconds != nil && *s.TimestampDeltaMilliseconds < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("TimestampDeltaMilliseconds", -2.147483648e+09)) + } + if s.CaptionLanguageMappings != nil { + for i, v := range s.CaptionLanguageMappings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionLanguageMappings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsGroupSettings) SetAdMarkers(v []*string) *HlsGroupSettings { + s.AdMarkers = v + return s +} + +// SetBaseUrl sets the BaseUrl field's value. +func (s *HlsGroupSettings) SetBaseUrl(v string) *HlsGroupSettings { + s.BaseUrl = &v + return s +} + +// SetCaptionLanguageMappings sets the CaptionLanguageMappings field's value. +func (s *HlsGroupSettings) SetCaptionLanguageMappings(v []*HlsCaptionLanguageMapping) *HlsGroupSettings { + s.CaptionLanguageMappings = v + return s +} + +// SetCaptionLanguageSetting sets the CaptionLanguageSetting field's value. +func (s *HlsGroupSettings) SetCaptionLanguageSetting(v string) *HlsGroupSettings { + s.CaptionLanguageSetting = &v + return s +} + +// SetClientCache sets the ClientCache field's value. +func (s *HlsGroupSettings) SetClientCache(v string) *HlsGroupSettings { + s.ClientCache = &v + return s +} + +// SetCodecSpecification sets the CodecSpecification field's value. +func (s *HlsGroupSettings) SetCodecSpecification(v string) *HlsGroupSettings { + s.CodecSpecification = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *HlsGroupSettings) SetDestination(v string) *HlsGroupSettings { + s.Destination = &v + return s +} + +// SetDirectoryStructure sets the DirectoryStructure field's value. +func (s *HlsGroupSettings) SetDirectoryStructure(v string) *HlsGroupSettings { + s.DirectoryStructure = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *HlsGroupSettings) SetEncryption(v *HlsEncryptionSettings) *HlsGroupSettings { + s.Encryption = v + return s +} + +// SetManifestCompression sets the ManifestCompression field's value. +func (s *HlsGroupSettings) SetManifestCompression(v string) *HlsGroupSettings { + s.ManifestCompression = &v + return s +} + +// SetManifestDurationFormat sets the ManifestDurationFormat field's value. +func (s *HlsGroupSettings) SetManifestDurationFormat(v string) *HlsGroupSettings { + s.ManifestDurationFormat = &v + return s +} + +// SetMinFinalSegmentLength sets the MinFinalSegmentLength field's value. +func (s *HlsGroupSettings) SetMinFinalSegmentLength(v float64) *HlsGroupSettings { + s.MinFinalSegmentLength = &v + return s +} + +// SetMinSegmentLength sets the MinSegmentLength field's value. +func (s *HlsGroupSettings) SetMinSegmentLength(v int64) *HlsGroupSettings { + s.MinSegmentLength = &v + return s +} + +// SetOutputSelection sets the OutputSelection field's value. +func (s *HlsGroupSettings) SetOutputSelection(v string) *HlsGroupSettings { + s.OutputSelection = &v + return s +} + +// SetProgramDateTime sets the ProgramDateTime field's value. +func (s *HlsGroupSettings) SetProgramDateTime(v string) *HlsGroupSettings { + s.ProgramDateTime = &v + return s +} + +// SetProgramDateTimePeriod sets the ProgramDateTimePeriod field's value. +func (s *HlsGroupSettings) SetProgramDateTimePeriod(v int64) *HlsGroupSettings { + s.ProgramDateTimePeriod = &v + return s +} + +// SetSegmentControl sets the SegmentControl field's value. +func (s *HlsGroupSettings) SetSegmentControl(v string) *HlsGroupSettings { + s.SegmentControl = &v + return s +} + +// SetSegmentLength sets the SegmentLength field's value. +func (s *HlsGroupSettings) SetSegmentLength(v int64) *HlsGroupSettings { + s.SegmentLength = &v + return s +} + +// SetSegmentsPerSubdirectory sets the SegmentsPerSubdirectory field's value. +func (s *HlsGroupSettings) SetSegmentsPerSubdirectory(v int64) *HlsGroupSettings { + s.SegmentsPerSubdirectory = &v + return s +} + +// SetStreamInfResolution sets the StreamInfResolution field's value. +func (s *HlsGroupSettings) SetStreamInfResolution(v string) *HlsGroupSettings { + s.StreamInfResolution = &v + return s +} + +// SetTimedMetadataId3Frame sets the TimedMetadataId3Frame field's value. +func (s *HlsGroupSettings) SetTimedMetadataId3Frame(v string) *HlsGroupSettings { + s.TimedMetadataId3Frame = &v + return s +} + +// SetTimedMetadataId3Period sets the TimedMetadataId3Period field's value. +func (s *HlsGroupSettings) SetTimedMetadataId3Period(v int64) *HlsGroupSettings { + s.TimedMetadataId3Period = &v + return s +} + +// SetTimestampDeltaMilliseconds sets the TimestampDeltaMilliseconds field's value. +func (s *HlsGroupSettings) SetTimestampDeltaMilliseconds(v int64) *HlsGroupSettings { + s.TimestampDeltaMilliseconds = &v + return s +} + +// Settings for HLS output groups +type HlsSettings struct { + _ struct{} `type:"structure"` + + // Specifies the group to which the audio Rendition belongs. + AudioGroupId *string `locationName:"audioGroupId" type:"string"` + + // List all the audio groups that are used with the video output stream. Input + // all the audio GROUP-IDs that are associated to the video, separate by ','. + AudioRenditionSets *string `locationName:"audioRenditionSets" type:"string"` + + // Four types of audio-only tracks are supported: Audio-Only Variant Stream + // The client can play back this audio-only stream instead of video in low-bandwidth + // scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate + // Audio, Auto Select, Default Alternate rendition that the client should try + // to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest + // with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default + // Alternate rendition that the client may try to play back by default. Represented + // as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate + // Audio, not Auto Select Alternate rendition that the client will not try to + // play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with + // DEFAULT=NO, AUTOSELECT=NO + AudioTrackType *string `locationName:"audioTrackType" type:"string" enum:"HlsAudioTrackType"` + + // When set to INCLUDE, writes I-Frame Only Manifest in addition to the HLS + // manifest + IFrameOnlyManifest *string `locationName:"iFrameOnlyManifest" type:"string" enum:"HlsIFrameOnlyManifest"` + + // String concatenated to end of segment filenames. Accepts "Format Identifiers":#format_identifier_parameters. + SegmentModifier *string `locationName:"segmentModifier" type:"string"` +} + +// String returns the string representation +func (s HlsSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsSettings) GoString() string { + return s.String() +} + +// SetAudioGroupId sets the AudioGroupId field's value. +func (s *HlsSettings) SetAudioGroupId(v string) *HlsSettings { + s.AudioGroupId = &v + return s +} + +// SetAudioRenditionSets sets the AudioRenditionSets field's value. +func (s *HlsSettings) SetAudioRenditionSets(v string) *HlsSettings { + s.AudioRenditionSets = &v + return s +} + +// SetAudioTrackType sets the AudioTrackType field's value. +func (s *HlsSettings) SetAudioTrackType(v string) *HlsSettings { + s.AudioTrackType = &v + return s +} + +// SetIFrameOnlyManifest sets the IFrameOnlyManifest field's value. +func (s *HlsSettings) SetIFrameOnlyManifest(v string) *HlsSettings { + s.IFrameOnlyManifest = &v + return s +} + +// SetSegmentModifier sets the SegmentModifier field's value. +func (s *HlsSettings) SetSegmentModifier(v string) *HlsSettings { + s.SegmentModifier = &v + return s +} + +// To insert ID3 tags in your output, specify two values. Use ID3 tag (Id3) +// to specify the base 64 encoded string and use Timecode (TimeCode) to specify +// the time when the tag should be inserted. To insert multiple ID3 tags in +// your output, create multiple instances of ID3 insertion (Id3Insertion). +type Id3Insertion struct { + _ struct{} `type:"structure"` + + // Use ID3 tag (Id3) to provide a tag value in base64-encode format. + Id3 *string `locationName:"id3" type:"string"` + + // Provide a Timecode (TimeCode) in HH:MM:SS:FF or HH:MM:SS;FF format. + Timecode *string `locationName:"timecode" type:"string"` +} + +// String returns the string representation +func (s Id3Insertion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Id3Insertion) GoString() string { + return s.String() +} + +// SetId3 sets the Id3 field's value. +func (s *Id3Insertion) SetId3(v string) *Id3Insertion { + s.Id3 = &v + return s +} + +// SetTimecode sets the Timecode field's value. +func (s *Id3Insertion) SetTimecode(v string) *Id3Insertion { + s.Timecode = &v + return s +} + +// Enable the image inserter feature to include a graphic overlay on your video. +// Enable or disable this feature for each input or output individually. This +// setting is disabled by default. +type ImageInserter struct { + _ struct{} `type:"structure"` + + // Specify the images that you want to overlay on your video. The images must + // be PNG or TGA files. + InsertableImages []*InsertableImage `locationName:"insertableImages" type:"list"` +} + +// String returns the string representation +func (s ImageInserter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageInserter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImageInserter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImageInserter"} + if s.InsertableImages != nil { + for i, v := range s.InsertableImages { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InsertableImages", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInsertableImages sets the InsertableImages field's value. +func (s *ImageInserter) SetInsertableImages(v []*InsertableImage) *ImageInserter { + s.InsertableImages = v + return s +} + +// Specifies media input +type Input struct { + _ struct{} `type:"structure"` + + // Specifies set of audio selectors within an input to combine. An input may + // have multiple audio selector groups. See "Audio Selector Group":#inputs-audio_selector_group + // for more information. + AudioSelectorGroups map[string]*AudioSelectorGroup `locationName:"audioSelectorGroups" type:"map"` + + // Use Audio selectors (AudioSelectors) to specify a track or set of tracks + // from the input that you will use in your outputs. You can use mutiple Audio + // selectors per input. + AudioSelectors map[string]*AudioSelector `locationName:"audioSelectors" type:"map"` + + // Use Captions selectors (CaptionSelectors) to specify the captions data from + // the input that you will use in your outputs. You can use mutiple captions + // selectors per input. + CaptionSelectors map[string]*CaptionSelector `locationName:"captionSelectors" type:"map"` + + // Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. + // Default is disabled. Only manaully controllable for MPEG2 and uncompressed + // video inputs. + DeblockFilter *string `locationName:"deblockFilter" type:"string" enum:"InputDeblockFilter"` + + // Settings for decrypting any input files that are encrypted. + DecryptionSettings *InputDecryptionSettings `locationName:"decryptionSettings" type:"structure"` + + // Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default + // is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video + // inputs. + DenoiseFilter *string `locationName:"denoiseFilter" type:"string" enum:"InputDenoiseFilter"` + + // Specify the source file for your transcoding job. You can use multiple inputs + // in a single job. The service concatenates these inputs, in the order that + // you specify them in the job, to create the outputs. If your input format + // is IMF, specify your input by providing the path to your CPL. For example, + // "s3://bucket/vf/cpl.xml". If the CPL is in an incomplete IMP, make sure to + // use *Supplemental IMPs* (SupplementalImps) to specify any supplemental IMPs + // that contain assets referenced by the CPL. + FileInput *string `locationName:"fileInput" type:"string"` + + // Use Filter enable (InputFilterEnable) to specify how the transcoding service + // applies the denoise and deblock filters. You must also enable the filters + // separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). + // * Auto - The transcoding service determines whether to apply filtering, depending + // on input type and quality. * Disable - The input is not filtered. This is + // true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). + // * Force - The in put is filtered regardless of input type. + FilterEnable *string `locationName:"filterEnable" type:"string" enum:"InputFilterEnable"` + + // Use Filter strength (FilterStrength) to adjust the magnitude the input filter + // settings (Deblock and Denoise). The range is -5 to 5. Default is 0. + FilterStrength *int64 `locationName:"filterStrength" type:"integer"` + + // Enable the image inserter feature to include a graphic overlay on your video. + // Enable or disable this feature for each input individually. This setting + // is disabled by default. + ImageInserter *ImageInserter `locationName:"imageInserter" type:"structure"` + + // (InputClippings) contains sets of start and end times that together specify + // a portion of the input to be used in the outputs. If you provide only a start + // time, the clip will be the entire input from that point to the end. If you + // provide only an end time, it will be the entire input up to that point. When + // you specify more than one input clip, the transcoding service creates the + // job outputs by stringing the clips together in the order you specify them. + InputClippings []*InputClipping `locationName:"inputClippings" type:"list"` + + // Use Program (programNumber) to select a specific program from within a multi-program + // transport stream. Note that Quad 4K is not currently supported. Default is + // the first program within the transport stream. If the program you specify + // doesn't exist, the transcoding service will use this default. + ProgramNumber *int64 `locationName:"programNumber" min:"1" type:"integer"` + + // Set PSI control (InputPsiControl) for transport stream inputs to specify + // which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio + // and video. * Use PSI - Scan only PSI data. + PsiControl *string `locationName:"psiControl" type:"string" enum:"InputPsiControl"` + + // Provide a list of any necessary supplemental IMPs. You need supplemental + // IMPs if the CPL that you're using for your input is in an incomplete IMP. + // Specify either the supplemental IMP directories with a trailing slash or + // the ASSETMAP.xml files. For example ["s3://bucket/ov/", "s3://bucket/vf2/ASSETMAP.xml"]. + // You don't need to specify the IMP that contains your input CPL, because the + // service automatically detects it. + SupplementalImps []*string `locationName:"supplementalImps" type:"list"` + + // Timecode source under input settings (InputTimecodeSource) only affects the + // behavior of features that apply to a single input at a time, such as input + // clipping and synchronizing some captions formats. Use this setting to specify + // whether the service counts frames by timecodes embedded in the video (EMBEDDED) + // or by starting the first frame at zero (ZEROBASED). In both cases, the timecode + // format is HH:MM:SS:FF or HH:MM:SS;FF, where FF is the frame number. Only + // set this to EMBEDDED if your source video has embedded timecodes. + TimecodeSource *string `locationName:"timecodeSource" type:"string" enum:"InputTimecodeSource"` + + // Selector for video. + VideoSelector *VideoSelector `locationName:"videoSelector" type:"structure"` +} + +// String returns the string representation +func (s Input) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Input) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Input) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Input"} + if s.FilterStrength != nil && *s.FilterStrength < -5 { + invalidParams.Add(request.NewErrParamMinValue("FilterStrength", -5)) + } + if s.ProgramNumber != nil && *s.ProgramNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("ProgramNumber", 1)) + } + if s.AudioSelectors != nil { + for i, v := range s.AudioSelectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioSelectors", i), err.(request.ErrInvalidParams)) + } + } + } + if s.CaptionSelectors != nil { + for i, v := range s.CaptionSelectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSelectors", i), err.(request.ErrInvalidParams)) + } + } + } + if s.DecryptionSettings != nil { + if err := s.DecryptionSettings.Validate(); err != nil { + invalidParams.AddNested("DecryptionSettings", err.(request.ErrInvalidParams)) + } + } + if s.ImageInserter != nil { + if err := s.ImageInserter.Validate(); err != nil { + invalidParams.AddNested("ImageInserter", err.(request.ErrInvalidParams)) + } + } + if s.VideoSelector != nil { + if err := s.VideoSelector.Validate(); err != nil { + invalidParams.AddNested("VideoSelector", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioSelectorGroups sets the AudioSelectorGroups field's value. +func (s *Input) SetAudioSelectorGroups(v map[string]*AudioSelectorGroup) *Input { + s.AudioSelectorGroups = v + return s +} + +// SetAudioSelectors sets the AudioSelectors field's value. +func (s *Input) SetAudioSelectors(v map[string]*AudioSelector) *Input { + s.AudioSelectors = v + return s +} + +// SetCaptionSelectors sets the CaptionSelectors field's value. +func (s *Input) SetCaptionSelectors(v map[string]*CaptionSelector) *Input { + s.CaptionSelectors = v + return s +} + +// SetDeblockFilter sets the DeblockFilter field's value. +func (s *Input) SetDeblockFilter(v string) *Input { + s.DeblockFilter = &v + return s +} + +// SetDecryptionSettings sets the DecryptionSettings field's value. +func (s *Input) SetDecryptionSettings(v *InputDecryptionSettings) *Input { + s.DecryptionSettings = v + return s +} + +// SetDenoiseFilter sets the DenoiseFilter field's value. +func (s *Input) SetDenoiseFilter(v string) *Input { + s.DenoiseFilter = &v + return s +} + +// SetFileInput sets the FileInput field's value. +func (s *Input) SetFileInput(v string) *Input { + s.FileInput = &v + return s +} + +// SetFilterEnable sets the FilterEnable field's value. +func (s *Input) SetFilterEnable(v string) *Input { + s.FilterEnable = &v + return s +} + +// SetFilterStrength sets the FilterStrength field's value. +func (s *Input) SetFilterStrength(v int64) *Input { + s.FilterStrength = &v + return s +} + +// SetImageInserter sets the ImageInserter field's value. +func (s *Input) SetImageInserter(v *ImageInserter) *Input { + s.ImageInserter = v + return s +} + +// SetInputClippings sets the InputClippings field's value. +func (s *Input) SetInputClippings(v []*InputClipping) *Input { + s.InputClippings = v + return s +} + +// SetProgramNumber sets the ProgramNumber field's value. +func (s *Input) SetProgramNumber(v int64) *Input { + s.ProgramNumber = &v + return s +} + +// SetPsiControl sets the PsiControl field's value. +func (s *Input) SetPsiControl(v string) *Input { + s.PsiControl = &v + return s +} + +// SetSupplementalImps sets the SupplementalImps field's value. +func (s *Input) SetSupplementalImps(v []*string) *Input { + s.SupplementalImps = v + return s +} + +// SetTimecodeSource sets the TimecodeSource field's value. +func (s *Input) SetTimecodeSource(v string) *Input { + s.TimecodeSource = &v + return s +} + +// SetVideoSelector sets the VideoSelector field's value. +func (s *Input) SetVideoSelector(v *VideoSelector) *Input { + s.VideoSelector = v + return s +} + +// To transcode only portions of your input (clips), include one Input clipping +// (one instance of InputClipping in the JSON job file) for each input clip. +// All input clips you specify will be included in every output of the job. +type InputClipping struct { + _ struct{} `type:"structure"` + + // Set End timecode (EndTimecode) to the end of the portion of the input you + // are clipping. The frame corresponding to the End timecode value is included + // in the clip. Start timecode or End timecode may be left blank, but not both. + // Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the hour, MM is the + // minute, SS is the second, and FF is the frame number. When choosing this + // value, take into account your setting for timecode source under input settings + // (InputTimecodeSource). For example, if you have embedded timecodes that start + // at 01:00:00:00 and you want your clip to end six minutes into the video, + // use 01:06:00:00. + EndTimecode *string `locationName:"endTimecode" type:"string"` + + // Set Start timecode (StartTimecode) to the beginning of the portion of the + // input you are clipping. The frame corresponding to the Start timecode value + // is included in the clip. Start timecode or End timecode may be left blank, + // but not both. Use the format HH:MM:SS:FF or HH:MM:SS;FF, where HH is the + // hour, MM is the minute, SS is the second, and FF is the frame number. When + // choosing this value, take into account your setting for Input timecode source. + // For example, if you have embedded timecodes that start at 01:00:00:00 and + // you want your clip to begin five minutes into the video, use 01:05:00:00. + StartTimecode *string `locationName:"startTimecode" type:"string"` +} + +// String returns the string representation +func (s InputClipping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputClipping) GoString() string { + return s.String() +} + +// SetEndTimecode sets the EndTimecode field's value. +func (s *InputClipping) SetEndTimecode(v string) *InputClipping { + s.EndTimecode = &v + return s +} + +// SetStartTimecode sets the StartTimecode field's value. +func (s *InputClipping) SetStartTimecode(v string) *InputClipping { + s.StartTimecode = &v + return s +} + +// Specify the decryption settings used to decrypt encrypted input +type InputDecryptionSettings struct { + _ struct{} `type:"structure"` + + // This specifies how the encrypted file needs to be decrypted. + DecryptionMode *string `locationName:"decryptionMode" type:"string" enum:"DecryptionMode"` + + // Decryption key either 128 or 192 or 256 bits encrypted with KMS + EncryptedDecryptionKey *string `locationName:"encryptedDecryptionKey" min:"24" type:"string"` + + // Initialization Vector 96 bits (CTR/GCM mode only) or 128 bits. + InitializationVector *string `locationName:"initializationVector" min:"16" type:"string"` + + // The AWS region in which decryption key was encrypted with KMS + KmsKeyRegion *string `locationName:"kmsKeyRegion" min:"9" type:"string"` +} + +// String returns the string representation +func (s InputDecryptionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDecryptionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputDecryptionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputDecryptionSettings"} + if s.EncryptedDecryptionKey != nil && len(*s.EncryptedDecryptionKey) < 24 { + invalidParams.Add(request.NewErrParamMinLen("EncryptedDecryptionKey", 24)) + } + if s.InitializationVector != nil && len(*s.InitializationVector) < 16 { + invalidParams.Add(request.NewErrParamMinLen("InitializationVector", 16)) + } + if s.KmsKeyRegion != nil && len(*s.KmsKeyRegion) < 9 { + invalidParams.Add(request.NewErrParamMinLen("KmsKeyRegion", 9)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDecryptionMode sets the DecryptionMode field's value. +func (s *InputDecryptionSettings) SetDecryptionMode(v string) *InputDecryptionSettings { + s.DecryptionMode = &v + return s +} + +// SetEncryptedDecryptionKey sets the EncryptedDecryptionKey field's value. +func (s *InputDecryptionSettings) SetEncryptedDecryptionKey(v string) *InputDecryptionSettings { + s.EncryptedDecryptionKey = &v + return s +} + +// SetInitializationVector sets the InitializationVector field's value. +func (s *InputDecryptionSettings) SetInitializationVector(v string) *InputDecryptionSettings { + s.InitializationVector = &v + return s +} + +// SetKmsKeyRegion sets the KmsKeyRegion field's value. +func (s *InputDecryptionSettings) SetKmsKeyRegion(v string) *InputDecryptionSettings { + s.KmsKeyRegion = &v + return s +} + +// Specified video input in a template. +type InputTemplate struct { + _ struct{} `type:"structure"` + + // Specifies set of audio selectors within an input to combine. An input may + // have multiple audio selector groups. See "Audio Selector Group":#inputs-audio_selector_group + // for more information. + AudioSelectorGroups map[string]*AudioSelectorGroup `locationName:"audioSelectorGroups" type:"map"` + + // Use Audio selectors (AudioSelectors) to specify a track or set of tracks + // from the input that you will use in your outputs. You can use mutiple Audio + // selectors per input. + AudioSelectors map[string]*AudioSelector `locationName:"audioSelectors" type:"map"` + + // Use Captions selectors (CaptionSelectors) to specify the captions data from + // the input that you will use in your outputs. You can use mutiple captions + // selectors per input. + CaptionSelectors map[string]*CaptionSelector `locationName:"captionSelectors" type:"map"` + + // Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. + // Default is disabled. Only manaully controllable for MPEG2 and uncompressed + // video inputs. + DeblockFilter *string `locationName:"deblockFilter" type:"string" enum:"InputDeblockFilter"` + + // Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default + // is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video + // inputs. + DenoiseFilter *string `locationName:"denoiseFilter" type:"string" enum:"InputDenoiseFilter"` + + // Use Filter enable (InputFilterEnable) to specify how the transcoding service + // applies the denoise and deblock filters. You must also enable the filters + // separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). + // * Auto - The transcoding service determines whether to apply filtering, depending + // on input type and quality. * Disable - The input is not filtered. This is + // true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). + // * Force - The in put is filtered regardless of input type. + FilterEnable *string `locationName:"filterEnable" type:"string" enum:"InputFilterEnable"` + + // Use Filter strength (FilterStrength) to adjust the magnitude the input filter + // settings (Deblock and Denoise). The range is -5 to 5. Default is 0. + FilterStrength *int64 `locationName:"filterStrength" type:"integer"` + + // Enable the image inserter feature to include a graphic overlay on your video. + // Enable or disable this feature for each input individually. This setting + // is disabled by default. + ImageInserter *ImageInserter `locationName:"imageInserter" type:"structure"` + + // (InputClippings) contains sets of start and end times that together specify + // a portion of the input to be used in the outputs. If you provide only a start + // time, the clip will be the entire input from that point to the end. If you + // provide only an end time, it will be the entire input up to that point. When + // you specify more than one input clip, the transcoding service creates the + // job outputs by stringing the clips together in the order you specify them. + InputClippings []*InputClipping `locationName:"inputClippings" type:"list"` + + // Use Program (programNumber) to select a specific program from within a multi-program + // transport stream. Note that Quad 4K is not currently supported. Default is + // the first program within the transport stream. If the program you specify + // doesn't exist, the transcoding service will use this default. + ProgramNumber *int64 `locationName:"programNumber" min:"1" type:"integer"` + + // Set PSI control (InputPsiControl) for transport stream inputs to specify + // which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio + // and video. * Use PSI - Scan only PSI data. + PsiControl *string `locationName:"psiControl" type:"string" enum:"InputPsiControl"` + + // Timecode source under input settings (InputTimecodeSource) only affects the + // behavior of features that apply to a single input at a time, such as input + // clipping and synchronizing some captions formats. Use this setting to specify + // whether the service counts frames by timecodes embedded in the video (EMBEDDED) + // or by starting the first frame at zero (ZEROBASED). In both cases, the timecode + // format is HH:MM:SS:FF or HH:MM:SS;FF, where FF is the frame number. Only + // set this to EMBEDDED if your source video has embedded timecodes. + TimecodeSource *string `locationName:"timecodeSource" type:"string" enum:"InputTimecodeSource"` + + // Selector for video. + VideoSelector *VideoSelector `locationName:"videoSelector" type:"structure"` +} + +// String returns the string representation +func (s InputTemplate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputTemplate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputTemplate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputTemplate"} + if s.FilterStrength != nil && *s.FilterStrength < -5 { + invalidParams.Add(request.NewErrParamMinValue("FilterStrength", -5)) + } + if s.ProgramNumber != nil && *s.ProgramNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("ProgramNumber", 1)) + } + if s.AudioSelectors != nil { + for i, v := range s.AudioSelectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioSelectors", i), err.(request.ErrInvalidParams)) + } + } + } + if s.CaptionSelectors != nil { + for i, v := range s.CaptionSelectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSelectors", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ImageInserter != nil { + if err := s.ImageInserter.Validate(); err != nil { + invalidParams.AddNested("ImageInserter", err.(request.ErrInvalidParams)) + } + } + if s.VideoSelector != nil { + if err := s.VideoSelector.Validate(); err != nil { + invalidParams.AddNested("VideoSelector", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioSelectorGroups sets the AudioSelectorGroups field's value. +func (s *InputTemplate) SetAudioSelectorGroups(v map[string]*AudioSelectorGroup) *InputTemplate { + s.AudioSelectorGroups = v + return s +} + +// SetAudioSelectors sets the AudioSelectors field's value. +func (s *InputTemplate) SetAudioSelectors(v map[string]*AudioSelector) *InputTemplate { + s.AudioSelectors = v + return s +} + +// SetCaptionSelectors sets the CaptionSelectors field's value. +func (s *InputTemplate) SetCaptionSelectors(v map[string]*CaptionSelector) *InputTemplate { + s.CaptionSelectors = v + return s +} + +// SetDeblockFilter sets the DeblockFilter field's value. +func (s *InputTemplate) SetDeblockFilter(v string) *InputTemplate { + s.DeblockFilter = &v + return s +} + +// SetDenoiseFilter sets the DenoiseFilter field's value. +func (s *InputTemplate) SetDenoiseFilter(v string) *InputTemplate { + s.DenoiseFilter = &v + return s +} + +// SetFilterEnable sets the FilterEnable field's value. +func (s *InputTemplate) SetFilterEnable(v string) *InputTemplate { + s.FilterEnable = &v + return s +} + +// SetFilterStrength sets the FilterStrength field's value. +func (s *InputTemplate) SetFilterStrength(v int64) *InputTemplate { + s.FilterStrength = &v + return s +} + +// SetImageInserter sets the ImageInserter field's value. +func (s *InputTemplate) SetImageInserter(v *ImageInserter) *InputTemplate { + s.ImageInserter = v + return s +} + +// SetInputClippings sets the InputClippings field's value. +func (s *InputTemplate) SetInputClippings(v []*InputClipping) *InputTemplate { + s.InputClippings = v + return s +} + +// SetProgramNumber sets the ProgramNumber field's value. +func (s *InputTemplate) SetProgramNumber(v int64) *InputTemplate { + s.ProgramNumber = &v + return s +} + +// SetPsiControl sets the PsiControl field's value. +func (s *InputTemplate) SetPsiControl(v string) *InputTemplate { + s.PsiControl = &v + return s +} + +// SetTimecodeSource sets the TimecodeSource field's value. +func (s *InputTemplate) SetTimecodeSource(v string) *InputTemplate { + s.TimecodeSource = &v + return s +} + +// SetVideoSelector sets the VideoSelector field's value. +func (s *InputTemplate) SetVideoSelector(v *VideoSelector) *InputTemplate { + s.VideoSelector = v + return s +} + +// Settings that specify how your still graphic overlay appears. +type InsertableImage struct { + _ struct{} `type:"structure"` + + // Specify the time, in milliseconds, for the image to remain on the output + // video. This duration includes fade-in time but not fade-out time. + Duration *int64 `locationName:"duration" type:"integer"` + + // Specify the length of time, in milliseconds, between the Start time that + // you specify for the image insertion and the time that the image appears at + // full opacity. Full opacity is the level that you specify for the opacity + // setting. If you don't specify a value for Fade-in, the image will appear + // abruptly at the overlay start time. + FadeIn *int64 `locationName:"fadeIn" type:"integer"` + + // Specify the length of time, in milliseconds, between the end of the time + // that you have specified for the image overlay Duration and when the overlaid + // image has faded to total transparency. If you don't specify a value for Fade-out, + // the image will disappear abruptly at the end of the inserted image duration. + FadeOut *int64 `locationName:"fadeOut" type:"integer"` + + // Specify the height of the inserted image in pixels. If you specify a value + // that's larger than the video resolution height, the service will crop your + // overlaid image to fit. To use the native height of the image, keep this setting + // blank. + Height *int64 `locationName:"height" type:"integer"` + + // Specify the Amazon S3 location of the image that you want to overlay on the + // video. Use a PNG or TGA file. + ImageInserterInput *string `locationName:"imageInserterInput" min:"14" type:"string"` + + // Specify the distance, in pixels, between the inserted image and the left + // edge of the video frame. Required for any image overlay that you specify. + ImageX *int64 `locationName:"imageX" type:"integer"` + + // Specify the distance, in pixels, between the overlaid image and the top edge + // of the video frame. Required for any image overlay that you specify. + ImageY *int64 `locationName:"imageY" type:"integer"` + + // Specify how overlapping inserted images appear. Images with higher values + // for Layer appear on top of images with lower values for Layer. + Layer *int64 `locationName:"layer" type:"integer"` + + // Use Opacity (Opacity) to specify how much of the underlying video shows through + // the inserted image. 0 is transparent and 100 is fully opaque. Default is + // 50. + Opacity *int64 `locationName:"opacity" type:"integer"` + + // Specify the timecode of the frame that you want the overlay to first appear + // on. This must be in timecode (HH:MM:SS:FF or HH:MM:SS;FF) format. Remember + // to take into account your timecode source settings. + StartTime *string `locationName:"startTime" type:"string"` + + // Specify the width of the inserted image in pixels. If you specify a value + // that's larger than the video resolution width, the service will crop your + // overlaid image to fit. To use the native width of the image, keep this setting + // blank. + Width *int64 `locationName:"width" type:"integer"` +} + +// String returns the string representation +func (s InsertableImage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InsertableImage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InsertableImage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InsertableImage"} + if s.ImageInserterInput != nil && len(*s.ImageInserterInput) < 14 { + invalidParams.Add(request.NewErrParamMinLen("ImageInserterInput", 14)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDuration sets the Duration field's value. +func (s *InsertableImage) SetDuration(v int64) *InsertableImage { + s.Duration = &v + return s +} + +// SetFadeIn sets the FadeIn field's value. +func (s *InsertableImage) SetFadeIn(v int64) *InsertableImage { + s.FadeIn = &v + return s +} + +// SetFadeOut sets the FadeOut field's value. +func (s *InsertableImage) SetFadeOut(v int64) *InsertableImage { + s.FadeOut = &v + return s +} + +// SetHeight sets the Height field's value. +func (s *InsertableImage) SetHeight(v int64) *InsertableImage { + s.Height = &v + return s +} + +// SetImageInserterInput sets the ImageInserterInput field's value. +func (s *InsertableImage) SetImageInserterInput(v string) *InsertableImage { + s.ImageInserterInput = &v + return s +} + +// SetImageX sets the ImageX field's value. +func (s *InsertableImage) SetImageX(v int64) *InsertableImage { + s.ImageX = &v + return s +} + +// SetImageY sets the ImageY field's value. +func (s *InsertableImage) SetImageY(v int64) *InsertableImage { + s.ImageY = &v + return s +} + +// SetLayer sets the Layer field's value. +func (s *InsertableImage) SetLayer(v int64) *InsertableImage { + s.Layer = &v + return s +} + +// SetOpacity sets the Opacity field's value. +func (s *InsertableImage) SetOpacity(v int64) *InsertableImage { + s.Opacity = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *InsertableImage) SetStartTime(v string) *InsertableImage { + s.StartTime = &v + return s +} + +// SetWidth sets the Width field's value. +func (s *InsertableImage) SetWidth(v int64) *InsertableImage { + s.Width = &v + return s +} + +// Each job converts an input file into an output file or files. For more information, +// see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html +type Job struct { + _ struct{} `type:"structure"` + + // Acceleration settings for job execution. + AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` + + // An identifier for this resource that is unique within all of AWS. + Arn *string `locationName:"arn" type:"string"` + + // Optional. Choose a tag type that AWS Billing and Cost Management will use + // to sort your AWS Elemental MediaConvert costs on any billing report that + // you set up. Any transcoding outputs that don't have an associated tag will + // appear in your billing report unsorted. If you don't choose a valid value + // for this field, your job outputs will appear on the billing report unsorted. + BillingTagsSource *string `locationName:"billingTagsSource" type:"string" enum:"BillingTagsSource"` + + // The time, in Unix epoch format in seconds, when the job got created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` + + // Error code for the job + ErrorCode *int64 `locationName:"errorCode" type:"integer"` + + // Error message of Job + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // A portion of the job's ARN, unique within your AWS Elemental MediaConvert + // resources + Id *string `locationName:"id" type:"string"` + + // The job template that the job is created from, if it is created from a job + // template. + JobTemplate *string `locationName:"jobTemplate" type:"string"` + + // List of output group details + OutputGroupDetails []*OutputGroupDetail `locationName:"outputGroupDetails" type:"list"` + + // Optional. When you create a job, you can specify a queue to send it to. If + // you don't specify, the job will go to the default queue. For more about queues, + // see the User Guide topic at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html + Queue *string `locationName:"queue" type:"string"` + + // The IAM role you use for creating this job. For details about permissions, + // see the User Guide topic at the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html + // + // Role is a required field + Role *string `locationName:"role" type:"string" required:"true"` + + // JobSettings contains all the transcode settings for a job. + // + // Settings is a required field + Settings *JobSettings `locationName:"settings" type:"structure" required:"true"` + + // A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. + Status *string `locationName:"status" type:"string" enum:"JobStatus"` + + // Information about when jobs are submitted, started, and finished is specified + // in Unix epoch format in seconds. + Timing *Timing `locationName:"timing" type:"structure"` + + // User-defined metadata that you want to associate with an MediaConvert job. + // You specify metadata in key/value pairs. + UserMetadata map[string]*string `locationName:"userMetadata" type:"map"` +} + +// String returns the string representation +func (s Job) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Job) GoString() string { + return s.String() +} + +// SetAccelerationSettings sets the AccelerationSettings field's value. +func (s *Job) SetAccelerationSettings(v *AccelerationSettings) *Job { + s.AccelerationSettings = v + return s +} + +// SetArn sets the Arn field's value. +func (s *Job) SetArn(v string) *Job { + s.Arn = &v + return s +} + +// SetBillingTagsSource sets the BillingTagsSource field's value. +func (s *Job) SetBillingTagsSource(v string) *Job { + s.BillingTagsSource = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Job) SetCreatedAt(v time.Time) *Job { + s.CreatedAt = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *Job) SetErrorCode(v int64) *Job { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *Job) SetErrorMessage(v string) *Job { + s.ErrorMessage = &v + return s +} + +// SetId sets the Id field's value. +func (s *Job) SetId(v string) *Job { + s.Id = &v + return s +} + +// SetJobTemplate sets the JobTemplate field's value. +func (s *Job) SetJobTemplate(v string) *Job { + s.JobTemplate = &v + return s +} + +// SetOutputGroupDetails sets the OutputGroupDetails field's value. +func (s *Job) SetOutputGroupDetails(v []*OutputGroupDetail) *Job { + s.OutputGroupDetails = v + return s +} + +// SetQueue sets the Queue field's value. +func (s *Job) SetQueue(v string) *Job { + s.Queue = &v + return s +} + +// SetRole sets the Role field's value. +func (s *Job) SetRole(v string) *Job { + s.Role = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *Job) SetSettings(v *JobSettings) *Job { + s.Settings = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Job) SetStatus(v string) *Job { + s.Status = &v + return s +} + +// SetTiming sets the Timing field's value. +func (s *Job) SetTiming(v *Timing) *Job { + s.Timing = v + return s +} + +// SetUserMetadata sets the UserMetadata field's value. +func (s *Job) SetUserMetadata(v map[string]*string) *Job { + s.UserMetadata = v + return s +} + +// JobSettings contains all the transcode settings for a job. +type JobSettings struct { + _ struct{} `type:"structure"` + + // When specified, this offset (in milliseconds) is added to the input Ad Avail + // PTS time. + AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` + + // Settings for ad avail blanking. Video can be blanked or overlaid with an + // image, and audio muted during SCTE-35 triggered ad avails. + AvailBlanking *AvailBlanking `locationName:"availBlanking" type:"structure"` + + // Use Inputs (inputs) to define source file used in the transcode job. There + // can be multiple inputs add in a job. These inputs will be concantenated together + // to create the output. + Inputs []*Input `locationName:"inputs" type:"list"` + + // Overlay motion graphics on top of your video. The motion graphics that you + // specify here appear on all outputs in all output groups. + MotionImageInserter *MotionImageInserter `locationName:"motionImageInserter" type:"structure"` + + // Settings for Nielsen Configuration + NielsenConfiguration *NielsenConfiguration `locationName:"nielsenConfiguration" type:"structure"` + + // (OutputGroups) contains one group of settings for each set of outputs that + // share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, + // MXF, and no container) are grouped in a single output group as well. Required + // in (OutputGroups) is a group of settings that apply to the whole group. This + // required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). + // Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings + // * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings + // * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, + // CmafGroupSettings + OutputGroups []*OutputGroup `locationName:"outputGroups" type:"list"` + + // Contains settings used to acquire and adjust timecode information from inputs. + TimecodeConfig *TimecodeConfig `locationName:"timecodeConfig" type:"structure"` + + // Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags + // in your job. To include timed metadata, you must enable it here, enable it + // in each output container, and specify tags and timecodes in ID3 insertion + // (Id3Insertion) objects. + TimedMetadataInsertion *TimedMetadataInsertion `locationName:"timedMetadataInsertion" type:"structure"` +} + +// String returns the string representation +func (s JobSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *JobSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JobSettings"} + if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { + invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) + } + if s.AvailBlanking != nil { + if err := s.AvailBlanking.Validate(); err != nil { + invalidParams.AddNested("AvailBlanking", err.(request.ErrInvalidParams)) + } + } + if s.Inputs != nil { + for i, v := range s.Inputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.MotionImageInserter != nil { + if err := s.MotionImageInserter.Validate(); err != nil { + invalidParams.AddNested("MotionImageInserter", err.(request.ErrInvalidParams)) + } + } + if s.OutputGroups != nil { + for i, v := range s.OutputGroups { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputGroups", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdAvailOffset sets the AdAvailOffset field's value. +func (s *JobSettings) SetAdAvailOffset(v int64) *JobSettings { + s.AdAvailOffset = &v + return s +} + +// SetAvailBlanking sets the AvailBlanking field's value. +func (s *JobSettings) SetAvailBlanking(v *AvailBlanking) *JobSettings { + s.AvailBlanking = v + return s +} + +// SetInputs sets the Inputs field's value. +func (s *JobSettings) SetInputs(v []*Input) *JobSettings { + s.Inputs = v + return s +} + +// SetMotionImageInserter sets the MotionImageInserter field's value. +func (s *JobSettings) SetMotionImageInserter(v *MotionImageInserter) *JobSettings { + s.MotionImageInserter = v + return s +} + +// SetNielsenConfiguration sets the NielsenConfiguration field's value. +func (s *JobSettings) SetNielsenConfiguration(v *NielsenConfiguration) *JobSettings { + s.NielsenConfiguration = v + return s +} + +// SetOutputGroups sets the OutputGroups field's value. +func (s *JobSettings) SetOutputGroups(v []*OutputGroup) *JobSettings { + s.OutputGroups = v + return s +} + +// SetTimecodeConfig sets the TimecodeConfig field's value. +func (s *JobSettings) SetTimecodeConfig(v *TimecodeConfig) *JobSettings { + s.TimecodeConfig = v + return s +} + +// SetTimedMetadataInsertion sets the TimedMetadataInsertion field's value. +func (s *JobSettings) SetTimedMetadataInsertion(v *TimedMetadataInsertion) *JobSettings { + s.TimedMetadataInsertion = v + return s +} + +// A job template is a pre-made set of encoding instructions that you can use +// to quickly create a job. +type JobTemplate struct { + _ struct{} `type:"structure"` + + // Acceleration settings for job execution. + AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` + + // An identifier for this resource that is unique within all of AWS. + Arn *string `locationName:"arn" type:"string"` + + // An optional category you create to organize your job templates. + Category *string `locationName:"category" type:"string"` + + // The timestamp in epoch seconds for Job template creation. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` + + // An optional description you create for each job template. + Description *string `locationName:"description" type:"string"` + + // The timestamp in epoch seconds when the Job template was last updated. + LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` + + // A name you create for each job template. Each name must be unique within + // your account. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Optional. The queue that jobs created from this template are assigned to. + // If you don't specify this, jobs will go to the default queue. + Queue *string `locationName:"queue" type:"string"` + + // JobTemplateSettings contains all the transcode settings saved in the template + // that will be applied to jobs created from it. + // + // Settings is a required field + Settings *JobTemplateSettings `locationName:"settings" type:"structure" required:"true"` + + // A job template can be of two types: system or custom. System or built-in + // job templates can't be modified or deleted by the user. + Type *string `locationName:"type" type:"string" enum:"Type"` +} + +// String returns the string representation +func (s JobTemplate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobTemplate) GoString() string { + return s.String() +} + +// SetAccelerationSettings sets the AccelerationSettings field's value. +func (s *JobTemplate) SetAccelerationSettings(v *AccelerationSettings) *JobTemplate { + s.AccelerationSettings = v + return s +} + +// SetArn sets the Arn field's value. +func (s *JobTemplate) SetArn(v string) *JobTemplate { + s.Arn = &v + return s +} + +// SetCategory sets the Category field's value. +func (s *JobTemplate) SetCategory(v string) *JobTemplate { + s.Category = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *JobTemplate) SetCreatedAt(v time.Time) *JobTemplate { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *JobTemplate) SetDescription(v string) *JobTemplate { + s.Description = &v + return s +} + +// SetLastUpdated sets the LastUpdated field's value. +func (s *JobTemplate) SetLastUpdated(v time.Time) *JobTemplate { + s.LastUpdated = &v + return s +} + +// SetName sets the Name field's value. +func (s *JobTemplate) SetName(v string) *JobTemplate { + s.Name = &v + return s +} + +// SetQueue sets the Queue field's value. +func (s *JobTemplate) SetQueue(v string) *JobTemplate { + s.Queue = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *JobTemplate) SetSettings(v *JobTemplateSettings) *JobTemplate { + s.Settings = v + return s +} + +// SetType sets the Type field's value. +func (s *JobTemplate) SetType(v string) *JobTemplate { + s.Type = &v + return s +} + +// JobTemplateSettings contains all the transcode settings saved in the template +// that will be applied to jobs created from it. +type JobTemplateSettings struct { + _ struct{} `type:"structure"` + + // When specified, this offset (in milliseconds) is added to the input Ad Avail + // PTS time. + AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` + + // Settings for ad avail blanking. Video can be blanked or overlaid with an + // image, and audio muted during SCTE-35 triggered ad avails. + AvailBlanking *AvailBlanking `locationName:"availBlanking" type:"structure"` + + // Use Inputs (inputs) to define the source file used in the transcode job. + // There can only be one input in a job template. Using the API, you can include + // multiple inputs when referencing a job template. + Inputs []*InputTemplate `locationName:"inputs" type:"list"` + + // Overlay motion graphics on top of your video. The motion graphics that you + // specify here appear on all outputs in all output groups. + MotionImageInserter *MotionImageInserter `locationName:"motionImageInserter" type:"structure"` + + // Settings for Nielsen Configuration + NielsenConfiguration *NielsenConfiguration `locationName:"nielsenConfiguration" type:"structure"` + + // (OutputGroups) contains one group of settings for each set of outputs that + // share a common package type. All unpackaged files (MPEG-4, MPEG-2 TS, Quicktime, + // MXF, and no container) are grouped in a single output group as well. Required + // in (OutputGroups) is a group of settings that apply to the whole group. This + // required object depends on the value you set for (Type) under (OutputGroups)>(OutputGroupSettings). + // Type, settings object pairs are as follows. * FILE_GROUP_SETTINGS, FileGroupSettings + // * HLS_GROUP_SETTINGS, HlsGroupSettings * DASH_ISO_GROUP_SETTINGS, DashIsoGroupSettings + // * MS_SMOOTH_GROUP_SETTINGS, MsSmoothGroupSettings * CMAF_GROUP_SETTINGS, + // CmafGroupSettings + OutputGroups []*OutputGroup `locationName:"outputGroups" type:"list"` + + // Contains settings used to acquire and adjust timecode information from inputs. + TimecodeConfig *TimecodeConfig `locationName:"timecodeConfig" type:"structure"` + + // Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags + // in your job. To include timed metadata, you must enable it here, enable it + // in each output container, and specify tags and timecodes in ID3 insertion + // (Id3Insertion) objects. + TimedMetadataInsertion *TimedMetadataInsertion `locationName:"timedMetadataInsertion" type:"structure"` +} + +// String returns the string representation +func (s JobTemplateSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobTemplateSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *JobTemplateSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JobTemplateSettings"} + if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { + invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) + } + if s.AvailBlanking != nil { + if err := s.AvailBlanking.Validate(); err != nil { + invalidParams.AddNested("AvailBlanking", err.(request.ErrInvalidParams)) + } + } + if s.Inputs != nil { + for i, v := range s.Inputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.MotionImageInserter != nil { + if err := s.MotionImageInserter.Validate(); err != nil { + invalidParams.AddNested("MotionImageInserter", err.(request.ErrInvalidParams)) + } + } + if s.OutputGroups != nil { + for i, v := range s.OutputGroups { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputGroups", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdAvailOffset sets the AdAvailOffset field's value. +func (s *JobTemplateSettings) SetAdAvailOffset(v int64) *JobTemplateSettings { + s.AdAvailOffset = &v + return s +} + +// SetAvailBlanking sets the AvailBlanking field's value. +func (s *JobTemplateSettings) SetAvailBlanking(v *AvailBlanking) *JobTemplateSettings { + s.AvailBlanking = v + return s +} + +// SetInputs sets the Inputs field's value. +func (s *JobTemplateSettings) SetInputs(v []*InputTemplate) *JobTemplateSettings { + s.Inputs = v + return s +} + +// SetMotionImageInserter sets the MotionImageInserter field's value. +func (s *JobTemplateSettings) SetMotionImageInserter(v *MotionImageInserter) *JobTemplateSettings { + s.MotionImageInserter = v + return s +} + +// SetNielsenConfiguration sets the NielsenConfiguration field's value. +func (s *JobTemplateSettings) SetNielsenConfiguration(v *NielsenConfiguration) *JobTemplateSettings { + s.NielsenConfiguration = v + return s +} + +// SetOutputGroups sets the OutputGroups field's value. +func (s *JobTemplateSettings) SetOutputGroups(v []*OutputGroup) *JobTemplateSettings { + s.OutputGroups = v + return s +} + +// SetTimecodeConfig sets the TimecodeConfig field's value. +func (s *JobTemplateSettings) SetTimecodeConfig(v *TimecodeConfig) *JobTemplateSettings { + s.TimecodeConfig = v + return s +} + +// SetTimedMetadataInsertion sets the TimedMetadataInsertion field's value. +func (s *JobTemplateSettings) SetTimedMetadataInsertion(v *TimedMetadataInsertion) *JobTemplateSettings { + s.TimedMetadataInsertion = v + return s +} + +// You can send list job templates requests with an empty body. Optionally, +// you can filter the response by category by specifying it in your request +// body. You can also optionally specify the maximum number, up to twenty, of +// job templates to be returned. +type ListJobTemplatesInput struct { + _ struct{} `type:"structure"` + + // Optionally, specify a job template category to limit responses to only job + // templates from that category. + Category *string `location:"querystring" locationName:"category" type:"string"` + + // Optional. When you request a list of job templates, you can choose to list + // them alphabetically by NAME or chronologically by CREATION_DATE. If you don't + // specify, the service will list them by name. + ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"JobTemplateListBy"` + + // Optional. Number of job templates, up to twenty, that will be returned at + // one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Use this string, provided with the response to a previous request, to request + // the next batch of job templates. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // When you request lists of resources, you can optionally specify whether they + // are sorted in ASCENDING or DESCENDING order. Default varies by resource. + Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` +} + +// String returns the string representation +func (s ListJobTemplatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJobTemplatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListJobTemplatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJobTemplatesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *ListJobTemplatesInput) SetCategory(v string) *ListJobTemplatesInput { + s.Category = &v + return s +} + +// SetListBy sets the ListBy field's value. +func (s *ListJobTemplatesInput) SetListBy(v string) *ListJobTemplatesInput { + s.ListBy = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListJobTemplatesInput) SetMaxResults(v int64) *ListJobTemplatesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJobTemplatesInput) SetNextToken(v string) *ListJobTemplatesInput { + s.NextToken = &v + return s +} + +// SetOrder sets the Order field's value. +func (s *ListJobTemplatesInput) SetOrder(v string) *ListJobTemplatesInput { + s.Order = &v + return s +} + +// Successful list job templates requests return a JSON array of job templates. +// If you don't specify how they are ordered, you will receive them in alphabetical +// order by name. +type ListJobTemplatesOutput struct { + _ struct{} `type:"structure"` + + // List of Job templates. + JobTemplates []*JobTemplate `locationName:"jobTemplates" type:"list"` + + // Use this string to request the next batch of job templates. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListJobTemplatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJobTemplatesOutput) GoString() string { + return s.String() +} + +// SetJobTemplates sets the JobTemplates field's value. +func (s *ListJobTemplatesOutput) SetJobTemplates(v []*JobTemplate) *ListJobTemplatesOutput { + s.JobTemplates = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJobTemplatesOutput) SetNextToken(v string) *ListJobTemplatesOutput { + s.NextToken = &v + return s +} + +// You can send list jobs requests with an empty body. Optionally, you can filter +// the response by queue and/or job status by specifying them in your request +// body. You can also optionally specify the maximum number, up to twenty, of +// jobs to be returned. +type ListJobsInput struct { + _ struct{} `type:"structure"` + + // Optional. Number of jobs, up to twenty, that will be returned at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Use this string, provided with the response to a previous request, to request + // the next batch of jobs. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // When you request lists of resources, you can optionally specify whether they + // are sorted in ASCENDING or DESCENDING order. Default varies by resource. + Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` + + // Provide a queue name to get back only jobs from that queue. + Queue *string `location:"querystring" locationName:"queue" type:"string"` + + // A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. + Status *string `location:"querystring" locationName:"status" type:"string" enum:"JobStatus"` +} + +// String returns the string representation +func (s ListJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { + s.NextToken = &v + return s +} + +// SetOrder sets the Order field's value. +func (s *ListJobsInput) SetOrder(v string) *ListJobsInput { + s.Order = &v + return s +} + +// SetQueue sets the Queue field's value. +func (s *ListJobsInput) SetQueue(v string) *ListJobsInput { + s.Queue = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ListJobsInput) SetStatus(v string) *ListJobsInput { + s.Status = &v + return s +} + +// Successful list jobs requests return a JSON array of jobs. If you don't specify +// how they are ordered, you will receive the most recently created first. +type ListJobsOutput struct { + _ struct{} `type:"structure"` + + // List of jobs + Jobs []*Job `locationName:"jobs" type:"list"` + + // Use this string to request the next batch of jobs. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListJobsOutput) GoString() string { + return s.String() +} + +// SetJobs sets the Jobs field's value. +func (s *ListJobsOutput) SetJobs(v []*Job) *ListJobsOutput { + s.Jobs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { + s.NextToken = &v + return s +} + +// You can send list presets requests with an empty body. Optionally, you can +// filter the response by category by specifying it in your request body. You +// can also optionally specify the maximum number, up to twenty, of queues to +// be returned. +type ListPresetsInput struct { + _ struct{} `type:"structure"` + + // Optionally, specify a preset category to limit responses to only presets + // from that category. + Category *string `location:"querystring" locationName:"category" type:"string"` + + // Optional. When you request a list of presets, you can choose to list them + // alphabetically by NAME or chronologically by CREATION_DATE. If you don't + // specify, the service will list them by name. + ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"PresetListBy"` + + // Optional. Number of presets, up to twenty, that will be returned at one time + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Use this string, provided with the response to a previous request, to request + // the next batch of presets. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // When you request lists of resources, you can optionally specify whether they + // are sorted in ASCENDING or DESCENDING order. Default varies by resource. + Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` +} + +// String returns the string representation +func (s ListPresetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPresetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPresetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPresetsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *ListPresetsInput) SetCategory(v string) *ListPresetsInput { + s.Category = &v + return s +} + +// SetListBy sets the ListBy field's value. +func (s *ListPresetsInput) SetListBy(v string) *ListPresetsInput { + s.ListBy = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListPresetsInput) SetMaxResults(v int64) *ListPresetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPresetsInput) SetNextToken(v string) *ListPresetsInput { + s.NextToken = &v + return s +} + +// SetOrder sets the Order field's value. +func (s *ListPresetsInput) SetOrder(v string) *ListPresetsInput { + s.Order = &v + return s +} + +// Successful list presets requests return a JSON array of presets. If you don't +// specify how they are ordered, you will receive them alphabetically by name. +type ListPresetsOutput struct { + _ struct{} `type:"structure"` + + // Use this string to request the next batch of presets. + NextToken *string `locationName:"nextToken" type:"string"` + + // List of presets + Presets []*Preset `locationName:"presets" type:"list"` +} + +// String returns the string representation +func (s ListPresetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPresetsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPresetsOutput) SetNextToken(v string) *ListPresetsOutput { + s.NextToken = &v + return s +} + +// SetPresets sets the Presets field's value. +func (s *ListPresetsOutput) SetPresets(v []*Preset) *ListPresetsOutput { + s.Presets = v + return s +} + +// You can send list queues requests with an empty body. You can optionally +// specify the maximum number, up to twenty, of queues to be returned. +type ListQueuesInput struct { + _ struct{} `type:"structure"` + + // Optional. When you request a list of queues, you can choose to list them + // alphabetically by NAME or chronologically by CREATION_DATE. If you don't + // specify, the service will list them by creation date. + ListBy *string `location:"querystring" locationName:"listBy" type:"string" enum:"QueueListBy"` + + // Optional. Number of queues, up to twenty, that will be returned at one time. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Use this string, provided with the response to a previous request, to request + // the next batch of queues. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // When you request lists of resources, you can optionally specify whether they + // are sorted in ASCENDING or DESCENDING order. Default varies by resource. + Order *string `location:"querystring" locationName:"order" type:"string" enum:"Order"` +} + +// String returns the string representation +func (s ListQueuesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueuesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListQueuesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListQueuesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetListBy sets the ListBy field's value. +func (s *ListQueuesInput) SetListBy(v string) *ListQueuesInput { + s.ListBy = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListQueuesInput) SetMaxResults(v int64) *ListQueuesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListQueuesInput) SetNextToken(v string) *ListQueuesInput { + s.NextToken = &v + return s +} + +// SetOrder sets the Order field's value. +func (s *ListQueuesInput) SetOrder(v string) *ListQueuesInput { + s.Order = &v + return s +} + +// Successful list queues requests return a JSON array of queues. If you don't +// specify how they are ordered, you will receive them alphabetically by name. +type ListQueuesOutput struct { + _ struct{} `type:"structure"` + + // Use this string to request the next batch of queues. + NextToken *string `locationName:"nextToken" type:"string"` + + // List of queues. + Queues []*Queue `locationName:"queues" type:"list"` +} + +// String returns the string representation +func (s ListQueuesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListQueuesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListQueuesOutput) SetNextToken(v string) *ListQueuesOutput { + s.NextToken = &v + return s +} + +// SetQueues sets the Queues field's value. +func (s *ListQueuesOutput) SetQueues(v []*Queue) *ListQueuesOutput { + s.Queues = v + return s +} + +// List the tags for your AWS Elemental MediaConvert resource by sending a request +// with the Amazon Resource Name (ARN) of the resource. To get the ARN, send +// a GET request with the resource name. +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to list tags + // for. To get the ARN, send a GET request with the resource name. + // + // Arn is a required field + Arn *string `location:"uri" locationName:"arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *ListTagsForResourceInput) SetArn(v string) *ListTagsForResourceInput { + s.Arn = &v + return s +} + +// A successful request to list the tags for a resource returns a JSON map of +// tags. +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert + // resource. + ResourceTags *ResourceTags `locationName:"resourceTags" type:"structure"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetResourceTags sets the ResourceTags field's value. +func (s *ListTagsForResourceOutput) SetResourceTags(v *ResourceTags) *ListTagsForResourceOutput { + s.ResourceTags = v + return s +} + +// Settings for M2TS Container. +type M2tsSettings struct { + _ struct{} `type:"structure"` + + // Selects between the DVB and ATSC buffer models for Dolby Digital audio. + AudioBufferModel *string `locationName:"audioBufferModel" type:"string" enum:"M2tsAudioBufferModel"` + + // The number of audio frames to insert for each PES packet. + AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` + + // Packet Identifier (PID) of the elementary audio stream(s) in the transport + // stream. Multiple values are accepted, and can be entered in ranges and/or + // by comma separation. + AudioPids []*int64 `locationName:"audioPids" type:"list"` + + // The output bitrate of the transport stream in bits per second. Setting to + // 0 lets the muxer automatically determine the appropriate bitrate. Other common + // values are 3750000, 7500000, and 15000000. + Bitrate *int64 `locationName:"bitrate" type:"integer"` + + // Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, + // use multiplex buffer model. If set to NONE, this can lead to lower latency, + // but low-memory devices may not be able to play back the stream without interruptions. + BufferModel *string `locationName:"bufferModel" type:"string" enum:"M2tsBufferModel"` + + // Inserts DVB Network Information Table (NIT) at the specified table repetition + // interval. + DvbNitSettings *DvbNitSettings `locationName:"dvbNitSettings" type:"structure"` + + // Inserts DVB Service Description Table (NIT) at the specified table repetition + // interval. + DvbSdtSettings *DvbSdtSettings `locationName:"dvbSdtSettings" type:"structure"` + + // Packet Identifier (PID) for input source DVB Subtitle data to this output. + // Multiple values are accepted, and can be entered in ranges and/or by comma + // separation. + DvbSubPids []*int64 `locationName:"dvbSubPids" type:"list"` + + // Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. + DvbTdtSettings *DvbTdtSettings `locationName:"dvbTdtSettings" type:"structure"` + + // Packet Identifier (PID) for input source DVB Teletext data to this output. + DvbTeletextPid *int64 `locationName:"dvbTeletextPid" min:"32" type:"integer"` + + // When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to + // partitions 3 and 4. The interval between these additional markers will be + // fixed, and will be slightly shorter than the video EBP marker interval. When + // set to VIDEO_INTERVAL, these additional markers will not be inserted. Only + // applicable when EBP segmentation markers are is selected (segmentationMarkers + // is EBP or EBP_LEGACY). + EbpAudioInterval *string `locationName:"ebpAudioInterval" type:"string" enum:"M2tsEbpAudioInterval"` + + // Selects which PIDs to place EBP markers on. They can either be placed only + // on the video PID, or on both the video PID and all audio PIDs. Only applicable + // when EBP segmentation markers are is selected (segmentationMarkers is EBP + // or EBP_LEGACY). + EbpPlacement *string `locationName:"ebpPlacement" type:"string" enum:"M2tsEbpPlacement"` + + // Controls whether to include the ES Rate field in the PES header. + EsRateInPes *string `locationName:"esRateInPes" type:"string" enum:"M2tsEsRateInPes"` + + // Keep the default value (DEFAULT) unless you know that your audio EBP markers + // are incorrectly appearing before your video EBP markers. Set this value to + // Force (FORCE) to correct this problem. + ForceTsVideoEbpOrder *string `locationName:"forceTsVideoEbpOrder" type:"string" enum:"M2tsForceTsVideoEbpOrder"` + + // The length in seconds of each fragment. Only used with EBP markers. + FragmentTime *float64 `locationName:"fragmentTime" type:"double"` + + // Maximum time in milliseconds between Program Clock References (PCRs) inserted + // into the transport stream. + MaxPcrInterval *int64 `locationName:"maxPcrInterval" type:"integer"` + + // When set, enforces that Encoder Boundary Points do not come within the specified + // time interval of each other by looking ahead at input video. If another EBP + // is going to come in within the specified time interval, the current EBP is + // not emitted, and the segment is "stretched" to the next marker. The lookahead + // value does not add latency to the system. The Live Event must be configured + // elsewhere to create sufficient latency to make the lookahead accurate. + MinEbpInterval *int64 `locationName:"minEbpInterval" type:"integer"` + + // If INSERT, Nielsen inaudible tones for media tracking will be detected in + // the input audio and an equivalent ID3 tag will be inserted in the output. + NielsenId3 *string `locationName:"nielsenId3" type:"string" enum:"M2tsNielsenId3"` + + // Value in bits per second of extra null packets to insert into the transport + // stream. This can be used if a downstream encryption system requires periodic + // null packets. + NullPacketBitrate *float64 `locationName:"nullPacketBitrate" type:"double"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + PatInterval *int64 `locationName:"patInterval" type:"integer"` + + // When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted + // for every Packetized Elementary Stream (PES) header. This is effective only + // when the PCR PID is the same as the video or audio elementary stream. + PcrControl *string `locationName:"pcrControl" type:"string" enum:"M2tsPcrControl"` + + // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport + // stream. When no value is given, the encoder will assign the same value as + // the Video PID. + PcrPid *int64 `locationName:"pcrPid" min:"32" type:"integer"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` + + // Packet Identifier (PID) for the Program Map Table (PMT) in the transport + // stream. + PmtPid *int64 `locationName:"pmtPid" min:"32" type:"integer"` + + // Packet Identifier (PID) of the private metadata stream in the transport stream. + PrivateMetadataPid *int64 `locationName:"privateMetadataPid" min:"32" type:"integer"` + + // The value of the program number field in the Program Map Table. + ProgramNumber *int64 `locationName:"programNumber" type:"integer"` + + // When set to CBR, inserts null packets into transport stream to fill specified + // bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, + // but the output will not be padded up to that bitrate. + RateMode *string `locationName:"rateMode" type:"string" enum:"M2tsRateMode"` + + // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. + Scte35Pid *int64 `locationName:"scte35Pid" min:"32" type:"integer"` + + // Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from + // input to output. + Scte35Source *string `locationName:"scte35Source" type:"string" enum:"M2tsScte35Source"` + + // Inserts segmentation markers at each segmentation_time period. rai_segstart + // sets the Random Access Indicator bit in the adaptation field. rai_adapt sets + // the RAI bit and adds the current timecode in the private data bytes. psi_segstart + // inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary + // Point information to the adaptation field as per OpenCable specification + // OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information + // to the adaptation field using a legacy proprietary format. + SegmentationMarkers *string `locationName:"segmentationMarkers" type:"string" enum:"M2tsSegmentationMarkers"` + + // The segmentation style parameter controls how segmentation markers are inserted + // into the transport stream. With avails, it is possible that segments may + // be truncated, which can influence where future segmentation markers are inserted. + // When a segmentation style of "reset_cadence" is selected and a segment is + // truncated due to an avail, we will reset the segmentation cadence. This means + // the subsequent segment will have a duration of of $segmentation_time seconds. + // When a segmentation style of "maintain_cadence" is selected and a segment + // is truncated due to an avail, we will not reset the segmentation cadence. + // This means the subsequent segment will likely be truncated as well. However, + // all segments after that will have a duration of $segmentation_time seconds. + // Note that EBP lookahead is a slight exception to this rule. + SegmentationStyle *string `locationName:"segmentationStyle" type:"string" enum:"M2tsSegmentationStyle"` + + // The length in seconds of each segment. Required unless markers is set to + // _none_. + SegmentationTime *float64 `locationName:"segmentationTime" type:"double"` + + // Packet Identifier (PID) of the timed metadata stream in the transport stream. + TimedMetadataPid *int64 `locationName:"timedMetadataPid" min:"32" type:"integer"` + + // The value of the transport stream ID field in the Program Map Table. + TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` + + // Packet Identifier (PID) of the elementary video stream in the transport stream. + VideoPid *int64 `locationName:"videoPid" min:"32" type:"integer"` +} + +// String returns the string representation +func (s M2tsSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s M2tsSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *M2tsSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "M2tsSettings"} + if s.DvbTeletextPid != nil && *s.DvbTeletextPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("DvbTeletextPid", 32)) + } + if s.PcrPid != nil && *s.PcrPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("PcrPid", 32)) + } + if s.PmtPid != nil && *s.PmtPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("PmtPid", 32)) + } + if s.PrivateMetadataPid != nil && *s.PrivateMetadataPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("PrivateMetadataPid", 32)) + } + if s.Scte35Pid != nil && *s.Scte35Pid < 32 { + invalidParams.Add(request.NewErrParamMinValue("Scte35Pid", 32)) + } + if s.TimedMetadataPid != nil && *s.TimedMetadataPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("TimedMetadataPid", 32)) + } + if s.VideoPid != nil && *s.VideoPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("VideoPid", 32)) + } + if s.DvbNitSettings != nil { + if err := s.DvbNitSettings.Validate(); err != nil { + invalidParams.AddNested("DvbNitSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbSdtSettings != nil { + if err := s.DvbSdtSettings.Validate(); err != nil { + invalidParams.AddNested("DvbSdtSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbTdtSettings != nil { + if err := s.DvbTdtSettings.Validate(); err != nil { + invalidParams.AddNested("DvbTdtSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioBufferModel sets the AudioBufferModel field's value. +func (s *M2tsSettings) SetAudioBufferModel(v string) *M2tsSettings { + s.AudioBufferModel = &v + return s +} + +// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. +func (s *M2tsSettings) SetAudioFramesPerPes(v int64) *M2tsSettings { + s.AudioFramesPerPes = &v + return s +} + +// SetAudioPids sets the AudioPids field's value. +func (s *M2tsSettings) SetAudioPids(v []*int64) *M2tsSettings { + s.AudioPids = v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *M2tsSettings) SetBitrate(v int64) *M2tsSettings { + s.Bitrate = &v + return s +} + +// SetBufferModel sets the BufferModel field's value. +func (s *M2tsSettings) SetBufferModel(v string) *M2tsSettings { + s.BufferModel = &v + return s +} + +// SetDvbNitSettings sets the DvbNitSettings field's value. +func (s *M2tsSettings) SetDvbNitSettings(v *DvbNitSettings) *M2tsSettings { + s.DvbNitSettings = v + return s +} + +// SetDvbSdtSettings sets the DvbSdtSettings field's value. +func (s *M2tsSettings) SetDvbSdtSettings(v *DvbSdtSettings) *M2tsSettings { + s.DvbSdtSettings = v + return s +} + +// SetDvbSubPids sets the DvbSubPids field's value. +func (s *M2tsSettings) SetDvbSubPids(v []*int64) *M2tsSettings { + s.DvbSubPids = v + return s +} + +// SetDvbTdtSettings sets the DvbTdtSettings field's value. +func (s *M2tsSettings) SetDvbTdtSettings(v *DvbTdtSettings) *M2tsSettings { + s.DvbTdtSettings = v + return s +} + +// SetDvbTeletextPid sets the DvbTeletextPid field's value. +func (s *M2tsSettings) SetDvbTeletextPid(v int64) *M2tsSettings { + s.DvbTeletextPid = &v + return s +} + +// SetEbpAudioInterval sets the EbpAudioInterval field's value. +func (s *M2tsSettings) SetEbpAudioInterval(v string) *M2tsSettings { + s.EbpAudioInterval = &v + return s +} + +// SetEbpPlacement sets the EbpPlacement field's value. +func (s *M2tsSettings) SetEbpPlacement(v string) *M2tsSettings { + s.EbpPlacement = &v + return s +} + +// SetEsRateInPes sets the EsRateInPes field's value. +func (s *M2tsSettings) SetEsRateInPes(v string) *M2tsSettings { + s.EsRateInPes = &v + return s +} + +// SetForceTsVideoEbpOrder sets the ForceTsVideoEbpOrder field's value. +func (s *M2tsSettings) SetForceTsVideoEbpOrder(v string) *M2tsSettings { + s.ForceTsVideoEbpOrder = &v + return s +} + +// SetFragmentTime sets the FragmentTime field's value. +func (s *M2tsSettings) SetFragmentTime(v float64) *M2tsSettings { + s.FragmentTime = &v + return s +} + +// SetMaxPcrInterval sets the MaxPcrInterval field's value. +func (s *M2tsSettings) SetMaxPcrInterval(v int64) *M2tsSettings { + s.MaxPcrInterval = &v + return s +} + +// SetMinEbpInterval sets the MinEbpInterval field's value. +func (s *M2tsSettings) SetMinEbpInterval(v int64) *M2tsSettings { + s.MinEbpInterval = &v + return s +} + +// SetNielsenId3 sets the NielsenId3 field's value. +func (s *M2tsSettings) SetNielsenId3(v string) *M2tsSettings { + s.NielsenId3 = &v + return s +} + +// SetNullPacketBitrate sets the NullPacketBitrate field's value. +func (s *M2tsSettings) SetNullPacketBitrate(v float64) *M2tsSettings { + s.NullPacketBitrate = &v + return s +} + +// SetPatInterval sets the PatInterval field's value. +func (s *M2tsSettings) SetPatInterval(v int64) *M2tsSettings { + s.PatInterval = &v + return s +} + +// SetPcrControl sets the PcrControl field's value. +func (s *M2tsSettings) SetPcrControl(v string) *M2tsSettings { + s.PcrControl = &v + return s +} + +// SetPcrPid sets the PcrPid field's value. +func (s *M2tsSettings) SetPcrPid(v int64) *M2tsSettings { + s.PcrPid = &v + return s +} + +// SetPmtInterval sets the PmtInterval field's value. +func (s *M2tsSettings) SetPmtInterval(v int64) *M2tsSettings { + s.PmtInterval = &v + return s +} + +// SetPmtPid sets the PmtPid field's value. +func (s *M2tsSettings) SetPmtPid(v int64) *M2tsSettings { + s.PmtPid = &v + return s +} + +// SetPrivateMetadataPid sets the PrivateMetadataPid field's value. +func (s *M2tsSettings) SetPrivateMetadataPid(v int64) *M2tsSettings { + s.PrivateMetadataPid = &v + return s +} + +// SetProgramNumber sets the ProgramNumber field's value. +func (s *M2tsSettings) SetProgramNumber(v int64) *M2tsSettings { + s.ProgramNumber = &v + return s +} + +// SetRateMode sets the RateMode field's value. +func (s *M2tsSettings) SetRateMode(v string) *M2tsSettings { + s.RateMode = &v + return s +} + +// SetScte35Pid sets the Scte35Pid field's value. +func (s *M2tsSettings) SetScte35Pid(v int64) *M2tsSettings { + s.Scte35Pid = &v + return s +} + +// SetScte35Source sets the Scte35Source field's value. +func (s *M2tsSettings) SetScte35Source(v string) *M2tsSettings { + s.Scte35Source = &v + return s +} + +// SetSegmentationMarkers sets the SegmentationMarkers field's value. +func (s *M2tsSettings) SetSegmentationMarkers(v string) *M2tsSettings { + s.SegmentationMarkers = &v + return s +} + +// SetSegmentationStyle sets the SegmentationStyle field's value. +func (s *M2tsSettings) SetSegmentationStyle(v string) *M2tsSettings { + s.SegmentationStyle = &v + return s +} + +// SetSegmentationTime sets the SegmentationTime field's value. +func (s *M2tsSettings) SetSegmentationTime(v float64) *M2tsSettings { + s.SegmentationTime = &v + return s +} + +// SetTimedMetadataPid sets the TimedMetadataPid field's value. +func (s *M2tsSettings) SetTimedMetadataPid(v int64) *M2tsSettings { + s.TimedMetadataPid = &v + return s +} + +// SetTransportStreamId sets the TransportStreamId field's value. +func (s *M2tsSettings) SetTransportStreamId(v int64) *M2tsSettings { + s.TransportStreamId = &v + return s +} + +// SetVideoPid sets the VideoPid field's value. +func (s *M2tsSettings) SetVideoPid(v int64) *M2tsSettings { + s.VideoPid = &v + return s +} + +// Settings for TS segments in HLS +type M3u8Settings struct { + _ struct{} `type:"structure"` + + // The number of audio frames to insert for each PES packet. + AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` + + // Packet Identifier (PID) of the elementary audio stream(s) in the transport + // stream. Multiple values are accepted, and can be entered in ranges and/or + // by comma separation. + AudioPids []*int64 `locationName:"audioPids" type:"list"` + + // If INSERT, Nielsen inaudible tones for media tracking will be detected in + // the input audio and an equivalent ID3 tag will be inserted in the output. + NielsenId3 *string `locationName:"nielsenId3" type:"string" enum:"M3u8NielsenId3"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + PatInterval *int64 `locationName:"patInterval" type:"integer"` + + // When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted + // for every Packetized Elementary Stream (PES) header. This parameter is effective + // only when the PCR PID is the same as the video or audio elementary stream. + PcrControl *string `locationName:"pcrControl" type:"string" enum:"M3u8PcrControl"` + + // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport + // stream. When no value is given, the encoder will assign the same value as + // the Video PID. + PcrPid *int64 `locationName:"pcrPid" min:"32" type:"integer"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` + + // Packet Identifier (PID) for the Program Map Table (PMT) in the transport + // stream. + PmtPid *int64 `locationName:"pmtPid" min:"32" type:"integer"` + + // Packet Identifier (PID) of the private metadata stream in the transport stream. + PrivateMetadataPid *int64 `locationName:"privateMetadataPid" min:"32" type:"integer"` + + // The value of the program number field in the Program Map Table. + ProgramNumber *int64 `locationName:"programNumber" type:"integer"` + + // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. + Scte35Pid *int64 `locationName:"scte35Pid" min:"32" type:"integer"` + + // Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from + // input to output. + Scte35Source *string `locationName:"scte35Source" type:"string" enum:"M3u8Scte35Source"` + + // Applies only to HLS outputs. Use this setting to specify whether the service + // inserts the ID3 timed metadata from the input in this output. + TimedMetadata *string `locationName:"timedMetadata" type:"string" enum:"TimedMetadata"` + + // Packet Identifier (PID) of the timed metadata stream in the transport stream. + TimedMetadataPid *int64 `locationName:"timedMetadataPid" min:"32" type:"integer"` + + // The value of the transport stream ID field in the Program Map Table. + TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` + + // Packet Identifier (PID) of the elementary video stream in the transport stream. + VideoPid *int64 `locationName:"videoPid" min:"32" type:"integer"` +} + +// String returns the string representation +func (s M3u8Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s M3u8Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *M3u8Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "M3u8Settings"} + if s.PcrPid != nil && *s.PcrPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("PcrPid", 32)) + } + if s.PmtPid != nil && *s.PmtPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("PmtPid", 32)) + } + if s.PrivateMetadataPid != nil && *s.PrivateMetadataPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("PrivateMetadataPid", 32)) + } + if s.Scte35Pid != nil && *s.Scte35Pid < 32 { + invalidParams.Add(request.NewErrParamMinValue("Scte35Pid", 32)) + } + if s.TimedMetadataPid != nil && *s.TimedMetadataPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("TimedMetadataPid", 32)) + } + if s.VideoPid != nil && *s.VideoPid < 32 { + invalidParams.Add(request.NewErrParamMinValue("VideoPid", 32)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. +func (s *M3u8Settings) SetAudioFramesPerPes(v int64) *M3u8Settings { + s.AudioFramesPerPes = &v + return s +} + +// SetAudioPids sets the AudioPids field's value. +func (s *M3u8Settings) SetAudioPids(v []*int64) *M3u8Settings { + s.AudioPids = v + return s +} + +// SetNielsenId3 sets the NielsenId3 field's value. +func (s *M3u8Settings) SetNielsenId3(v string) *M3u8Settings { + s.NielsenId3 = &v + return s +} + +// SetPatInterval sets the PatInterval field's value. +func (s *M3u8Settings) SetPatInterval(v int64) *M3u8Settings { + s.PatInterval = &v + return s +} + +// SetPcrControl sets the PcrControl field's value. +func (s *M3u8Settings) SetPcrControl(v string) *M3u8Settings { + s.PcrControl = &v + return s +} + +// SetPcrPid sets the PcrPid field's value. +func (s *M3u8Settings) SetPcrPid(v int64) *M3u8Settings { + s.PcrPid = &v + return s +} + +// SetPmtInterval sets the PmtInterval field's value. +func (s *M3u8Settings) SetPmtInterval(v int64) *M3u8Settings { + s.PmtInterval = &v + return s +} + +// SetPmtPid sets the PmtPid field's value. +func (s *M3u8Settings) SetPmtPid(v int64) *M3u8Settings { + s.PmtPid = &v + return s +} + +// SetPrivateMetadataPid sets the PrivateMetadataPid field's value. +func (s *M3u8Settings) SetPrivateMetadataPid(v int64) *M3u8Settings { + s.PrivateMetadataPid = &v + return s +} + +// SetProgramNumber sets the ProgramNumber field's value. +func (s *M3u8Settings) SetProgramNumber(v int64) *M3u8Settings { + s.ProgramNumber = &v + return s +} + +// SetScte35Pid sets the Scte35Pid field's value. +func (s *M3u8Settings) SetScte35Pid(v int64) *M3u8Settings { + s.Scte35Pid = &v + return s +} + +// SetScte35Source sets the Scte35Source field's value. +func (s *M3u8Settings) SetScte35Source(v string) *M3u8Settings { + s.Scte35Source = &v + return s +} + +// SetTimedMetadata sets the TimedMetadata field's value. +func (s *M3u8Settings) SetTimedMetadata(v string) *M3u8Settings { + s.TimedMetadata = &v + return s +} + +// SetTimedMetadataPid sets the TimedMetadataPid field's value. +func (s *M3u8Settings) SetTimedMetadataPid(v int64) *M3u8Settings { + s.TimedMetadataPid = &v + return s +} + +// SetTransportStreamId sets the TransportStreamId field's value. +func (s *M3u8Settings) SetTransportStreamId(v int64) *M3u8Settings { + s.TransportStreamId = &v + return s +} + +// SetVideoPid sets the VideoPid field's value. +func (s *M3u8Settings) SetVideoPid(v int64) *M3u8Settings { + s.VideoPid = &v + return s +} + +// Overlay motion graphics on top of your video at the time that you specify. +type MotionImageInserter struct { + _ struct{} `type:"structure"` + + // If your motion graphic asset is a .mov file, keep this setting unspecified. + // If your motion graphic asset is a series of .png files, specify the frame + // rate of the overlay in frames per second, as a fraction. For example, specify + // 24 fps as 24/1. Make sure that the number of images in your series matches + // the frame rate and your intended overlay duration. For example, if you want + // a 30-second overlay at 30 fps, you should have 900 .png images. This overlay + // frame rate doesn't need to match the frame rate of the underlying video. + Framerate *MotionImageInsertionFramerate `locationName:"framerate" type:"structure"` + + // Specify the .mov file or series of .png files that you want to overlay on + // your video. For .png files, provide the file name of the first file in the + // series. Make sure that the names of the .png files end with sequential numbers + // that specify the order that they are played in. For example, overlay_000.png, + // overlay_001.png, overlay_002.png, and so on. The sequence must start at zero, + // and each image file name must have the same number of digits. Pad your initial + // file names with enough zeros to complete the sequence. For example, if the + // first image is overlay_0.png, there can be only 10 images in the sequence, + // with the last image being overlay_9.png. But if the first image is overlay_00.png, + // there can be 100 images in the sequence. + Input *string `locationName:"input" min:"14" type:"string"` + + // Choose the type of motion graphic asset that you are providing for your overlay. + // You can choose either a .mov file or a series of .png files. + InsertionMode *string `locationName:"insertionMode" type:"string" enum:"MotionImageInsertionMode"` + + // Use Offset to specify the placement of your motion graphic overlay on the + // video frame. Specify in pixels, from the upper-left corner of the frame. + // If you don't specify an offset, the service scales your overlay to the full + // size of the frame. Otherwise, the service inserts the overlay at its native + // resolution and scales the size up or down with any video scaling. + Offset *MotionImageInsertionOffset `locationName:"offset" type:"structure"` + + // Specify whether your motion graphic overlay repeats on a loop or plays only + // once. + Playback *string `locationName:"playback" type:"string" enum:"MotionImagePlayback"` + + // Specify when the motion overlay begins. Use timecode format (HH:MM:SS:FF + // or HH:MM:SS;FF). Make sure that the timecode you provide here takes into + // account how you have set up your timecode configuration under both job settings + // and input settings. The simplest way to do that is to set both to start at + // 0. If you need to set up your job to follow timecodes embedded in your source + // that don't start at zero, make sure that you specify a start time that is + // after the first embedded timecode. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/setting-up-timecode.html + // Find job-wide and input timecode configuration settings in your JSON job + // settings specification at settings>timecodeConfig>source and settings>inputs>timecodeSource. + StartTime *string `locationName:"startTime" min:"11" type:"string"` +} + +// String returns the string representation +func (s MotionImageInserter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MotionImageInserter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MotionImageInserter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MotionImageInserter"} + if s.Input != nil && len(*s.Input) < 14 { + invalidParams.Add(request.NewErrParamMinLen("Input", 14)) + } + if s.StartTime != nil && len(*s.StartTime) < 11 { + invalidParams.Add(request.NewErrParamMinLen("StartTime", 11)) + } + if s.Framerate != nil { + if err := s.Framerate.Validate(); err != nil { + invalidParams.AddNested("Framerate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFramerate sets the Framerate field's value. +func (s *MotionImageInserter) SetFramerate(v *MotionImageInsertionFramerate) *MotionImageInserter { + s.Framerate = v + return s +} + +// SetInput sets the Input field's value. +func (s *MotionImageInserter) SetInput(v string) *MotionImageInserter { + s.Input = &v + return s +} + +// SetInsertionMode sets the InsertionMode field's value. +func (s *MotionImageInserter) SetInsertionMode(v string) *MotionImageInserter { + s.InsertionMode = &v + return s +} + +// SetOffset sets the Offset field's value. +func (s *MotionImageInserter) SetOffset(v *MotionImageInsertionOffset) *MotionImageInserter { + s.Offset = v + return s +} + +// SetPlayback sets the Playback field's value. +func (s *MotionImageInserter) SetPlayback(v string) *MotionImageInserter { + s.Playback = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *MotionImageInserter) SetStartTime(v string) *MotionImageInserter { + s.StartTime = &v + return s +} + +// For motion overlays that don't have a built-in frame rate, specify the frame +// rate of the overlay in frames per second, as a fraction. For example, specify +// 24 fps as 24/1. The overlay frame rate doesn't need to match the frame rate +// of the underlying video. +type MotionImageInsertionFramerate struct { + _ struct{} `type:"structure"` + + // The bottom of the fraction that expresses your overlay frame rate. For example, + // if your frame rate is 24 fps, set this value to 1. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // The top of the fraction that expresses your overlay frame rate. For example, + // if your frame rate is 24 fps, set this value to 24. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` +} + +// String returns the string representation +func (s MotionImageInsertionFramerate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MotionImageInsertionFramerate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MotionImageInsertionFramerate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MotionImageInsertionFramerate"} + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *MotionImageInsertionFramerate) SetFramerateDenominator(v int64) *MotionImageInsertionFramerate { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *MotionImageInsertionFramerate) SetFramerateNumerator(v int64) *MotionImageInsertionFramerate { + s.FramerateNumerator = &v + return s +} + +// Specify the offset between the upper-left corner of the video frame and the +// top left corner of the overlay. +type MotionImageInsertionOffset struct { + _ struct{} `type:"structure"` + + // Set the distance, in pixels, between the overlay and the left edge of the + // video frame. + ImageX *int64 `locationName:"imageX" type:"integer"` + + // Set the distance, in pixels, between the overlay and the top edge of the + // video frame. + ImageY *int64 `locationName:"imageY" type:"integer"` +} + +// String returns the string representation +func (s MotionImageInsertionOffset) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MotionImageInsertionOffset) GoString() string { + return s.String() +} + +// SetImageX sets the ImageX field's value. +func (s *MotionImageInsertionOffset) SetImageX(v int64) *MotionImageInsertionOffset { + s.ImageX = &v + return s +} + +// SetImageY sets the ImageY field's value. +func (s *MotionImageInsertionOffset) SetImageY(v int64) *MotionImageInsertionOffset { + s.ImageY = &v + return s +} + +// Settings for MOV Container. +type MovSettings struct { + _ struct{} `type:"structure"` + + // When enabled, include 'clap' atom if appropriate for the video output settings. + ClapAtom *string `locationName:"clapAtom" type:"string" enum:"MovClapAtom"` + + // When enabled, file composition times will start at zero, composition times + // in the 'ctts' (composition time to sample) box for B-frames will be negative, + // and a 'cslg' (composition shift least greatest) box will be included per + // 14496-1 amendment 1. This improves compatibility with Apple players and tools. + CslgAtom *string `locationName:"cslgAtom" type:"string" enum:"MovCslgAtom"` + + // When set to XDCAM, writes MPEG2 video streams into the QuickTime file using + // XDCAM fourcc codes. This increases compatibility with Apple editors and players, + // but may decrease compatibility with other players. Only applicable when the + // video codec is MPEG2. + Mpeg2FourCCControl *string `locationName:"mpeg2FourCCControl" type:"string" enum:"MovMpeg2FourCCControl"` + + // If set to OMNEON, inserts Omneon-compatible padding + PaddingControl *string `locationName:"paddingControl" type:"string" enum:"MovPaddingControl"` + + // Always keep the default value (SELF_CONTAINED) for this setting. + Reference *string `locationName:"reference" type:"string" enum:"MovReference"` +} + +// String returns the string representation +func (s MovSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MovSettings) GoString() string { + return s.String() +} + +// SetClapAtom sets the ClapAtom field's value. +func (s *MovSettings) SetClapAtom(v string) *MovSettings { + s.ClapAtom = &v + return s +} + +// SetCslgAtom sets the CslgAtom field's value. +func (s *MovSettings) SetCslgAtom(v string) *MovSettings { + s.CslgAtom = &v + return s +} + +// SetMpeg2FourCCControl sets the Mpeg2FourCCControl field's value. +func (s *MovSettings) SetMpeg2FourCCControl(v string) *MovSettings { + s.Mpeg2FourCCControl = &v + return s +} + +// SetPaddingControl sets the PaddingControl field's value. +func (s *MovSettings) SetPaddingControl(v string) *MovSettings { + s.PaddingControl = &v + return s +} + +// SetReference sets the Reference field's value. +func (s *MovSettings) SetReference(v string) *MovSettings { + s.Reference = &v + return s +} + +// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to +// the value MP2. +type Mp2Settings struct { + _ struct{} `type:"structure"` + + // Average bitrate in bits/second. + Bitrate *int64 `locationName:"bitrate" min:"32000" type:"integer"` + + // Set Channels to specify the number of channels in this output audio track. + // Choosing Mono in the console will give you 1 output channel; choosing Stereo + // will give you 2. In the API, valid values are 1 and 2. + Channels *int64 `locationName:"channels" min:"1" type:"integer"` + + // Sample rate in hz. + SampleRate *int64 `locationName:"sampleRate" min:"32000" type:"integer"` +} + +// String returns the string representation +func (s Mp2Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Mp2Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Mp2Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Mp2Settings"} + if s.Bitrate != nil && *s.Bitrate < 32000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 32000)) + } + if s.Channels != nil && *s.Channels < 1 { + invalidParams.Add(request.NewErrParamMinValue("Channels", 1)) + } + if s.SampleRate != nil && *s.SampleRate < 32000 { + invalidParams.Add(request.NewErrParamMinValue("SampleRate", 32000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBitrate sets the Bitrate field's value. +func (s *Mp2Settings) SetBitrate(v int64) *Mp2Settings { + s.Bitrate = &v + return s +} + +// SetChannels sets the Channels field's value. +func (s *Mp2Settings) SetChannels(v int64) *Mp2Settings { + s.Channels = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *Mp2Settings) SetSampleRate(v int64) *Mp2Settings { + s.SampleRate = &v + return s +} + +// Settings for MP4 Container +type Mp4Settings struct { + _ struct{} `type:"structure"` + + // When enabled, file composition times will start at zero, composition times + // in the 'ctts' (composition time to sample) box for B-frames will be negative, + // and a 'cslg' (composition shift least greatest) box will be included per + // 14496-1 amendment 1. This improves compatibility with Apple players and tools. + CslgAtom *string `locationName:"cslgAtom" type:"string" enum:"Mp4CslgAtom"` + + // Inserts a free-space box immediately after the moov box. + FreeSpaceBox *string `locationName:"freeSpaceBox" type:"string" enum:"Mp4FreeSpaceBox"` + + // If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning + // of the archive as required for progressive downloading. Otherwise it is placed + // normally at the end. + MoovPlacement *string `locationName:"moovPlacement" type:"string" enum:"Mp4MoovPlacement"` + + // Overrides the "Major Brand" field in the output file. Usually not necessary + // to specify. + Mp4MajorBrand *string `locationName:"mp4MajorBrand" type:"string"` +} + +// String returns the string representation +func (s Mp4Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Mp4Settings) GoString() string { + return s.String() +} + +// SetCslgAtom sets the CslgAtom field's value. +func (s *Mp4Settings) SetCslgAtom(v string) *Mp4Settings { + s.CslgAtom = &v + return s +} + +// SetFreeSpaceBox sets the FreeSpaceBox field's value. +func (s *Mp4Settings) SetFreeSpaceBox(v string) *Mp4Settings { + s.FreeSpaceBox = &v + return s +} + +// SetMoovPlacement sets the MoovPlacement field's value. +func (s *Mp4Settings) SetMoovPlacement(v string) *Mp4Settings { + s.MoovPlacement = &v + return s +} + +// SetMp4MajorBrand sets the Mp4MajorBrand field's value. +func (s *Mp4Settings) SetMp4MajorBrand(v string) *Mp4Settings { + s.Mp4MajorBrand = &v + return s +} + +// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to +// the value MPEG2. +type Mpeg2Settings struct { + _ struct{} `type:"structure"` + + // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual + // quality. + AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"Mpeg2AdaptiveQuantization"` + + // Average bitrate in bits/second. Required for VBR and CBR. For MS Smooth outputs, + // bitrates must be unique when rounded down to the nearest multiple of 1000. + Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` + + // Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output. + CodecLevel *string `locationName:"codecLevel" type:"string" enum:"Mpeg2CodecLevel"` + + // Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output. + CodecProfile *string `locationName:"codecProfile" type:"string" enum:"Mpeg2CodecProfile"` + + // Choose Adaptive to improve subjective video quality for high-motion content. + // This will cause the service to use fewer B-frames (which infer information + // based on other frames) for high-motion portions of the video and more B-frames + // for low-motion portions. The maximum number of B-frames is limited by the + // value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). + DynamicSubGop *string `locationName:"dynamicSubGop" type:"string" enum:"Mpeg2DynamicSubGop"` + + // If you are using the console, use the Framerate setting to specify the frame + // rate for this output. If you want to keep the same frame rate as the input + // video, choose Follow source. If you want to do frame rate conversion, choose + // a frame rate from the dropdown list or choose Custom. The framerates shown + // in the dropdown list are decimal approximations of fractions. If you choose + // Custom, specify your frame rate as a fraction. If you are creating your transcoding + // job sepecification as a JSON file without the console, use FramerateControl + // to specify which value the service uses for the frame rate for this output. + // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate + // from the input. Choose SPECIFIED if you want the service to use the frame + // rate you specify in the settings FramerateNumerator and FramerateDenominator. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"Mpeg2FramerateControl"` + + // When set to INTERPOLATE, produces smoother motion during frame rate conversion. + FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"Mpeg2FramerateConversionAlgorithm"` + + // Frame rate denominator. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // Frame rate numerator - frame rate is a fraction, e.g. 24000 / 1001 = 23.976 + // fps. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"24" type:"integer"` + + // Frequency of closed GOPs. In streaming applications, it is recommended that + // this be set to 1 so a decoder joining mid-stream will receive an IDR frame + // as quickly as possible. Setting this value to 0 will break output segmenting. + GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` + + // GOP Length (keyframe interval) in frames or seconds. Must be greater than + // zero. + GopSize *float64 `locationName:"gopSize" type:"double"` + + // Indicates if the GOP Size in MPEG2 is specified in frames or seconds. If + // seconds the system will convert the GOP Size into a frame count at run time. + GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"Mpeg2GopSizeUnits"` + + // Percentage of the buffer that should initially be filled (HRD buffer model). + HrdBufferInitialFillPercentage *int64 `locationName:"hrdBufferInitialFillPercentage" type:"integer"` + + // Size of buffer (HRD buffer model) in bits. For example, enter five megabits + // as 5000000. + HrdBufferSize *int64 `locationName:"hrdBufferSize" type:"integer"` + + // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. + // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce + // interlaced output with the entire output having the same field polarity (top + // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default + // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, + // behavior depends on the input scan type. - If the source is interlaced, the + // output will be interlaced with the same polarity as the source (it will follow + // the source). The output could therefore be a mix of "top field first" and + // "bottom field first". - If the source is progressive, the output will be + // interlaced with "top field first" or "bottom field first" polarity, depending + // on which of the Follow options you chose. + InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"Mpeg2InterlaceMode"` + + // Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision + // for intra-block DC coefficients. If you choose the value auto, the service + // will automatically select the precision based on the per-frame compression + // ratio. + IntraDcPrecision *string `locationName:"intraDcPrecision" type:"string" enum:"Mpeg2IntraDcPrecision"` + + // Maximum bitrate in bits/second. For example, enter five megabits per second + // as 5000000. + MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` + + // Enforces separation between repeated (cadence) I-frames and I-frames inserted + // by Scene Change Detection. If a scene change I-frame is within I-interval + // frames of a cadence I-frame, the GOP is shrunk and/or stretched to the scene + // change I-frame. GOP stretch requires enabling lookahead as well as setting + // I-interval. The normal cadence resumes for the next GOP. This setting is + // only used when Scene Change Detect is enabled. Note: Maximum GOP stretch + // = GOP size + Min-I-interval - 1 + MinIInterval *int64 `locationName:"minIInterval" type:"integer"` + + // Number of B-frames between reference frames. + NumberBFramesBetweenReferenceFrames *int64 `locationName:"numberBFramesBetweenReferenceFrames" type:"integer"` + + // Using the API, enable ParFollowSource if you want the service to use the + // pixel aspect ratio from the input. Using the console, do this by choosing + // Follow source for Pixel aspect ratio. + ParControl *string `locationName:"parControl" type:"string" enum:"Mpeg2ParControl"` + + // Pixel Aspect Ratio denominator. + ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` + + // Pixel Aspect Ratio numerator. + ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` + + // Use Quality tuning level (Mpeg2QualityTuningLevel) to specifiy whether to + // use single-pass or multipass video encoding. + QualityTuningLevel *string `locationName:"qualityTuningLevel" type:"string" enum:"Mpeg2QualityTuningLevel"` + + // Use Rate control mode (Mpeg2RateControlMode) to specifiy whether the bitrate + // is variable (vbr) or constant (cbr). + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"Mpeg2RateControlMode"` + + // Scene change detection (inserts I-frames on scene changes). + SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"Mpeg2SceneChangeDetect"` + + // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled + // as 25fps, and audio is sped up correspondingly. + SlowPal *string `locationName:"slowPal" type:"string" enum:"Mpeg2SlowPal"` + + // Softness. Selects quantizer matrix, larger values reduce high-frequency content + // in the encoded image. + Softness *int64 `locationName:"softness" type:"integer"` + + // Adjust quantization within each frame based on spatial variation of content + // complexity. + SpatialAdaptiveQuantization *string `locationName:"spatialAdaptiveQuantization" type:"string" enum:"Mpeg2SpatialAdaptiveQuantization"` + + // Produces a Type D-10 compatible bitstream (SMPTE 356M-2001). + Syntax *string `locationName:"syntax" type:"string" enum:"Mpeg2Syntax"` + + // Only use Telecine (Mpeg2Telecine) when you set Framerate (Framerate) to 29.970. + // Set Telecine (Mpeg2Telecine) to Hard (hard) to produce a 29.97i output from + // a 23.976 input. Set it to Soft (soft) to produce 23.976 output and leave + // converstion to the player. + Telecine *string `locationName:"telecine" type:"string" enum:"Mpeg2Telecine"` + + // Adjust quantization within each frame based on temporal variation of content + // complexity. + TemporalAdaptiveQuantization *string `locationName:"temporalAdaptiveQuantization" type:"string" enum:"Mpeg2TemporalAdaptiveQuantization"` +} + +// String returns the string representation +func (s Mpeg2Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Mpeg2Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Mpeg2Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Mpeg2Settings"} + if s.Bitrate != nil && *s.Bitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) + } + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 24 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 24)) + } + if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) + } + if s.ParDenominator != nil && *s.ParDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) + } + if s.ParNumerator != nil && *s.ParNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. +func (s *Mpeg2Settings) SetAdaptiveQuantization(v string) *Mpeg2Settings { + s.AdaptiveQuantization = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *Mpeg2Settings) SetBitrate(v int64) *Mpeg2Settings { + s.Bitrate = &v + return s +} + +// SetCodecLevel sets the CodecLevel field's value. +func (s *Mpeg2Settings) SetCodecLevel(v string) *Mpeg2Settings { + s.CodecLevel = &v + return s +} + +// SetCodecProfile sets the CodecProfile field's value. +func (s *Mpeg2Settings) SetCodecProfile(v string) *Mpeg2Settings { + s.CodecProfile = &v + return s +} + +// SetDynamicSubGop sets the DynamicSubGop field's value. +func (s *Mpeg2Settings) SetDynamicSubGop(v string) *Mpeg2Settings { + s.DynamicSubGop = &v + return s +} + +// SetFramerateControl sets the FramerateControl field's value. +func (s *Mpeg2Settings) SetFramerateControl(v string) *Mpeg2Settings { + s.FramerateControl = &v + return s +} + +// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. +func (s *Mpeg2Settings) SetFramerateConversionAlgorithm(v string) *Mpeg2Settings { + s.FramerateConversionAlgorithm = &v + return s +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *Mpeg2Settings) SetFramerateDenominator(v int64) *Mpeg2Settings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *Mpeg2Settings) SetFramerateNumerator(v int64) *Mpeg2Settings { + s.FramerateNumerator = &v + return s +} + +// SetGopClosedCadence sets the GopClosedCadence field's value. +func (s *Mpeg2Settings) SetGopClosedCadence(v int64) *Mpeg2Settings { + s.GopClosedCadence = &v + return s +} + +// SetGopSize sets the GopSize field's value. +func (s *Mpeg2Settings) SetGopSize(v float64) *Mpeg2Settings { + s.GopSize = &v + return s +} + +// SetGopSizeUnits sets the GopSizeUnits field's value. +func (s *Mpeg2Settings) SetGopSizeUnits(v string) *Mpeg2Settings { + s.GopSizeUnits = &v + return s +} + +// SetHrdBufferInitialFillPercentage sets the HrdBufferInitialFillPercentage field's value. +func (s *Mpeg2Settings) SetHrdBufferInitialFillPercentage(v int64) *Mpeg2Settings { + s.HrdBufferInitialFillPercentage = &v + return s +} + +// SetHrdBufferSize sets the HrdBufferSize field's value. +func (s *Mpeg2Settings) SetHrdBufferSize(v int64) *Mpeg2Settings { + s.HrdBufferSize = &v + return s +} + +// SetInterlaceMode sets the InterlaceMode field's value. +func (s *Mpeg2Settings) SetInterlaceMode(v string) *Mpeg2Settings { + s.InterlaceMode = &v + return s +} + +// SetIntraDcPrecision sets the IntraDcPrecision field's value. +func (s *Mpeg2Settings) SetIntraDcPrecision(v string) *Mpeg2Settings { + s.IntraDcPrecision = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *Mpeg2Settings) SetMaxBitrate(v int64) *Mpeg2Settings { + s.MaxBitrate = &v + return s +} + +// SetMinIInterval sets the MinIInterval field's value. +func (s *Mpeg2Settings) SetMinIInterval(v int64) *Mpeg2Settings { + s.MinIInterval = &v + return s +} + +// SetNumberBFramesBetweenReferenceFrames sets the NumberBFramesBetweenReferenceFrames field's value. +func (s *Mpeg2Settings) SetNumberBFramesBetweenReferenceFrames(v int64) *Mpeg2Settings { + s.NumberBFramesBetweenReferenceFrames = &v + return s +} + +// SetParControl sets the ParControl field's value. +func (s *Mpeg2Settings) SetParControl(v string) *Mpeg2Settings { + s.ParControl = &v + return s +} + +// SetParDenominator sets the ParDenominator field's value. +func (s *Mpeg2Settings) SetParDenominator(v int64) *Mpeg2Settings { + s.ParDenominator = &v + return s +} + +// SetParNumerator sets the ParNumerator field's value. +func (s *Mpeg2Settings) SetParNumerator(v int64) *Mpeg2Settings { + s.ParNumerator = &v + return s +} + +// SetQualityTuningLevel sets the QualityTuningLevel field's value. +func (s *Mpeg2Settings) SetQualityTuningLevel(v string) *Mpeg2Settings { + s.QualityTuningLevel = &v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *Mpeg2Settings) SetRateControlMode(v string) *Mpeg2Settings { + s.RateControlMode = &v + return s +} + +// SetSceneChangeDetect sets the SceneChangeDetect field's value. +func (s *Mpeg2Settings) SetSceneChangeDetect(v string) *Mpeg2Settings { + s.SceneChangeDetect = &v + return s +} + +// SetSlowPal sets the SlowPal field's value. +func (s *Mpeg2Settings) SetSlowPal(v string) *Mpeg2Settings { + s.SlowPal = &v + return s +} + +// SetSoftness sets the Softness field's value. +func (s *Mpeg2Settings) SetSoftness(v int64) *Mpeg2Settings { + s.Softness = &v + return s +} + +// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. +func (s *Mpeg2Settings) SetSpatialAdaptiveQuantization(v string) *Mpeg2Settings { + s.SpatialAdaptiveQuantization = &v + return s +} + +// SetSyntax sets the Syntax field's value. +func (s *Mpeg2Settings) SetSyntax(v string) *Mpeg2Settings { + s.Syntax = &v + return s +} + +// SetTelecine sets the Telecine field's value. +func (s *Mpeg2Settings) SetTelecine(v string) *Mpeg2Settings { + s.Telecine = &v + return s +} + +// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. +func (s *Mpeg2Settings) SetTemporalAdaptiveQuantization(v string) *Mpeg2Settings { + s.TemporalAdaptiveQuantization = &v + return s +} + +// If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify +// the value SpekeKeyProvider. +type MsSmoothEncryptionSettings struct { + _ struct{} `type:"structure"` + + // Settings for use with a SPEKE key provider + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure"` +} + +// String returns the string representation +func (s MsSmoothEncryptionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MsSmoothEncryptionSettings) GoString() string { + return s.String() +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *MsSmoothEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *MsSmoothEncryptionSettings { + s.SpekeKeyProvider = v + return s +} + +// Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to +// MS_SMOOTH_GROUP_SETTINGS. +type MsSmoothGroupSettings struct { + _ struct{} `type:"structure"` + + // COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across + // a Microsoft Smooth output group into a single audio stream. + AudioDeduplication *string `locationName:"audioDeduplication" type:"string" enum:"MsSmoothAudioDeduplication"` + + // Use Destination (Destination) to specify the S3 output location and the output + // filename base. Destination accepts format identifiers. If you do not specify + // the base filename in the URI, the service will use the filename of the input + // file. If your job has multiple inputs, the service uses the filename of the + // first input file. + Destination *string `locationName:"destination" type:"string"` + + // If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify + // the value SpekeKeyProvider. + Encryption *MsSmoothEncryptionSettings `locationName:"encryption" type:"structure"` + + // Use Fragment length (FragmentLength) to specify the mp4 fragment sizes in + // seconds. Fragment length must be compatible with GOP size and frame rate. + FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` + + // Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding + // format for the server and client manifest. Valid options are utf8 and utf16. + ManifestEncoding *string `locationName:"manifestEncoding" type:"string" enum:"MsSmoothManifestEncoding"` +} + +// String returns the string representation +func (s MsSmoothGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MsSmoothGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MsSmoothGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MsSmoothGroupSettings"} + if s.FragmentLength != nil && *s.FragmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioDeduplication sets the AudioDeduplication field's value. +func (s *MsSmoothGroupSettings) SetAudioDeduplication(v string) *MsSmoothGroupSettings { + s.AudioDeduplication = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *MsSmoothGroupSettings) SetDestination(v string) *MsSmoothGroupSettings { + s.Destination = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *MsSmoothGroupSettings) SetEncryption(v *MsSmoothEncryptionSettings) *MsSmoothGroupSettings { + s.Encryption = v + return s +} + +// SetFragmentLength sets the FragmentLength field's value. +func (s *MsSmoothGroupSettings) SetFragmentLength(v int64) *MsSmoothGroupSettings { + s.FragmentLength = &v + return s +} + +// SetManifestEncoding sets the ManifestEncoding field's value. +func (s *MsSmoothGroupSettings) SetManifestEncoding(v string) *MsSmoothGroupSettings { + s.ManifestEncoding = &v + return s +} + +// Settings for Nielsen Configuration +type NielsenConfiguration struct { + _ struct{} `type:"structure"` + + // Use Nielsen Configuration (NielsenConfiguration) to set the Nielsen measurement + // system breakout code. Supported values are 0, 3, 7, and 9. + BreakoutCode *int64 `locationName:"breakoutCode" type:"integer"` + + // Use Distributor ID (DistributorID) to specify the distributor ID that is + // assigned to your organization by Neilsen. + DistributorId *string `locationName:"distributorId" type:"string"` +} + +// String returns the string representation +func (s NielsenConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NielsenConfiguration) GoString() string { + return s.String() +} + +// SetBreakoutCode sets the BreakoutCode field's value. +func (s *NielsenConfiguration) SetBreakoutCode(v int64) *NielsenConfiguration { + s.BreakoutCode = &v + return s +} + +// SetDistributorId sets the DistributorId field's value. +func (s *NielsenConfiguration) SetDistributorId(v string) *NielsenConfiguration { + s.DistributorId = &v + return s +} + +// Enable the Noise reducer (NoiseReducer) feature to remove noise from your +// video output if necessary. Enable or disable this feature for each output +// individually. This setting is disabled by default. When you enable Noise +// reducer (NoiseReducer), you must also select a value for Noise reducer filter +// (NoiseReducerFilter). +type NoiseReducer struct { + _ struct{} `type:"structure"` + + // Use Noise reducer filter (NoiseReducerFilter) to select one of the following + // spatial image filtering functions. To use this setting, you must also enable + // Noise reducer (NoiseReducer). * Bilateral is an edge preserving noise reduction + // filter. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) are convolution + // filters. * Conserve is a min/max noise reduction filter. * Spatial is a frequency-domain + // filter based on JND principles. + Filter *string `locationName:"filter" type:"string" enum:"NoiseReducerFilter"` + + // Settings for a noise reducer filter + FilterSettings *NoiseReducerFilterSettings `locationName:"filterSettings" type:"structure"` + + // Noise reducer filter settings for spatial filter. + SpatialFilterSettings *NoiseReducerSpatialFilterSettings `locationName:"spatialFilterSettings" type:"structure"` +} + +// String returns the string representation +func (s NoiseReducer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NoiseReducer) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NoiseReducer) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NoiseReducer"} + if s.SpatialFilterSettings != nil { + if err := s.SpatialFilterSettings.Validate(); err != nil { + invalidParams.AddNested("SpatialFilterSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *NoiseReducer) SetFilter(v string) *NoiseReducer { + s.Filter = &v + return s +} + +// SetFilterSettings sets the FilterSettings field's value. +func (s *NoiseReducer) SetFilterSettings(v *NoiseReducerFilterSettings) *NoiseReducer { + s.FilterSettings = v + return s +} + +// SetSpatialFilterSettings sets the SpatialFilterSettings field's value. +func (s *NoiseReducer) SetSpatialFilterSettings(v *NoiseReducerSpatialFilterSettings) *NoiseReducer { + s.SpatialFilterSettings = v + return s +} + +// Settings for a noise reducer filter +type NoiseReducerFilterSettings struct { + _ struct{} `type:"structure"` + + // Relative strength of noise reducing filter. Higher values produce stronger + // filtering. + Strength *int64 `locationName:"strength" type:"integer"` +} + +// String returns the string representation +func (s NoiseReducerFilterSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NoiseReducerFilterSettings) GoString() string { + return s.String() +} + +// SetStrength sets the Strength field's value. +func (s *NoiseReducerFilterSettings) SetStrength(v int64) *NoiseReducerFilterSettings { + s.Strength = &v + return s +} + +// Noise reducer filter settings for spatial filter. +type NoiseReducerSpatialFilterSettings struct { + _ struct{} `type:"structure"` + + // Specify strength of post noise reduction sharpening filter, with 0 disabling + // the filter and 3 enabling it at maximum strength. + PostFilterSharpenStrength *int64 `locationName:"postFilterSharpenStrength" type:"integer"` + + // The speed of the filter, from -2 (lower speed) to 3 (higher speed), with + // 0 being the nominal value. + Speed *int64 `locationName:"speed" type:"integer"` + + // Relative strength of noise reducing filter. Higher values produce stronger + // filtering. + Strength *int64 `locationName:"strength" type:"integer"` +} + +// String returns the string representation +func (s NoiseReducerSpatialFilterSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NoiseReducerSpatialFilterSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NoiseReducerSpatialFilterSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NoiseReducerSpatialFilterSettings"} + if s.Speed != nil && *s.Speed < -2 { + invalidParams.Add(request.NewErrParamMinValue("Speed", -2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPostFilterSharpenStrength sets the PostFilterSharpenStrength field's value. +func (s *NoiseReducerSpatialFilterSettings) SetPostFilterSharpenStrength(v int64) *NoiseReducerSpatialFilterSettings { + s.PostFilterSharpenStrength = &v + return s +} + +// SetSpeed sets the Speed field's value. +func (s *NoiseReducerSpatialFilterSettings) SetSpeed(v int64) *NoiseReducerSpatialFilterSettings { + s.Speed = &v + return s +} + +// SetStrength sets the Strength field's value. +func (s *NoiseReducerSpatialFilterSettings) SetStrength(v int64) *NoiseReducerSpatialFilterSettings { + s.Strength = &v + return s +} + +// An output object describes the settings for a single output file or stream +// in an output group. +type Output struct { + _ struct{} `type:"structure"` + + // (AudioDescriptions) contains groups of audio encoding settings organized + // by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) + // can contain multiple groups of encoding settings. + AudioDescriptions []*AudioDescription `locationName:"audioDescriptions" type:"list"` + + // (CaptionDescriptions) contains groups of captions settings. For each output + // that has captions, include one instance of (CaptionDescriptions). (CaptionDescriptions) + // can contain multiple groups of captions settings. + CaptionDescriptions []*CaptionDescription `locationName:"captionDescriptions" type:"list"` + + // Container specific settings. + ContainerSettings *ContainerSettings `locationName:"containerSettings" type:"structure"` + + // Use Extension (Extension) to specify the file extension for outputs in File + // output groups. If you do not specify a value, the service will use default + // extensions by container type as follows * MPEG-2 transport stream, m2ts * + // Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * No Container, + // the service will use codec extensions (e.g. AAC, H265, H265, AC3) + Extension *string `locationName:"extension" type:"string"` + + // Use Name modifier (NameModifier) to have the service add a string to the + // end of each output filename. You specify the base filename as part of your + // destination URI. When you create multiple outputs in the same output group, + // Name modifier (NameModifier) is required. Name modifier also accepts format + // identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ + // or $Time$ in one output, you must use them in the same way in all outputs + // of the output group. + NameModifier *string `locationName:"nameModifier" min:"1" type:"string"` + + // Specific settings for this type of output. + OutputSettings *OutputSettings `locationName:"outputSettings" type:"structure"` + + // Use Preset (Preset) to specifiy a preset for your transcoding settings. Provide + // the system or custom preset name. You can specify either Preset (Preset) + // or Container settings (ContainerSettings), but not both. + Preset *string `locationName:"preset" type:"string"` + + // (VideoDescription) contains a group of video encoding settings. The specific + // video settings depend on the video codec you choose when you specify a value + // for Video codec (codec). Include one instance of (VideoDescription) per output. + VideoDescription *VideoDescription `locationName:"videoDescription" type:"structure"` +} + +// String returns the string representation +func (s Output) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Output) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Output) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Output"} + if s.NameModifier != nil && len(*s.NameModifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameModifier", 1)) + } + if s.AudioDescriptions != nil { + for i, v := range s.AudioDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.CaptionDescriptions != nil { + for i, v := range s.CaptionDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ContainerSettings != nil { + if err := s.ContainerSettings.Validate(); err != nil { + invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) + } + } + if s.VideoDescription != nil { + if err := s.VideoDescription.Validate(); err != nil { + invalidParams.AddNested("VideoDescription", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioDescriptions sets the AudioDescriptions field's value. +func (s *Output) SetAudioDescriptions(v []*AudioDescription) *Output { + s.AudioDescriptions = v + return s +} + +// SetCaptionDescriptions sets the CaptionDescriptions field's value. +func (s *Output) SetCaptionDescriptions(v []*CaptionDescription) *Output { + s.CaptionDescriptions = v + return s +} + +// SetContainerSettings sets the ContainerSettings field's value. +func (s *Output) SetContainerSettings(v *ContainerSettings) *Output { + s.ContainerSettings = v + return s +} + +// SetExtension sets the Extension field's value. +func (s *Output) SetExtension(v string) *Output { + s.Extension = &v + return s +} + +// SetNameModifier sets the NameModifier field's value. +func (s *Output) SetNameModifier(v string) *Output { + s.NameModifier = &v + return s +} + +// SetOutputSettings sets the OutputSettings field's value. +func (s *Output) SetOutputSettings(v *OutputSettings) *Output { + s.OutputSettings = v + return s +} + +// SetPreset sets the Preset field's value. +func (s *Output) SetPreset(v string) *Output { + s.Preset = &v + return s +} + +// SetVideoDescription sets the VideoDescription field's value. +func (s *Output) SetVideoDescription(v *VideoDescription) *Output { + s.VideoDescription = v + return s +} + +// OutputChannel mapping settings. +type OutputChannelMapping struct { + _ struct{} `type:"structure"` + + // List of input channels + InputChannels []*int64 `locationName:"inputChannels" type:"list"` +} + +// String returns the string representation +func (s OutputChannelMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputChannelMapping) GoString() string { + return s.String() +} + +// SetInputChannels sets the InputChannels field's value. +func (s *OutputChannelMapping) SetInputChannels(v []*int64) *OutputChannelMapping { + s.InputChannels = v + return s +} + +// Details regarding output +type OutputDetail struct { + _ struct{} `type:"structure"` + + // Duration in milliseconds + DurationInMs *int64 `locationName:"durationInMs" type:"integer"` + + // Contains details about the output's video stream + VideoDetails *VideoDetail `locationName:"videoDetails" type:"structure"` +} + +// String returns the string representation +func (s OutputDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputDetail) GoString() string { + return s.String() +} + +// SetDurationInMs sets the DurationInMs field's value. +func (s *OutputDetail) SetDurationInMs(v int64) *OutputDetail { + s.DurationInMs = &v + return s +} + +// SetVideoDetails sets the VideoDetails field's value. +func (s *OutputDetail) SetVideoDetails(v *VideoDetail) *OutputDetail { + s.VideoDetails = v + return s +} + +// Group of outputs +type OutputGroup struct { + _ struct{} `type:"structure"` + + // Use Custom Group Name (CustomName) to specify a name for the output group. + // This value is displayed on the console and can make your job settings JSON + // more human-readable. It does not affect your outputs. Use up to twelve characters + // that are either letters, numbers, spaces, or underscores. + CustomName *string `locationName:"customName" type:"string"` + + // Name of the output group + Name *string `locationName:"name" type:"string"` + + // Output Group settings, including type + OutputGroupSettings *OutputGroupSettings `locationName:"outputGroupSettings" type:"structure"` + + // This object holds groups of encoding settings, one group of settings per + // output. + Outputs []*Output `locationName:"outputs" type:"list"` +} + +// String returns the string representation +func (s OutputGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputGroup) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputGroup) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputGroup"} + if s.OutputGroupSettings != nil { + if err := s.OutputGroupSettings.Validate(); err != nil { + invalidParams.AddNested("OutputGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.Outputs != nil { + for i, v := range s.Outputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomName sets the CustomName field's value. +func (s *OutputGroup) SetCustomName(v string) *OutputGroup { + s.CustomName = &v + return s +} + +// SetName sets the Name field's value. +func (s *OutputGroup) SetName(v string) *OutputGroup { + s.Name = &v + return s +} + +// SetOutputGroupSettings sets the OutputGroupSettings field's value. +func (s *OutputGroup) SetOutputGroupSettings(v *OutputGroupSettings) *OutputGroup { + s.OutputGroupSettings = v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *OutputGroup) SetOutputs(v []*Output) *OutputGroup { + s.Outputs = v + return s +} + +// Contains details about the output groups specified in the job settings. +type OutputGroupDetail struct { + _ struct{} `type:"structure"` + + // Details about the output + OutputDetails []*OutputDetail `locationName:"outputDetails" type:"list"` +} + +// String returns the string representation +func (s OutputGroupDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputGroupDetail) GoString() string { + return s.String() +} + +// SetOutputDetails sets the OutputDetails field's value. +func (s *OutputGroupDetail) SetOutputDetails(v []*OutputDetail) *OutputGroupDetail { + s.OutputDetails = v + return s +} + +// Output Group settings, including type +type OutputGroupSettings struct { + _ struct{} `type:"structure"` + + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to + // CMAF_GROUP_SETTINGS. Each output in a CMAF Output Group may only contain + // a single video, audio, or caption output. + CmafGroupSettings *CmafGroupSettings `locationName:"cmafGroupSettings" type:"structure"` + + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to + // DASH_ISO_GROUP_SETTINGS. + DashIsoGroupSettings *DashIsoGroupSettings `locationName:"dashIsoGroupSettings" type:"structure"` + + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to + // FILE_GROUP_SETTINGS. + FileGroupSettings *FileGroupSettings `locationName:"fileGroupSettings" type:"structure"` + + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to + // HLS_GROUP_SETTINGS. + HlsGroupSettings *HlsGroupSettings `locationName:"hlsGroupSettings" type:"structure"` + + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to + // MS_SMOOTH_GROUP_SETTINGS. + MsSmoothGroupSettings *MsSmoothGroupSettings `locationName:"msSmoothGroupSettings" type:"structure"` + + // Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, + // CMAF) + Type *string `locationName:"type" type:"string" enum:"OutputGroupType"` +} + +// String returns the string representation +func (s OutputGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputGroupSettings"} + if s.CmafGroupSettings != nil { + if err := s.CmafGroupSettings.Validate(); err != nil { + invalidParams.AddNested("CmafGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.DashIsoGroupSettings != nil { + if err := s.DashIsoGroupSettings.Validate(); err != nil { + invalidParams.AddNested("DashIsoGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.HlsGroupSettings != nil { + if err := s.HlsGroupSettings.Validate(); err != nil { + invalidParams.AddNested("HlsGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.MsSmoothGroupSettings != nil { + if err := s.MsSmoothGroupSettings.Validate(); err != nil { + invalidParams.AddNested("MsSmoothGroupSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCmafGroupSettings sets the CmafGroupSettings field's value. +func (s *OutputGroupSettings) SetCmafGroupSettings(v *CmafGroupSettings) *OutputGroupSettings { + s.CmafGroupSettings = v + return s +} + +// SetDashIsoGroupSettings sets the DashIsoGroupSettings field's value. +func (s *OutputGroupSettings) SetDashIsoGroupSettings(v *DashIsoGroupSettings) *OutputGroupSettings { + s.DashIsoGroupSettings = v + return s +} + +// SetFileGroupSettings sets the FileGroupSettings field's value. +func (s *OutputGroupSettings) SetFileGroupSettings(v *FileGroupSettings) *OutputGroupSettings { + s.FileGroupSettings = v + return s +} + +// SetHlsGroupSettings sets the HlsGroupSettings field's value. +func (s *OutputGroupSettings) SetHlsGroupSettings(v *HlsGroupSettings) *OutputGroupSettings { + s.HlsGroupSettings = v + return s +} + +// SetMsSmoothGroupSettings sets the MsSmoothGroupSettings field's value. +func (s *OutputGroupSettings) SetMsSmoothGroupSettings(v *MsSmoothGroupSettings) *OutputGroupSettings { + s.MsSmoothGroupSettings = v + return s +} + +// SetType sets the Type field's value. +func (s *OutputGroupSettings) SetType(v string) *OutputGroupSettings { + s.Type = &v + return s +} + +// Specific settings for this type of output. +type OutputSettings struct { + _ struct{} `type:"structure"` + + // Settings for HLS output groups + HlsSettings *HlsSettings `locationName:"hlsSettings" type:"structure"` +} + +// String returns the string representation +func (s OutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputSettings) GoString() string { + return s.String() +} + +// SetHlsSettings sets the HlsSettings field's value. +func (s *OutputSettings) SetHlsSettings(v *HlsSettings) *OutputSettings { + s.HlsSettings = v + return s +} + +// A preset is a collection of preconfigured media conversion settings that +// you want MediaConvert to apply to the output during the conversion process. +type Preset struct { + _ struct{} `type:"structure"` + + // An identifier for this resource that is unique within all of AWS. + Arn *string `locationName:"arn" type:"string"` + + // An optional category you create to organize your presets. + Category *string `locationName:"category" type:"string"` + + // The timestamp in epoch seconds for preset creation. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` + + // An optional description you create for each preset. + Description *string `locationName:"description" type:"string"` + + // The timestamp in epoch seconds when the preset was last updated. + LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` + + // A name you create for each preset. Each name must be unique within your account. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Settings for preset + // + // Settings is a required field + Settings *PresetSettings `locationName:"settings" type:"structure" required:"true"` + + // A preset can be of two types: system or custom. System or built-in preset + // can't be modified or deleted by the user. + Type *string `locationName:"type" type:"string" enum:"Type"` +} + +// String returns the string representation +func (s Preset) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Preset) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Preset) SetArn(v string) *Preset { + s.Arn = &v + return s +} + +// SetCategory sets the Category field's value. +func (s *Preset) SetCategory(v string) *Preset { + s.Category = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Preset) SetCreatedAt(v time.Time) *Preset { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Preset) SetDescription(v string) *Preset { + s.Description = &v + return s +} + +// SetLastUpdated sets the LastUpdated field's value. +func (s *Preset) SetLastUpdated(v time.Time) *Preset { + s.LastUpdated = &v + return s +} + +// SetName sets the Name field's value. +func (s *Preset) SetName(v string) *Preset { + s.Name = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *Preset) SetSettings(v *PresetSettings) *Preset { + s.Settings = v + return s +} + +// SetType sets the Type field's value. +func (s *Preset) SetType(v string) *Preset { + s.Type = &v + return s +} + +// Settings for preset +type PresetSettings struct { + _ struct{} `type:"structure"` + + // (AudioDescriptions) contains groups of audio encoding settings organized + // by audio codec. Include one instance of (AudioDescriptions) per output. (AudioDescriptions) + // can contain multiple groups of encoding settings. + AudioDescriptions []*AudioDescription `locationName:"audioDescriptions" type:"list"` + + // Caption settings for this preset. There can be multiple caption settings + // in a single output. + CaptionDescriptions []*CaptionDescriptionPreset `locationName:"captionDescriptions" type:"list"` + + // Container specific settings. + ContainerSettings *ContainerSettings `locationName:"containerSettings" type:"structure"` + + // (VideoDescription) contains a group of video encoding settings. The specific + // video settings depend on the video codec you choose when you specify a value + // for Video codec (codec). Include one instance of (VideoDescription) per output. + VideoDescription *VideoDescription `locationName:"videoDescription" type:"structure"` +} + +// String returns the string representation +func (s PresetSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PresetSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PresetSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PresetSettings"} + if s.AudioDescriptions != nil { + for i, v := range s.AudioDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.CaptionDescriptions != nil { + for i, v := range s.CaptionDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ContainerSettings != nil { + if err := s.ContainerSettings.Validate(); err != nil { + invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) + } + } + if s.VideoDescription != nil { + if err := s.VideoDescription.Validate(); err != nil { + invalidParams.AddNested("VideoDescription", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioDescriptions sets the AudioDescriptions field's value. +func (s *PresetSettings) SetAudioDescriptions(v []*AudioDescription) *PresetSettings { + s.AudioDescriptions = v + return s +} + +// SetCaptionDescriptions sets the CaptionDescriptions field's value. +func (s *PresetSettings) SetCaptionDescriptions(v []*CaptionDescriptionPreset) *PresetSettings { + s.CaptionDescriptions = v + return s +} + +// SetContainerSettings sets the ContainerSettings field's value. +func (s *PresetSettings) SetContainerSettings(v *ContainerSettings) *PresetSettings { + s.ContainerSettings = v + return s +} + +// SetVideoDescription sets the VideoDescription field's value. +func (s *PresetSettings) SetVideoDescription(v *VideoDescription) *PresetSettings { + s.VideoDescription = v + return s +} + +// Required when you set (Codec) under (VideoDescription)>(CodecSettings) to +// the value PRORES. +type ProresSettings struct { + _ struct{} `type:"structure"` + + // Use Profile (ProResCodecProfile) to specifiy the type of Apple ProRes codec + // to use for this output. + CodecProfile *string `locationName:"codecProfile" type:"string" enum:"ProresCodecProfile"` + + // If you are using the console, use the Framerate setting to specify the frame + // rate for this output. If you want to keep the same frame rate as the input + // video, choose Follow source. If you want to do frame rate conversion, choose + // a frame rate from the dropdown list or choose Custom. The framerates shown + // in the dropdown list are decimal approximations of fractions. If you choose + // Custom, specify your frame rate as a fraction. If you are creating your transcoding + // job sepecification as a JSON file without the console, use FramerateControl + // to specify which value the service uses for the frame rate for this output. + // Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate + // from the input. Choose SPECIFIED if you want the service to use the frame + // rate you specify in the settings FramerateNumerator and FramerateDenominator. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"ProresFramerateControl"` + + // When set to INTERPOLATE, produces smoother motion during frame rate conversion. + FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"ProresFramerateConversionAlgorithm"` + + // Frame rate denominator. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // When you use the API for transcode jobs that use frame rate conversion, specify + // the frame rate as a fraction. For example, 24000 / 1001 = 23.976 fps. Use + // FramerateNumerator to specify the numerator of this fraction. In this example, + // use 24000 for the value of FramerateNumerator. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` + + // Use Interlace mode (InterlaceMode) to choose the scan line type for the output. + // * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce + // interlaced output with the entire output having the same field polarity (top + // or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default + // Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, + // behavior depends on the input scan type. - If the source is interlaced, the + // output will be interlaced with the same polarity as the source (it will follow + // the source). The output could therefore be a mix of "top field first" and + // "bottom field first". - If the source is progressive, the output will be + // interlaced with "top field first" or "bottom field first" polarity, depending + // on which of the Follow options you chose. + InterlaceMode *string `locationName:"interlaceMode" type:"string" enum:"ProresInterlaceMode"` + + // Use (ProresParControl) to specify how the service determines the pixel aspect + // ratio. Set to Follow source (INITIALIZE_FROM_SOURCE) to use the pixel aspect + // ratio from the input. To specify a different pixel aspect ratio: Using the + // console, choose it from the dropdown menu. Using the API, set ProresParControl + // to (SPECIFIED) and provide for (ParNumerator) and (ParDenominator). + ParControl *string `locationName:"parControl" type:"string" enum:"ProresParControl"` + + // Pixel Aspect Ratio denominator. + ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` + + // Pixel Aspect Ratio numerator. + ParNumerator *int64 `locationName:"parNumerator" min:"1" type:"integer"` + + // Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled + // as 25fps, and audio is sped up correspondingly. + SlowPal *string `locationName:"slowPal" type:"string" enum:"ProresSlowPal"` + + // Only use Telecine (ProresTelecine) when you set Framerate (Framerate) to + // 29.970. Set Telecine (ProresTelecine) to Hard (hard) to produce a 29.97i + // output from a 23.976 input. Set it to Soft (soft) to produce 23.976 output + // and leave converstion to the player. + Telecine *string `locationName:"telecine" type:"string" enum:"ProresTelecine"` +} + +// String returns the string representation +func (s ProresSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProresSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProresSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProresSettings"} + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + if s.ParDenominator != nil && *s.ParDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) + } + if s.ParNumerator != nil && *s.ParNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParNumerator", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodecProfile sets the CodecProfile field's value. +func (s *ProresSettings) SetCodecProfile(v string) *ProresSettings { + s.CodecProfile = &v + return s +} + +// SetFramerateControl sets the FramerateControl field's value. +func (s *ProresSettings) SetFramerateControl(v string) *ProresSettings { + s.FramerateControl = &v + return s +} + +// SetFramerateConversionAlgorithm sets the FramerateConversionAlgorithm field's value. +func (s *ProresSettings) SetFramerateConversionAlgorithm(v string) *ProresSettings { + s.FramerateConversionAlgorithm = &v + return s +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *ProresSettings) SetFramerateDenominator(v int64) *ProresSettings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *ProresSettings) SetFramerateNumerator(v int64) *ProresSettings { + s.FramerateNumerator = &v + return s +} + +// SetInterlaceMode sets the InterlaceMode field's value. +func (s *ProresSettings) SetInterlaceMode(v string) *ProresSettings { + s.InterlaceMode = &v + return s +} + +// SetParControl sets the ParControl field's value. +func (s *ProresSettings) SetParControl(v string) *ProresSettings { + s.ParControl = &v + return s +} + +// SetParDenominator sets the ParDenominator field's value. +func (s *ProresSettings) SetParDenominator(v int64) *ProresSettings { + s.ParDenominator = &v + return s +} + +// SetParNumerator sets the ParNumerator field's value. +func (s *ProresSettings) SetParNumerator(v int64) *ProresSettings { + s.ParNumerator = &v + return s +} + +// SetSlowPal sets the SlowPal field's value. +func (s *ProresSettings) SetSlowPal(v string) *ProresSettings { + s.SlowPal = &v + return s +} + +// SetTelecine sets the Telecine field's value. +func (s *ProresSettings) SetTelecine(v string) *ProresSettings { + s.Telecine = &v + return s +} + +// You can use queues to manage the resources that are available to your AWS +// account for running multiple transcoding jobs at the same time. If you don't +// specify a queue, the service sends all jobs through the default queue. For +// more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. +type Queue struct { + _ struct{} `type:"structure"` + + // An identifier for this resource that is unique within all of AWS. + Arn *string `locationName:"arn" type:"string"` + + // The timestamp in epoch seconds for when you created the queue. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unixTimestamp"` + + // An optional description that you create for each queue. + Description *string `locationName:"description" type:"string"` + + // The timestamp in epoch seconds for when you most recently updated the queue. + LastUpdated *time.Time `locationName:"lastUpdated" type:"timestamp" timestampFormat:"unixTimestamp"` + + // A name that you create for each queue. Each name must be unique within your + // account. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Specifies whether the pricing plan for the queue is on-demand or reserved. + // For on-demand, you pay per minute, billed in increments of .01 minute. For + // reserved, you pay for the transcoding capacity of the entire queue, regardless + // of how much or how little you use it. Reserved pricing requires a 12-month + // commitment. + PricingPlan *string `locationName:"pricingPlan" type:"string" enum:"PricingPlan"` + + // The estimated number of jobs with a PROGRESSING status. + ProgressingJobsCount *int64 `locationName:"progressingJobsCount" type:"integer"` + + // Details about the pricing plan for your reserved queue. Required for reserved + // queues and not applicable to on-demand queues. + ReservationPlan *ReservationPlan `locationName:"reservationPlan" type:"structure"` + + // Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin + // processing jobs in that queue. Jobs that are running when you pause the queue + // continue to run until they finish or result in an error. + Status *string `locationName:"status" type:"string" enum:"QueueStatus"` + + // The estimated number of jobs with a SUBMITTED status. + SubmittedJobsCount *int64 `locationName:"submittedJobsCount" type:"integer"` + + // Specifies whether this on-demand queue is system or custom. System queues + // are built in. You can't modify or delete system queues. You can create and + // modify custom queues. + Type *string `locationName:"type" type:"string" enum:"Type"` +} + +// String returns the string representation +func (s Queue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Queue) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Queue) SetArn(v string) *Queue { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Queue) SetCreatedAt(v time.Time) *Queue { + s.CreatedAt = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Queue) SetDescription(v string) *Queue { + s.Description = &v + return s +} + +// SetLastUpdated sets the LastUpdated field's value. +func (s *Queue) SetLastUpdated(v time.Time) *Queue { + s.LastUpdated = &v + return s +} + +// SetName sets the Name field's value. +func (s *Queue) SetName(v string) *Queue { + s.Name = &v + return s +} + +// SetPricingPlan sets the PricingPlan field's value. +func (s *Queue) SetPricingPlan(v string) *Queue { + s.PricingPlan = &v + return s +} + +// SetProgressingJobsCount sets the ProgressingJobsCount field's value. +func (s *Queue) SetProgressingJobsCount(v int64) *Queue { + s.ProgressingJobsCount = &v + return s +} + +// SetReservationPlan sets the ReservationPlan field's value. +func (s *Queue) SetReservationPlan(v *ReservationPlan) *Queue { + s.ReservationPlan = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Queue) SetStatus(v string) *Queue { + s.Status = &v + return s +} + +// SetSubmittedJobsCount sets the SubmittedJobsCount field's value. +func (s *Queue) SetSubmittedJobsCount(v int64) *Queue { + s.SubmittedJobsCount = &v + return s +} + +// SetType sets the Type field's value. +func (s *Queue) SetType(v string) *Queue { + s.Type = &v + return s +} + +// Use Rectangle to identify a specific area of the video frame. +type Rectangle struct { + _ struct{} `type:"structure"` + + // Height of rectangle in pixels. Specify only even numbers. + Height *int64 `locationName:"height" min:"2" type:"integer"` + + // Width of rectangle in pixels. Specify only even numbers. + Width *int64 `locationName:"width" min:"2" type:"integer"` + + // The distance, in pixels, between the rectangle and the left edge of the video + // frame. Specify only even numbers. + X *int64 `locationName:"x" type:"integer"` + + // The distance, in pixels, between the rectangle and the top edge of the video + // frame. Specify only even numbers. + Y *int64 `locationName:"y" type:"integer"` +} + +// String returns the string representation +func (s Rectangle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Rectangle) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Rectangle) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Rectangle"} + if s.Height != nil && *s.Height < 2 { + invalidParams.Add(request.NewErrParamMinValue("Height", 2)) + } + if s.Width != nil && *s.Width < 2 { + invalidParams.Add(request.NewErrParamMinValue("Width", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHeight sets the Height field's value. +func (s *Rectangle) SetHeight(v int64) *Rectangle { + s.Height = &v + return s +} + +// SetWidth sets the Width field's value. +func (s *Rectangle) SetWidth(v int64) *Rectangle { + s.Width = &v + return s +} + +// SetX sets the X field's value. +func (s *Rectangle) SetX(v int64) *Rectangle { + s.X = &v + return s +} + +// SetY sets the Y field's value. +func (s *Rectangle) SetY(v int64) *Rectangle { + s.Y = &v + return s +} + +// Use Manual audio remixing (RemixSettings) to adjust audio levels for each +// audio channel in each output of your job. With audio remixing, you can output +// more or fewer audio channels than your input audio source provides. +type RemixSettings struct { + _ struct{} `type:"structure"` + + // Channel mapping (ChannelMapping) contains the group of fields that hold the + // remixing value for each channel. Units are in dB. Acceptable values are within + // the range from -60 (mute) through 6. A setting of 0 passes the input channel + // unchanged to the output channel (no attenuation or amplification). + ChannelMapping *ChannelMapping `locationName:"channelMapping" type:"structure"` + + // Specify the number of audio channels from your input that you want to use + // in your output. With remixing, you might combine or split the data in these + // channels, so the number of channels in your final output might be different. + ChannelsIn *int64 `locationName:"channelsIn" min:"1" type:"integer"` + + // Specify the number of channels in this output after remixing. Valid values: + // 1, 2, 4, 6, 8 + ChannelsOut *int64 `locationName:"channelsOut" min:"1" type:"integer"` +} + +// String returns the string representation +func (s RemixSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemixSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemixSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemixSettings"} + if s.ChannelsIn != nil && *s.ChannelsIn < 1 { + invalidParams.Add(request.NewErrParamMinValue("ChannelsIn", 1)) + } + if s.ChannelsOut != nil && *s.ChannelsOut < 1 { + invalidParams.Add(request.NewErrParamMinValue("ChannelsOut", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelMapping sets the ChannelMapping field's value. +func (s *RemixSettings) SetChannelMapping(v *ChannelMapping) *RemixSettings { + s.ChannelMapping = v + return s +} + +// SetChannelsIn sets the ChannelsIn field's value. +func (s *RemixSettings) SetChannelsIn(v int64) *RemixSettings { + s.ChannelsIn = &v + return s +} + +// SetChannelsOut sets the ChannelsOut field's value. +func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { + s.ChannelsOut = &v + return s +} + +// Details about the pricing plan for your reserved queue. Required for reserved +// queues and not applicable to on-demand queues. +type ReservationPlan struct { + _ struct{} `type:"structure"` + + // The length of the term of your reserved queue pricing plan commitment. + Commitment *string `locationName:"commitment" type:"string" enum:"Commitment"` + + // The timestamp in epoch seconds for when the current pricing plan term for + // this reserved queue expires. + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unixTimestamp"` + + // The timestamp in epoch seconds for when you set up the current pricing plan + // for this reserved queue. + PurchasedAt *time.Time `locationName:"purchasedAt" type:"timestamp" timestampFormat:"unixTimestamp"` + + // Specifies whether the term of your reserved queue pricing plan is automatically + // extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. + RenewalType *string `locationName:"renewalType" type:"string" enum:"RenewalType"` + + // Specifies the number of reserved transcode slots (RTS) for this queue. The + // number of RTS determines how many jobs the queue can process in parallel; + // each RTS can process one job at a time. When you increase this number, you + // extend your existing commitment with a new 12-month commitment for a larger + // number of RTS. The new commitment begins when you purchase the additional + // capacity. You can't decrease the number of RTS in your reserved queue. + ReservedSlots *int64 `locationName:"reservedSlots" type:"integer"` + + // Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED. + Status *string `locationName:"status" type:"string" enum:"ReservationPlanStatus"` +} + +// String returns the string representation +func (s ReservationPlan) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservationPlan) GoString() string { + return s.String() +} + +// SetCommitment sets the Commitment field's value. +func (s *ReservationPlan) SetCommitment(v string) *ReservationPlan { + s.Commitment = &v + return s +} + +// SetExpiresAt sets the ExpiresAt field's value. +func (s *ReservationPlan) SetExpiresAt(v time.Time) *ReservationPlan { + s.ExpiresAt = &v + return s +} + +// SetPurchasedAt sets the PurchasedAt field's value. +func (s *ReservationPlan) SetPurchasedAt(v time.Time) *ReservationPlan { + s.PurchasedAt = &v + return s +} + +// SetRenewalType sets the RenewalType field's value. +func (s *ReservationPlan) SetRenewalType(v string) *ReservationPlan { + s.RenewalType = &v + return s +} + +// SetReservedSlots sets the ReservedSlots field's value. +func (s *ReservationPlan) SetReservedSlots(v int64) *ReservationPlan { + s.ReservedSlots = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ReservationPlan) SetStatus(v string) *ReservationPlan { + s.Status = &v + return s +} + +// Details about the pricing plan for your reserved queue. Required for reserved +// queues and not applicable to on-demand queues. +type ReservationPlanSettings struct { + _ struct{} `type:"structure"` + + // The length of the term of your reserved queue pricing plan commitment. + // + // Commitment is a required field + Commitment *string `locationName:"commitment" type:"string" required:"true" enum:"Commitment"` + + // Specifies whether the term of your reserved queue pricing plan is automatically + // extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. When your + // term is auto renewed, you extend your commitment by 12 months from the auto + // renew date. You can cancel this commitment. + // + // RenewalType is a required field + RenewalType *string `locationName:"renewalType" type:"string" required:"true" enum:"RenewalType"` + + // Specifies the number of reserved transcode slots (RTS) for this queue. The + // number of RTS determines how many jobs the queue can process in parallel; + // each RTS can process one job at a time. You can't decrease the number of + // RTS in your reserved queue. You can increase the number of RTS by extending + // your existing commitment with a new 12-month commitment for the larger number. + // The new commitment begins when you purchase the additional capacity. You + // can't cancel your commitment or revert to your original commitment after + // you increase the capacity. + // + // ReservedSlots is a required field + ReservedSlots *int64 `locationName:"reservedSlots" type:"integer" required:"true"` +} + +// String returns the string representation +func (s ReservationPlanSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservationPlanSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReservationPlanSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReservationPlanSettings"} + if s.Commitment == nil { + invalidParams.Add(request.NewErrParamRequired("Commitment")) + } + if s.RenewalType == nil { + invalidParams.Add(request.NewErrParamRequired("RenewalType")) + } + if s.ReservedSlots == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedSlots")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCommitment sets the Commitment field's value. +func (s *ReservationPlanSettings) SetCommitment(v string) *ReservationPlanSettings { + s.Commitment = &v + return s +} + +// SetRenewalType sets the RenewalType field's value. +func (s *ReservationPlanSettings) SetRenewalType(v string) *ReservationPlanSettings { + s.RenewalType = &v + return s +} + +// SetReservedSlots sets the ReservedSlots field's value. +func (s *ReservationPlanSettings) SetReservedSlots(v int64) *ReservationPlanSettings { + s.ReservedSlots = &v + return s +} + +// The Amazon Resource Name (ARN) and tags for an AWS Elemental MediaConvert +// resource. +type ResourceTags struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. + Arn *string `locationName:"arn" type:"string"` + + // The tags for the resource. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s ResourceTags) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceTags) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ResourceTags) SetArn(v string) *ResourceTags { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ResourceTags) SetTags(v map[string]*string) *ResourceTags { + s.Tags = v + return s +} + +// Settings for SCC caption output. +type SccDestinationSettings struct { + _ struct{} `type:"structure"` + + // Set Framerate (SccDestinationFramerate) to make sure that the captions and + // the video are synchronized in the output. Specify a frame rate that matches + // the frame rate of the associated video. If the video frame rate is 29.97, + // choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has + // video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 + // non-dropframe (FRAMERATE_29_97_NON_DROPFRAME). + Framerate *string `locationName:"framerate" type:"string" enum:"SccDestinationFramerate"` +} + +// String returns the string representation +func (s SccDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SccDestinationSettings) GoString() string { + return s.String() +} + +// SetFramerate sets the Framerate field's value. +func (s *SccDestinationSettings) SetFramerate(v string) *SccDestinationSettings { + s.Framerate = &v + return s +} + +// Settings for use with a SPEKE key provider +type SpekeKeyProvider struct { + _ struct{} `type:"structure"` + + // Optional AWS Certificate Manager ARN for a certificate to send to the keyprovider. + // The certificate holds a key used by the keyprovider to encrypt the keys in + // its response. + CertificateArn *string `locationName:"certificateArn" type:"string"` + + // The SPEKE-compliant server uses Resource ID (ResourceId) to identify content. + ResourceId *string `locationName:"resourceId" type:"string"` + + // Relates to SPEKE implementation. DRM system identifiers. DASH output groups + // support a max of two system ids. Other group types support one system id. + SystemIds []*string `locationName:"systemIds" type:"list"` + + // Use URL (Url) to specify the SPEKE-compliant server that will provide keys + // for content. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s SpekeKeyProvider) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpekeKeyProvider) GoString() string { + return s.String() +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *SpekeKeyProvider) SetCertificateArn(v string) *SpekeKeyProvider { + s.CertificateArn = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *SpekeKeyProvider) SetResourceId(v string) *SpekeKeyProvider { + s.ResourceId = &v + return s +} + +// SetSystemIds sets the SystemIds field's value. +func (s *SpekeKeyProvider) SetSystemIds(v []*string) *SpekeKeyProvider { + s.SystemIds = v + return s +} + +// SetUrl sets the Url field's value. +func (s *SpekeKeyProvider) SetUrl(v string) *SpekeKeyProvider { + s.Url = &v + return s +} + +// Use these settings to set up encryption with a static key provider. +type StaticKeyProvider struct { + _ struct{} `type:"structure"` + + // Relates to DRM implementation. Sets the value of the KEYFORMAT attribute. + // Must be 'identity' or a reverse DNS string. May be omitted to indicate an + // implicit value of 'identity'. + KeyFormat *string `locationName:"keyFormat" type:"string"` + + // Relates to DRM implementation. Either a single positive integer version value + // or a slash delimited list of version values (1/2/3). + KeyFormatVersions *string `locationName:"keyFormatVersions" type:"string"` + + // Relates to DRM implementation. Use a 32-character hexidecimal string to specify + // Key Value (StaticKeyValue). + StaticKeyValue *string `locationName:"staticKeyValue" type:"string"` + + // Relates to DRM implementation. The location of the license server used for + // protecting content. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s StaticKeyProvider) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StaticKeyProvider) GoString() string { + return s.String() +} + +// SetKeyFormat sets the KeyFormat field's value. +func (s *StaticKeyProvider) SetKeyFormat(v string) *StaticKeyProvider { + s.KeyFormat = &v + return s +} + +// SetKeyFormatVersions sets the KeyFormatVersions field's value. +func (s *StaticKeyProvider) SetKeyFormatVersions(v string) *StaticKeyProvider { + s.KeyFormatVersions = &v + return s +} + +// SetStaticKeyValue sets the StaticKeyValue field's value. +func (s *StaticKeyProvider) SetStaticKeyValue(v string) *StaticKeyProvider { + s.StaticKeyValue = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *StaticKeyProvider) SetUrl(v string) *StaticKeyProvider { + s.Url = &v + return s +} + +// To add tags to a queue, preset, or job template, send a request with the +// Amazon Resource Name (ARN) of the resource and the tags that you want to +// add. +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to tag. To get + // the ARN, send a GET request with the resource name. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` + + // The tags that you want to add to the resource. You can tag resources with + // a key-value pair or with only a key. + // + // Tags is a required field + Tags map[string]*string `locationName:"tags" type:"map" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *TagResourceInput) SetArn(v string) *TagResourceInput { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { + s.Tags = v + return s +} + +// A successful request to add tags to a resource returns an OK message. +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// Settings for Teletext caption output +type TeletextDestinationSettings struct { + _ struct{} `type:"structure"` + + // Set pageNumber to the Teletext page number for the destination captions for + // this output. This value must be a three-digit hexadecimal string; strings + // ending in -FF are invalid. If you are passing through the entire set of Teletext + // data, do not use this field. + PageNumber *string `locationName:"pageNumber" min:"3" type:"string"` +} + +// String returns the string representation +func (s TeletextDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TeletextDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TeletextDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TeletextDestinationSettings"} + if s.PageNumber != nil && len(*s.PageNumber) < 3 { + invalidParams.Add(request.NewErrParamMinLen("PageNumber", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPageNumber sets the PageNumber field's value. +func (s *TeletextDestinationSettings) SetPageNumber(v string) *TeletextDestinationSettings { + s.PageNumber = &v + return s +} + +// Settings specific to Teletext caption sources, including Page number. +type TeletextSourceSettings struct { + _ struct{} `type:"structure"` + + // Use Page Number (PageNumber) to specify the three-digit hexadecimal page + // number that will be used for Teletext captions. Do not use this setting if + // you are passing through teletext from the input source to output. + PageNumber *string `locationName:"pageNumber" min:"3" type:"string"` +} + +// String returns the string representation +func (s TeletextSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TeletextSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TeletextSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TeletextSourceSettings"} + if s.PageNumber != nil && len(*s.PageNumber) < 3 { + invalidParams.Add(request.NewErrParamMinLen("PageNumber", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPageNumber sets the PageNumber field's value. +func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings { + s.PageNumber = &v + return s +} + +// Timecode burn-in (TimecodeBurnIn)--Burns the output timecode and specified +// prefix into the output. +type TimecodeBurnin struct { + _ struct{} `type:"structure"` + + // Use Font Size (FontSize) to set the font size of any burned-in timecode. + // Valid values are 10, 16, 32, 48. + FontSize *int64 `locationName:"fontSize" min:"10" type:"integer"` + + // Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to + // specify the location the burned-in timecode on output video. + Position *string `locationName:"position" type:"string" enum:"TimecodeBurninPosition"` + + // Use Prefix (Prefix) to place ASCII characters before any burned-in timecode. + // For example, a prefix of "EZ-" will result in the timecode "EZ-00:00:00:00". + // Provide either the characters themselves or the ASCII code equivalents. The + // supported range of characters is 0x20 through 0x7e. This includes letters, + // numbers, and all special characters represented on a standard English keyboard. + Prefix *string `locationName:"prefix" type:"string"` +} + +// String returns the string representation +func (s TimecodeBurnin) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimecodeBurnin) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TimecodeBurnin) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TimecodeBurnin"} + if s.FontSize != nil && *s.FontSize < 10 { + invalidParams.Add(request.NewErrParamMinValue("FontSize", 10)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFontSize sets the FontSize field's value. +func (s *TimecodeBurnin) SetFontSize(v int64) *TimecodeBurnin { + s.FontSize = &v + return s +} + +// SetPosition sets the Position field's value. +func (s *TimecodeBurnin) SetPosition(v string) *TimecodeBurnin { + s.Position = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *TimecodeBurnin) SetPrefix(v string) *TimecodeBurnin { + s.Prefix = &v + return s +} + +// These settings control how the service handles timecodes throughout the job. +// These settings don't affect input clipping. +type TimecodeConfig struct { + _ struct{} `type:"structure"` + + // If you use an editing platform that relies on an anchor timecode, use Anchor + // Timecode (Anchor) to specify a timecode that will match the input video frame + // to the output video frame. Use 24-hour format with frame number, (HH:MM:SS:FF) + // or (HH:MM:SS;FF). This setting ignores frame rate conversion. System behavior + // for Anchor Timecode varies depending on your setting for Source (TimecodeSource). + // * If Source (TimecodeSource) is set to Specified Start (SPECIFIEDSTART), + // the first input frame is the specified value in Start Timecode (Start). Anchor + // Timecode (Anchor) and Start Timecode (Start) are used calculate output timecode. + // * If Source (TimecodeSource) is set to Start at 0 (ZEROBASED) the first frame + // is 00:00:00:00. * If Source (TimecodeSource) is set to Embedded (EMBEDDED), + // the first frame is the timecode value on the first input frame of the input. + Anchor *string `locationName:"anchor" type:"string"` + + // Use Source (TimecodeSource) to set how timecodes are handled within this + // job. To make sure that your video, audio, captions, and markers are synchronized + // and that time-based features, such as image inserter, work correctly, choose + // the Timecode source option that matches your assets. All timecodes are in + // a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - + // Use the timecode that is in the input video. If no embedded timecode is in + // the source, the service will use Start at 0 (ZEROBASED) instead. * Start + // at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. + // * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame + // to a value other than zero. You use Start timecode (Start) to provide this + // value. + Source *string `locationName:"source" type:"string" enum:"TimecodeSource"` + + // Only use when you set Source (TimecodeSource) to Specified start (SPECIFIEDSTART). + // Use Start timecode (Start) to specify the timecode for the initial frame. + // Use 24-hour format with frame number, (HH:MM:SS:FF) or (HH:MM:SS;FF). + Start *string `locationName:"start" type:"string"` + + // Only applies to outputs that support program-date-time stamp. Use Timestamp + // offset (TimestampOffset) to overwrite the timecode date without affecting + // the time and frame number. Provide the new date as a string in the format + // "yyyy-mm-dd". To use Time stamp offset, you must also enable Insert program-date-time + // (InsertProgramDateTime) in the output settings. For example, if the date + // part of your timecodes is 2002-1-25 and you want to change it to one year + // later, set Timestamp offset (TimestampOffset) to 2003-1-25. + TimestampOffset *string `locationName:"timestampOffset" type:"string"` +} + +// String returns the string representation +func (s TimecodeConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimecodeConfig) GoString() string { + return s.String() +} + +// SetAnchor sets the Anchor field's value. +func (s *TimecodeConfig) SetAnchor(v string) *TimecodeConfig { + s.Anchor = &v + return s +} + +// SetSource sets the Source field's value. +func (s *TimecodeConfig) SetSource(v string) *TimecodeConfig { + s.Source = &v + return s +} + +// SetStart sets the Start field's value. +func (s *TimecodeConfig) SetStart(v string) *TimecodeConfig { + s.Start = &v + return s +} + +// SetTimestampOffset sets the TimestampOffset field's value. +func (s *TimecodeConfig) SetTimestampOffset(v string) *TimecodeConfig { + s.TimestampOffset = &v + return s +} + +// Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags +// in your job. To include timed metadata, you must enable it here, enable it +// in each output container, and specify tags and timecodes in ID3 insertion +// (Id3Insertion) objects. +type TimedMetadataInsertion struct { + _ struct{} `type:"structure"` + + // Id3Insertions contains the array of Id3Insertion instances. + Id3Insertions []*Id3Insertion `locationName:"id3Insertions" type:"list"` +} + +// String returns the string representation +func (s TimedMetadataInsertion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimedMetadataInsertion) GoString() string { + return s.String() +} + +// SetId3Insertions sets the Id3Insertions field's value. +func (s *TimedMetadataInsertion) SetId3Insertions(v []*Id3Insertion) *TimedMetadataInsertion { + s.Id3Insertions = v + return s +} + +// Information about when jobs are submitted, started, and finished is specified +// in Unix epoch format in seconds. +type Timing struct { + _ struct{} `type:"structure"` + + // The time, in Unix epoch format, that the transcoding job finished + FinishTime *time.Time `locationName:"finishTime" type:"timestamp" timestampFormat:"unixTimestamp"` + + // The time, in Unix epoch format, that transcoding for the job began. + StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"unixTimestamp"` + + // The time, in Unix epoch format, that you submitted the job. + SubmitTime *time.Time `locationName:"submitTime" type:"timestamp" timestampFormat:"unixTimestamp"` +} + +// String returns the string representation +func (s Timing) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Timing) GoString() string { + return s.String() +} + +// SetFinishTime sets the FinishTime field's value. +func (s *Timing) SetFinishTime(v time.Time) *Timing { + s.FinishTime = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *Timing) SetStartTime(v time.Time) *Timing { + s.StartTime = &v + return s +} + +// SetSubmitTime sets the SubmitTime field's value. +func (s *Timing) SetSubmitTime(v time.Time) *Timing { + s.SubmitTime = &v + return s +} + +// Settings specific to caption sources that are specfied by track number. Sources +// include IMSC in IMF. +type TrackSourceSettings struct { + _ struct{} `type:"structure"` + + // Use this setting to select a single captions track from a source. Track numbers + // correspond to the order in the captions source file. For IMF sources, track + // numbering is based on the order that the captions appear in the CPL. For + // example, use 1 to select the captions asset that is listed first in the CPL. + // To include more than one captions track in your job outputs, create multiple + // input captions selectors. Specify one track per selector. + TrackNumber *int64 `locationName:"trackNumber" min:"1" type:"integer"` +} + +// String returns the string representation +func (s TrackSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrackSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TrackSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TrackSourceSettings"} + if s.TrackNumber != nil && *s.TrackNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("TrackNumber", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTrackNumber sets the TrackNumber field's value. +func (s *TrackSourceSettings) SetTrackNumber(v int64) *TrackSourceSettings { + s.TrackNumber = &v + return s +} + +// Settings specific to TTML caption outputs, including Pass style information +// (TtmlStylePassthrough). +type TtmlDestinationSettings struct { + _ struct{} `type:"structure"` + + // Pass through style and position information from a TTML-like input source + // (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or TTML output. + StylePassthrough *string `locationName:"stylePassthrough" type:"string" enum:"TtmlStylePassthrough"` +} + +// String returns the string representation +func (s TtmlDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TtmlDestinationSettings) GoString() string { + return s.String() +} + +// SetStylePassthrough sets the StylePassthrough field's value. +func (s *TtmlDestinationSettings) SetStylePassthrough(v string) *TtmlDestinationSettings { + s.StylePassthrough = &v + return s +} + +// To remove tags from a resource, send a request with the Amazon Resource Name +// (ARN) of the resource and the keys of the tags that you want to remove. +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to remove tags + // from. To get the ARN, send a GET request with the resource name. + // + // Arn is a required field + Arn *string `location:"uri" locationName:"arn" type:"string" required:"true"` + + // The keys of the tags that you want to remove from the resource. + TagKeys []*string `locationName:"tagKeys" type:"list"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UntagResourceInput) SetArn(v string) *UntagResourceInput { + s.Arn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +// A successful request to remove tags from a resource returns an OK message. +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// Modify a job template by sending a request with the job template name and +// any of the following that you wish to change: description, category, and +// queue. +type UpdateJobTemplateInput struct { + _ struct{} `type:"structure"` + + // This is a beta feature. If you are interested in using this feature, please + // contact AWS customer support. + AccelerationSettings *AccelerationSettings `locationName:"accelerationSettings" type:"structure"` + + // The new category for the job template, if you are changing it. + Category *string `locationName:"category" type:"string"` + + // The new description for the job template, if you are changing it. + Description *string `locationName:"description" type:"string"` + + // The name of the job template you are modifying + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + + // The new queue for the job template, if you are changing it. + Queue *string `locationName:"queue" type:"string"` + + // JobTemplateSettings contains all the transcode settings saved in the template + // that will be applied to jobs created from it. + Settings *JobTemplateSettings `locationName:"settings" type:"structure"` +} + +// String returns the string representation +func (s UpdateJobTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateJobTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateJobTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateJobTemplateInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.AccelerationSettings != nil { + if err := s.AccelerationSettings.Validate(); err != nil { + invalidParams.AddNested("AccelerationSettings", err.(request.ErrInvalidParams)) + } + } + if s.Settings != nil { + if err := s.Settings.Validate(); err != nil { + invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccelerationSettings sets the AccelerationSettings field's value. +func (s *UpdateJobTemplateInput) SetAccelerationSettings(v *AccelerationSettings) *UpdateJobTemplateInput { + s.AccelerationSettings = v + return s +} + +// SetCategory sets the Category field's value. +func (s *UpdateJobTemplateInput) SetCategory(v string) *UpdateJobTemplateInput { + s.Category = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateJobTemplateInput) SetDescription(v string) *UpdateJobTemplateInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateJobTemplateInput) SetName(v string) *UpdateJobTemplateInput { + s.Name = &v + return s +} + +// SetQueue sets the Queue field's value. +func (s *UpdateJobTemplateInput) SetQueue(v string) *UpdateJobTemplateInput { + s.Queue = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *UpdateJobTemplateInput) SetSettings(v *JobTemplateSettings) *UpdateJobTemplateInput { + s.Settings = v + return s +} + +// Successful update job template requests will return the new job template +// JSON. +type UpdateJobTemplateOutput struct { + _ struct{} `type:"structure"` + + // A job template is a pre-made set of encoding instructions that you can use + // to quickly create a job. + JobTemplate *JobTemplate `locationName:"jobTemplate" type:"structure"` +} + +// String returns the string representation +func (s UpdateJobTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateJobTemplateOutput) GoString() string { + return s.String() +} + +// SetJobTemplate sets the JobTemplate field's value. +func (s *UpdateJobTemplateOutput) SetJobTemplate(v *JobTemplate) *UpdateJobTemplateOutput { + s.JobTemplate = v + return s +} + +// Modify a preset by sending a request with the preset name and any of the +// following that you wish to change: description, category, and transcoding +// settings. +type UpdatePresetInput struct { + _ struct{} `type:"structure"` + + // The new category for the preset, if you are changing it. + Category *string `locationName:"category" type:"string"` + + // The new description for the preset, if you are changing it. + Description *string `locationName:"description" type:"string"` + + // The name of the preset you are modifying. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + + // Settings for preset + Settings *PresetSettings `locationName:"settings" type:"structure"` +} + +// String returns the string representation +func (s UpdatePresetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePresetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdatePresetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdatePresetInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Settings != nil { + if err := s.Settings.Validate(); err != nil { + invalidParams.AddNested("Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategory sets the Category field's value. +func (s *UpdatePresetInput) SetCategory(v string) *UpdatePresetInput { + s.Category = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdatePresetInput) SetDescription(v string) *UpdatePresetInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdatePresetInput) SetName(v string) *UpdatePresetInput { + s.Name = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *UpdatePresetInput) SetSettings(v *PresetSettings) *UpdatePresetInput { + s.Settings = v + return s +} + +// Successful update preset requests will return the new preset JSON. +type UpdatePresetOutput struct { + _ struct{} `type:"structure"` + + // A preset is a collection of preconfigured media conversion settings that + // you want MediaConvert to apply to the output during the conversion process. + Preset *Preset `locationName:"preset" type:"structure"` +} + +// String returns the string representation +func (s UpdatePresetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePresetOutput) GoString() string { + return s.String() +} + +// SetPreset sets the Preset field's value. +func (s *UpdatePresetOutput) SetPreset(v *Preset) *UpdatePresetOutput { + s.Preset = v + return s +} + +// Modify a queue by sending a request with the queue name and any changes to +// the queue. +type UpdateQueueInput struct { + _ struct{} `type:"structure"` + + // The new description for the queue, if you are changing it. + Description *string `locationName:"description" type:"string"` + + // The name of the queue that you are modifying. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + + // The new details of your pricing plan for your reserved queue. When you set + // up a new pricing plan to replace an expired one, you enter into another 12-month + // commitment. When you add capacity to your queue by increasing the number + // of RTS, you extend the term of your commitment to 12 months from when you + // add capacity. After you make these commitments, you can't cancel them. + ReservationPlanSettings *ReservationPlanSettings `locationName:"reservationPlanSettings" type:"structure"` + + // Pause or activate a queue by changing its status between ACTIVE and PAUSED. + // If you pause a queue, jobs in that queue won't begin. Jobs that are running + // when you pause the queue continue to run until they finish or result in an + // error. + Status *string `locationName:"status" type:"string" enum:"QueueStatus"` +} + +// String returns the string representation +func (s UpdateQueueInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateQueueInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateQueueInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateQueueInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.ReservationPlanSettings != nil { + if err := s.ReservationPlanSettings.Validate(); err != nil { + invalidParams.AddNested("ReservationPlanSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateQueueInput) SetDescription(v string) *UpdateQueueInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateQueueInput) SetName(v string) *UpdateQueueInput { + s.Name = &v + return s +} + +// SetReservationPlanSettings sets the ReservationPlanSettings field's value. +func (s *UpdateQueueInput) SetReservationPlanSettings(v *ReservationPlanSettings) *UpdateQueueInput { + s.ReservationPlanSettings = v + return s +} + +// SetStatus sets the Status field's value. +func (s *UpdateQueueInput) SetStatus(v string) *UpdateQueueInput { + s.Status = &v + return s +} + +// Successful update queue requests return the new queue information in JSON +// format. +type UpdateQueueOutput struct { + _ struct{} `type:"structure"` + + // You can use queues to manage the resources that are available to your AWS + // account for running multiple transcoding jobs at the same time. If you don't + // specify a queue, the service sends all jobs through the default queue. For + // more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html. + Queue *Queue `locationName:"queue" type:"structure"` +} + +// String returns the string representation +func (s UpdateQueueOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateQueueOutput) GoString() string { + return s.String() +} + +// SetQueue sets the Queue field's value. +func (s *UpdateQueueOutput) SetQueue(v *Queue) *UpdateQueueOutput { + s.Queue = v + return s +} + +// Video codec settings, (CodecSettings) under (VideoDescription), contains +// the group of settings related to video encoding. The settings in this group +// vary depending on the value you choose for Video codec (Codec). For each +// codec enum you choose, define the corresponding settings object. The following +// lists the codec enum, settings object pairs. * H_264, H264Settings * H_265, +// H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * FRAME_CAPTURE, +// FrameCaptureSettings +type VideoCodecSettings struct { + _ struct{} `type:"structure"` + + // Specifies the video codec. This must be equal to one of the enum values defined + // by the object VideoCodec. + Codec *string `locationName:"codec" type:"string" enum:"VideoCodec"` + + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to + // the value FRAME_CAPTURE. + FrameCaptureSettings *FrameCaptureSettings `locationName:"frameCaptureSettings" type:"structure"` + + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to + // the value H_264. + H264Settings *H264Settings `locationName:"h264Settings" type:"structure"` + + // Settings for H265 codec + H265Settings *H265Settings `locationName:"h265Settings" type:"structure"` + + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to + // the value MPEG2. + Mpeg2Settings *Mpeg2Settings `locationName:"mpeg2Settings" type:"structure"` + + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to + // the value PRORES. + ProresSettings *ProresSettings `locationName:"proresSettings" type:"structure"` +} + +// String returns the string representation +func (s VideoCodecSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoCodecSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VideoCodecSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VideoCodecSettings"} + if s.FrameCaptureSettings != nil { + if err := s.FrameCaptureSettings.Validate(); err != nil { + invalidParams.AddNested("FrameCaptureSettings", err.(request.ErrInvalidParams)) + } + } + if s.H264Settings != nil { + if err := s.H264Settings.Validate(); err != nil { + invalidParams.AddNested("H264Settings", err.(request.ErrInvalidParams)) + } + } + if s.H265Settings != nil { + if err := s.H265Settings.Validate(); err != nil { + invalidParams.AddNested("H265Settings", err.(request.ErrInvalidParams)) + } + } + if s.Mpeg2Settings != nil { + if err := s.Mpeg2Settings.Validate(); err != nil { + invalidParams.AddNested("Mpeg2Settings", err.(request.ErrInvalidParams)) + } + } + if s.ProresSettings != nil { + if err := s.ProresSettings.Validate(); err != nil { + invalidParams.AddNested("ProresSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodec sets the Codec field's value. +func (s *VideoCodecSettings) SetCodec(v string) *VideoCodecSettings { + s.Codec = &v + return s +} + +// SetFrameCaptureSettings sets the FrameCaptureSettings field's value. +func (s *VideoCodecSettings) SetFrameCaptureSettings(v *FrameCaptureSettings) *VideoCodecSettings { + s.FrameCaptureSettings = v + return s +} + +// SetH264Settings sets the H264Settings field's value. +func (s *VideoCodecSettings) SetH264Settings(v *H264Settings) *VideoCodecSettings { + s.H264Settings = v + return s +} + +// SetH265Settings sets the H265Settings field's value. +func (s *VideoCodecSettings) SetH265Settings(v *H265Settings) *VideoCodecSettings { + s.H265Settings = v + return s +} + +// SetMpeg2Settings sets the Mpeg2Settings field's value. +func (s *VideoCodecSettings) SetMpeg2Settings(v *Mpeg2Settings) *VideoCodecSettings { + s.Mpeg2Settings = v + return s +} + +// SetProresSettings sets the ProresSettings field's value. +func (s *VideoCodecSettings) SetProresSettings(v *ProresSettings) *VideoCodecSettings { + s.ProresSettings = v + return s +} + +// Settings for video outputs +type VideoDescription struct { + _ struct{} `type:"structure"` + + // This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert + // AFD signaling (AfdSignaling) to specify whether the service includes AFD + // values in the output video data and what those values are. * Choose None + // to remove all AFD values from this output. * Choose Fixed to ignore input + // AFD values and instead encode the value specified in the job. * Choose Auto + // to calculate output AFD values based on the input AFD scaler data. + AfdSignaling *string `locationName:"afdSignaling" type:"string" enum:"AfdSignaling"` + + // Enable Anti-alias (AntiAlias) to enhance sharp edges in video output when + // your input resolution is much larger than your output resolution. Default + // is enabled. + AntiAlias *string `locationName:"antiAlias" type:"string" enum:"AntiAlias"` + + // Video codec settings, (CodecSettings) under (VideoDescription), contains + // the group of settings related to video encoding. The settings in this group + // vary depending on the value you choose for Video codec (Codec). For each + // codec enum you choose, define the corresponding settings object. The following + // lists the codec enum, settings object pairs. * H_264, H264Settings * H_265, + // H265Settings * MPEG2, Mpeg2Settings * PRORES, ProresSettings * FRAME_CAPTURE, + // FrameCaptureSettings + CodecSettings *VideoCodecSettings `locationName:"codecSettings" type:"structure"` + + // Enable Insert color metadata (ColorMetadata) to include color metadata in + // this output. This setting is enabled by default. + ColorMetadata *string `locationName:"colorMetadata" type:"string" enum:"ColorMetadata"` + + // Applies only if your input aspect ratio is different from your output aspect + // ratio. Use Input cropping rectangle (Crop) to specify the video area the + // service will include in the output. This will crop the input source, causing + // video pixels to be removed on encode. If you crop your input frame size to + // smaller than your output frame size, make sure to specify the behavior you + // want in your output setting "Scaling behavior". + Crop *Rectangle `locationName:"crop" type:"structure"` + + // Applies only to 29.97 fps outputs. When this feature is enabled, the service + // will use drop-frame timecode on outputs. If it is not possible to use drop-frame + // timecode, the system will fall back to non-drop-frame. This setting is enabled + // by default when Timecode insertion (TimecodeInsertion) is enabled. + DropFrameTimecode *string `locationName:"dropFrameTimecode" type:"string" enum:"DropFrameTimecode"` + + // Applies only if you set AFD Signaling(AfdSignaling) to Fixed (FIXED). Use + // Fixed (FixedAfd) to specify a four-bit AFD value which the service will write + // on all frames of this video output. + FixedAfd *int64 `locationName:"fixedAfd" type:"integer"` + + // Use the Height (Height) setting to define the video resolution height for + // this output. Specify in pixels. If you don't provide a value here, the service + // will use the input height. + Height *int64 `locationName:"height" min:"32" type:"integer"` + + // Use Position (Position) to point to a rectangle object to define your position. + // This setting overrides any other aspect ratio. + Position *Rectangle `locationName:"position" type:"structure"` + + // Use Respond to AFD (RespondToAfd) to specify how the service changes the + // video itself in response to AFD values in the input. * Choose Respond to + // clip the input video frame according to the AFD value, input display aspect + // ratio, and output display aspect ratio. * Choose Passthrough to include the + // input AFD values. Do not choose this when AfdSignaling is set to (NONE). + // A preferred implementation of this workflow is to set RespondToAfd to (NONE) + // and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values + // from this output. + RespondToAfd *string `locationName:"respondToAfd" type:"string" enum:"RespondToAfd"` + + // Applies only if your input aspect ratio is different from your output aspect + // ratio. Choose "Stretch to output" to have the service stretch your video + // image to fit. Keep the setting "Default" to allow the service to letterbox + // your video instead. This setting overrides any positioning value you specify + // elsewhere in the job. + ScalingBehavior *string `locationName:"scalingBehavior" type:"string" enum:"ScalingBehavior"` + + // Use Sharpness (Sharpness)setting to specify the strength of anti-aliasing. + // This setting changes the width of the anti-alias filter kernel used for scaling. + // Sharpness only applies if your output resolution is different from your input + // resolution, and if you set Anti-alias (AntiAlias) to ENABLED. 0 is the softest + // setting, 100 the sharpest, and 50 recommended for most content. + Sharpness *int64 `locationName:"sharpness" type:"integer"` + + // Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode + // insertion when the input frame rate is identical to the output frame rate. + // To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) + // to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. + // When the service inserts timecodes in an output, by default, it uses any + // embedded timecodes from the input. If none are present, the service will + // set the timecode for the first output frame to zero. To change this default + // behavior, adjust the settings under Timecode configuration (TimecodeConfig). + // In the console, these settings are located under Job > Job settings > Timecode + // configuration. Note - Timecode source under input settings (InputTimecodeSource) + // does not affect the timecodes that are inserted in the output. Source under + // Job settings > Timecode configuration (TimecodeSource) does. + TimecodeInsertion *string `locationName:"timecodeInsertion" type:"string" enum:"VideoTimecodeInsertion"` + + // Find additional transcoding features under Preprocessors (VideoPreprocessors). + // Enable the features at each output individually. These features are disabled + // by default. + VideoPreprocessors *VideoPreprocessor `locationName:"videoPreprocessors" type:"structure"` + + // Use Width (Width) to define the video resolution width, in pixels, for this + // output. If you don't provide a value here, the service will use the input + // width. + Width *int64 `locationName:"width" min:"32" type:"integer"` +} + +// String returns the string representation +func (s VideoDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoDescription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VideoDescription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VideoDescription"} + if s.Height != nil && *s.Height < 32 { + invalidParams.Add(request.NewErrParamMinValue("Height", 32)) + } + if s.Width != nil && *s.Width < 32 { + invalidParams.Add(request.NewErrParamMinValue("Width", 32)) + } + if s.CodecSettings != nil { + if err := s.CodecSettings.Validate(); err != nil { + invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) + } + } + if s.Crop != nil { + if err := s.Crop.Validate(); err != nil { + invalidParams.AddNested("Crop", err.(request.ErrInvalidParams)) + } + } + if s.Position != nil { + if err := s.Position.Validate(); err != nil { + invalidParams.AddNested("Position", err.(request.ErrInvalidParams)) + } + } + if s.VideoPreprocessors != nil { + if err := s.VideoPreprocessors.Validate(); err != nil { + invalidParams.AddNested("VideoPreprocessors", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAfdSignaling sets the AfdSignaling field's value. +func (s *VideoDescription) SetAfdSignaling(v string) *VideoDescription { + s.AfdSignaling = &v + return s +} + +// SetAntiAlias sets the AntiAlias field's value. +func (s *VideoDescription) SetAntiAlias(v string) *VideoDescription { + s.AntiAlias = &v + return s +} + +// SetCodecSettings sets the CodecSettings field's value. +func (s *VideoDescription) SetCodecSettings(v *VideoCodecSettings) *VideoDescription { + s.CodecSettings = v + return s +} + +// SetColorMetadata sets the ColorMetadata field's value. +func (s *VideoDescription) SetColorMetadata(v string) *VideoDescription { + s.ColorMetadata = &v + return s +} + +// SetCrop sets the Crop field's value. +func (s *VideoDescription) SetCrop(v *Rectangle) *VideoDescription { + s.Crop = v + return s +} + +// SetDropFrameTimecode sets the DropFrameTimecode field's value. +func (s *VideoDescription) SetDropFrameTimecode(v string) *VideoDescription { + s.DropFrameTimecode = &v + return s +} + +// SetFixedAfd sets the FixedAfd field's value. +func (s *VideoDescription) SetFixedAfd(v int64) *VideoDescription { + s.FixedAfd = &v + return s +} + +// SetHeight sets the Height field's value. +func (s *VideoDescription) SetHeight(v int64) *VideoDescription { + s.Height = &v + return s +} + +// SetPosition sets the Position field's value. +func (s *VideoDescription) SetPosition(v *Rectangle) *VideoDescription { + s.Position = v + return s +} + +// SetRespondToAfd sets the RespondToAfd field's value. +func (s *VideoDescription) SetRespondToAfd(v string) *VideoDescription { + s.RespondToAfd = &v + return s +} + +// SetScalingBehavior sets the ScalingBehavior field's value. +func (s *VideoDescription) SetScalingBehavior(v string) *VideoDescription { + s.ScalingBehavior = &v + return s +} + +// SetSharpness sets the Sharpness field's value. +func (s *VideoDescription) SetSharpness(v int64) *VideoDescription { + s.Sharpness = &v + return s +} + +// SetTimecodeInsertion sets the TimecodeInsertion field's value. +func (s *VideoDescription) SetTimecodeInsertion(v string) *VideoDescription { + s.TimecodeInsertion = &v + return s +} + +// SetVideoPreprocessors sets the VideoPreprocessors field's value. +func (s *VideoDescription) SetVideoPreprocessors(v *VideoPreprocessor) *VideoDescription { + s.VideoPreprocessors = v + return s +} + +// SetWidth sets the Width field's value. +func (s *VideoDescription) SetWidth(v int64) *VideoDescription { + s.Width = &v + return s +} + +// Contains details about the output's video stream +type VideoDetail struct { + _ struct{} `type:"structure"` + + // Height in pixels for the output + HeightInPx *int64 `locationName:"heightInPx" type:"integer"` + + // Width in pixels for the output + WidthInPx *int64 `locationName:"widthInPx" type:"integer"` +} + +// String returns the string representation +func (s VideoDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoDetail) GoString() string { + return s.String() +} + +// SetHeightInPx sets the HeightInPx field's value. +func (s *VideoDetail) SetHeightInPx(v int64) *VideoDetail { + s.HeightInPx = &v + return s +} + +// SetWidthInPx sets the WidthInPx field's value. +func (s *VideoDetail) SetWidthInPx(v int64) *VideoDetail { + s.WidthInPx = &v + return s +} + +// Find additional transcoding features under Preprocessors (VideoPreprocessors). +// Enable the features at each output individually. These features are disabled +// by default. +type VideoPreprocessor struct { + _ struct{} `type:"structure"` + + // Enable the Color corrector (ColorCorrector) feature if necessary. Enable + // or disable this feature for each output individually. This setting is disabled + // by default. + ColorCorrector *ColorCorrector `locationName:"colorCorrector" type:"structure"` + + // Use Deinterlacer (Deinterlacer) to produce smoother motion and a clearer + // picture. + Deinterlacer *Deinterlacer `locationName:"deinterlacer" type:"structure"` + + // Enable the Image inserter (ImageInserter) feature to include a graphic overlay + // on your video. Enable or disable this feature for each output individually. + // This setting is disabled by default. + ImageInserter *ImageInserter `locationName:"imageInserter" type:"structure"` + + // Enable the Noise reducer (NoiseReducer) feature to remove noise from your + // video output if necessary. Enable or disable this feature for each output + // individually. This setting is disabled by default. + NoiseReducer *NoiseReducer `locationName:"noiseReducer" type:"structure"` + + // Timecode burn-in (TimecodeBurnIn)--Burns the output timecode and specified + // prefix into the output. + TimecodeBurnin *TimecodeBurnin `locationName:"timecodeBurnin" type:"structure"` +} + +// String returns the string representation +func (s VideoPreprocessor) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoPreprocessor) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VideoPreprocessor) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VideoPreprocessor"} + if s.ColorCorrector != nil { + if err := s.ColorCorrector.Validate(); err != nil { + invalidParams.AddNested("ColorCorrector", err.(request.ErrInvalidParams)) + } + } + if s.ImageInserter != nil { + if err := s.ImageInserter.Validate(); err != nil { + invalidParams.AddNested("ImageInserter", err.(request.ErrInvalidParams)) + } + } + if s.NoiseReducer != nil { + if err := s.NoiseReducer.Validate(); err != nil { + invalidParams.AddNested("NoiseReducer", err.(request.ErrInvalidParams)) + } + } + if s.TimecodeBurnin != nil { + if err := s.TimecodeBurnin.Validate(); err != nil { + invalidParams.AddNested("TimecodeBurnin", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetColorCorrector sets the ColorCorrector field's value. +func (s *VideoPreprocessor) SetColorCorrector(v *ColorCorrector) *VideoPreprocessor { + s.ColorCorrector = v + return s +} + +// SetDeinterlacer sets the Deinterlacer field's value. +func (s *VideoPreprocessor) SetDeinterlacer(v *Deinterlacer) *VideoPreprocessor { + s.Deinterlacer = v + return s +} + +// SetImageInserter sets the ImageInserter field's value. +func (s *VideoPreprocessor) SetImageInserter(v *ImageInserter) *VideoPreprocessor { + s.ImageInserter = v + return s +} + +// SetNoiseReducer sets the NoiseReducer field's value. +func (s *VideoPreprocessor) SetNoiseReducer(v *NoiseReducer) *VideoPreprocessor { + s.NoiseReducer = v + return s +} + +// SetTimecodeBurnin sets the TimecodeBurnin field's value. +func (s *VideoPreprocessor) SetTimecodeBurnin(v *TimecodeBurnin) *VideoPreprocessor { + s.TimecodeBurnin = v + return s +} + +// Selector for video. +type VideoSelector struct { + _ struct{} `type:"structure"` + + // If your input video has accurate color space metadata, or if you don't know + // about color space, leave this set to the default value FOLLOW. The service + // will automatically detect your input color space. If your input video has + // metadata indicating the wrong color space, or if your input video is missing + // color space metadata that should be there, specify the accurate color space + // here. If you choose HDR10, you can also correct inaccurate color space coefficients, + // using the HDR master display information controls. You must also set Color + // space usage (ColorSpaceUsage) to FORCE for the service to use these values. + ColorSpace *string `locationName:"colorSpace" type:"string" enum:"ColorSpace"` + + // There are two sources for color metadata, the input file and the job configuration + // (in the Color space and HDR master display informaiton settings). The Color + // space usage setting controls which takes precedence. FORCE: The system will + // use color metadata supplied by user, if any. If the user does not supply + // color metadata, the system will use data from the source. FALLBACK: The system + // will use color metadata from the source. If source has no color metadata, + // the system will use user-supplied color metadata values if available. + ColorSpaceUsage *string `locationName:"colorSpaceUsage" type:"string" enum:"ColorSpaceUsage"` + + // Use the "HDR master display information" (Hdr10Metadata) settings to correct + // HDR metadata or to provide missing metadata. These values vary depending + // on the input video and must be provided by a color grader. Range is 0 to + // 50,000; each increment represents 0.00002 in CIE1931 color coordinate. Note + // that these settings are not color correction. Note that if you are creating + // HDR outputs inside of an HLS CMAF package, to comply with the Apple specification, + // you must use the following settings. Set "MP4 packaging type" (writeMp4PackagingType) + // to HVC1 (HVC1). Set "Profile" (H265Settings > codecProfile) to Main10/High + // (MAIN10_HIGH). Set "Level" (H265Settings > codecLevel) to 5 (LEVEL_5). + Hdr10Metadata *Hdr10Metadata `locationName:"hdr10Metadata" type:"structure"` + + // Use PID (Pid) to select specific video data from an input file. Specify this + // value as an integer; the system automatically converts it to the hexidecimal + // value. For example, 257 selects PID 0x101. A PID, or packet identifier, is + // an identifier for a set of data in an MPEG-2 transport stream container. + Pid *int64 `locationName:"pid" min:"1" type:"integer"` + + // Selects a specific program from within a multi-program transport stream. + // Note that Quad 4K is not currently supported. + ProgramNumber *int64 `locationName:"programNumber" type:"integer"` +} + +// String returns the string representation +func (s VideoSelector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoSelector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VideoSelector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VideoSelector"} + if s.Pid != nil && *s.Pid < 1 { + invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) + } + if s.ProgramNumber != nil && *s.ProgramNumber < -2.147483648e+09 { + invalidParams.Add(request.NewErrParamMinValue("ProgramNumber", -2.147483648e+09)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetColorSpace sets the ColorSpace field's value. +func (s *VideoSelector) SetColorSpace(v string) *VideoSelector { + s.ColorSpace = &v + return s +} + +// SetColorSpaceUsage sets the ColorSpaceUsage field's value. +func (s *VideoSelector) SetColorSpaceUsage(v string) *VideoSelector { + s.ColorSpaceUsage = &v + return s +} + +// SetHdr10Metadata sets the Hdr10Metadata field's value. +func (s *VideoSelector) SetHdr10Metadata(v *Hdr10Metadata) *VideoSelector { + s.Hdr10Metadata = v + return s +} + +// SetPid sets the Pid field's value. +func (s *VideoSelector) SetPid(v int64) *VideoSelector { + s.Pid = &v + return s +} + +// SetProgramNumber sets the ProgramNumber field's value. +func (s *VideoSelector) SetProgramNumber(v int64) *VideoSelector { + s.ProgramNumber = &v + return s +} + +// Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to +// the value WAV. +type WavSettings struct { + _ struct{} `type:"structure"` + + // Specify Bit depth (BitDepth), in bits per sample, to choose the encoding + // quality for this audio track. + BitDepth *int64 `locationName:"bitDepth" min:"16" type:"integer"` + + // Set Channels to specify the number of channels in this output audio track. + // With WAV, valid values 1, 2, 4, and 8. In the console, these values are Mono, + // Stereo, 4-Channel, and 8-Channel, respectively. + Channels *int64 `locationName:"channels" min:"1" type:"integer"` + + // The service defaults to using RIFF for WAV outputs. If your output audio + // is likely to exceed 4 GB in file size, or if you otherwise need the extended + // support of the RF64 format, set your output WAV file format to RF64. + Format *string `locationName:"format" type:"string" enum:"WavFormat"` + + // Sample rate in Hz. + SampleRate *int64 `locationName:"sampleRate" min:"8000" type:"integer"` +} + +// String returns the string representation +func (s WavSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WavSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WavSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WavSettings"} + if s.BitDepth != nil && *s.BitDepth < 16 { + invalidParams.Add(request.NewErrParamMinValue("BitDepth", 16)) + } + if s.Channels != nil && *s.Channels < 1 { + invalidParams.Add(request.NewErrParamMinValue("Channels", 1)) + } + if s.SampleRate != nil && *s.SampleRate < 8000 { + invalidParams.Add(request.NewErrParamMinValue("SampleRate", 8000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBitDepth sets the BitDepth field's value. +func (s *WavSettings) SetBitDepth(v int64) *WavSettings { + s.BitDepth = &v + return s +} + +// SetChannels sets the Channels field's value. +func (s *WavSettings) SetChannels(v int64) *WavSettings { + s.Channels = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *WavSettings) SetFormat(v string) *WavSettings { + s.Format = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *WavSettings) SetSampleRate(v int64) *WavSettings { + s.SampleRate = &v + return s +} + +// Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio +// + audio description (AD) as a stereo pair. The value for AudioType will be +// set to 3, which signals to downstream systems that this stream contains "broadcaster +// mixed AD". Note that the input received by the encoder must contain pre-mixed +// audio; the encoder does not perform the mixing. When you choose BROADCASTER_MIXED_AD, +// the encoder ignores any values you provide in AudioType and FollowInputAudioType. +// Choose NORMAL when the input does not contain pre-mixed audio + audio description +// (AD). In this case, the encoder will use any values you provide for AudioType +// and FollowInputAudioType. +const ( + // AacAudioDescriptionBroadcasterMixBroadcasterMixedAd is a AacAudioDescriptionBroadcasterMix enum value + AacAudioDescriptionBroadcasterMixBroadcasterMixedAd = "BROADCASTER_MIXED_AD" + + // AacAudioDescriptionBroadcasterMixNormal is a AacAudioDescriptionBroadcasterMix enum value + AacAudioDescriptionBroadcasterMixNormal = "NORMAL" +) + +// AAC Profile. +const ( + // AacCodecProfileLc is a AacCodecProfile enum value + AacCodecProfileLc = "LC" + + // AacCodecProfileHev1 is a AacCodecProfile enum value + AacCodecProfileHev1 = "HEV1" + + // AacCodecProfileHev2 is a AacCodecProfile enum value + AacCodecProfileHev2 = "HEV2" +) + +// Mono (Audio Description), Mono, Stereo, or 5.1 channel layout. Valid values +// depend on rate control mode and profile. "1.0 - Audio Description (Receiver +// Mix)" setting receives a stereo description plus control track and emits +// a mono AAC encode of the description track, with control data emitted in +// the PES header as per ETSI TS 101 154 Annex E. +const ( + // AacCodingModeAdReceiverMix is a AacCodingMode enum value + AacCodingModeAdReceiverMix = "AD_RECEIVER_MIX" + + // AacCodingModeCodingMode10 is a AacCodingMode enum value + AacCodingModeCodingMode10 = "CODING_MODE_1_0" + + // AacCodingModeCodingMode11 is a AacCodingMode enum value + AacCodingModeCodingMode11 = "CODING_MODE_1_1" + + // AacCodingModeCodingMode20 is a AacCodingMode enum value + AacCodingModeCodingMode20 = "CODING_MODE_2_0" + + // AacCodingModeCodingMode51 is a AacCodingMode enum value + AacCodingModeCodingMode51 = "CODING_MODE_5_1" +) + +// Rate Control Mode. +const ( + // AacRateControlModeCbr is a AacRateControlMode enum value + AacRateControlModeCbr = "CBR" + + // AacRateControlModeVbr is a AacRateControlMode enum value + AacRateControlModeVbr = "VBR" +) + +// Enables LATM/LOAS AAC output. Note that if you use LATM/LOAS AAC in an output, +// you must choose "No container" for the output container. +const ( + // AacRawFormatLatmLoas is a AacRawFormat enum value + AacRawFormatLatmLoas = "LATM_LOAS" + + // AacRawFormatNone is a AacRawFormat enum value + AacRawFormatNone = "NONE" +) + +// Use MPEG-2 AAC instead of MPEG-4 AAC audio for raw or MPEG-2 Transport Stream +// containers. +const ( + // AacSpecificationMpeg2 is a AacSpecification enum value + AacSpecificationMpeg2 = "MPEG2" + + // AacSpecificationMpeg4 is a AacSpecification enum value + AacSpecificationMpeg4 = "MPEG4" +) + +// VBR Quality Level - Only used if rate_control_mode is VBR. +const ( + // AacVbrQualityLow is a AacVbrQuality enum value + AacVbrQualityLow = "LOW" + + // AacVbrQualityMediumLow is a AacVbrQuality enum value + AacVbrQualityMediumLow = "MEDIUM_LOW" + + // AacVbrQualityMediumHigh is a AacVbrQuality enum value + AacVbrQualityMediumHigh = "MEDIUM_HIGH" + + // AacVbrQualityHigh is a AacVbrQuality enum value + AacVbrQualityHigh = "HIGH" +) + +// Specifies the "Bitstream Mode" (bsmod) for the emitted AC-3 stream. See ATSC +// A/52-2012 for background on these values. +const ( + // Ac3BitstreamModeCompleteMain is a Ac3BitstreamMode enum value + Ac3BitstreamModeCompleteMain = "COMPLETE_MAIN" + + // Ac3BitstreamModeCommentary is a Ac3BitstreamMode enum value + Ac3BitstreamModeCommentary = "COMMENTARY" + + // Ac3BitstreamModeDialogue is a Ac3BitstreamMode enum value + Ac3BitstreamModeDialogue = "DIALOGUE" + + // Ac3BitstreamModeEmergency is a Ac3BitstreamMode enum value + Ac3BitstreamModeEmergency = "EMERGENCY" + + // Ac3BitstreamModeHearingImpaired is a Ac3BitstreamMode enum value + Ac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" + + // Ac3BitstreamModeMusicAndEffects is a Ac3BitstreamMode enum value + Ac3BitstreamModeMusicAndEffects = "MUSIC_AND_EFFECTS" + + // Ac3BitstreamModeVisuallyImpaired is a Ac3BitstreamMode enum value + Ac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" + + // Ac3BitstreamModeVoiceOver is a Ac3BitstreamMode enum value + Ac3BitstreamModeVoiceOver = "VOICE_OVER" +) + +// Dolby Digital coding mode. Determines number of channels. +const ( + // Ac3CodingModeCodingMode10 is a Ac3CodingMode enum value + Ac3CodingModeCodingMode10 = "CODING_MODE_1_0" + + // Ac3CodingModeCodingMode11 is a Ac3CodingMode enum value + Ac3CodingModeCodingMode11 = "CODING_MODE_1_1" + + // Ac3CodingModeCodingMode20 is a Ac3CodingMode enum value + Ac3CodingModeCodingMode20 = "CODING_MODE_2_0" + + // Ac3CodingModeCodingMode32Lfe is a Ac3CodingMode enum value + Ac3CodingModeCodingMode32Lfe = "CODING_MODE_3_2_LFE" +) + +// If set to FILM_STANDARD, adds dynamic range compression signaling to the +// output bitstream as defined in the Dolby Digital specification. +const ( + // Ac3DynamicRangeCompressionProfileFilmStandard is a Ac3DynamicRangeCompressionProfile enum value + Ac3DynamicRangeCompressionProfileFilmStandard = "FILM_STANDARD" + + // Ac3DynamicRangeCompressionProfileNone is a Ac3DynamicRangeCompressionProfile enum value + Ac3DynamicRangeCompressionProfileNone = "NONE" +) + +// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only +// valid with 3_2_LFE coding mode. +const ( + // Ac3LfeFilterEnabled is a Ac3LfeFilter enum value + Ac3LfeFilterEnabled = "ENABLED" + + // Ac3LfeFilterDisabled is a Ac3LfeFilter enum value + Ac3LfeFilterDisabled = "DISABLED" +) + +// When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, +// or DolbyE decoder that supplied this audio data. If audio was not supplied +// from one of these streams, then the static metadata settings will be used. +const ( + // Ac3MetadataControlFollowInput is a Ac3MetadataControl enum value + Ac3MetadataControlFollowInput = "FOLLOW_INPUT" + + // Ac3MetadataControlUseConfigured is a Ac3MetadataControl enum value + Ac3MetadataControlUseConfigured = "USE_CONFIGURED" +) + +// Acceleration configuration for the job. +const ( + // AccelerationModeDisabled is a AccelerationMode enum value + AccelerationModeDisabled = "DISABLED" + + // AccelerationModeEnabled is a AccelerationMode enum value + AccelerationModeEnabled = "ENABLED" +) + +// This setting only applies to H.264, H.265, and MPEG2 outputs. Use Insert +// AFD signaling (AfdSignaling) to specify whether the service includes AFD +// values in the output video data and what those values are. * Choose None +// to remove all AFD values from this output. * Choose Fixed to ignore input +// AFD values and instead encode the value specified in the job. * Choose Auto +// to calculate output AFD values based on the input AFD scaler data. +const ( + // AfdSignalingNone is a AfdSignaling enum value + AfdSignalingNone = "NONE" + + // AfdSignalingAuto is a AfdSignaling enum value + AfdSignalingAuto = "AUTO" + + // AfdSignalingFixed is a AfdSignaling enum value + AfdSignalingFixed = "FIXED" +) + +// Enable Anti-alias (AntiAlias) to enhance sharp edges in video output when +// your input resolution is much larger than your output resolution. Default +// is enabled. +const ( + // AntiAliasDisabled is a AntiAlias enum value + AntiAliasDisabled = "DISABLED" + + // AntiAliasEnabled is a AntiAlias enum value + AntiAliasEnabled = "ENABLED" +) + +// Type of Audio codec. +const ( + // AudioCodecAac is a AudioCodec enum value + AudioCodecAac = "AAC" + + // AudioCodecMp2 is a AudioCodec enum value + AudioCodecMp2 = "MP2" + + // AudioCodecWav is a AudioCodec enum value + AudioCodecWav = "WAV" + + // AudioCodecAiff is a AudioCodec enum value + AudioCodecAiff = "AIFF" + + // AudioCodecAc3 is a AudioCodec enum value + AudioCodecAc3 = "AC3" + + // AudioCodecEac3 is a AudioCodec enum value + AudioCodecEac3 = "EAC3" + + // AudioCodecPassthrough is a AudioCodec enum value + AudioCodecPassthrough = "PASSTHROUGH" +) + +// Enable this setting on one audio selector to set it as the default for the +// job. The service uses this default for outputs where it can't find the specified +// input audio. If you don't set a default, those outputs have no audio. +const ( + // AudioDefaultSelectionDefault is a AudioDefaultSelection enum value + AudioDefaultSelectionDefault = "DEFAULT" + + // AudioDefaultSelectionNotDefault is a AudioDefaultSelection enum value + AudioDefaultSelectionNotDefault = "NOT_DEFAULT" +) + +// Choosing FOLLOW_INPUT will cause the ISO 639 language code of the output +// to follow the ISO 639 language code of the input. The language specified +// for languageCode' will be used when USE_CONFIGURED is selected or when FOLLOW_INPUT +// is selected but there is no ISO 639 language code specified by the input. +const ( + // AudioLanguageCodeControlFollowInput is a AudioLanguageCodeControl enum value + AudioLanguageCodeControlFollowInput = "FOLLOW_INPUT" + + // AudioLanguageCodeControlUseConfigured is a AudioLanguageCodeControl enum value + AudioLanguageCodeControlUseConfigured = "USE_CONFIGURED" +) + +// Audio normalization algorithm to use. 1770-1 conforms to the CALM Act specification, +// 1770-2 conforms to the EBU R-128 specification. +const ( + // AudioNormalizationAlgorithmItuBs17701 is a AudioNormalizationAlgorithm enum value + AudioNormalizationAlgorithmItuBs17701 = "ITU_BS_1770_1" + + // AudioNormalizationAlgorithmItuBs17702 is a AudioNormalizationAlgorithm enum value + AudioNormalizationAlgorithmItuBs17702 = "ITU_BS_1770_2" +) + +// When enabled the output audio is corrected using the chosen algorithm. If +// disabled, the audio will be measured but not adjusted. +const ( + // AudioNormalizationAlgorithmControlCorrectAudio is a AudioNormalizationAlgorithmControl enum value + AudioNormalizationAlgorithmControlCorrectAudio = "CORRECT_AUDIO" + + // AudioNormalizationAlgorithmControlMeasureOnly is a AudioNormalizationAlgorithmControl enum value + AudioNormalizationAlgorithmControlMeasureOnly = "MEASURE_ONLY" +) + +// If set to LOG, log each output's audio track loudness to a CSV file. +const ( + // AudioNormalizationLoudnessLoggingLog is a AudioNormalizationLoudnessLogging enum value + AudioNormalizationLoudnessLoggingLog = "LOG" + + // AudioNormalizationLoudnessLoggingDontLog is a AudioNormalizationLoudnessLogging enum value + AudioNormalizationLoudnessLoggingDontLog = "DONT_LOG" +) + +// If set to TRUE_PEAK, calculate and log the TruePeak for each output's audio +// track loudness. +const ( + // AudioNormalizationPeakCalculationTruePeak is a AudioNormalizationPeakCalculation enum value + AudioNormalizationPeakCalculationTruePeak = "TRUE_PEAK" + + // AudioNormalizationPeakCalculationNone is a AudioNormalizationPeakCalculation enum value + AudioNormalizationPeakCalculationNone = "NONE" +) + +// Specifies the type of the audio selector. +const ( + // AudioSelectorTypePid is a AudioSelectorType enum value + AudioSelectorTypePid = "PID" + + // AudioSelectorTypeTrack is a AudioSelectorType enum value + AudioSelectorTypeTrack = "TRACK" + + // AudioSelectorTypeLanguageCode is a AudioSelectorType enum value + AudioSelectorTypeLanguageCode = "LANGUAGE_CODE" +) + +// When set to FOLLOW_INPUT, if the input contains an ISO 639 audio_type, then +// that value is passed through to the output. If the input contains no ISO +// 639 audio_type, the value in Audio Type is included in the output. Otherwise +// the value in Audio Type is included in the output. Note that this field and +// audioType are both ignored if audioDescriptionBroadcasterMix is set to BROADCASTER_MIXED_AD. +const ( + // AudioTypeControlFollowInput is a AudioTypeControl enum value + AudioTypeControlFollowInput = "FOLLOW_INPUT" + + // AudioTypeControlUseConfigured is a AudioTypeControl enum value + AudioTypeControlUseConfigured = "USE_CONFIGURED" +) + +// Optional. Choose a tag type that AWS Billing and Cost Management will use +// to sort your AWS Elemental MediaConvert costs on any billing report that +// you set up. Any transcoding outputs that don't have an associated tag will +// appear in your billing report unsorted. If you don't choose a valid value +// for this field, your job outputs will appear on the billing report unsorted. +const ( + // BillingTagsSourceQueue is a BillingTagsSource enum value + BillingTagsSourceQueue = "QUEUE" + + // BillingTagsSourcePreset is a BillingTagsSource enum value + BillingTagsSourcePreset = "PRESET" + + // BillingTagsSourceJobTemplate is a BillingTagsSource enum value + BillingTagsSourceJobTemplate = "JOB_TEMPLATE" +) + +// If no explicit x_position or y_position is provided, setting alignment to +// centered will place the captions at the bottom center of the output. Similarly, +// setting a left alignment will align captions to the bottom left of the output. +// If x and y positions are given in conjunction with the alignment parameter, +// the font will be justified (either left or centered) relative to those coordinates. +// This option is not valid for source captions that are STL, 608/embedded or +// teletext. These source settings are already pre-defined by the caption stream. +// All burn-in and DVB-Sub font settings must match. +const ( + // BurninSubtitleAlignmentCentered is a BurninSubtitleAlignment enum value + BurninSubtitleAlignmentCentered = "CENTERED" + + // BurninSubtitleAlignmentLeft is a BurninSubtitleAlignment enum value + BurninSubtitleAlignmentLeft = "LEFT" +) + +// Specifies the color of the rectangle behind the captions.All burn-in and +// DVB-Sub font settings must match. +const ( + // BurninSubtitleBackgroundColorNone is a BurninSubtitleBackgroundColor enum value + BurninSubtitleBackgroundColorNone = "NONE" + + // BurninSubtitleBackgroundColorBlack is a BurninSubtitleBackgroundColor enum value + BurninSubtitleBackgroundColorBlack = "BLACK" + + // BurninSubtitleBackgroundColorWhite is a BurninSubtitleBackgroundColor enum value + BurninSubtitleBackgroundColorWhite = "WHITE" +) + +// Specifies the color of the burned-in captions. This option is not valid for +// source captions that are STL, 608/embedded or teletext. These source settings +// are already pre-defined by the caption stream. All burn-in and DVB-Sub font +// settings must match. +const ( + // BurninSubtitleFontColorWhite is a BurninSubtitleFontColor enum value + BurninSubtitleFontColorWhite = "WHITE" + + // BurninSubtitleFontColorBlack is a BurninSubtitleFontColor enum value + BurninSubtitleFontColorBlack = "BLACK" + + // BurninSubtitleFontColorYellow is a BurninSubtitleFontColor enum value + BurninSubtitleFontColorYellow = "YELLOW" + + // BurninSubtitleFontColorRed is a BurninSubtitleFontColor enum value + BurninSubtitleFontColorRed = "RED" + + // BurninSubtitleFontColorGreen is a BurninSubtitleFontColor enum value + BurninSubtitleFontColorGreen = "GREEN" + + // BurninSubtitleFontColorBlue is a BurninSubtitleFontColor enum value + BurninSubtitleFontColorBlue = "BLUE" +) + +// Specifies font outline color. This option is not valid for source captions +// that are either 608/embedded or teletext. These source settings are already +// pre-defined by the caption stream. All burn-in and DVB-Sub font settings +// must match. +const ( + // BurninSubtitleOutlineColorBlack is a BurninSubtitleOutlineColor enum value + BurninSubtitleOutlineColorBlack = "BLACK" + + // BurninSubtitleOutlineColorWhite is a BurninSubtitleOutlineColor enum value + BurninSubtitleOutlineColorWhite = "WHITE" + + // BurninSubtitleOutlineColorYellow is a BurninSubtitleOutlineColor enum value + BurninSubtitleOutlineColorYellow = "YELLOW" + + // BurninSubtitleOutlineColorRed is a BurninSubtitleOutlineColor enum value + BurninSubtitleOutlineColorRed = "RED" + + // BurninSubtitleOutlineColorGreen is a BurninSubtitleOutlineColor enum value + BurninSubtitleOutlineColorGreen = "GREEN" + + // BurninSubtitleOutlineColorBlue is a BurninSubtitleOutlineColor enum value + BurninSubtitleOutlineColorBlue = "BLUE" +) + +// Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub +// font settings must match. +const ( + // BurninSubtitleShadowColorNone is a BurninSubtitleShadowColor enum value + BurninSubtitleShadowColorNone = "NONE" + + // BurninSubtitleShadowColorBlack is a BurninSubtitleShadowColor enum value + BurninSubtitleShadowColorBlack = "BLACK" + + // BurninSubtitleShadowColorWhite is a BurninSubtitleShadowColor enum value + BurninSubtitleShadowColorWhite = "WHITE" +) + +// Only applies to jobs with input captions in Teletext or STL formats. Specify +// whether the spacing between letters in your captions is set by the captions +// grid or varies depending on letter width. Choose fixed grid to conform to +// the spacing specified in the captions file more accurately. Choose proportional +// to make the text easier to read if the captions are closed caption. +const ( + // BurninSubtitleTeletextSpacingFixedGrid is a BurninSubtitleTeletextSpacing enum value + BurninSubtitleTeletextSpacingFixedGrid = "FIXED_GRID" + + // BurninSubtitleTeletextSpacingProportional is a BurninSubtitleTeletextSpacing enum value + BurninSubtitleTeletextSpacingProportional = "PROPORTIONAL" +) + +// Specify the format for this set of captions on this output. The default format +// is embedded without SCTE-20. Other options are embedded with SCTE-20, burn-in, +// DVB-sub, SCC, SRT, teletext, TTML, and web-VTT. If you are using SCTE-20, +// choose SCTE-20 plus embedded (SCTE20_PLUS_EMBEDDED) to create an output that +// complies with the SCTE-43 spec. To create a non-compliant output where the +// embedded captions come first, choose Embedded plus SCTE-20 (EMBEDDED_PLUS_SCTE20). +const ( + // CaptionDestinationTypeBurnIn is a CaptionDestinationType enum value + CaptionDestinationTypeBurnIn = "BURN_IN" + + // CaptionDestinationTypeDvbSub is a CaptionDestinationType enum value + CaptionDestinationTypeDvbSub = "DVB_SUB" + + // CaptionDestinationTypeEmbedded is a CaptionDestinationType enum value + CaptionDestinationTypeEmbedded = "EMBEDDED" + + // CaptionDestinationTypeEmbeddedPlusScte20 is a CaptionDestinationType enum value + CaptionDestinationTypeEmbeddedPlusScte20 = "EMBEDDED_PLUS_SCTE20" + + // CaptionDestinationTypeScte20PlusEmbedded is a CaptionDestinationType enum value + CaptionDestinationTypeScte20PlusEmbedded = "SCTE20_PLUS_EMBEDDED" + + // CaptionDestinationTypeScc is a CaptionDestinationType enum value + CaptionDestinationTypeScc = "SCC" + + // CaptionDestinationTypeSrt is a CaptionDestinationType enum value + CaptionDestinationTypeSrt = "SRT" + + // CaptionDestinationTypeSmi is a CaptionDestinationType enum value + CaptionDestinationTypeSmi = "SMI" + + // CaptionDestinationTypeTeletext is a CaptionDestinationType enum value + CaptionDestinationTypeTeletext = "TELETEXT" + + // CaptionDestinationTypeTtml is a CaptionDestinationType enum value + CaptionDestinationTypeTtml = "TTML" + + // CaptionDestinationTypeWebvtt is a CaptionDestinationType enum value + CaptionDestinationTypeWebvtt = "WEBVTT" +) + +// Use Source (SourceType) to identify the format of your input captions. The +// service cannot auto-detect caption format. +const ( + // CaptionSourceTypeAncillary is a CaptionSourceType enum value + CaptionSourceTypeAncillary = "ANCILLARY" + + // CaptionSourceTypeDvbSub is a CaptionSourceType enum value + CaptionSourceTypeDvbSub = "DVB_SUB" + + // CaptionSourceTypeEmbedded is a CaptionSourceType enum value + CaptionSourceTypeEmbedded = "EMBEDDED" + + // CaptionSourceTypeScte20 is a CaptionSourceType enum value + CaptionSourceTypeScte20 = "SCTE20" + + // CaptionSourceTypeScc is a CaptionSourceType enum value + CaptionSourceTypeScc = "SCC" + + // CaptionSourceTypeTtml is a CaptionSourceType enum value + CaptionSourceTypeTtml = "TTML" + + // CaptionSourceTypeStl is a CaptionSourceType enum value + CaptionSourceTypeStl = "STL" + + // CaptionSourceTypeSrt is a CaptionSourceType enum value + CaptionSourceTypeSrt = "SRT" + + // CaptionSourceTypeSmi is a CaptionSourceType enum value + CaptionSourceTypeSmi = "SMI" + + // CaptionSourceTypeTeletext is a CaptionSourceType enum value + CaptionSourceTypeTeletext = "TELETEXT" + + // CaptionSourceTypeNullSource is a CaptionSourceType enum value + CaptionSourceTypeNullSource = "NULL_SOURCE" + + // CaptionSourceTypeImsc is a CaptionSourceType enum value + CaptionSourceTypeImsc = "IMSC" +) + +// When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client +// from saving media segments for later replay. +const ( + // CmafClientCacheDisabled is a CmafClientCache enum value + CmafClientCacheDisabled = "DISABLED" + + // CmafClientCacheEnabled is a CmafClientCache enum value + CmafClientCacheEnabled = "ENABLED" +) + +// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist +// generation. +const ( + // CmafCodecSpecificationRfc6381 is a CmafCodecSpecification enum value + CmafCodecSpecificationRfc6381 = "RFC_6381" + + // CmafCodecSpecificationRfc4281 is a CmafCodecSpecification enum value + CmafCodecSpecificationRfc4281 = "RFC_4281" +) + +// Encrypts the segments with the given encryption scheme. Leave blank to disable. +// Selecting 'Disabled' in the web interface also disables encryption. +const ( + // CmafEncryptionTypeSampleAes is a CmafEncryptionType enum value + CmafEncryptionTypeSampleAes = "SAMPLE_AES" +) + +// The Initialization Vector is a 128-bit number used in conjunction with the +// key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed +// in the manifest. Otherwise Initialization Vector is not in the manifest. +const ( + // CmafInitializationVectorInManifestInclude is a CmafInitializationVectorInManifest enum value + CmafInitializationVectorInManifestInclude = "INCLUDE" + + // CmafInitializationVectorInManifestExclude is a CmafInitializationVectorInManifest enum value + CmafInitializationVectorInManifestExclude = "EXCLUDE" +) + +// Indicates which type of key provider is used for encryption. +const ( + // CmafKeyProviderTypeStaticKey is a CmafKeyProviderType enum value + CmafKeyProviderTypeStaticKey = "STATIC_KEY" +) + +// When set to GZIP, compresses HLS playlist. +const ( + // CmafManifestCompressionGzip is a CmafManifestCompression enum value + CmafManifestCompressionGzip = "GZIP" + + // CmafManifestCompressionNone is a CmafManifestCompression enum value + CmafManifestCompressionNone = "NONE" +) + +// Indicates whether the output manifest should use floating point values for +// segment duration. +const ( + // CmafManifestDurationFormatFloatingPoint is a CmafManifestDurationFormat enum value + CmafManifestDurationFormatFloatingPoint = "FLOATING_POINT" + + // CmafManifestDurationFormatInteger is a CmafManifestDurationFormat enum value + CmafManifestDurationFormatInteger = "INTEGER" +) + +// When set to SINGLE_FILE, a single output file is generated, which is internally +// segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, +// separate segment files will be created. +const ( + // CmafSegmentControlSingleFile is a CmafSegmentControl enum value + CmafSegmentControlSingleFile = "SINGLE_FILE" + + // CmafSegmentControlSegmentedFiles is a CmafSegmentControl enum value + CmafSegmentControlSegmentedFiles = "SEGMENTED_FILES" +) + +// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag +// of variant manifest. +const ( + // CmafStreamInfResolutionInclude is a CmafStreamInfResolution enum value + CmafStreamInfResolutionInclude = "INCLUDE" + + // CmafStreamInfResolutionExclude is a CmafStreamInfResolution enum value + CmafStreamInfResolutionExclude = "EXCLUDE" +) + +// When set to ENABLED, a DASH MPD manifest will be generated for this output. +const ( + // CmafWriteDASHManifestDisabled is a CmafWriteDASHManifest enum value + CmafWriteDASHManifestDisabled = "DISABLED" + + // CmafWriteDASHManifestEnabled is a CmafWriteDASHManifest enum value + CmafWriteDASHManifestEnabled = "ENABLED" +) + +// When set to ENABLED, an Apple HLS manifest will be generated for this output. +const ( + // CmafWriteHLSManifestDisabled is a CmafWriteHLSManifest enum value + CmafWriteHLSManifestDisabled = "DISABLED" + + // CmafWriteHLSManifestEnabled is a CmafWriteHLSManifest enum value + CmafWriteHLSManifestEnabled = "ENABLED" +) + +// Enable Insert color metadata (ColorMetadata) to include color metadata in +// this output. This setting is enabled by default. +const ( + // ColorMetadataIgnore is a ColorMetadata enum value + ColorMetadataIgnore = "IGNORE" + + // ColorMetadataInsert is a ColorMetadata enum value + ColorMetadataInsert = "INSERT" +) + +// If your input video has accurate color space metadata, or if you don't know +// about color space, leave this set to the default value FOLLOW. The service +// will automatically detect your input color space. If your input video has +// metadata indicating the wrong color space, or if your input video is missing +// color space metadata that should be there, specify the accurate color space +// here. If you choose HDR10, you can also correct inaccurate color space coefficients, +// using the HDR master display information controls. You must also set Color +// space usage (ColorSpaceUsage) to FORCE for the service to use these values. +const ( + // ColorSpaceFollow is a ColorSpace enum value + ColorSpaceFollow = "FOLLOW" + + // ColorSpaceRec601 is a ColorSpace enum value + ColorSpaceRec601 = "REC_601" + + // ColorSpaceRec709 is a ColorSpace enum value + ColorSpaceRec709 = "REC_709" + + // ColorSpaceHdr10 is a ColorSpace enum value + ColorSpaceHdr10 = "HDR10" + + // ColorSpaceHlg2020 is a ColorSpace enum value + ColorSpaceHlg2020 = "HLG_2020" +) + +// Determines if colorspace conversion will be performed. If set to _None_, +// no conversion will be performed. If _Force 601_ or _Force 709_ are selected, +// conversion will be performed for inputs with differing colorspaces. An input's +// colorspace can be specified explicitly in the "Video Selector":#inputs-video_selector +// if necessary. +const ( + // ColorSpaceConversionNone is a ColorSpaceConversion enum value + ColorSpaceConversionNone = "NONE" + + // ColorSpaceConversionForce601 is a ColorSpaceConversion enum value + ColorSpaceConversionForce601 = "FORCE_601" + + // ColorSpaceConversionForce709 is a ColorSpaceConversion enum value + ColorSpaceConversionForce709 = "FORCE_709" + + // ColorSpaceConversionForceHdr10 is a ColorSpaceConversion enum value + ColorSpaceConversionForceHdr10 = "FORCE_HDR10" + + // ColorSpaceConversionForceHlg2020 is a ColorSpaceConversion enum value + ColorSpaceConversionForceHlg2020 = "FORCE_HLG_2020" +) + +// There are two sources for color metadata, the input file and the job configuration +// (in the Color space and HDR master display informaiton settings). The Color +// space usage setting controls which takes precedence. FORCE: The system will +// use color metadata supplied by user, if any. If the user does not supply +// color metadata, the system will use data from the source. FALLBACK: The system +// will use color metadata from the source. If source has no color metadata, +// the system will use user-supplied color metadata values if available. +const ( + // ColorSpaceUsageForce is a ColorSpaceUsage enum value + ColorSpaceUsageForce = "FORCE" + + // ColorSpaceUsageFallback is a ColorSpaceUsage enum value + ColorSpaceUsageFallback = "FALLBACK" +) + +// The length of the term of your reserved queue pricing plan commitment. +const ( + // CommitmentOneYear is a Commitment enum value + CommitmentOneYear = "ONE_YEAR" +) + +// Container for this output. Some containers require a container settings object. +// If not specified, the default object will be created. +const ( + // ContainerTypeF4v is a ContainerType enum value + ContainerTypeF4v = "F4V" + + // ContainerTypeIsmv is a ContainerType enum value + ContainerTypeIsmv = "ISMV" + + // ContainerTypeM2ts is a ContainerType enum value + ContainerTypeM2ts = "M2TS" + + // ContainerTypeM3u8 is a ContainerType enum value + ContainerTypeM3u8 = "M3U8" + + // ContainerTypeCmfc is a ContainerType enum value + ContainerTypeCmfc = "CMFC" + + // ContainerTypeMov is a ContainerType enum value + ContainerTypeMov = "MOV" + + // ContainerTypeMp4 is a ContainerType enum value + ContainerTypeMp4 = "MP4" + + // ContainerTypeMpd is a ContainerType enum value + ContainerTypeMpd = "MPD" + + // ContainerTypeMxf is a ContainerType enum value + ContainerTypeMxf = "MXF" + + // ContainerTypeRaw is a ContainerType enum value + ContainerTypeRaw = "RAW" +) + +// Supports HbbTV specification as indicated +const ( + // DashIsoHbbtvComplianceHbbtv15 is a DashIsoHbbtvCompliance enum value + DashIsoHbbtvComplianceHbbtv15 = "HBBTV_1_5" + + // DashIsoHbbtvComplianceNone is a DashIsoHbbtvCompliance enum value + DashIsoHbbtvComplianceNone = "NONE" +) + +// When set to SINGLE_FILE, a single output file is generated, which is internally +// segmented using the Fragment Length and Segment Length. When set to SEGMENTED_FILES, +// separate segment files will be created. +const ( + // DashIsoSegmentControlSingleFile is a DashIsoSegmentControl enum value + DashIsoSegmentControlSingleFile = "SINGLE_FILE" + + // DashIsoSegmentControlSegmentedFiles is a DashIsoSegmentControl enum value + DashIsoSegmentControlSegmentedFiles = "SEGMENTED_FILES" +) + +// When you enable Precise segment duration in manifests (writeSegmentTimelineInRepresentation), +// your DASH manifest shows precise segment durations. The segment duration +// information appears inside the SegmentTimeline element, inside SegmentTemplate +// at the Representation level. When this feature isn't enabled, the segment +// durations in your DASH manifest are approximate. The segment duration information +// appears in the duration attribute of the SegmentTemplate element. +const ( + // DashIsoWriteSegmentTimelineInRepresentationEnabled is a DashIsoWriteSegmentTimelineInRepresentation enum value + DashIsoWriteSegmentTimelineInRepresentationEnabled = "ENABLED" + + // DashIsoWriteSegmentTimelineInRepresentationDisabled is a DashIsoWriteSegmentTimelineInRepresentation enum value + DashIsoWriteSegmentTimelineInRepresentationDisabled = "DISABLED" +) + +// This specifies how the encrypted file needs to be decrypted. +const ( + // DecryptionModeAesCtr is a DecryptionMode enum value + DecryptionModeAesCtr = "AES_CTR" + + // DecryptionModeAesCbc is a DecryptionMode enum value + DecryptionModeAesCbc = "AES_CBC" + + // DecryptionModeAesGcm is a DecryptionMode enum value + DecryptionModeAesGcm = "AES_GCM" +) + +// Only applies when you set Deinterlacer (DeinterlaceMode) to Deinterlace (DEINTERLACE) +// or Adaptive (ADAPTIVE). Motion adaptive interpolate (INTERPOLATE) produces +// sharper pictures, while blend (BLEND) produces smoother motion. Use (INTERPOLATE_TICKER) +// OR (BLEND_TICKER) if your source file includes a ticker, such as a scrolling +// headline at the bottom of the frame. +const ( + // DeinterlaceAlgorithmInterpolate is a DeinterlaceAlgorithm enum value + DeinterlaceAlgorithmInterpolate = "INTERPOLATE" + + // DeinterlaceAlgorithmInterpolateTicker is a DeinterlaceAlgorithm enum value + DeinterlaceAlgorithmInterpolateTicker = "INTERPOLATE_TICKER" + + // DeinterlaceAlgorithmBlend is a DeinterlaceAlgorithm enum value + DeinterlaceAlgorithmBlend = "BLEND" + + // DeinterlaceAlgorithmBlendTicker is a DeinterlaceAlgorithm enum value + DeinterlaceAlgorithmBlendTicker = "BLEND_TICKER" +) + +// - When set to NORMAL (default), the deinterlacer does not convert frames +// that are tagged in metadata as progressive. It will only convert those that +// are tagged as some other type. - When set to FORCE_ALL_FRAMES, the deinterlacer +// converts every frame to progressive - even those that are already tagged +// as progressive. Turn Force mode on only if there is a good chance that the +// metadata has tagged frames as progressive when they are not progressive. +// Do not turn on otherwise; processing frames that are already progressive +// into progressive will probably result in lower quality video. +const ( + // DeinterlacerControlForceAllFrames is a DeinterlacerControl enum value + DeinterlacerControlForceAllFrames = "FORCE_ALL_FRAMES" + + // DeinterlacerControlNormal is a DeinterlacerControl enum value + DeinterlacerControlNormal = "NORMAL" +) + +// Use Deinterlacer (DeinterlaceMode) to choose how the service will do deinterlacing. +// Default is Deinterlace. - Deinterlace converts interlaced to progressive. +// - Inverse telecine converts Hard Telecine 29.97i to progressive 23.976p. +// - Adaptive auto-detects and converts to progressive. +const ( + // DeinterlacerModeDeinterlace is a DeinterlacerMode enum value + DeinterlacerModeDeinterlace = "DEINTERLACE" + + // DeinterlacerModeInverseTelecine is a DeinterlacerMode enum value + DeinterlacerModeInverseTelecine = "INVERSE_TELECINE" + + // DeinterlacerModeAdaptive is a DeinterlacerMode enum value + DeinterlacerModeAdaptive = "ADAPTIVE" +) + +// Optional field, defaults to DEFAULT. Specify DEFAULT for this operation to +// return your endpoints if any exist, or to create an endpoint for you and +// return it if one doesn't already exist. Specify GET_ONLY to return your endpoints +// if any exist, or an empty list if none exist. +const ( + // DescribeEndpointsModeDefault is a DescribeEndpointsMode enum value + DescribeEndpointsModeDefault = "DEFAULT" + + // DescribeEndpointsModeGetOnly is a DescribeEndpointsMode enum value + DescribeEndpointsModeGetOnly = "GET_ONLY" +) + +// Applies only to 29.97 fps outputs. When this feature is enabled, the service +// will use drop-frame timecode on outputs. If it is not possible to use drop-frame +// timecode, the system will fall back to non-drop-frame. This setting is enabled +// by default when Timecode insertion (TimecodeInsertion) is enabled. +const ( + // DropFrameTimecodeDisabled is a DropFrameTimecode enum value + DropFrameTimecodeDisabled = "DISABLED" + + // DropFrameTimecodeEnabled is a DropFrameTimecode enum value + DropFrameTimecodeEnabled = "ENABLED" +) + +// If no explicit x_position or y_position is provided, setting alignment to +// centered will place the captions at the bottom center of the output. Similarly, +// setting a left alignment will align captions to the bottom left of the output. +// If x and y positions are given in conjunction with the alignment parameter, +// the font will be justified (either left or centered) relative to those coordinates. +// This option is not valid for source captions that are STL, 608/embedded or +// teletext. These source settings are already pre-defined by the caption stream. +// All burn-in and DVB-Sub font settings must match. +const ( + // DvbSubtitleAlignmentCentered is a DvbSubtitleAlignment enum value + DvbSubtitleAlignmentCentered = "CENTERED" + + // DvbSubtitleAlignmentLeft is a DvbSubtitleAlignment enum value + DvbSubtitleAlignmentLeft = "LEFT" +) + +// Specifies the color of the rectangle behind the captions.All burn-in and +// DVB-Sub font settings must match. +const ( + // DvbSubtitleBackgroundColorNone is a DvbSubtitleBackgroundColor enum value + DvbSubtitleBackgroundColorNone = "NONE" + + // DvbSubtitleBackgroundColorBlack is a DvbSubtitleBackgroundColor enum value + DvbSubtitleBackgroundColorBlack = "BLACK" + + // DvbSubtitleBackgroundColorWhite is a DvbSubtitleBackgroundColor enum value + DvbSubtitleBackgroundColorWhite = "WHITE" +) + +// Specifies the color of the burned-in captions. This option is not valid for +// source captions that are STL, 608/embedded or teletext. These source settings +// are already pre-defined by the caption stream. All burn-in and DVB-Sub font +// settings must match. +const ( + // DvbSubtitleFontColorWhite is a DvbSubtitleFontColor enum value + DvbSubtitleFontColorWhite = "WHITE" + + // DvbSubtitleFontColorBlack is a DvbSubtitleFontColor enum value + DvbSubtitleFontColorBlack = "BLACK" + + // DvbSubtitleFontColorYellow is a DvbSubtitleFontColor enum value + DvbSubtitleFontColorYellow = "YELLOW" + + // DvbSubtitleFontColorRed is a DvbSubtitleFontColor enum value + DvbSubtitleFontColorRed = "RED" + + // DvbSubtitleFontColorGreen is a DvbSubtitleFontColor enum value + DvbSubtitleFontColorGreen = "GREEN" + + // DvbSubtitleFontColorBlue is a DvbSubtitleFontColor enum value + DvbSubtitleFontColorBlue = "BLUE" +) + +// Specifies font outline color. This option is not valid for source captions +// that are either 608/embedded or teletext. These source settings are already +// pre-defined by the caption stream. All burn-in and DVB-Sub font settings +// must match. +const ( + // DvbSubtitleOutlineColorBlack is a DvbSubtitleOutlineColor enum value + DvbSubtitleOutlineColorBlack = "BLACK" + + // DvbSubtitleOutlineColorWhite is a DvbSubtitleOutlineColor enum value + DvbSubtitleOutlineColorWhite = "WHITE" + + // DvbSubtitleOutlineColorYellow is a DvbSubtitleOutlineColor enum value + DvbSubtitleOutlineColorYellow = "YELLOW" + + // DvbSubtitleOutlineColorRed is a DvbSubtitleOutlineColor enum value + DvbSubtitleOutlineColorRed = "RED" + + // DvbSubtitleOutlineColorGreen is a DvbSubtitleOutlineColor enum value + DvbSubtitleOutlineColorGreen = "GREEN" + + // DvbSubtitleOutlineColorBlue is a DvbSubtitleOutlineColor enum value + DvbSubtitleOutlineColorBlue = "BLUE" +) + +// Specifies the color of the shadow cast by the captions.All burn-in and DVB-Sub +// font settings must match. +const ( + // DvbSubtitleShadowColorNone is a DvbSubtitleShadowColor enum value + DvbSubtitleShadowColorNone = "NONE" + + // DvbSubtitleShadowColorBlack is a DvbSubtitleShadowColor enum value + DvbSubtitleShadowColorBlack = "BLACK" + + // DvbSubtitleShadowColorWhite is a DvbSubtitleShadowColor enum value + DvbSubtitleShadowColorWhite = "WHITE" +) + +// Only applies to jobs with input captions in Teletext or STL formats. Specify +// whether the spacing between letters in your captions is set by the captions +// grid or varies depending on letter width. Choose fixed grid to conform to +// the spacing specified in the captions file more accurately. Choose proportional +// to make the text easier to read if the captions are closed caption. +const ( + // DvbSubtitleTeletextSpacingFixedGrid is a DvbSubtitleTeletextSpacing enum value + DvbSubtitleTeletextSpacingFixedGrid = "FIXED_GRID" + + // DvbSubtitleTeletextSpacingProportional is a DvbSubtitleTeletextSpacing enum value + DvbSubtitleTeletextSpacingProportional = "PROPORTIONAL" +) + +// If set to ATTENUATE_3_DB, applies a 3 dB attenuation to the surround channels. +// Only used for 3/2 coding mode. +const ( + // Eac3AttenuationControlAttenuate3Db is a Eac3AttenuationControl enum value + Eac3AttenuationControlAttenuate3Db = "ATTENUATE_3_DB" + + // Eac3AttenuationControlNone is a Eac3AttenuationControl enum value + Eac3AttenuationControlNone = "NONE" +) + +// Specifies the "Bitstream Mode" (bsmod) for the emitted E-AC-3 stream. See +// ATSC A/52-2012 (Annex E) for background on these values. +const ( + // Eac3BitstreamModeCompleteMain is a Eac3BitstreamMode enum value + Eac3BitstreamModeCompleteMain = "COMPLETE_MAIN" + + // Eac3BitstreamModeCommentary is a Eac3BitstreamMode enum value + Eac3BitstreamModeCommentary = "COMMENTARY" + + // Eac3BitstreamModeEmergency is a Eac3BitstreamMode enum value + Eac3BitstreamModeEmergency = "EMERGENCY" + + // Eac3BitstreamModeHearingImpaired is a Eac3BitstreamMode enum value + Eac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" + + // Eac3BitstreamModeVisuallyImpaired is a Eac3BitstreamMode enum value + Eac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" +) + +// Dolby Digital Plus coding mode. Determines number of channels. +const ( + // Eac3CodingModeCodingMode10 is a Eac3CodingMode enum value + Eac3CodingModeCodingMode10 = "CODING_MODE_1_0" + + // Eac3CodingModeCodingMode20 is a Eac3CodingMode enum value + Eac3CodingModeCodingMode20 = "CODING_MODE_2_0" + + // Eac3CodingModeCodingMode32 is a Eac3CodingMode enum value + Eac3CodingModeCodingMode32 = "CODING_MODE_3_2" +) + +// Activates a DC highpass filter for all input channels. +const ( + // Eac3DcFilterEnabled is a Eac3DcFilter enum value + Eac3DcFilterEnabled = "ENABLED" + + // Eac3DcFilterDisabled is a Eac3DcFilter enum value + Eac3DcFilterDisabled = "DISABLED" +) + +// Enables Dynamic Range Compression that restricts the absolute peak level +// for a signal. +const ( + // Eac3DynamicRangeCompressionLineNone is a Eac3DynamicRangeCompressionLine enum value + Eac3DynamicRangeCompressionLineNone = "NONE" + + // Eac3DynamicRangeCompressionLineFilmStandard is a Eac3DynamicRangeCompressionLine enum value + Eac3DynamicRangeCompressionLineFilmStandard = "FILM_STANDARD" + + // Eac3DynamicRangeCompressionLineFilmLight is a Eac3DynamicRangeCompressionLine enum value + Eac3DynamicRangeCompressionLineFilmLight = "FILM_LIGHT" + + // Eac3DynamicRangeCompressionLineMusicStandard is a Eac3DynamicRangeCompressionLine enum value + Eac3DynamicRangeCompressionLineMusicStandard = "MUSIC_STANDARD" + + // Eac3DynamicRangeCompressionLineMusicLight is a Eac3DynamicRangeCompressionLine enum value + Eac3DynamicRangeCompressionLineMusicLight = "MUSIC_LIGHT" + + // Eac3DynamicRangeCompressionLineSpeech is a Eac3DynamicRangeCompressionLine enum value + Eac3DynamicRangeCompressionLineSpeech = "SPEECH" +) + +// Enables Heavy Dynamic Range Compression, ensures that the instantaneous signal +// peaks do not exceed specified levels. +const ( + // Eac3DynamicRangeCompressionRfNone is a Eac3DynamicRangeCompressionRf enum value + Eac3DynamicRangeCompressionRfNone = "NONE" + + // Eac3DynamicRangeCompressionRfFilmStandard is a Eac3DynamicRangeCompressionRf enum value + Eac3DynamicRangeCompressionRfFilmStandard = "FILM_STANDARD" + + // Eac3DynamicRangeCompressionRfFilmLight is a Eac3DynamicRangeCompressionRf enum value + Eac3DynamicRangeCompressionRfFilmLight = "FILM_LIGHT" + + // Eac3DynamicRangeCompressionRfMusicStandard is a Eac3DynamicRangeCompressionRf enum value + Eac3DynamicRangeCompressionRfMusicStandard = "MUSIC_STANDARD" + + // Eac3DynamicRangeCompressionRfMusicLight is a Eac3DynamicRangeCompressionRf enum value + Eac3DynamicRangeCompressionRfMusicLight = "MUSIC_LIGHT" + + // Eac3DynamicRangeCompressionRfSpeech is a Eac3DynamicRangeCompressionRf enum value + Eac3DynamicRangeCompressionRfSpeech = "SPEECH" +) + +// When encoding 3/2 audio, controls whether the LFE channel is enabled +const ( + // Eac3LfeControlLfe is a Eac3LfeControl enum value + Eac3LfeControlLfe = "LFE" + + // Eac3LfeControlNoLfe is a Eac3LfeControl enum value + Eac3LfeControlNoLfe = "NO_LFE" +) + +// Applies a 120Hz lowpass filter to the LFE channel prior to encoding. Only +// valid with 3_2_LFE coding mode. +const ( + // Eac3LfeFilterEnabled is a Eac3LfeFilter enum value + Eac3LfeFilterEnabled = "ENABLED" + + // Eac3LfeFilterDisabled is a Eac3LfeFilter enum value + Eac3LfeFilterDisabled = "DISABLED" +) + +// When set to FOLLOW_INPUT, encoder metadata will be sourced from the DD, DD+, +// or DolbyE decoder that supplied this audio data. If audio was not supplied +// from one of these streams, then the static metadata settings will be used. +const ( + // Eac3MetadataControlFollowInput is a Eac3MetadataControl enum value + Eac3MetadataControlFollowInput = "FOLLOW_INPUT" + + // Eac3MetadataControlUseConfigured is a Eac3MetadataControl enum value + Eac3MetadataControlUseConfigured = "USE_CONFIGURED" +) + +// When set to WHEN_POSSIBLE, input DD+ audio will be passed through if it is +// present on the input. this detection is dynamic over the life of the transcode. +// Inputs that alternate between DD+ and non-DD+ content will have a consistent +// DD+ output as the system alternates between passthrough and encoding. +const ( + // Eac3PassthroughControlWhenPossible is a Eac3PassthroughControl enum value + Eac3PassthroughControlWhenPossible = "WHEN_POSSIBLE" + + // Eac3PassthroughControlNoPassthrough is a Eac3PassthroughControl enum value + Eac3PassthroughControlNoPassthrough = "NO_PASSTHROUGH" +) + +// Controls the amount of phase-shift applied to the surround channels. Only +// used for 3/2 coding mode. +const ( + // Eac3PhaseControlShift90Degrees is a Eac3PhaseControl enum value + Eac3PhaseControlShift90Degrees = "SHIFT_90_DEGREES" + + // Eac3PhaseControlNoShift is a Eac3PhaseControl enum value + Eac3PhaseControlNoShift = "NO_SHIFT" +) + +// Stereo downmix preference. Only used for 3/2 coding mode. +const ( + // Eac3StereoDownmixNotIndicated is a Eac3StereoDownmix enum value + Eac3StereoDownmixNotIndicated = "NOT_INDICATED" + + // Eac3StereoDownmixLoRo is a Eac3StereoDownmix enum value + Eac3StereoDownmixLoRo = "LO_RO" + + // Eac3StereoDownmixLtRt is a Eac3StereoDownmix enum value + Eac3StereoDownmixLtRt = "LT_RT" + + // Eac3StereoDownmixDpl2 is a Eac3StereoDownmix enum value + Eac3StereoDownmixDpl2 = "DPL2" +) + +// When encoding 3/2 audio, sets whether an extra center back surround channel +// is matrix encoded into the left and right surround channels. +const ( + // Eac3SurroundExModeNotIndicated is a Eac3SurroundExMode enum value + Eac3SurroundExModeNotIndicated = "NOT_INDICATED" + + // Eac3SurroundExModeEnabled is a Eac3SurroundExMode enum value + Eac3SurroundExModeEnabled = "ENABLED" + + // Eac3SurroundExModeDisabled is a Eac3SurroundExMode enum value + Eac3SurroundExModeDisabled = "DISABLED" +) + +// When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into +// the two channels. +const ( + // Eac3SurroundModeNotIndicated is a Eac3SurroundMode enum value + Eac3SurroundModeNotIndicated = "NOT_INDICATED" + + // Eac3SurroundModeEnabled is a Eac3SurroundMode enum value + Eac3SurroundModeEnabled = "ENABLED" + + // Eac3SurroundModeDisabled is a Eac3SurroundMode enum value + Eac3SurroundModeDisabled = "DISABLED" +) + +// When set to UPCONVERT, 608 data is both passed through via the "608 compatibility +// bytes" fields of the 708 wrapper as well as translated into 708. 708 data +// present in the source content will be discarded. +const ( + // EmbeddedConvert608To708Upconvert is a EmbeddedConvert608To708 enum value + EmbeddedConvert608To708Upconvert = "UPCONVERT" + + // EmbeddedConvert608To708Disabled is a EmbeddedConvert608To708 enum value + EmbeddedConvert608To708Disabled = "DISABLED" +) + +// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning +// of the archive as required for progressive downloading. Otherwise it is placed +// normally at the end. +const ( + // F4vMoovPlacementProgressiveDownload is a F4vMoovPlacement enum value + F4vMoovPlacementProgressiveDownload = "PROGRESSIVE_DOWNLOAD" + + // F4vMoovPlacementNormal is a F4vMoovPlacement enum value + F4vMoovPlacementNormal = "NORMAL" +) + +// If set to UPCONVERT, 608 caption data is both passed through via the "608 +// compatibility bytes" fields of the 708 wrapper as well as translated into +// 708. 708 data present in the source content will be discarded. +const ( + // FileSourceConvert608To708Upconvert is a FileSourceConvert608To708 enum value + FileSourceConvert608To708Upconvert = "UPCONVERT" + + // FileSourceConvert608To708Disabled is a FileSourceConvert608To708 enum value + FileSourceConvert608To708Disabled = "DISABLED" +) + +// Provide the font script, using an ISO 15924 script code, if the LanguageCode +// is not sufficient for determining the script type. Where LanguageCode or +// CustomLanguageCode is sufficient, use "AUTOMATIC" or leave unset. +const ( + // FontScriptAutomatic is a FontScript enum value + FontScriptAutomatic = "AUTOMATIC" + + // FontScriptHans is a FontScript enum value + FontScriptHans = "HANS" + + // FontScriptHant is a FontScript enum value + FontScriptHant = "HANT" +) + +// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual +// quality. +const ( + // H264AdaptiveQuantizationOff is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationOff = "OFF" + + // H264AdaptiveQuantizationLow is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationLow = "LOW" + + // H264AdaptiveQuantizationMedium is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationMedium = "MEDIUM" + + // H264AdaptiveQuantizationHigh is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationHigh = "HIGH" + + // H264AdaptiveQuantizationHigher is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationHigher = "HIGHER" + + // H264AdaptiveQuantizationMax is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationMax = "MAX" +) + +// Specify an H.264 level that is consistent with your output video settings. +// If you aren't sure what level to specify, choose Auto (AUTO). +const ( + // H264CodecLevelAuto is a H264CodecLevel enum value + H264CodecLevelAuto = "AUTO" + + // H264CodecLevelLevel1 is a H264CodecLevel enum value + H264CodecLevelLevel1 = "LEVEL_1" + + // H264CodecLevelLevel11 is a H264CodecLevel enum value + H264CodecLevelLevel11 = "LEVEL_1_1" + + // H264CodecLevelLevel12 is a H264CodecLevel enum value + H264CodecLevelLevel12 = "LEVEL_1_2" + + // H264CodecLevelLevel13 is a H264CodecLevel enum value + H264CodecLevelLevel13 = "LEVEL_1_3" + + // H264CodecLevelLevel2 is a H264CodecLevel enum value + H264CodecLevelLevel2 = "LEVEL_2" + + // H264CodecLevelLevel21 is a H264CodecLevel enum value + H264CodecLevelLevel21 = "LEVEL_2_1" + + // H264CodecLevelLevel22 is a H264CodecLevel enum value + H264CodecLevelLevel22 = "LEVEL_2_2" + + // H264CodecLevelLevel3 is a H264CodecLevel enum value + H264CodecLevelLevel3 = "LEVEL_3" + + // H264CodecLevelLevel31 is a H264CodecLevel enum value + H264CodecLevelLevel31 = "LEVEL_3_1" + + // H264CodecLevelLevel32 is a H264CodecLevel enum value + H264CodecLevelLevel32 = "LEVEL_3_2" + + // H264CodecLevelLevel4 is a H264CodecLevel enum value + H264CodecLevelLevel4 = "LEVEL_4" + + // H264CodecLevelLevel41 is a H264CodecLevel enum value + H264CodecLevelLevel41 = "LEVEL_4_1" + + // H264CodecLevelLevel42 is a H264CodecLevel enum value + H264CodecLevelLevel42 = "LEVEL_4_2" + + // H264CodecLevelLevel5 is a H264CodecLevel enum value + H264CodecLevelLevel5 = "LEVEL_5" + + // H264CodecLevelLevel51 is a H264CodecLevel enum value + H264CodecLevelLevel51 = "LEVEL_5_1" + + // H264CodecLevelLevel52 is a H264CodecLevel enum value + H264CodecLevelLevel52 = "LEVEL_5_2" +) + +// H.264 Profile. High 4:2:2 and 10-bit profiles are only available with the +// AVC-I License. +const ( + // H264CodecProfileBaseline is a H264CodecProfile enum value + H264CodecProfileBaseline = "BASELINE" + + // H264CodecProfileHigh is a H264CodecProfile enum value + H264CodecProfileHigh = "HIGH" + + // H264CodecProfileHigh10bit is a H264CodecProfile enum value + H264CodecProfileHigh10bit = "HIGH_10BIT" + + // H264CodecProfileHigh422 is a H264CodecProfile enum value + H264CodecProfileHigh422 = "HIGH_422" + + // H264CodecProfileHigh42210bit is a H264CodecProfile enum value + H264CodecProfileHigh42210bit = "HIGH_422_10BIT" + + // H264CodecProfileMain is a H264CodecProfile enum value + H264CodecProfileMain = "MAIN" +) + +// Choose Adaptive to improve subjective video quality for high-motion content. +// This will cause the service to use fewer B-frames (which infer information +// based on other frames) for high-motion portions of the video and more B-frames +// for low-motion portions. The maximum number of B-frames is limited by the +// value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). +const ( + // H264DynamicSubGopAdaptive is a H264DynamicSubGop enum value + H264DynamicSubGopAdaptive = "ADAPTIVE" + + // H264DynamicSubGopStatic is a H264DynamicSubGop enum value + H264DynamicSubGopStatic = "STATIC" +) + +// Entropy encoding mode. Use CABAC (must be in Main or High profile) or CAVLC. +const ( + // H264EntropyEncodingCabac is a H264EntropyEncoding enum value + H264EntropyEncodingCabac = "CABAC" + + // H264EntropyEncodingCavlc is a H264EntropyEncoding enum value + H264EntropyEncodingCavlc = "CAVLC" +) + +// Choosing FORCE_FIELD disables PAFF encoding for interlaced outputs. +const ( + // H264FieldEncodingPaff is a H264FieldEncoding enum value + H264FieldEncodingPaff = "PAFF" + + // H264FieldEncodingForceField is a H264FieldEncoding enum value + H264FieldEncodingForceField = "FORCE_FIELD" +) + +// Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. +const ( + // H264FlickerAdaptiveQuantizationDisabled is a H264FlickerAdaptiveQuantization enum value + H264FlickerAdaptiveQuantizationDisabled = "DISABLED" + + // H264FlickerAdaptiveQuantizationEnabled is a H264FlickerAdaptiveQuantization enum value + H264FlickerAdaptiveQuantizationEnabled = "ENABLED" +) + +// If you are using the console, use the Framerate setting to specify the frame +// rate for this output. If you want to keep the same frame rate as the input +// video, choose Follow source. If you want to do frame rate conversion, choose +// a frame rate from the dropdown list or choose Custom. The framerates shown +// in the dropdown list are decimal approximations of fractions. If you choose +// Custom, specify your frame rate as a fraction. If you are creating your transcoding +// job specification as a JSON file without the console, use FramerateControl +// to specify which value the service uses for the frame rate for this output. +// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate +// from the input. Choose SPECIFIED if you want the service to use the frame +// rate you specify in the settings FramerateNumerator and FramerateDenominator. +const ( + // H264FramerateControlInitializeFromSource is a H264FramerateControl enum value + H264FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // H264FramerateControlSpecified is a H264FramerateControl enum value + H264FramerateControlSpecified = "SPECIFIED" +) + +// When set to INTERPOLATE, produces smoother motion during frame rate conversion. +const ( + // H264FramerateConversionAlgorithmDuplicateDrop is a H264FramerateConversionAlgorithm enum value + H264FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" + + // H264FramerateConversionAlgorithmInterpolate is a H264FramerateConversionAlgorithm enum value + H264FramerateConversionAlgorithmInterpolate = "INTERPOLATE" +) + +// If enable, use reference B frames for GOP structures that have B frames > +// 1. +const ( + // H264GopBReferenceDisabled is a H264GopBReference enum value + H264GopBReferenceDisabled = "DISABLED" + + // H264GopBReferenceEnabled is a H264GopBReference enum value + H264GopBReferenceEnabled = "ENABLED" +) + +// Indicates if the GOP Size in H264 is specified in frames or seconds. If seconds +// the system will convert the GOP Size into a frame count at run time. +const ( + // H264GopSizeUnitsFrames is a H264GopSizeUnits enum value + H264GopSizeUnitsFrames = "FRAMES" + + // H264GopSizeUnitsSeconds is a H264GopSizeUnits enum value + H264GopSizeUnitsSeconds = "SECONDS" +) + +// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. +// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce +// interlaced output with the entire output having the same field polarity (top +// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default +// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, +// behavior depends on the input scan type, as follows. - If the source is interlaced, +// the output will be interlaced with the same polarity as the source (it will +// follow the source). The output could therefore be a mix of "top field first" +// and "bottom field first". - If the source is progressive, the output will +// be interlaced with "top field first" or "bottom field first" polarity, depending +// on which of the Follow options you chose. +const ( + // H264InterlaceModeProgressive is a H264InterlaceMode enum value + H264InterlaceModeProgressive = "PROGRESSIVE" + + // H264InterlaceModeTopField is a H264InterlaceMode enum value + H264InterlaceModeTopField = "TOP_FIELD" + + // H264InterlaceModeBottomField is a H264InterlaceMode enum value + H264InterlaceModeBottomField = "BOTTOM_FIELD" + + // H264InterlaceModeFollowTopField is a H264InterlaceMode enum value + H264InterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" + + // H264InterlaceModeFollowBottomField is a H264InterlaceMode enum value + H264InterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" +) + +// Using the API, enable ParFollowSource if you want the service to use the +// pixel aspect ratio from the input. Using the console, do this by choosing +// Follow source for Pixel aspect ratio. +const ( + // H264ParControlInitializeFromSource is a H264ParControl enum value + H264ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // H264ParControlSpecified is a H264ParControl enum value + H264ParControlSpecified = "SPECIFIED" +) + +// Use Quality tuning level (H264QualityTuningLevel) to specifiy whether to +// use fast single-pass, high-quality singlepass, or high-quality multipass +// video encoding. +const ( + // H264QualityTuningLevelSinglePass is a H264QualityTuningLevel enum value + H264QualityTuningLevelSinglePass = "SINGLE_PASS" + + // H264QualityTuningLevelSinglePassHq is a H264QualityTuningLevel enum value + H264QualityTuningLevelSinglePassHq = "SINGLE_PASS_HQ" + + // H264QualityTuningLevelMultiPassHq is a H264QualityTuningLevel enum value + H264QualityTuningLevelMultiPassHq = "MULTI_PASS_HQ" +) + +// Use this setting to specify whether this output has a variable bitrate (VBR), +// constant bitrate (CBR) or quality-defined variable bitrate (QVBR). +const ( + // H264RateControlModeVbr is a H264RateControlMode enum value + H264RateControlModeVbr = "VBR" + + // H264RateControlModeCbr is a H264RateControlMode enum value + H264RateControlModeCbr = "CBR" + + // H264RateControlModeQvbr is a H264RateControlMode enum value + H264RateControlModeQvbr = "QVBR" +) + +// Places a PPS header on each encoded picture, even if repeated. +const ( + // H264RepeatPpsDisabled is a H264RepeatPps enum value + H264RepeatPpsDisabled = "DISABLED" + + // H264RepeatPpsEnabled is a H264RepeatPps enum value + H264RepeatPpsEnabled = "ENABLED" +) + +// Scene change detection (inserts I-frames on scene changes). +const ( + // H264SceneChangeDetectDisabled is a H264SceneChangeDetect enum value + H264SceneChangeDetectDisabled = "DISABLED" + + // H264SceneChangeDetectEnabled is a H264SceneChangeDetect enum value + H264SceneChangeDetectEnabled = "ENABLED" +) + +// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled +// as 25fps, and audio is sped up correspondingly. +const ( + // H264SlowPalDisabled is a H264SlowPal enum value + H264SlowPalDisabled = "DISABLED" + + // H264SlowPalEnabled is a H264SlowPal enum value + H264SlowPalEnabled = "ENABLED" +) + +// Adjust quantization within each frame based on spatial variation of content +// complexity. +const ( + // H264SpatialAdaptiveQuantizationDisabled is a H264SpatialAdaptiveQuantization enum value + H264SpatialAdaptiveQuantizationDisabled = "DISABLED" + + // H264SpatialAdaptiveQuantizationEnabled is a H264SpatialAdaptiveQuantization enum value + H264SpatialAdaptiveQuantizationEnabled = "ENABLED" +) + +// Produces a bitstream compliant with SMPTE RP-2027. +const ( + // H264SyntaxDefault is a H264Syntax enum value + H264SyntaxDefault = "DEFAULT" + + // H264SyntaxRp2027 is a H264Syntax enum value + H264SyntaxRp2027 = "RP2027" +) + +// This field applies only if the Streams > Advanced > Framerate (framerate) +// field is set to 29.970. This field works with the Streams > Advanced > Preprocessors +// > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced +// Mode field (interlace_mode) to identify the scan type for the output: Progressive, +// Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output +// from 23.976 input. - Soft: produces 23.976; the player converts this output +// to 29.97i. +const ( + // H264TelecineNone is a H264Telecine enum value + H264TelecineNone = "NONE" + + // H264TelecineSoft is a H264Telecine enum value + H264TelecineSoft = "SOFT" + + // H264TelecineHard is a H264Telecine enum value + H264TelecineHard = "HARD" +) + +// Adjust quantization within each frame based on temporal variation of content +// complexity. +const ( + // H264TemporalAdaptiveQuantizationDisabled is a H264TemporalAdaptiveQuantization enum value + H264TemporalAdaptiveQuantizationDisabled = "DISABLED" + + // H264TemporalAdaptiveQuantizationEnabled is a H264TemporalAdaptiveQuantization enum value + H264TemporalAdaptiveQuantizationEnabled = "ENABLED" +) + +// Inserts timecode for each frame as 4 bytes of an unregistered SEI message. +const ( + // H264UnregisteredSeiTimecodeDisabled is a H264UnregisteredSeiTimecode enum value + H264UnregisteredSeiTimecodeDisabled = "DISABLED" + + // H264UnregisteredSeiTimecodeEnabled is a H264UnregisteredSeiTimecode enum value + H264UnregisteredSeiTimecodeEnabled = "ENABLED" +) + +// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual +// quality. +const ( + // H265AdaptiveQuantizationOff is a H265AdaptiveQuantization enum value + H265AdaptiveQuantizationOff = "OFF" + + // H265AdaptiveQuantizationLow is a H265AdaptiveQuantization enum value + H265AdaptiveQuantizationLow = "LOW" + + // H265AdaptiveQuantizationMedium is a H265AdaptiveQuantization enum value + H265AdaptiveQuantizationMedium = "MEDIUM" + + // H265AdaptiveQuantizationHigh is a H265AdaptiveQuantization enum value + H265AdaptiveQuantizationHigh = "HIGH" + + // H265AdaptiveQuantizationHigher is a H265AdaptiveQuantization enum value + H265AdaptiveQuantizationHigher = "HIGHER" + + // H265AdaptiveQuantizationMax is a H265AdaptiveQuantization enum value + H265AdaptiveQuantizationMax = "MAX" +) + +// Enables Alternate Transfer Function SEI message for outputs using Hybrid +// Log Gamma (HLG) Electro-Optical Transfer Function (EOTF). +const ( + // H265AlternateTransferFunctionSeiDisabled is a H265AlternateTransferFunctionSei enum value + H265AlternateTransferFunctionSeiDisabled = "DISABLED" + + // H265AlternateTransferFunctionSeiEnabled is a H265AlternateTransferFunctionSei enum value + H265AlternateTransferFunctionSeiEnabled = "ENABLED" +) + +// H.265 Level. +const ( + // H265CodecLevelAuto is a H265CodecLevel enum value + H265CodecLevelAuto = "AUTO" + + // H265CodecLevelLevel1 is a H265CodecLevel enum value + H265CodecLevelLevel1 = "LEVEL_1" + + // H265CodecLevelLevel2 is a H265CodecLevel enum value + H265CodecLevelLevel2 = "LEVEL_2" + + // H265CodecLevelLevel21 is a H265CodecLevel enum value + H265CodecLevelLevel21 = "LEVEL_2_1" + + // H265CodecLevelLevel3 is a H265CodecLevel enum value + H265CodecLevelLevel3 = "LEVEL_3" + + // H265CodecLevelLevel31 is a H265CodecLevel enum value + H265CodecLevelLevel31 = "LEVEL_3_1" + + // H265CodecLevelLevel4 is a H265CodecLevel enum value + H265CodecLevelLevel4 = "LEVEL_4" + + // H265CodecLevelLevel41 is a H265CodecLevel enum value + H265CodecLevelLevel41 = "LEVEL_4_1" + + // H265CodecLevelLevel5 is a H265CodecLevel enum value + H265CodecLevelLevel5 = "LEVEL_5" + + // H265CodecLevelLevel51 is a H265CodecLevel enum value + H265CodecLevelLevel51 = "LEVEL_5_1" + + // H265CodecLevelLevel52 is a H265CodecLevel enum value + H265CodecLevelLevel52 = "LEVEL_5_2" + + // H265CodecLevelLevel6 is a H265CodecLevel enum value + H265CodecLevelLevel6 = "LEVEL_6" + + // H265CodecLevelLevel61 is a H265CodecLevel enum value + H265CodecLevelLevel61 = "LEVEL_6_1" + + // H265CodecLevelLevel62 is a H265CodecLevel enum value + H265CodecLevelLevel62 = "LEVEL_6_2" +) + +// Represents the Profile and Tier, per the HEVC (H.265) specification. Selections +// are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile +// with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License. +const ( + // H265CodecProfileMainMain is a H265CodecProfile enum value + H265CodecProfileMainMain = "MAIN_MAIN" + + // H265CodecProfileMainHigh is a H265CodecProfile enum value + H265CodecProfileMainHigh = "MAIN_HIGH" + + // H265CodecProfileMain10Main is a H265CodecProfile enum value + H265CodecProfileMain10Main = "MAIN10_MAIN" + + // H265CodecProfileMain10High is a H265CodecProfile enum value + H265CodecProfileMain10High = "MAIN10_HIGH" + + // H265CodecProfileMain4228bitMain is a H265CodecProfile enum value + H265CodecProfileMain4228bitMain = "MAIN_422_8BIT_MAIN" + + // H265CodecProfileMain4228bitHigh is a H265CodecProfile enum value + H265CodecProfileMain4228bitHigh = "MAIN_422_8BIT_HIGH" + + // H265CodecProfileMain42210bitMain is a H265CodecProfile enum value + H265CodecProfileMain42210bitMain = "MAIN_422_10BIT_MAIN" + + // H265CodecProfileMain42210bitHigh is a H265CodecProfile enum value + H265CodecProfileMain42210bitHigh = "MAIN_422_10BIT_HIGH" +) + +// Choose Adaptive to improve subjective video quality for high-motion content. +// This will cause the service to use fewer B-frames (which infer information +// based on other frames) for high-motion portions of the video and more B-frames +// for low-motion portions. The maximum number of B-frames is limited by the +// value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). +const ( + // H265DynamicSubGopAdaptive is a H265DynamicSubGop enum value + H265DynamicSubGopAdaptive = "ADAPTIVE" + + // H265DynamicSubGopStatic is a H265DynamicSubGop enum value + H265DynamicSubGopStatic = "STATIC" +) + +// Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. +const ( + // H265FlickerAdaptiveQuantizationDisabled is a H265FlickerAdaptiveQuantization enum value + H265FlickerAdaptiveQuantizationDisabled = "DISABLED" + + // H265FlickerAdaptiveQuantizationEnabled is a H265FlickerAdaptiveQuantization enum value + H265FlickerAdaptiveQuantizationEnabled = "ENABLED" +) + +// If you are using the console, use the Framerate setting to specify the frame +// rate for this output. If you want to keep the same frame rate as the input +// video, choose Follow source. If you want to do frame rate conversion, choose +// a frame rate from the dropdown list or choose Custom. The framerates shown +// in the dropdown list are decimal approximations of fractions. If you choose +// Custom, specify your frame rate as a fraction. If you are creating your transcoding +// job sepecification as a JSON file without the console, use FramerateControl +// to specify which value the service uses for the frame rate for this output. +// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate +// from the input. Choose SPECIFIED if you want the service to use the frame +// rate you specify in the settings FramerateNumerator and FramerateDenominator. +const ( + // H265FramerateControlInitializeFromSource is a H265FramerateControl enum value + H265FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // H265FramerateControlSpecified is a H265FramerateControl enum value + H265FramerateControlSpecified = "SPECIFIED" +) + +// When set to INTERPOLATE, produces smoother motion during frame rate conversion. +const ( + // H265FramerateConversionAlgorithmDuplicateDrop is a H265FramerateConversionAlgorithm enum value + H265FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" + + // H265FramerateConversionAlgorithmInterpolate is a H265FramerateConversionAlgorithm enum value + H265FramerateConversionAlgorithmInterpolate = "INTERPOLATE" +) + +// If enable, use reference B frames for GOP structures that have B frames > +// 1. +const ( + // H265GopBReferenceDisabled is a H265GopBReference enum value + H265GopBReferenceDisabled = "DISABLED" + + // H265GopBReferenceEnabled is a H265GopBReference enum value + H265GopBReferenceEnabled = "ENABLED" +) + +// Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds +// the system will convert the GOP Size into a frame count at run time. +const ( + // H265GopSizeUnitsFrames is a H265GopSizeUnits enum value + H265GopSizeUnitsFrames = "FRAMES" + + // H265GopSizeUnitsSeconds is a H265GopSizeUnits enum value + H265GopSizeUnitsSeconds = "SECONDS" +) + +// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. +// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce +// interlaced output with the entire output having the same field polarity (top +// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default +// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, +// behavior depends on the input scan type. - If the source is interlaced, the +// output will be interlaced with the same polarity as the source (it will follow +// the source). The output could therefore be a mix of "top field first" and +// "bottom field first". - If the source is progressive, the output will be +// interlaced with "top field first" or "bottom field first" polarity, depending +// on which of the Follow options you chose. +const ( + // H265InterlaceModeProgressive is a H265InterlaceMode enum value + H265InterlaceModeProgressive = "PROGRESSIVE" + + // H265InterlaceModeTopField is a H265InterlaceMode enum value + H265InterlaceModeTopField = "TOP_FIELD" + + // H265InterlaceModeBottomField is a H265InterlaceMode enum value + H265InterlaceModeBottomField = "BOTTOM_FIELD" + + // H265InterlaceModeFollowTopField is a H265InterlaceMode enum value + H265InterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" + + // H265InterlaceModeFollowBottomField is a H265InterlaceMode enum value + H265InterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" +) + +// Using the API, enable ParFollowSource if you want the service to use the +// pixel aspect ratio from the input. Using the console, do this by choosing +// Follow source for Pixel aspect ratio. +const ( + // H265ParControlInitializeFromSource is a H265ParControl enum value + H265ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // H265ParControlSpecified is a H265ParControl enum value + H265ParControlSpecified = "SPECIFIED" +) + +// Use Quality tuning level (H265QualityTuningLevel) to specifiy whether to +// use fast single-pass, high-quality singlepass, or high-quality multipass +// video encoding. +const ( + // H265QualityTuningLevelSinglePass is a H265QualityTuningLevel enum value + H265QualityTuningLevelSinglePass = "SINGLE_PASS" + + // H265QualityTuningLevelSinglePassHq is a H265QualityTuningLevel enum value + H265QualityTuningLevelSinglePassHq = "SINGLE_PASS_HQ" + + // H265QualityTuningLevelMultiPassHq is a H265QualityTuningLevel enum value + H265QualityTuningLevelMultiPassHq = "MULTI_PASS_HQ" +) + +// Use this setting to specify whether this output has a variable bitrate (VBR), +// constant bitrate (CBR) or quality-defined variable bitrate (QVBR). +const ( + // H265RateControlModeVbr is a H265RateControlMode enum value + H265RateControlModeVbr = "VBR" + + // H265RateControlModeCbr is a H265RateControlMode enum value + H265RateControlModeCbr = "CBR" + + // H265RateControlModeQvbr is a H265RateControlMode enum value + H265RateControlModeQvbr = "QVBR" +) + +// Specify Sample Adaptive Offset (SAO) filter strength. Adaptive mode dynamically +// selects best strength based on content +const ( + // H265SampleAdaptiveOffsetFilterModeDefault is a H265SampleAdaptiveOffsetFilterMode enum value + H265SampleAdaptiveOffsetFilterModeDefault = "DEFAULT" + + // H265SampleAdaptiveOffsetFilterModeAdaptive is a H265SampleAdaptiveOffsetFilterMode enum value + H265SampleAdaptiveOffsetFilterModeAdaptive = "ADAPTIVE" + + // H265SampleAdaptiveOffsetFilterModeOff is a H265SampleAdaptiveOffsetFilterMode enum value + H265SampleAdaptiveOffsetFilterModeOff = "OFF" +) + +// Scene change detection (inserts I-frames on scene changes). +const ( + // H265SceneChangeDetectDisabled is a H265SceneChangeDetect enum value + H265SceneChangeDetectDisabled = "DISABLED" + + // H265SceneChangeDetectEnabled is a H265SceneChangeDetect enum value + H265SceneChangeDetectEnabled = "ENABLED" +) + +// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled +// as 25fps, and audio is sped up correspondingly. +const ( + // H265SlowPalDisabled is a H265SlowPal enum value + H265SlowPalDisabled = "DISABLED" + + // H265SlowPalEnabled is a H265SlowPal enum value + H265SlowPalEnabled = "ENABLED" +) + +// Adjust quantization within each frame based on spatial variation of content +// complexity. +const ( + // H265SpatialAdaptiveQuantizationDisabled is a H265SpatialAdaptiveQuantization enum value + H265SpatialAdaptiveQuantizationDisabled = "DISABLED" + + // H265SpatialAdaptiveQuantizationEnabled is a H265SpatialAdaptiveQuantization enum value + H265SpatialAdaptiveQuantizationEnabled = "ENABLED" +) + +// This field applies only if the Streams > Advanced > Framerate (framerate) +// field is set to 29.970. This field works with the Streams > Advanced > Preprocessors +// > Deinterlacer field (deinterlace_mode) and the Streams > Advanced > Interlaced +// Mode field (interlace_mode) to identify the scan type for the output: Progressive, +// Interlaced, Hard Telecine or Soft Telecine. - Hard: produces 29.97i output +// from 23.976 input. - Soft: produces 23.976; the player converts this output +// to 29.97i. +const ( + // H265TelecineNone is a H265Telecine enum value + H265TelecineNone = "NONE" + + // H265TelecineSoft is a H265Telecine enum value + H265TelecineSoft = "SOFT" + + // H265TelecineHard is a H265Telecine enum value + H265TelecineHard = "HARD" +) + +// Adjust quantization within each frame based on temporal variation of content +// complexity. +const ( + // H265TemporalAdaptiveQuantizationDisabled is a H265TemporalAdaptiveQuantization enum value + H265TemporalAdaptiveQuantizationDisabled = "DISABLED" + + // H265TemporalAdaptiveQuantizationEnabled is a H265TemporalAdaptiveQuantization enum value + H265TemporalAdaptiveQuantizationEnabled = "ENABLED" +) + +// Enables temporal layer identifiers in the encoded bitstream. Up to 3 layers +// are supported depending on GOP structure: I- and P-frames form one layer, +// reference B-frames can form a second layer and non-reference b-frames can +// form a third layer. Decoders can optionally decode only the lower temporal +// layers to generate a lower frame rate output. For example, given a bitstream +// with temporal IDs and with b-frames = 1 (i.e. IbPbPb display order), a decoder +// could decode all the frames for full frame rate output or only the I and +// P frames (lowest temporal layer) for a half frame rate output. +const ( + // H265TemporalIdsDisabled is a H265TemporalIds enum value + H265TemporalIdsDisabled = "DISABLED" + + // H265TemporalIdsEnabled is a H265TemporalIds enum value + H265TemporalIdsEnabled = "ENABLED" +) + +// Enable use of tiles, allowing horizontal as well as vertical subdivision +// of the encoded pictures. +const ( + // H265TilesDisabled is a H265Tiles enum value + H265TilesDisabled = "DISABLED" + + // H265TilesEnabled is a H265Tiles enum value + H265TilesEnabled = "ENABLED" +) + +// Inserts timecode for each frame as 4 bytes of an unregistered SEI message. +const ( + // H265UnregisteredSeiTimecodeDisabled is a H265UnregisteredSeiTimecode enum value + H265UnregisteredSeiTimecodeDisabled = "DISABLED" + + // H265UnregisteredSeiTimecodeEnabled is a H265UnregisteredSeiTimecode enum value + H265UnregisteredSeiTimecodeEnabled = "ENABLED" +) + +// If HVC1, output that is H.265 will be marked as HVC1 and adhere to the ISO-IECJTC1-SC29_N13798_Text_ISOIEC_FDIS_14496-15_3rd_E +// spec which states that parameter set NAL units will be stored in the sample +// headers but not in the samples directly. If HEV1, then H.265 will be marked +// as HEV1 and parameter set NAL units will be written into the samples. +const ( + // H265WriteMp4PackagingTypeHvc1 is a H265WriteMp4PackagingType enum value + H265WriteMp4PackagingTypeHvc1 = "HVC1" + + // H265WriteMp4PackagingTypeHev1 is a H265WriteMp4PackagingType enum value + H265WriteMp4PackagingTypeHev1 = "HEV1" +) + +const ( + // HlsAdMarkersElemental is a HlsAdMarkers enum value + HlsAdMarkersElemental = "ELEMENTAL" + + // HlsAdMarkersElementalScte35 is a HlsAdMarkers enum value + HlsAdMarkersElementalScte35 = "ELEMENTAL_SCTE35" +) + +// Four types of audio-only tracks are supported: Audio-Only Variant Stream +// The client can play back this audio-only stream instead of video in low-bandwidth +// scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest. Alternate +// Audio, Auto Select, Default Alternate rendition that the client should try +// to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest +// with DEFAULT=YES, AUTOSELECT=YES Alternate Audio, Auto Select, Not Default +// Alternate rendition that the client may try to play back by default. Represented +// as an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YES Alternate +// Audio, not Auto Select Alternate rendition that the client will not try to +// play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with +// DEFAULT=NO, AUTOSELECT=NO +const ( + // HlsAudioTrackTypeAlternateAudioAutoSelectDefault is a HlsAudioTrackType enum value + HlsAudioTrackTypeAlternateAudioAutoSelectDefault = "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" + + // HlsAudioTrackTypeAlternateAudioAutoSelect is a HlsAudioTrackType enum value + HlsAudioTrackTypeAlternateAudioAutoSelect = "ALTERNATE_AUDIO_AUTO_SELECT" + + // HlsAudioTrackTypeAlternateAudioNotAutoSelect is a HlsAudioTrackType enum value + HlsAudioTrackTypeAlternateAudioNotAutoSelect = "ALTERNATE_AUDIO_NOT_AUTO_SELECT" + + // HlsAudioTrackTypeAudioOnlyVariantStream is a HlsAudioTrackType enum value + HlsAudioTrackTypeAudioOnlyVariantStream = "AUDIO_ONLY_VARIANT_STREAM" +) + +// Applies only to 608 Embedded output captions. Insert: Include CLOSED-CAPTIONS +// lines in the manifest. Specify at least one language in the CC1 Language +// Code field. One CLOSED-CAPTION line is added for each Language Code you specify. +// Make sure to specify the languages in the order in which they appear in the +// original source (if the source is embedded format) or the order of the caption +// selectors (if the source is other than embedded). Otherwise, languages in +// the manifest will not match up properly with the output captions. None: Include +// CLOSED-CAPTIONS=NONE line in the manifest. Omit: Omit any CLOSED-CAPTIONS +// line from the manifest. +const ( + // HlsCaptionLanguageSettingInsert is a HlsCaptionLanguageSetting enum value + HlsCaptionLanguageSettingInsert = "INSERT" + + // HlsCaptionLanguageSettingOmit is a HlsCaptionLanguageSetting enum value + HlsCaptionLanguageSettingOmit = "OMIT" + + // HlsCaptionLanguageSettingNone is a HlsCaptionLanguageSetting enum value + HlsCaptionLanguageSettingNone = "NONE" +) + +// When set to ENABLED, sets #EXT-X-ALLOW-CACHE:no tag, which prevents client +// from saving media segments for later replay. +const ( + // HlsClientCacheDisabled is a HlsClientCache enum value + HlsClientCacheDisabled = "DISABLED" + + // HlsClientCacheEnabled is a HlsClientCache enum value + HlsClientCacheEnabled = "ENABLED" +) + +// Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist +// generation. +const ( + // HlsCodecSpecificationRfc6381 is a HlsCodecSpecification enum value + HlsCodecSpecificationRfc6381 = "RFC_6381" + + // HlsCodecSpecificationRfc4281 is a HlsCodecSpecification enum value + HlsCodecSpecificationRfc4281 = "RFC_4281" +) + +// Indicates whether segments should be placed in subdirectories. +const ( + // HlsDirectoryStructureSingleDirectory is a HlsDirectoryStructure enum value + HlsDirectoryStructureSingleDirectory = "SINGLE_DIRECTORY" + + // HlsDirectoryStructureSubdirectoryPerStream is a HlsDirectoryStructure enum value + HlsDirectoryStructureSubdirectoryPerStream = "SUBDIRECTORY_PER_STREAM" +) + +// Encrypts the segments with the given encryption scheme. Leave blank to disable. +// Selecting 'Disabled' in the web interface also disables encryption. +const ( + // HlsEncryptionTypeAes128 is a HlsEncryptionType enum value + HlsEncryptionTypeAes128 = "AES128" + + // HlsEncryptionTypeSampleAes is a HlsEncryptionType enum value + HlsEncryptionTypeSampleAes = "SAMPLE_AES" +) + +// When set to INCLUDE, writes I-Frame Only Manifest in addition to the HLS +// manifest +const ( + // HlsIFrameOnlyManifestInclude is a HlsIFrameOnlyManifest enum value + HlsIFrameOnlyManifestInclude = "INCLUDE" + + // HlsIFrameOnlyManifestExclude is a HlsIFrameOnlyManifest enum value + HlsIFrameOnlyManifestExclude = "EXCLUDE" +) + +// The Initialization Vector is a 128-bit number used in conjunction with the +// key for encrypting blocks. If set to INCLUDE, Initialization Vector is listed +// in the manifest. Otherwise Initialization Vector is not in the manifest. +const ( + // HlsInitializationVectorInManifestInclude is a HlsInitializationVectorInManifest enum value + HlsInitializationVectorInManifestInclude = "INCLUDE" + + // HlsInitializationVectorInManifestExclude is a HlsInitializationVectorInManifest enum value + HlsInitializationVectorInManifestExclude = "EXCLUDE" +) + +// Indicates which type of key provider is used for encryption. +const ( + // HlsKeyProviderTypeSpeke is a HlsKeyProviderType enum value + HlsKeyProviderTypeSpeke = "SPEKE" + + // HlsKeyProviderTypeStaticKey is a HlsKeyProviderType enum value + HlsKeyProviderTypeStaticKey = "STATIC_KEY" +) + +// When set to GZIP, compresses HLS playlist. +const ( + // HlsManifestCompressionGzip is a HlsManifestCompression enum value + HlsManifestCompressionGzip = "GZIP" + + // HlsManifestCompressionNone is a HlsManifestCompression enum value + HlsManifestCompressionNone = "NONE" +) + +// Indicates whether the output manifest should use floating point values for +// segment duration. +const ( + // HlsManifestDurationFormatFloatingPoint is a HlsManifestDurationFormat enum value + HlsManifestDurationFormatFloatingPoint = "FLOATING_POINT" + + // HlsManifestDurationFormatInteger is a HlsManifestDurationFormat enum value + HlsManifestDurationFormatInteger = "INTEGER" +) + +// Indicates whether the .m3u8 manifest file should be generated for this HLS +// output group. +const ( + // HlsOutputSelectionManifestsAndSegments is a HlsOutputSelection enum value + HlsOutputSelectionManifestsAndSegments = "MANIFESTS_AND_SEGMENTS" + + // HlsOutputSelectionSegmentsOnly is a HlsOutputSelection enum value + HlsOutputSelectionSegmentsOnly = "SEGMENTS_ONLY" +) + +// Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. +// The value is calculated as follows: either the program date and time are +// initialized using the input timecode source, or the time is initialized using +// the input timecode source and the date is initialized using the timestamp_offset. +const ( + // HlsProgramDateTimeInclude is a HlsProgramDateTime enum value + HlsProgramDateTimeInclude = "INCLUDE" + + // HlsProgramDateTimeExclude is a HlsProgramDateTime enum value + HlsProgramDateTimeExclude = "EXCLUDE" +) + +// When set to SINGLE_FILE, emits program as a single media resource (.ts) file, +// uses #EXT-X-BYTERANGE tags to index segment for playback. +const ( + // HlsSegmentControlSingleFile is a HlsSegmentControl enum value + HlsSegmentControlSingleFile = "SINGLE_FILE" + + // HlsSegmentControlSegmentedFiles is a HlsSegmentControl enum value + HlsSegmentControlSegmentedFiles = "SEGMENTED_FILES" +) + +// Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag +// of variant manifest. +const ( + // HlsStreamInfResolutionInclude is a HlsStreamInfResolution enum value + HlsStreamInfResolutionInclude = "INCLUDE" + + // HlsStreamInfResolutionExclude is a HlsStreamInfResolution enum value + HlsStreamInfResolutionExclude = "EXCLUDE" +) + +// Indicates ID3 frame that has the timecode. +const ( + // HlsTimedMetadataId3FrameNone is a HlsTimedMetadataId3Frame enum value + HlsTimedMetadataId3FrameNone = "NONE" + + // HlsTimedMetadataId3FramePriv is a HlsTimedMetadataId3Frame enum value + HlsTimedMetadataId3FramePriv = "PRIV" + + // HlsTimedMetadataId3FrameTdrl is a HlsTimedMetadataId3Frame enum value + HlsTimedMetadataId3FrameTdrl = "TDRL" +) + +// Enable Deblock (InputDeblockFilter) to produce smoother motion in the output. +// Default is disabled. Only manaully controllable for MPEG2 and uncompressed +// video inputs. +const ( + // InputDeblockFilterEnabled is a InputDeblockFilter enum value + InputDeblockFilterEnabled = "ENABLED" + + // InputDeblockFilterDisabled is a InputDeblockFilter enum value + InputDeblockFilterDisabled = "DISABLED" +) + +// Enable Denoise (InputDenoiseFilter) to filter noise from the input. Default +// is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video +// inputs. +const ( + // InputDenoiseFilterEnabled is a InputDenoiseFilter enum value + InputDenoiseFilterEnabled = "ENABLED" + + // InputDenoiseFilterDisabled is a InputDenoiseFilter enum value + InputDenoiseFilterDisabled = "DISABLED" +) + +// Use Filter enable (InputFilterEnable) to specify how the transcoding service +// applies the denoise and deblock filters. You must also enable the filters +// separately, with Denoise (InputDenoiseFilter) and Deblock (InputDeblockFilter). +// * Auto - The transcoding service determines whether to apply filtering, depending +// on input type and quality. * Disable - The input is not filtered. This is +// true even if you use the API to enable them in (InputDeblockFilter) and (InputDeblockFilter). +// * Force - The in put is filtered regardless of input type. +const ( + // InputFilterEnableAuto is a InputFilterEnable enum value + InputFilterEnableAuto = "AUTO" + + // InputFilterEnableDisable is a InputFilterEnable enum value + InputFilterEnableDisable = "DISABLE" + + // InputFilterEnableForce is a InputFilterEnable enum value + InputFilterEnableForce = "FORCE" +) + +// Set PSI control (InputPsiControl) for transport stream inputs to specify +// which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio +// and video. * Use PSI - Scan only PSI data. +const ( + // InputPsiControlIgnorePsi is a InputPsiControl enum value + InputPsiControlIgnorePsi = "IGNORE_PSI" + + // InputPsiControlUsePsi is a InputPsiControl enum value + InputPsiControlUsePsi = "USE_PSI" +) + +// Timecode source under input settings (InputTimecodeSource) only affects the +// behavior of features that apply to a single input at a time, such as input +// clipping and synchronizing some captions formats. Use this setting to specify +// whether the service counts frames by timecodes embedded in the video (EMBEDDED) +// or by starting the first frame at zero (ZEROBASED). In both cases, the timecode +// format is HH:MM:SS:FF or HH:MM:SS;FF, where FF is the frame number. Only +// set this to EMBEDDED if your source video has embedded timecodes. +const ( + // InputTimecodeSourceEmbedded is a InputTimecodeSource enum value + InputTimecodeSourceEmbedded = "EMBEDDED" + + // InputTimecodeSourceZerobased is a InputTimecodeSource enum value + InputTimecodeSourceZerobased = "ZEROBASED" + + // InputTimecodeSourceSpecifiedstart is a InputTimecodeSource enum value + InputTimecodeSourceSpecifiedstart = "SPECIFIEDSTART" +) + +// A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR. +const ( + // JobStatusSubmitted is a JobStatus enum value + JobStatusSubmitted = "SUBMITTED" + + // JobStatusProgressing is a JobStatus enum value + JobStatusProgressing = "PROGRESSING" + + // JobStatusComplete is a JobStatus enum value + JobStatusComplete = "COMPLETE" + + // JobStatusCanceled is a JobStatus enum value + JobStatusCanceled = "CANCELED" + + // JobStatusError is a JobStatus enum value + JobStatusError = "ERROR" +) + +// Optional. When you request a list of job templates, you can choose to list +// them alphabetically by NAME or chronologically by CREATION_DATE. If you don't +// specify, the service will list them by name. +const ( + // JobTemplateListByName is a JobTemplateListBy enum value + JobTemplateListByName = "NAME" + + // JobTemplateListByCreationDate is a JobTemplateListBy enum value + JobTemplateListByCreationDate = "CREATION_DATE" + + // JobTemplateListBySystem is a JobTemplateListBy enum value + JobTemplateListBySystem = "SYSTEM" +) + +// Specify the language, using the ISO 639-2 three-letter code listed at https://www.loc.gov/standards/iso639-2/php/code_list.php. +const ( + // LanguageCodeEng is a LanguageCode enum value + LanguageCodeEng = "ENG" + + // LanguageCodeSpa is a LanguageCode enum value + LanguageCodeSpa = "SPA" + + // LanguageCodeFra is a LanguageCode enum value + LanguageCodeFra = "FRA" + + // LanguageCodeDeu is a LanguageCode enum value + LanguageCodeDeu = "DEU" + + // LanguageCodeGer is a LanguageCode enum value + LanguageCodeGer = "GER" + + // LanguageCodeZho is a LanguageCode enum value + LanguageCodeZho = "ZHO" + + // LanguageCodeAra is a LanguageCode enum value + LanguageCodeAra = "ARA" + + // LanguageCodeHin is a LanguageCode enum value + LanguageCodeHin = "HIN" + + // LanguageCodeJpn is a LanguageCode enum value + LanguageCodeJpn = "JPN" + + // LanguageCodeRus is a LanguageCode enum value + LanguageCodeRus = "RUS" + + // LanguageCodePor is a LanguageCode enum value + LanguageCodePor = "POR" + + // LanguageCodeIta is a LanguageCode enum value + LanguageCodeIta = "ITA" + + // LanguageCodeUrd is a LanguageCode enum value + LanguageCodeUrd = "URD" + + // LanguageCodeVie is a LanguageCode enum value + LanguageCodeVie = "VIE" + + // LanguageCodeKor is a LanguageCode enum value + LanguageCodeKor = "KOR" + + // LanguageCodePan is a LanguageCode enum value + LanguageCodePan = "PAN" + + // LanguageCodeAbk is a LanguageCode enum value + LanguageCodeAbk = "ABK" + + // LanguageCodeAar is a LanguageCode enum value + LanguageCodeAar = "AAR" + + // LanguageCodeAfr is a LanguageCode enum value + LanguageCodeAfr = "AFR" + + // LanguageCodeAka is a LanguageCode enum value + LanguageCodeAka = "AKA" + + // LanguageCodeSqi is a LanguageCode enum value + LanguageCodeSqi = "SQI" + + // LanguageCodeAmh is a LanguageCode enum value + LanguageCodeAmh = "AMH" + + // LanguageCodeArg is a LanguageCode enum value + LanguageCodeArg = "ARG" + + // LanguageCodeHye is a LanguageCode enum value + LanguageCodeHye = "HYE" + + // LanguageCodeAsm is a LanguageCode enum value + LanguageCodeAsm = "ASM" + + // LanguageCodeAva is a LanguageCode enum value + LanguageCodeAva = "AVA" + + // LanguageCodeAve is a LanguageCode enum value + LanguageCodeAve = "AVE" + + // LanguageCodeAym is a LanguageCode enum value + LanguageCodeAym = "AYM" + + // LanguageCodeAze is a LanguageCode enum value + LanguageCodeAze = "AZE" + + // LanguageCodeBam is a LanguageCode enum value + LanguageCodeBam = "BAM" + + // LanguageCodeBak is a LanguageCode enum value + LanguageCodeBak = "BAK" + + // LanguageCodeEus is a LanguageCode enum value + LanguageCodeEus = "EUS" + + // LanguageCodeBel is a LanguageCode enum value + LanguageCodeBel = "BEL" + + // LanguageCodeBen is a LanguageCode enum value + LanguageCodeBen = "BEN" + + // LanguageCodeBih is a LanguageCode enum value + LanguageCodeBih = "BIH" + + // LanguageCodeBis is a LanguageCode enum value + LanguageCodeBis = "BIS" + + // LanguageCodeBos is a LanguageCode enum value + LanguageCodeBos = "BOS" + + // LanguageCodeBre is a LanguageCode enum value + LanguageCodeBre = "BRE" + + // LanguageCodeBul is a LanguageCode enum value + LanguageCodeBul = "BUL" + + // LanguageCodeMya is a LanguageCode enum value + LanguageCodeMya = "MYA" + + // LanguageCodeCat is a LanguageCode enum value + LanguageCodeCat = "CAT" + + // LanguageCodeKhm is a LanguageCode enum value + LanguageCodeKhm = "KHM" + + // LanguageCodeCha is a LanguageCode enum value + LanguageCodeCha = "CHA" + + // LanguageCodeChe is a LanguageCode enum value + LanguageCodeChe = "CHE" + + // LanguageCodeNya is a LanguageCode enum value + LanguageCodeNya = "NYA" + + // LanguageCodeChu is a LanguageCode enum value + LanguageCodeChu = "CHU" + + // LanguageCodeChv is a LanguageCode enum value + LanguageCodeChv = "CHV" + + // LanguageCodeCor is a LanguageCode enum value + LanguageCodeCor = "COR" + + // LanguageCodeCos is a LanguageCode enum value + LanguageCodeCos = "COS" + + // LanguageCodeCre is a LanguageCode enum value + LanguageCodeCre = "CRE" + + // LanguageCodeHrv is a LanguageCode enum value + LanguageCodeHrv = "HRV" + + // LanguageCodeCes is a LanguageCode enum value + LanguageCodeCes = "CES" + + // LanguageCodeDan is a LanguageCode enum value + LanguageCodeDan = "DAN" + + // LanguageCodeDiv is a LanguageCode enum value + LanguageCodeDiv = "DIV" + + // LanguageCodeNld is a LanguageCode enum value + LanguageCodeNld = "NLD" + + // LanguageCodeDzo is a LanguageCode enum value + LanguageCodeDzo = "DZO" + + // LanguageCodeEnm is a LanguageCode enum value + LanguageCodeEnm = "ENM" + + // LanguageCodeEpo is a LanguageCode enum value + LanguageCodeEpo = "EPO" + + // LanguageCodeEst is a LanguageCode enum value + LanguageCodeEst = "EST" + + // LanguageCodeEwe is a LanguageCode enum value + LanguageCodeEwe = "EWE" + + // LanguageCodeFao is a LanguageCode enum value + LanguageCodeFao = "FAO" + + // LanguageCodeFij is a LanguageCode enum value + LanguageCodeFij = "FIJ" + + // LanguageCodeFin is a LanguageCode enum value + LanguageCodeFin = "FIN" + + // LanguageCodeFrm is a LanguageCode enum value + LanguageCodeFrm = "FRM" + + // LanguageCodeFul is a LanguageCode enum value + LanguageCodeFul = "FUL" + + // LanguageCodeGla is a LanguageCode enum value + LanguageCodeGla = "GLA" + + // LanguageCodeGlg is a LanguageCode enum value + LanguageCodeGlg = "GLG" + + // LanguageCodeLug is a LanguageCode enum value + LanguageCodeLug = "LUG" + + // LanguageCodeKat is a LanguageCode enum value + LanguageCodeKat = "KAT" + + // LanguageCodeEll is a LanguageCode enum value + LanguageCodeEll = "ELL" + + // LanguageCodeGrn is a LanguageCode enum value + LanguageCodeGrn = "GRN" + + // LanguageCodeGuj is a LanguageCode enum value + LanguageCodeGuj = "GUJ" + + // LanguageCodeHat is a LanguageCode enum value + LanguageCodeHat = "HAT" + + // LanguageCodeHau is a LanguageCode enum value + LanguageCodeHau = "HAU" + + // LanguageCodeHeb is a LanguageCode enum value + LanguageCodeHeb = "HEB" + + // LanguageCodeHer is a LanguageCode enum value + LanguageCodeHer = "HER" + + // LanguageCodeHmo is a LanguageCode enum value + LanguageCodeHmo = "HMO" + + // LanguageCodeHun is a LanguageCode enum value + LanguageCodeHun = "HUN" + + // LanguageCodeIsl is a LanguageCode enum value + LanguageCodeIsl = "ISL" + + // LanguageCodeIdo is a LanguageCode enum value + LanguageCodeIdo = "IDO" + + // LanguageCodeIbo is a LanguageCode enum value + LanguageCodeIbo = "IBO" + + // LanguageCodeInd is a LanguageCode enum value + LanguageCodeInd = "IND" + + // LanguageCodeIna is a LanguageCode enum value + LanguageCodeIna = "INA" + + // LanguageCodeIle is a LanguageCode enum value + LanguageCodeIle = "ILE" + + // LanguageCodeIku is a LanguageCode enum value + LanguageCodeIku = "IKU" + + // LanguageCodeIpk is a LanguageCode enum value + LanguageCodeIpk = "IPK" + + // LanguageCodeGle is a LanguageCode enum value + LanguageCodeGle = "GLE" + + // LanguageCodeJav is a LanguageCode enum value + LanguageCodeJav = "JAV" + + // LanguageCodeKal is a LanguageCode enum value + LanguageCodeKal = "KAL" + + // LanguageCodeKan is a LanguageCode enum value + LanguageCodeKan = "KAN" + + // LanguageCodeKau is a LanguageCode enum value + LanguageCodeKau = "KAU" + + // LanguageCodeKas is a LanguageCode enum value + LanguageCodeKas = "KAS" + + // LanguageCodeKaz is a LanguageCode enum value + LanguageCodeKaz = "KAZ" + + // LanguageCodeKik is a LanguageCode enum value + LanguageCodeKik = "KIK" + + // LanguageCodeKin is a LanguageCode enum value + LanguageCodeKin = "KIN" + + // LanguageCodeKir is a LanguageCode enum value + LanguageCodeKir = "KIR" + + // LanguageCodeKom is a LanguageCode enum value + LanguageCodeKom = "KOM" + + // LanguageCodeKon is a LanguageCode enum value + LanguageCodeKon = "KON" + + // LanguageCodeKua is a LanguageCode enum value + LanguageCodeKua = "KUA" + + // LanguageCodeKur is a LanguageCode enum value + LanguageCodeKur = "KUR" + + // LanguageCodeLao is a LanguageCode enum value + LanguageCodeLao = "LAO" + + // LanguageCodeLat is a LanguageCode enum value + LanguageCodeLat = "LAT" + + // LanguageCodeLav is a LanguageCode enum value + LanguageCodeLav = "LAV" + + // LanguageCodeLim is a LanguageCode enum value + LanguageCodeLim = "LIM" + + // LanguageCodeLin is a LanguageCode enum value + LanguageCodeLin = "LIN" + + // LanguageCodeLit is a LanguageCode enum value + LanguageCodeLit = "LIT" + + // LanguageCodeLub is a LanguageCode enum value + LanguageCodeLub = "LUB" + + // LanguageCodeLtz is a LanguageCode enum value + LanguageCodeLtz = "LTZ" + + // LanguageCodeMkd is a LanguageCode enum value + LanguageCodeMkd = "MKD" + + // LanguageCodeMlg is a LanguageCode enum value + LanguageCodeMlg = "MLG" + + // LanguageCodeMsa is a LanguageCode enum value + LanguageCodeMsa = "MSA" + + // LanguageCodeMal is a LanguageCode enum value + LanguageCodeMal = "MAL" + + // LanguageCodeMlt is a LanguageCode enum value + LanguageCodeMlt = "MLT" + + // LanguageCodeGlv is a LanguageCode enum value + LanguageCodeGlv = "GLV" + + // LanguageCodeMri is a LanguageCode enum value + LanguageCodeMri = "MRI" + + // LanguageCodeMar is a LanguageCode enum value + LanguageCodeMar = "MAR" + + // LanguageCodeMah is a LanguageCode enum value + LanguageCodeMah = "MAH" + + // LanguageCodeMon is a LanguageCode enum value + LanguageCodeMon = "MON" + + // LanguageCodeNau is a LanguageCode enum value + LanguageCodeNau = "NAU" + + // LanguageCodeNav is a LanguageCode enum value + LanguageCodeNav = "NAV" + + // LanguageCodeNde is a LanguageCode enum value + LanguageCodeNde = "NDE" + + // LanguageCodeNbl is a LanguageCode enum value + LanguageCodeNbl = "NBL" + + // LanguageCodeNdo is a LanguageCode enum value + LanguageCodeNdo = "NDO" + + // LanguageCodeNep is a LanguageCode enum value + LanguageCodeNep = "NEP" + + // LanguageCodeSme is a LanguageCode enum value + LanguageCodeSme = "SME" + + // LanguageCodeNor is a LanguageCode enum value + LanguageCodeNor = "NOR" + + // LanguageCodeNob is a LanguageCode enum value + LanguageCodeNob = "NOB" + + // LanguageCodeNno is a LanguageCode enum value + LanguageCodeNno = "NNO" + + // LanguageCodeOci is a LanguageCode enum value + LanguageCodeOci = "OCI" + + // LanguageCodeOji is a LanguageCode enum value + LanguageCodeOji = "OJI" + + // LanguageCodeOri is a LanguageCode enum value + LanguageCodeOri = "ORI" + + // LanguageCodeOrm is a LanguageCode enum value + LanguageCodeOrm = "ORM" + + // LanguageCodeOss is a LanguageCode enum value + LanguageCodeOss = "OSS" + + // LanguageCodePli is a LanguageCode enum value + LanguageCodePli = "PLI" + + // LanguageCodeFas is a LanguageCode enum value + LanguageCodeFas = "FAS" + + // LanguageCodePol is a LanguageCode enum value + LanguageCodePol = "POL" + + // LanguageCodePus is a LanguageCode enum value + LanguageCodePus = "PUS" + + // LanguageCodeQue is a LanguageCode enum value + LanguageCodeQue = "QUE" + + // LanguageCodeQaa is a LanguageCode enum value + LanguageCodeQaa = "QAA" + + // LanguageCodeRon is a LanguageCode enum value + LanguageCodeRon = "RON" + + // LanguageCodeRoh is a LanguageCode enum value + LanguageCodeRoh = "ROH" + + // LanguageCodeRun is a LanguageCode enum value + LanguageCodeRun = "RUN" + + // LanguageCodeSmo is a LanguageCode enum value + LanguageCodeSmo = "SMO" + + // LanguageCodeSag is a LanguageCode enum value + LanguageCodeSag = "SAG" + + // LanguageCodeSan is a LanguageCode enum value + LanguageCodeSan = "SAN" + + // LanguageCodeSrd is a LanguageCode enum value + LanguageCodeSrd = "SRD" + + // LanguageCodeSrb is a LanguageCode enum value + LanguageCodeSrb = "SRB" + + // LanguageCodeSna is a LanguageCode enum value + LanguageCodeSna = "SNA" + + // LanguageCodeIii is a LanguageCode enum value + LanguageCodeIii = "III" + + // LanguageCodeSnd is a LanguageCode enum value + LanguageCodeSnd = "SND" + + // LanguageCodeSin is a LanguageCode enum value + LanguageCodeSin = "SIN" + + // LanguageCodeSlk is a LanguageCode enum value + LanguageCodeSlk = "SLK" + + // LanguageCodeSlv is a LanguageCode enum value + LanguageCodeSlv = "SLV" + + // LanguageCodeSom is a LanguageCode enum value + LanguageCodeSom = "SOM" + + // LanguageCodeSot is a LanguageCode enum value + LanguageCodeSot = "SOT" + + // LanguageCodeSun is a LanguageCode enum value + LanguageCodeSun = "SUN" + + // LanguageCodeSwa is a LanguageCode enum value + LanguageCodeSwa = "SWA" + + // LanguageCodeSsw is a LanguageCode enum value + LanguageCodeSsw = "SSW" + + // LanguageCodeSwe is a LanguageCode enum value + LanguageCodeSwe = "SWE" + + // LanguageCodeTgl is a LanguageCode enum value + LanguageCodeTgl = "TGL" + + // LanguageCodeTah is a LanguageCode enum value + LanguageCodeTah = "TAH" + + // LanguageCodeTgk is a LanguageCode enum value + LanguageCodeTgk = "TGK" + + // LanguageCodeTam is a LanguageCode enum value + LanguageCodeTam = "TAM" + + // LanguageCodeTat is a LanguageCode enum value + LanguageCodeTat = "TAT" + + // LanguageCodeTel is a LanguageCode enum value + LanguageCodeTel = "TEL" + + // LanguageCodeTha is a LanguageCode enum value + LanguageCodeTha = "THA" + + // LanguageCodeBod is a LanguageCode enum value + LanguageCodeBod = "BOD" + + // LanguageCodeTir is a LanguageCode enum value + LanguageCodeTir = "TIR" + + // LanguageCodeTon is a LanguageCode enum value + LanguageCodeTon = "TON" + + // LanguageCodeTso is a LanguageCode enum value + LanguageCodeTso = "TSO" + + // LanguageCodeTsn is a LanguageCode enum value + LanguageCodeTsn = "TSN" + + // LanguageCodeTur is a LanguageCode enum value + LanguageCodeTur = "TUR" + + // LanguageCodeTuk is a LanguageCode enum value + LanguageCodeTuk = "TUK" + + // LanguageCodeTwi is a LanguageCode enum value + LanguageCodeTwi = "TWI" + + // LanguageCodeUig is a LanguageCode enum value + LanguageCodeUig = "UIG" + + // LanguageCodeUkr is a LanguageCode enum value + LanguageCodeUkr = "UKR" + + // LanguageCodeUzb is a LanguageCode enum value + LanguageCodeUzb = "UZB" + + // LanguageCodeVen is a LanguageCode enum value + LanguageCodeVen = "VEN" + + // LanguageCodeVol is a LanguageCode enum value + LanguageCodeVol = "VOL" + + // LanguageCodeWln is a LanguageCode enum value + LanguageCodeWln = "WLN" + + // LanguageCodeCym is a LanguageCode enum value + LanguageCodeCym = "CYM" + + // LanguageCodeFry is a LanguageCode enum value + LanguageCodeFry = "FRY" + + // LanguageCodeWol is a LanguageCode enum value + LanguageCodeWol = "WOL" + + // LanguageCodeXho is a LanguageCode enum value + LanguageCodeXho = "XHO" + + // LanguageCodeYid is a LanguageCode enum value + LanguageCodeYid = "YID" + + // LanguageCodeYor is a LanguageCode enum value + LanguageCodeYor = "YOR" + + // LanguageCodeZha is a LanguageCode enum value + LanguageCodeZha = "ZHA" + + // LanguageCodeZul is a LanguageCode enum value + LanguageCodeZul = "ZUL" + + // LanguageCodeOrj is a LanguageCode enum value + LanguageCodeOrj = "ORJ" + + // LanguageCodeQpc is a LanguageCode enum value + LanguageCodeQpc = "QPC" + + // LanguageCodeTng is a LanguageCode enum value + LanguageCodeTng = "TNG" +) + +// Selects between the DVB and ATSC buffer models for Dolby Digital audio. +const ( + // M2tsAudioBufferModelDvb is a M2tsAudioBufferModel enum value + M2tsAudioBufferModelDvb = "DVB" + + // M2tsAudioBufferModelAtsc is a M2tsAudioBufferModel enum value + M2tsAudioBufferModelAtsc = "ATSC" +) + +// Controls what buffer model to use for accurate interleaving. If set to MULTIPLEX, +// use multiplex buffer model. If set to NONE, this can lead to lower latency, +// but low-memory devices may not be able to play back the stream without interruptions. +const ( + // M2tsBufferModelMultiplex is a M2tsBufferModel enum value + M2tsBufferModelMultiplex = "MULTIPLEX" + + // M2tsBufferModelNone is a M2tsBufferModel enum value + M2tsBufferModelNone = "NONE" +) + +// When set to VIDEO_AND_FIXED_INTERVALS, audio EBP markers will be added to +// partitions 3 and 4. The interval between these additional markers will be +// fixed, and will be slightly shorter than the video EBP marker interval. When +// set to VIDEO_INTERVAL, these additional markers will not be inserted. Only +// applicable when EBP segmentation markers are is selected (segmentationMarkers +// is EBP or EBP_LEGACY). +const ( + // M2tsEbpAudioIntervalVideoAndFixedIntervals is a M2tsEbpAudioInterval enum value + M2tsEbpAudioIntervalVideoAndFixedIntervals = "VIDEO_AND_FIXED_INTERVALS" + + // M2tsEbpAudioIntervalVideoInterval is a M2tsEbpAudioInterval enum value + M2tsEbpAudioIntervalVideoInterval = "VIDEO_INTERVAL" +) + +// Selects which PIDs to place EBP markers on. They can either be placed only +// on the video PID, or on both the video PID and all audio PIDs. Only applicable +// when EBP segmentation markers are is selected (segmentationMarkers is EBP +// or EBP_LEGACY). +const ( + // M2tsEbpPlacementVideoAndAudioPids is a M2tsEbpPlacement enum value + M2tsEbpPlacementVideoAndAudioPids = "VIDEO_AND_AUDIO_PIDS" + + // M2tsEbpPlacementVideoPid is a M2tsEbpPlacement enum value + M2tsEbpPlacementVideoPid = "VIDEO_PID" +) + +// Controls whether to include the ES Rate field in the PES header. +const ( + // M2tsEsRateInPesInclude is a M2tsEsRateInPes enum value + M2tsEsRateInPesInclude = "INCLUDE" + + // M2tsEsRateInPesExclude is a M2tsEsRateInPes enum value + M2tsEsRateInPesExclude = "EXCLUDE" +) + +// Keep the default value (DEFAULT) unless you know that your audio EBP markers +// are incorrectly appearing before your video EBP markers. Set this value to +// Force (FORCE) to correct this problem. +const ( + // M2tsForceTsVideoEbpOrderForce is a M2tsForceTsVideoEbpOrder enum value + M2tsForceTsVideoEbpOrderForce = "FORCE" + + // M2tsForceTsVideoEbpOrderDefault is a M2tsForceTsVideoEbpOrder enum value + M2tsForceTsVideoEbpOrderDefault = "DEFAULT" +) + +// If INSERT, Nielsen inaudible tones for media tracking will be detected in +// the input audio and an equivalent ID3 tag will be inserted in the output. +const ( + // M2tsNielsenId3Insert is a M2tsNielsenId3 enum value + M2tsNielsenId3Insert = "INSERT" + + // M2tsNielsenId3None is a M2tsNielsenId3 enum value + M2tsNielsenId3None = "NONE" +) + +// When set to PCR_EVERY_PES_PACKET, a Program Clock Reference value is inserted +// for every Packetized Elementary Stream (PES) header. This is effective only +// when the PCR PID is the same as the video or audio elementary stream. +const ( + // M2tsPcrControlPcrEveryPesPacket is a M2tsPcrControl enum value + M2tsPcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" + + // M2tsPcrControlConfiguredPcrPeriod is a M2tsPcrControl enum value + M2tsPcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" +) + +// When set to CBR, inserts null packets into transport stream to fill specified +// bitrate. When set to VBR, the bitrate setting acts as the maximum bitrate, +// but the output will not be padded up to that bitrate. +const ( + // M2tsRateModeVbr is a M2tsRateMode enum value + M2tsRateModeVbr = "VBR" + + // M2tsRateModeCbr is a M2tsRateMode enum value + M2tsRateModeCbr = "CBR" +) + +// Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from +// input to output. +const ( + // M2tsScte35SourcePassthrough is a M2tsScte35Source enum value + M2tsScte35SourcePassthrough = "PASSTHROUGH" + + // M2tsScte35SourceNone is a M2tsScte35Source enum value + M2tsScte35SourceNone = "NONE" +) + +// Inserts segmentation markers at each segmentation_time period. rai_segstart +// sets the Random Access Indicator bit in the adaptation field. rai_adapt sets +// the RAI bit and adds the current timecode in the private data bytes. psi_segstart +// inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary +// Point information to the adaptation field as per OpenCable specification +// OC-SP-EBP-I01-130118. ebp_legacy adds Encoder Boundary Point information +// to the adaptation field using a legacy proprietary format. +const ( + // M2tsSegmentationMarkersNone is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersNone = "NONE" + + // M2tsSegmentationMarkersRaiSegstart is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersRaiSegstart = "RAI_SEGSTART" + + // M2tsSegmentationMarkersRaiAdapt is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersRaiAdapt = "RAI_ADAPT" + + // M2tsSegmentationMarkersPsiSegstart is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersPsiSegstart = "PSI_SEGSTART" + + // M2tsSegmentationMarkersEbp is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersEbp = "EBP" + + // M2tsSegmentationMarkersEbpLegacy is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersEbpLegacy = "EBP_LEGACY" +) + +// The segmentation style parameter controls how segmentation markers are inserted +// into the transport stream. With avails, it is possible that segments may +// be truncated, which can influence where future segmentation markers are inserted. +// When a segmentation style of "reset_cadence" is selected and a segment is +// truncated due to an avail, we will reset the segmentation cadence. This means +// the subsequent segment will have a duration of of $segmentation_time seconds. +// When a segmentation style of "maintain_cadence" is selected and a segment +// is truncated due to an avail, we will not reset the segmentation cadence. +// This means the subsequent segment will likely be truncated as well. However, +// all segments after that will have a duration of $segmentation_time seconds. +// Note that EBP lookahead is a slight exception to this rule. +const ( + // M2tsSegmentationStyleMaintainCadence is a M2tsSegmentationStyle enum value + M2tsSegmentationStyleMaintainCadence = "MAINTAIN_CADENCE" + + // M2tsSegmentationStyleResetCadence is a M2tsSegmentationStyle enum value + M2tsSegmentationStyleResetCadence = "RESET_CADENCE" +) + +// If INSERT, Nielsen inaudible tones for media tracking will be detected in +// the input audio and an equivalent ID3 tag will be inserted in the output. +const ( + // M3u8NielsenId3Insert is a M3u8NielsenId3 enum value + M3u8NielsenId3Insert = "INSERT" + + // M3u8NielsenId3None is a M3u8NielsenId3 enum value + M3u8NielsenId3None = "NONE" +) + +// When set to PCR_EVERY_PES_PACKET a Program Clock Reference value is inserted +// for every Packetized Elementary Stream (PES) header. This parameter is effective +// only when the PCR PID is the same as the video or audio elementary stream. +const ( + // M3u8PcrControlPcrEveryPesPacket is a M3u8PcrControl enum value + M3u8PcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" + + // M3u8PcrControlConfiguredPcrPeriod is a M3u8PcrControl enum value + M3u8PcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" +) + +// Enables SCTE-35 passthrough (scte35Source) to pass any SCTE-35 signals from +// input to output. +const ( + // M3u8Scte35SourcePassthrough is a M3u8Scte35Source enum value + M3u8Scte35SourcePassthrough = "PASSTHROUGH" + + // M3u8Scte35SourceNone is a M3u8Scte35Source enum value + M3u8Scte35SourceNone = "NONE" +) + +// Choose the type of motion graphic asset that you are providing for your overlay. +// You can choose either a .mov file or a series of .png files. +const ( + // MotionImageInsertionModeMov is a MotionImageInsertionMode enum value + MotionImageInsertionModeMov = "MOV" + + // MotionImageInsertionModePng is a MotionImageInsertionMode enum value + MotionImageInsertionModePng = "PNG" +) + +// Specify whether your motion graphic overlay repeats on a loop or plays only +// once. +const ( + // MotionImagePlaybackOnce is a MotionImagePlayback enum value + MotionImagePlaybackOnce = "ONCE" + + // MotionImagePlaybackRepeat is a MotionImagePlayback enum value + MotionImagePlaybackRepeat = "REPEAT" +) + +// When enabled, include 'clap' atom if appropriate for the video output settings. +const ( + // MovClapAtomInclude is a MovClapAtom enum value + MovClapAtomInclude = "INCLUDE" + + // MovClapAtomExclude is a MovClapAtom enum value + MovClapAtomExclude = "EXCLUDE" +) + +// When enabled, file composition times will start at zero, composition times +// in the 'ctts' (composition time to sample) box for B-frames will be negative, +// and a 'cslg' (composition shift least greatest) box will be included per +// 14496-1 amendment 1. This improves compatibility with Apple players and tools. +const ( + // MovCslgAtomInclude is a MovCslgAtom enum value + MovCslgAtomInclude = "INCLUDE" + + // MovCslgAtomExclude is a MovCslgAtom enum value + MovCslgAtomExclude = "EXCLUDE" +) + +// When set to XDCAM, writes MPEG2 video streams into the QuickTime file using +// XDCAM fourcc codes. This increases compatibility with Apple editors and players, +// but may decrease compatibility with other players. Only applicable when the +// video codec is MPEG2. +const ( + // MovMpeg2FourCCControlXdcam is a MovMpeg2FourCCControl enum value + MovMpeg2FourCCControlXdcam = "XDCAM" + + // MovMpeg2FourCCControlMpeg is a MovMpeg2FourCCControl enum value + MovMpeg2FourCCControlMpeg = "MPEG" +) + +// If set to OMNEON, inserts Omneon-compatible padding +const ( + // MovPaddingControlOmneon is a MovPaddingControl enum value + MovPaddingControlOmneon = "OMNEON" + + // MovPaddingControlNone is a MovPaddingControl enum value + MovPaddingControlNone = "NONE" +) + +// Always keep the default value (SELF_CONTAINED) for this setting. +const ( + // MovReferenceSelfContained is a MovReference enum value + MovReferenceSelfContained = "SELF_CONTAINED" + + // MovReferenceExternal is a MovReference enum value + MovReferenceExternal = "EXTERNAL" +) + +// When enabled, file composition times will start at zero, composition times +// in the 'ctts' (composition time to sample) box for B-frames will be negative, +// and a 'cslg' (composition shift least greatest) box will be included per +// 14496-1 amendment 1. This improves compatibility with Apple players and tools. +const ( + // Mp4CslgAtomInclude is a Mp4CslgAtom enum value + Mp4CslgAtomInclude = "INCLUDE" + + // Mp4CslgAtomExclude is a Mp4CslgAtom enum value + Mp4CslgAtomExclude = "EXCLUDE" +) + +// Inserts a free-space box immediately after the moov box. +const ( + // Mp4FreeSpaceBoxInclude is a Mp4FreeSpaceBox enum value + Mp4FreeSpaceBoxInclude = "INCLUDE" + + // Mp4FreeSpaceBoxExclude is a Mp4FreeSpaceBox enum value + Mp4FreeSpaceBoxExclude = "EXCLUDE" +) + +// If set to PROGRESSIVE_DOWNLOAD, the MOOV atom is relocated to the beginning +// of the archive as required for progressive downloading. Otherwise it is placed +// normally at the end. +const ( + // Mp4MoovPlacementProgressiveDownload is a Mp4MoovPlacement enum value + Mp4MoovPlacementProgressiveDownload = "PROGRESSIVE_DOWNLOAD" + + // Mp4MoovPlacementNormal is a Mp4MoovPlacement enum value + Mp4MoovPlacementNormal = "NORMAL" +) + +// Adaptive quantization. Allows intra-frame quantizers to vary to improve visual +// quality. +const ( + // Mpeg2AdaptiveQuantizationOff is a Mpeg2AdaptiveQuantization enum value + Mpeg2AdaptiveQuantizationOff = "OFF" + + // Mpeg2AdaptiveQuantizationLow is a Mpeg2AdaptiveQuantization enum value + Mpeg2AdaptiveQuantizationLow = "LOW" + + // Mpeg2AdaptiveQuantizationMedium is a Mpeg2AdaptiveQuantization enum value + Mpeg2AdaptiveQuantizationMedium = "MEDIUM" + + // Mpeg2AdaptiveQuantizationHigh is a Mpeg2AdaptiveQuantization enum value + Mpeg2AdaptiveQuantizationHigh = "HIGH" +) + +// Use Level (Mpeg2CodecLevel) to set the MPEG-2 level for the video output. +const ( + // Mpeg2CodecLevelAuto is a Mpeg2CodecLevel enum value + Mpeg2CodecLevelAuto = "AUTO" + + // Mpeg2CodecLevelLow is a Mpeg2CodecLevel enum value + Mpeg2CodecLevelLow = "LOW" + + // Mpeg2CodecLevelMain is a Mpeg2CodecLevel enum value + Mpeg2CodecLevelMain = "MAIN" + + // Mpeg2CodecLevelHigh1440 is a Mpeg2CodecLevel enum value + Mpeg2CodecLevelHigh1440 = "HIGH1440" + + // Mpeg2CodecLevelHigh is a Mpeg2CodecLevel enum value + Mpeg2CodecLevelHigh = "HIGH" +) + +// Use Profile (Mpeg2CodecProfile) to set the MPEG-2 profile for the video output. +const ( + // Mpeg2CodecProfileMain is a Mpeg2CodecProfile enum value + Mpeg2CodecProfileMain = "MAIN" + + // Mpeg2CodecProfileProfile422 is a Mpeg2CodecProfile enum value + Mpeg2CodecProfileProfile422 = "PROFILE_422" +) + +// Choose Adaptive to improve subjective video quality for high-motion content. +// This will cause the service to use fewer B-frames (which infer information +// based on other frames) for high-motion portions of the video and more B-frames +// for low-motion portions. The maximum number of B-frames is limited by the +// value you provide for the setting B frames between reference frames (numberBFramesBetweenReferenceFrames). +const ( + // Mpeg2DynamicSubGopAdaptive is a Mpeg2DynamicSubGop enum value + Mpeg2DynamicSubGopAdaptive = "ADAPTIVE" + + // Mpeg2DynamicSubGopStatic is a Mpeg2DynamicSubGop enum value + Mpeg2DynamicSubGopStatic = "STATIC" +) + +// If you are using the console, use the Framerate setting to specify the frame +// rate for this output. If you want to keep the same frame rate as the input +// video, choose Follow source. If you want to do frame rate conversion, choose +// a frame rate from the dropdown list or choose Custom. The framerates shown +// in the dropdown list are decimal approximations of fractions. If you choose +// Custom, specify your frame rate as a fraction. If you are creating your transcoding +// job sepecification as a JSON file without the console, use FramerateControl +// to specify which value the service uses for the frame rate for this output. +// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate +// from the input. Choose SPECIFIED if you want the service to use the frame +// rate you specify in the settings FramerateNumerator and FramerateDenominator. +const ( + // Mpeg2FramerateControlInitializeFromSource is a Mpeg2FramerateControl enum value + Mpeg2FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // Mpeg2FramerateControlSpecified is a Mpeg2FramerateControl enum value + Mpeg2FramerateControlSpecified = "SPECIFIED" +) + +// When set to INTERPOLATE, produces smoother motion during frame rate conversion. +const ( + // Mpeg2FramerateConversionAlgorithmDuplicateDrop is a Mpeg2FramerateConversionAlgorithm enum value + Mpeg2FramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" + + // Mpeg2FramerateConversionAlgorithmInterpolate is a Mpeg2FramerateConversionAlgorithm enum value + Mpeg2FramerateConversionAlgorithmInterpolate = "INTERPOLATE" +) + +// Indicates if the GOP Size in MPEG2 is specified in frames or seconds. If +// seconds the system will convert the GOP Size into a frame count at run time. +const ( + // Mpeg2GopSizeUnitsFrames is a Mpeg2GopSizeUnits enum value + Mpeg2GopSizeUnitsFrames = "FRAMES" + + // Mpeg2GopSizeUnitsSeconds is a Mpeg2GopSizeUnits enum value + Mpeg2GopSizeUnitsSeconds = "SECONDS" +) + +// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. +// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce +// interlaced output with the entire output having the same field polarity (top +// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default +// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, +// behavior depends on the input scan type. - If the source is interlaced, the +// output will be interlaced with the same polarity as the source (it will follow +// the source). The output could therefore be a mix of "top field first" and +// "bottom field first". - If the source is progressive, the output will be +// interlaced with "top field first" or "bottom field first" polarity, depending +// on which of the Follow options you chose. +const ( + // Mpeg2InterlaceModeProgressive is a Mpeg2InterlaceMode enum value + Mpeg2InterlaceModeProgressive = "PROGRESSIVE" + + // Mpeg2InterlaceModeTopField is a Mpeg2InterlaceMode enum value + Mpeg2InterlaceModeTopField = "TOP_FIELD" + + // Mpeg2InterlaceModeBottomField is a Mpeg2InterlaceMode enum value + Mpeg2InterlaceModeBottomField = "BOTTOM_FIELD" + + // Mpeg2InterlaceModeFollowTopField is a Mpeg2InterlaceMode enum value + Mpeg2InterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" + + // Mpeg2InterlaceModeFollowBottomField is a Mpeg2InterlaceMode enum value + Mpeg2InterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" +) + +// Use Intra DC precision (Mpeg2IntraDcPrecision) to set quantization precision +// for intra-block DC coefficients. If you choose the value auto, the service +// will automatically select the precision based on the per-frame compression +// ratio. +const ( + // Mpeg2IntraDcPrecisionAuto is a Mpeg2IntraDcPrecision enum value + Mpeg2IntraDcPrecisionAuto = "AUTO" + + // Mpeg2IntraDcPrecisionIntraDcPrecision8 is a Mpeg2IntraDcPrecision enum value + Mpeg2IntraDcPrecisionIntraDcPrecision8 = "INTRA_DC_PRECISION_8" + + // Mpeg2IntraDcPrecisionIntraDcPrecision9 is a Mpeg2IntraDcPrecision enum value + Mpeg2IntraDcPrecisionIntraDcPrecision9 = "INTRA_DC_PRECISION_9" + + // Mpeg2IntraDcPrecisionIntraDcPrecision10 is a Mpeg2IntraDcPrecision enum value + Mpeg2IntraDcPrecisionIntraDcPrecision10 = "INTRA_DC_PRECISION_10" + + // Mpeg2IntraDcPrecisionIntraDcPrecision11 is a Mpeg2IntraDcPrecision enum value + Mpeg2IntraDcPrecisionIntraDcPrecision11 = "INTRA_DC_PRECISION_11" +) + +// Using the API, enable ParFollowSource if you want the service to use the +// pixel aspect ratio from the input. Using the console, do this by choosing +// Follow source for Pixel aspect ratio. +const ( + // Mpeg2ParControlInitializeFromSource is a Mpeg2ParControl enum value + Mpeg2ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // Mpeg2ParControlSpecified is a Mpeg2ParControl enum value + Mpeg2ParControlSpecified = "SPECIFIED" +) + +// Use Quality tuning level (Mpeg2QualityTuningLevel) to specifiy whether to +// use single-pass or multipass video encoding. +const ( + // Mpeg2QualityTuningLevelSinglePass is a Mpeg2QualityTuningLevel enum value + Mpeg2QualityTuningLevelSinglePass = "SINGLE_PASS" + + // Mpeg2QualityTuningLevelMultiPass is a Mpeg2QualityTuningLevel enum value + Mpeg2QualityTuningLevelMultiPass = "MULTI_PASS" +) + +// Use Rate control mode (Mpeg2RateControlMode) to specifiy whether the bitrate +// is variable (vbr) or constant (cbr). +const ( + // Mpeg2RateControlModeVbr is a Mpeg2RateControlMode enum value + Mpeg2RateControlModeVbr = "VBR" + + // Mpeg2RateControlModeCbr is a Mpeg2RateControlMode enum value + Mpeg2RateControlModeCbr = "CBR" +) + +// Scene change detection (inserts I-frames on scene changes). +const ( + // Mpeg2SceneChangeDetectDisabled is a Mpeg2SceneChangeDetect enum value + Mpeg2SceneChangeDetectDisabled = "DISABLED" + + // Mpeg2SceneChangeDetectEnabled is a Mpeg2SceneChangeDetect enum value + Mpeg2SceneChangeDetectEnabled = "ENABLED" +) + +// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled +// as 25fps, and audio is sped up correspondingly. +const ( + // Mpeg2SlowPalDisabled is a Mpeg2SlowPal enum value + Mpeg2SlowPalDisabled = "DISABLED" + + // Mpeg2SlowPalEnabled is a Mpeg2SlowPal enum value + Mpeg2SlowPalEnabled = "ENABLED" +) + +// Adjust quantization within each frame based on spatial variation of content +// complexity. +const ( + // Mpeg2SpatialAdaptiveQuantizationDisabled is a Mpeg2SpatialAdaptiveQuantization enum value + Mpeg2SpatialAdaptiveQuantizationDisabled = "DISABLED" + + // Mpeg2SpatialAdaptiveQuantizationEnabled is a Mpeg2SpatialAdaptiveQuantization enum value + Mpeg2SpatialAdaptiveQuantizationEnabled = "ENABLED" +) + +// Produces a Type D-10 compatible bitstream (SMPTE 356M-2001). +const ( + // Mpeg2SyntaxDefault is a Mpeg2Syntax enum value + Mpeg2SyntaxDefault = "DEFAULT" + + // Mpeg2SyntaxD10 is a Mpeg2Syntax enum value + Mpeg2SyntaxD10 = "D_10" +) + +// Only use Telecine (Mpeg2Telecine) when you set Framerate (Framerate) to 29.970. +// Set Telecine (Mpeg2Telecine) to Hard (hard) to produce a 29.97i output from +// a 23.976 input. Set it to Soft (soft) to produce 23.976 output and leave +// converstion to the player. +const ( + // Mpeg2TelecineNone is a Mpeg2Telecine enum value + Mpeg2TelecineNone = "NONE" + + // Mpeg2TelecineSoft is a Mpeg2Telecine enum value + Mpeg2TelecineSoft = "SOFT" + + // Mpeg2TelecineHard is a Mpeg2Telecine enum value + Mpeg2TelecineHard = "HARD" +) + +// Adjust quantization within each frame based on temporal variation of content +// complexity. +const ( + // Mpeg2TemporalAdaptiveQuantizationDisabled is a Mpeg2TemporalAdaptiveQuantization enum value + Mpeg2TemporalAdaptiveQuantizationDisabled = "DISABLED" + + // Mpeg2TemporalAdaptiveQuantizationEnabled is a Mpeg2TemporalAdaptiveQuantization enum value + Mpeg2TemporalAdaptiveQuantizationEnabled = "ENABLED" +) + +// COMBINE_DUPLICATE_STREAMS combines identical audio encoding settings across +// a Microsoft Smooth output group into a single audio stream. +const ( + // MsSmoothAudioDeduplicationCombineDuplicateStreams is a MsSmoothAudioDeduplication enum value + MsSmoothAudioDeduplicationCombineDuplicateStreams = "COMBINE_DUPLICATE_STREAMS" + + // MsSmoothAudioDeduplicationNone is a MsSmoothAudioDeduplication enum value + MsSmoothAudioDeduplicationNone = "NONE" +) + +// Use Manifest encoding (MsSmoothManifestEncoding) to specify the encoding +// format for the server and client manifest. Valid options are utf8 and utf16. +const ( + // MsSmoothManifestEncodingUtf8 is a MsSmoothManifestEncoding enum value + MsSmoothManifestEncodingUtf8 = "UTF8" + + // MsSmoothManifestEncodingUtf16 is a MsSmoothManifestEncoding enum value + MsSmoothManifestEncodingUtf16 = "UTF16" +) + +// Use Noise reducer filter (NoiseReducerFilter) to select one of the following +// spatial image filtering functions. To use this setting, you must also enable +// Noise reducer (NoiseReducer). * Bilateral is an edge preserving noise reduction +// filter. * Mean (softest), Gaussian, Lanczos, and Sharpen (sharpest) are convolution +// filters. * Conserve is a min/max noise reduction filter. * Spatial is a frequency-domain +// filter based on JND principles. +const ( + // NoiseReducerFilterBilateral is a NoiseReducerFilter enum value + NoiseReducerFilterBilateral = "BILATERAL" + + // NoiseReducerFilterMean is a NoiseReducerFilter enum value + NoiseReducerFilterMean = "MEAN" + + // NoiseReducerFilterGaussian is a NoiseReducerFilter enum value + NoiseReducerFilterGaussian = "GAUSSIAN" + + // NoiseReducerFilterLanczos is a NoiseReducerFilter enum value + NoiseReducerFilterLanczos = "LANCZOS" + + // NoiseReducerFilterSharpen is a NoiseReducerFilter enum value + NoiseReducerFilterSharpen = "SHARPEN" + + // NoiseReducerFilterConserve is a NoiseReducerFilter enum value + NoiseReducerFilterConserve = "CONSERVE" + + // NoiseReducerFilterSpatial is a NoiseReducerFilter enum value + NoiseReducerFilterSpatial = "SPATIAL" +) + +// When you request lists of resources, you can optionally specify whether they +// are sorted in ASCENDING or DESCENDING order. Default varies by resource. +const ( + // OrderAscending is a Order enum value + OrderAscending = "ASCENDING" + + // OrderDescending is a Order enum value + OrderDescending = "DESCENDING" +) + +// Type of output group (File group, Apple HLS, DASH ISO, Microsoft Smooth Streaming, +// CMAF) +const ( + // OutputGroupTypeHlsGroupSettings is a OutputGroupType enum value + OutputGroupTypeHlsGroupSettings = "HLS_GROUP_SETTINGS" + + // OutputGroupTypeDashIsoGroupSettings is a OutputGroupType enum value + OutputGroupTypeDashIsoGroupSettings = "DASH_ISO_GROUP_SETTINGS" + + // OutputGroupTypeFileGroupSettings is a OutputGroupType enum value + OutputGroupTypeFileGroupSettings = "FILE_GROUP_SETTINGS" + + // OutputGroupTypeMsSmoothGroupSettings is a OutputGroupType enum value + OutputGroupTypeMsSmoothGroupSettings = "MS_SMOOTH_GROUP_SETTINGS" + + // OutputGroupTypeCmafGroupSettings is a OutputGroupType enum value + OutputGroupTypeCmafGroupSettings = "CMAF_GROUP_SETTINGS" +) + +// Selects method of inserting SDT information into output stream. "Follow input +// SDT" copies SDT information from input stream to output stream. "Follow input +// SDT if present" copies SDT information from input stream to output stream +// if SDT information is present in the input, otherwise it will fall back on +// the user-defined values. Enter "SDT Manually" means user will enter the SDT +// information. "No SDT" means output stream will not contain SDT information. +const ( + // OutputSdtSdtFollow is a OutputSdt enum value + OutputSdtSdtFollow = "SDT_FOLLOW" + + // OutputSdtSdtFollowIfPresent is a OutputSdt enum value + OutputSdtSdtFollowIfPresent = "SDT_FOLLOW_IF_PRESENT" + + // OutputSdtSdtManual is a OutputSdt enum value + OutputSdtSdtManual = "SDT_MANUAL" + + // OutputSdtSdtNone is a OutputSdt enum value + OutputSdtSdtNone = "SDT_NONE" +) + +// Optional. When you request a list of presets, you can choose to list them +// alphabetically by NAME or chronologically by CREATION_DATE. If you don't +// specify, the service will list them by name. +const ( + // PresetListByName is a PresetListBy enum value + PresetListByName = "NAME" + + // PresetListByCreationDate is a PresetListBy enum value + PresetListByCreationDate = "CREATION_DATE" + + // PresetListBySystem is a PresetListBy enum value + PresetListBySystem = "SYSTEM" +) + +// Specifies whether the pricing plan for the queue is on-demand or reserved. +// For on-demand, you pay per minute, billed in increments of .01 minute. For +// reserved, you pay for the transcoding capacity of the entire queue, regardless +// of how much or how little you use it. Reserved pricing requires a 12-month +// commitment. +const ( + // PricingPlanOnDemand is a PricingPlan enum value + PricingPlanOnDemand = "ON_DEMAND" + + // PricingPlanReserved is a PricingPlan enum value + PricingPlanReserved = "RESERVED" +) + +// Use Profile (ProResCodecProfile) to specifiy the type of Apple ProRes codec +// to use for this output. +const ( + // ProresCodecProfileAppleProres422 is a ProresCodecProfile enum value + ProresCodecProfileAppleProres422 = "APPLE_PRORES_422" + + // ProresCodecProfileAppleProres422Hq is a ProresCodecProfile enum value + ProresCodecProfileAppleProres422Hq = "APPLE_PRORES_422_HQ" + + // ProresCodecProfileAppleProres422Lt is a ProresCodecProfile enum value + ProresCodecProfileAppleProres422Lt = "APPLE_PRORES_422_LT" + + // ProresCodecProfileAppleProres422Proxy is a ProresCodecProfile enum value + ProresCodecProfileAppleProres422Proxy = "APPLE_PRORES_422_PROXY" +) + +// If you are using the console, use the Framerate setting to specify the frame +// rate for this output. If you want to keep the same frame rate as the input +// video, choose Follow source. If you want to do frame rate conversion, choose +// a frame rate from the dropdown list or choose Custom. The framerates shown +// in the dropdown list are decimal approximations of fractions. If you choose +// Custom, specify your frame rate as a fraction. If you are creating your transcoding +// job sepecification as a JSON file without the console, use FramerateControl +// to specify which value the service uses for the frame rate for this output. +// Choose INITIALIZE_FROM_SOURCE if you want the service to use the frame rate +// from the input. Choose SPECIFIED if you want the service to use the frame +// rate you specify in the settings FramerateNumerator and FramerateDenominator. +const ( + // ProresFramerateControlInitializeFromSource is a ProresFramerateControl enum value + ProresFramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // ProresFramerateControlSpecified is a ProresFramerateControl enum value + ProresFramerateControlSpecified = "SPECIFIED" +) + +// When set to INTERPOLATE, produces smoother motion during frame rate conversion. +const ( + // ProresFramerateConversionAlgorithmDuplicateDrop is a ProresFramerateConversionAlgorithm enum value + ProresFramerateConversionAlgorithmDuplicateDrop = "DUPLICATE_DROP" + + // ProresFramerateConversionAlgorithmInterpolate is a ProresFramerateConversionAlgorithm enum value + ProresFramerateConversionAlgorithmInterpolate = "INTERPOLATE" +) + +// Use Interlace mode (InterlaceMode) to choose the scan line type for the output. +// * Top Field First (TOP_FIELD) and Bottom Field First (BOTTOM_FIELD) produce +// interlaced output with the entire output having the same field polarity (top +// or bottom first). * Follow, Default Top (FOLLOW_TOP_FIELD) and Follow, Default +// Bottom (FOLLOW_BOTTOM_FIELD) use the same field polarity as the source. Therefore, +// behavior depends on the input scan type. - If the source is interlaced, the +// output will be interlaced with the same polarity as the source (it will follow +// the source). The output could therefore be a mix of "top field first" and +// "bottom field first". - If the source is progressive, the output will be +// interlaced with "top field first" or "bottom field first" polarity, depending +// on which of the Follow options you chose. +const ( + // ProresInterlaceModeProgressive is a ProresInterlaceMode enum value + ProresInterlaceModeProgressive = "PROGRESSIVE" + + // ProresInterlaceModeTopField is a ProresInterlaceMode enum value + ProresInterlaceModeTopField = "TOP_FIELD" + + // ProresInterlaceModeBottomField is a ProresInterlaceMode enum value + ProresInterlaceModeBottomField = "BOTTOM_FIELD" + + // ProresInterlaceModeFollowTopField is a ProresInterlaceMode enum value + ProresInterlaceModeFollowTopField = "FOLLOW_TOP_FIELD" + + // ProresInterlaceModeFollowBottomField is a ProresInterlaceMode enum value + ProresInterlaceModeFollowBottomField = "FOLLOW_BOTTOM_FIELD" +) + +// Use (ProresParControl) to specify how the service determines the pixel aspect +// ratio. Set to Follow source (INITIALIZE_FROM_SOURCE) to use the pixel aspect +// ratio from the input. To specify a different pixel aspect ratio: Using the +// console, choose it from the dropdown menu. Using the API, set ProresParControl +// to (SPECIFIED) and provide for (ParNumerator) and (ParDenominator). +const ( + // ProresParControlInitializeFromSource is a ProresParControl enum value + ProresParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // ProresParControlSpecified is a ProresParControl enum value + ProresParControlSpecified = "SPECIFIED" +) + +// Enables Slow PAL rate conversion. 23.976fps and 24fps input is relabeled +// as 25fps, and audio is sped up correspondingly. +const ( + // ProresSlowPalDisabled is a ProresSlowPal enum value + ProresSlowPalDisabled = "DISABLED" + + // ProresSlowPalEnabled is a ProresSlowPal enum value + ProresSlowPalEnabled = "ENABLED" +) + +// Only use Telecine (ProresTelecine) when you set Framerate (Framerate) to +// 29.970. Set Telecine (ProresTelecine) to Hard (hard) to produce a 29.97i +// output from a 23.976 input. Set it to Soft (soft) to produce 23.976 output +// and leave converstion to the player. +const ( + // ProresTelecineNone is a ProresTelecine enum value + ProresTelecineNone = "NONE" + + // ProresTelecineHard is a ProresTelecine enum value + ProresTelecineHard = "HARD" +) + +// Optional. When you request a list of queues, you can choose to list them +// alphabetically by NAME or chronologically by CREATION_DATE. If you don't +// specify, the service will list them by creation date. +const ( + // QueueListByName is a QueueListBy enum value + QueueListByName = "NAME" + + // QueueListByCreationDate is a QueueListBy enum value + QueueListByCreationDate = "CREATION_DATE" +) + +// Queues can be ACTIVE or PAUSED. If you pause a queue, jobs in that queue +// won't begin. Jobs that are running when you pause a queue continue to run +// until they finish or result in an error. +const ( + // QueueStatusActive is a QueueStatus enum value + QueueStatusActive = "ACTIVE" + + // QueueStatusPaused is a QueueStatus enum value + QueueStatusPaused = "PAUSED" +) + +// Specifies whether the term of your reserved queue pricing plan is automatically +// extended (AUTO_RENEW) or expires (EXPIRE) at the end of the term. +const ( + // RenewalTypeAutoRenew is a RenewalType enum value + RenewalTypeAutoRenew = "AUTO_RENEW" + + // RenewalTypeExpire is a RenewalType enum value + RenewalTypeExpire = "EXPIRE" +) + +// Specifies whether the pricing plan for your reserved queue is ACTIVE or EXPIRED. +const ( + // ReservationPlanStatusActive is a ReservationPlanStatus enum value + ReservationPlanStatusActive = "ACTIVE" + + // ReservationPlanStatusExpired is a ReservationPlanStatus enum value + ReservationPlanStatusExpired = "EXPIRED" +) + +// Use Respond to AFD (RespondToAfd) to specify how the service changes the +// video itself in response to AFD values in the input. * Choose Respond to +// clip the input video frame according to the AFD value, input display aspect +// ratio, and output display aspect ratio. * Choose Passthrough to include the +// input AFD values. Do not choose this when AfdSignaling is set to (NONE). +// A preferred implementation of this workflow is to set RespondToAfd to (NONE) +// and set AfdSignaling to (AUTO). * Choose None to remove all input AFD values +// from this output. +const ( + // RespondToAfdNone is a RespondToAfd enum value + RespondToAfdNone = "NONE" + + // RespondToAfdRespond is a RespondToAfd enum value + RespondToAfdRespond = "RESPOND" + + // RespondToAfdPassthrough is a RespondToAfd enum value + RespondToAfdPassthrough = "PASSTHROUGH" +) + +// Applies only if your input aspect ratio is different from your output aspect +// ratio. Choose "Stretch to output" to have the service stretch your video +// image to fit. Keep the setting "Default" to allow the service to letterbox +// your video instead. This setting overrides any positioning value you specify +// elsewhere in the job. +const ( + // ScalingBehaviorDefault is a ScalingBehavior enum value + ScalingBehaviorDefault = "DEFAULT" + + // ScalingBehaviorStretchToOutput is a ScalingBehavior enum value + ScalingBehaviorStretchToOutput = "STRETCH_TO_OUTPUT" +) + +// Set Framerate (SccDestinationFramerate) to make sure that the captions and +// the video are synchronized in the output. Specify a frame rate that matches +// the frame rate of the associated video. If the video frame rate is 29.97, +// choose 29.97 dropframe (FRAMERATE_29_97_DROPFRAME) only if the video has +// video_insertion=true and drop_frame_timecode=true; otherwise, choose 29.97 +// non-dropframe (FRAMERATE_29_97_NON_DROPFRAME). +const ( + // SccDestinationFramerateFramerate2397 is a SccDestinationFramerate enum value + SccDestinationFramerateFramerate2397 = "FRAMERATE_23_97" + + // SccDestinationFramerateFramerate24 is a SccDestinationFramerate enum value + SccDestinationFramerateFramerate24 = "FRAMERATE_24" + + // SccDestinationFramerateFramerate2997Dropframe is a SccDestinationFramerate enum value + SccDestinationFramerateFramerate2997Dropframe = "FRAMERATE_29_97_DROPFRAME" + + // SccDestinationFramerateFramerate2997NonDropframe is a SccDestinationFramerate enum value + SccDestinationFramerateFramerate2997NonDropframe = "FRAMERATE_29_97_NON_DROPFRAME" +) + +// Use Position (Position) under under Timecode burn-in (TimecodeBurnIn) to +// specify the location the burned-in timecode on output video. +const ( + // TimecodeBurninPositionTopCenter is a TimecodeBurninPosition enum value + TimecodeBurninPositionTopCenter = "TOP_CENTER" + + // TimecodeBurninPositionTopLeft is a TimecodeBurninPosition enum value + TimecodeBurninPositionTopLeft = "TOP_LEFT" + + // TimecodeBurninPositionTopRight is a TimecodeBurninPosition enum value + TimecodeBurninPositionTopRight = "TOP_RIGHT" + + // TimecodeBurninPositionMiddleLeft is a TimecodeBurninPosition enum value + TimecodeBurninPositionMiddleLeft = "MIDDLE_LEFT" + + // TimecodeBurninPositionMiddleCenter is a TimecodeBurninPosition enum value + TimecodeBurninPositionMiddleCenter = "MIDDLE_CENTER" + + // TimecodeBurninPositionMiddleRight is a TimecodeBurninPosition enum value + TimecodeBurninPositionMiddleRight = "MIDDLE_RIGHT" + + // TimecodeBurninPositionBottomLeft is a TimecodeBurninPosition enum value + TimecodeBurninPositionBottomLeft = "BOTTOM_LEFT" + + // TimecodeBurninPositionBottomCenter is a TimecodeBurninPosition enum value + TimecodeBurninPositionBottomCenter = "BOTTOM_CENTER" + + // TimecodeBurninPositionBottomRight is a TimecodeBurninPosition enum value + TimecodeBurninPositionBottomRight = "BOTTOM_RIGHT" +) + +// Use Source (TimecodeSource) to set how timecodes are handled within this +// job. To make sure that your video, audio, captions, and markers are synchronized +// and that time-based features, such as image inserter, work correctly, choose +// the Timecode source option that matches your assets. All timecodes are in +// a 24-hour format with frame number (HH:MM:SS:FF). * Embedded (EMBEDDED) - +// Use the timecode that is in the input video. If no embedded timecode is in +// the source, the service will use Start at 0 (ZEROBASED) instead. * Start +// at 0 (ZEROBASED) - Set the timecode of the initial frame to 00:00:00:00. +// * Specified Start (SPECIFIEDSTART) - Set the timecode of the initial frame +// to a value other than zero. You use Start timecode (Start) to provide this +// value. +const ( + // TimecodeSourceEmbedded is a TimecodeSource enum value + TimecodeSourceEmbedded = "EMBEDDED" + + // TimecodeSourceZerobased is a TimecodeSource enum value + TimecodeSourceZerobased = "ZEROBASED" + + // TimecodeSourceSpecifiedstart is a TimecodeSource enum value + TimecodeSourceSpecifiedstart = "SPECIFIEDSTART" +) + +// Applies only to HLS outputs. Use this setting to specify whether the service +// inserts the ID3 timed metadata from the input in this output. +const ( + // TimedMetadataPassthrough is a TimedMetadata enum value + TimedMetadataPassthrough = "PASSTHROUGH" + + // TimedMetadataNone is a TimedMetadata enum value + TimedMetadataNone = "NONE" +) + +// Pass through style and position information from a TTML-like input source +// (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or TTML output. +const ( + // TtmlStylePassthroughEnabled is a TtmlStylePassthrough enum value + TtmlStylePassthroughEnabled = "ENABLED" + + // TtmlStylePassthroughDisabled is a TtmlStylePassthrough enum value + TtmlStylePassthroughDisabled = "DISABLED" +) + +const ( + // TypeSystem is a Type enum value + TypeSystem = "SYSTEM" + + // TypeCustom is a Type enum value + TypeCustom = "CUSTOM" +) + +// Type of video codec +const ( + // VideoCodecFrameCapture is a VideoCodec enum value + VideoCodecFrameCapture = "FRAME_CAPTURE" + + // VideoCodecH264 is a VideoCodec enum value + VideoCodecH264 = "H_264" + + // VideoCodecH265 is a VideoCodec enum value + VideoCodecH265 = "H_265" + + // VideoCodecMpeg2 is a VideoCodec enum value + VideoCodecMpeg2 = "MPEG2" + + // VideoCodecProres is a VideoCodec enum value + VideoCodecProres = "PRORES" +) + +// Applies only to H.264, H.265, MPEG2, and ProRes outputs. Only enable Timecode +// insertion when the input frame rate is identical to the output frame rate. +// To include timecodes in this output, set Timecode insertion (VideoTimecodeInsertion) +// to PIC_TIMING_SEI. To leave them out, set it to DISABLED. Default is DISABLED. +// When the service inserts timecodes in an output, by default, it uses any +// embedded timecodes from the input. If none are present, the service will +// set the timecode for the first output frame to zero. To change this default +// behavior, adjust the settings under Timecode configuration (TimecodeConfig). +// In the console, these settings are located under Job > Job settings > Timecode +// configuration. Note - Timecode source under input settings (InputTimecodeSource) +// does not affect the timecodes that are inserted in the output. Source under +// Job settings > Timecode configuration (TimecodeSource) does. +const ( + // VideoTimecodeInsertionDisabled is a VideoTimecodeInsertion enum value + VideoTimecodeInsertionDisabled = "DISABLED" + + // VideoTimecodeInsertionPicTimingSei is a VideoTimecodeInsertion enum value + VideoTimecodeInsertionPicTimingSei = "PIC_TIMING_SEI" +) + +// The service defaults to using RIFF for WAV outputs. If your output audio +// is likely to exceed 4 GB in file size, or if you otherwise need the extended +// support of the RF64 format, set your output WAV file format to RF64. +const ( + // WavFormatRiff is a WavFormat enum value + WavFormatRiff = "RIFF" + + // WavFormatRf64 is a WavFormat enum value + WavFormatRf64 = "RF64" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go new file mode 100644 index 000000000..f30ea5eb7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package mediaconvert provides the client and types for making API +// requests to AWS Elemental MediaConvert. +// +// AWS Elemental MediaConvert +// +// See https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29 for more information on this service. +// +// See mediaconvert package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconvert/ +// +// Using the Client +// +// To contact AWS Elemental MediaConvert with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Elemental MediaConvert client MediaConvert for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediaconvert/#New +package mediaconvert diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go new file mode 100644 index 000000000..7a607419d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/errors.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediaconvert + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + ErrCodeConflictException = "ConflictException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go new file mode 100644 index 000000000..441039b68 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediaconvert/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediaconvert + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// MediaConvert provides the API operation methods for making requests to +// AWS Elemental MediaConvert. See this package's package overview docs +// for details on the service. +// +// MediaConvert methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type MediaConvert struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "mediaconvert" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaConvert" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the MediaConvert client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a MediaConvert client from just a session. +// svc := mediaconvert.New(mySession) +// +// // Create a MediaConvert client with additional configuration +// svc := mediaconvert.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaConvert { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediaconvert" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaConvert { + svc := &MediaConvert{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-08-29", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a MediaConvert operation and runs any +// custom request initialization. +func (c *MediaConvert) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go new file mode 100644 index 000000000..5abd1b2c4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/api.go @@ -0,0 +1,17266 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package medialive + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opBatchUpdateSchedule = "BatchUpdateSchedule" + +// BatchUpdateScheduleRequest generates a "aws/request.Request" representing the +// client's request for the BatchUpdateSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See BatchUpdateSchedule for more information on using the BatchUpdateSchedule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the BatchUpdateScheduleRequest method. +// req, resp := client.BatchUpdateScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/BatchUpdateSchedule +func (c *MediaLive) BatchUpdateScheduleRequest(input *BatchUpdateScheduleInput) (req *request.Request, output *BatchUpdateScheduleOutput) { + op := &request.Operation{ + Name: opBatchUpdateSchedule, + HTTPMethod: "PUT", + HTTPPath: "/prod/channels/{channelId}/schedule", + } + + if input == nil { + input = &BatchUpdateScheduleInput{} + } + + output = &BatchUpdateScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchUpdateSchedule API operation for AWS Elemental MediaLive. +// +// Update a channel schedule +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation BatchUpdateSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/BatchUpdateSchedule +func (c *MediaLive) BatchUpdateSchedule(input *BatchUpdateScheduleInput) (*BatchUpdateScheduleOutput, error) { + req, out := c.BatchUpdateScheduleRequest(input) + return out, req.Send() +} + +// BatchUpdateScheduleWithContext is the same as BatchUpdateSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See BatchUpdateSchedule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) BatchUpdateScheduleWithContext(ctx aws.Context, input *BatchUpdateScheduleInput, opts ...request.Option) (*BatchUpdateScheduleOutput, error) { + req, out := c.BatchUpdateScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateChannel = "CreateChannel" + +// CreateChannelRequest generates a "aws/request.Request" representing the +// client's request for the CreateChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateChannel for more information on using the CreateChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateChannelRequest method. +// req, resp := client.CreateChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateChannel +func (c *MediaLive) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) { + op := &request.Operation{ + Name: opCreateChannel, + HTTPMethod: "POST", + HTTPPath: "/prod/channels", + } + + if input == nil { + input = &CreateChannelInput{} + } + + output = &CreateChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateChannel API operation for AWS Elemental MediaLive. +// +// Creates a new channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation CreateChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateChannel +func (c *MediaLive) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) { + req, out := c.CreateChannelRequest(input) + return out, req.Send() +} + +// CreateChannelWithContext is the same as CreateChannel with the addition of +// the ability to pass a context and additional request options. +// +// See CreateChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) { + req, out := c.CreateChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateInput = "CreateInput" + +// CreateInputRequest generates a "aws/request.Request" representing the +// client's request for the CreateInput operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateInput for more information on using the CreateInput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateInputRequest method. +// req, resp := client.CreateInputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInput +func (c *MediaLive) CreateInputRequest(input *CreateInputInput) (req *request.Request, output *CreateInputOutput) { + op := &request.Operation{ + Name: opCreateInput, + HTTPMethod: "POST", + HTTPPath: "/prod/inputs", + } + + if input == nil { + input = &CreateInputInput{} + } + + output = &CreateInputOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateInput API operation for AWS Elemental MediaLive. +// +// Create an input +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation CreateInput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInput +func (c *MediaLive) CreateInput(input *CreateInputInput) (*CreateInputOutput, error) { + req, out := c.CreateInputRequest(input) + return out, req.Send() +} + +// CreateInputWithContext is the same as CreateInput with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) CreateInputWithContext(ctx aws.Context, input *CreateInputInput, opts ...request.Option) (*CreateInputOutput, error) { + req, out := c.CreateInputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateInputSecurityGroup = "CreateInputSecurityGroup" + +// CreateInputSecurityGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateInputSecurityGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateInputSecurityGroup for more information on using the CreateInputSecurityGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateInputSecurityGroupRequest method. +// req, resp := client.CreateInputSecurityGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputSecurityGroup +func (c *MediaLive) CreateInputSecurityGroupRequest(input *CreateInputSecurityGroupInput) (req *request.Request, output *CreateInputSecurityGroupOutput) { + op := &request.Operation{ + Name: opCreateInputSecurityGroup, + HTTPMethod: "POST", + HTTPPath: "/prod/inputSecurityGroups", + } + + if input == nil { + input = &CreateInputSecurityGroupInput{} + } + + output = &CreateInputSecurityGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateInputSecurityGroup API operation for AWS Elemental MediaLive. +// +// Creates a Input Security Group +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation CreateInputSecurityGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputSecurityGroup +func (c *MediaLive) CreateInputSecurityGroup(input *CreateInputSecurityGroupInput) (*CreateInputSecurityGroupOutput, error) { + req, out := c.CreateInputSecurityGroupRequest(input) + return out, req.Send() +} + +// CreateInputSecurityGroupWithContext is the same as CreateInputSecurityGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInputSecurityGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) CreateInputSecurityGroupWithContext(ctx aws.Context, input *CreateInputSecurityGroupInput, opts ...request.Option) (*CreateInputSecurityGroupOutput, error) { + req, out := c.CreateInputSecurityGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteChannel = "DeleteChannel" + +// DeleteChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteChannel for more information on using the DeleteChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteChannelRequest method. +// req, resp := client.DeleteChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteChannel +func (c *MediaLive) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) { + op := &request.Operation{ + Name: opDeleteChannel, + HTTPMethod: "DELETE", + HTTPPath: "/prod/channels/{channelId}", + } + + if input == nil { + input = &DeleteChannelInput{} + } + + output = &DeleteChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteChannel API operation for AWS Elemental MediaLive. +// +// Starts deletion of channel. The associated outputs are also deleted. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DeleteChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteChannel +func (c *MediaLive) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) { + req, out := c.DeleteChannelRequest(input) + return out, req.Send() +} + +// DeleteChannelWithContext is the same as DeleteChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) { + req, out := c.DeleteChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteInput = "DeleteInput" + +// DeleteInputRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInput operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInput for more information on using the DeleteInput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInputRequest method. +// req, resp := client.DeleteInputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInput +func (c *MediaLive) DeleteInputRequest(input *DeleteInputInput) (req *request.Request, output *DeleteInputOutput) { + op := &request.Operation{ + Name: opDeleteInput, + HTTPMethod: "DELETE", + HTTPPath: "/prod/inputs/{inputId}", + } + + if input == nil { + input = &DeleteInputInput{} + } + + output = &DeleteInputOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteInput API operation for AWS Elemental MediaLive. +// +// Deletes the input end point +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DeleteInput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInput +func (c *MediaLive) DeleteInput(input *DeleteInputInput) (*DeleteInputOutput, error) { + req, out := c.DeleteInputRequest(input) + return out, req.Send() +} + +// DeleteInputWithContext is the same as DeleteInput with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DeleteInputWithContext(ctx aws.Context, input *DeleteInputInput, opts ...request.Option) (*DeleteInputOutput, error) { + req, out := c.DeleteInputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteInputSecurityGroup = "DeleteInputSecurityGroup" + +// DeleteInputSecurityGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInputSecurityGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteInputSecurityGroup for more information on using the DeleteInputSecurityGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteInputSecurityGroupRequest method. +// req, resp := client.DeleteInputSecurityGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputSecurityGroup +func (c *MediaLive) DeleteInputSecurityGroupRequest(input *DeleteInputSecurityGroupInput) (req *request.Request, output *DeleteInputSecurityGroupOutput) { + op := &request.Operation{ + Name: opDeleteInputSecurityGroup, + HTTPMethod: "DELETE", + HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", + } + + if input == nil { + input = &DeleteInputSecurityGroupInput{} + } + + output = &DeleteInputSecurityGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteInputSecurityGroup API operation for AWS Elemental MediaLive. +// +// Deletes an Input Security Group +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DeleteInputSecurityGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputSecurityGroup +func (c *MediaLive) DeleteInputSecurityGroup(input *DeleteInputSecurityGroupInput) (*DeleteInputSecurityGroupOutput, error) { + req, out := c.DeleteInputSecurityGroupRequest(input) + return out, req.Send() +} + +// DeleteInputSecurityGroupWithContext is the same as DeleteInputSecurityGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInputSecurityGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DeleteInputSecurityGroupWithContext(ctx aws.Context, input *DeleteInputSecurityGroupInput, opts ...request.Option) (*DeleteInputSecurityGroupOutput, error) { + req, out := c.DeleteInputSecurityGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteReservation = "DeleteReservation" + +// DeleteReservationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteReservation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteReservation for more information on using the DeleteReservation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteReservationRequest method. +// req, resp := client.DeleteReservationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteReservation +func (c *MediaLive) DeleteReservationRequest(input *DeleteReservationInput) (req *request.Request, output *DeleteReservationOutput) { + op := &request.Operation{ + Name: opDeleteReservation, + HTTPMethod: "DELETE", + HTTPPath: "/prod/reservations/{reservationId}", + } + + if input == nil { + input = &DeleteReservationInput{} + } + + output = &DeleteReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteReservation API operation for AWS Elemental MediaLive. +// +// Delete an expired reservation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DeleteReservation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteReservation +func (c *MediaLive) DeleteReservation(input *DeleteReservationInput) (*DeleteReservationOutput, error) { + req, out := c.DeleteReservationRequest(input) + return out, req.Send() +} + +// DeleteReservationWithContext is the same as DeleteReservation with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteReservation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DeleteReservationWithContext(ctx aws.Context, input *DeleteReservationInput, opts ...request.Option) (*DeleteReservationOutput, error) { + req, out := c.DeleteReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeChannel = "DescribeChannel" + +// DescribeChannelRequest generates a "aws/request.Request" representing the +// client's request for the DescribeChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeChannel for more information on using the DescribeChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeChannelRequest method. +// req, resp := client.DescribeChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeChannel +func (c *MediaLive) DescribeChannelRequest(input *DescribeChannelInput) (req *request.Request, output *DescribeChannelOutput) { + op := &request.Operation{ + Name: opDescribeChannel, + HTTPMethod: "GET", + HTTPPath: "/prod/channels/{channelId}", + } + + if input == nil { + input = &DescribeChannelInput{} + } + + output = &DescribeChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeChannel API operation for AWS Elemental MediaLive. +// +// Gets details about a channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeChannel +func (c *MediaLive) DescribeChannel(input *DescribeChannelInput) (*DescribeChannelOutput, error) { + req, out := c.DescribeChannelRequest(input) + return out, req.Send() +} + +// DescribeChannelWithContext is the same as DescribeChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeChannelWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.Option) (*DescribeChannelOutput, error) { + req, out := c.DescribeChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeInput = "DescribeInput" + +// DescribeInputRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInput operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInput for more information on using the DescribeInput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInputRequest method. +// req, resp := client.DescribeInputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInput +func (c *MediaLive) DescribeInputRequest(input *DescribeInputInput) (req *request.Request, output *DescribeInputOutput) { + op := &request.Operation{ + Name: opDescribeInput, + HTTPMethod: "GET", + HTTPPath: "/prod/inputs/{inputId}", + } + + if input == nil { + input = &DescribeInputInput{} + } + + output = &DescribeInputOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInput API operation for AWS Elemental MediaLive. +// +// Produces details about an input +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeInput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInput +func (c *MediaLive) DescribeInput(input *DescribeInputInput) (*DescribeInputOutput, error) { + req, out := c.DescribeInputRequest(input) + return out, req.Send() +} + +// DescribeInputWithContext is the same as DescribeInput with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeInputWithContext(ctx aws.Context, input *DescribeInputInput, opts ...request.Option) (*DescribeInputOutput, error) { + req, out := c.DescribeInputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeInputSecurityGroup = "DescribeInputSecurityGroup" + +// DescribeInputSecurityGroupRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInputSecurityGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeInputSecurityGroup for more information on using the DescribeInputSecurityGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeInputSecurityGroupRequest method. +// req, resp := client.DescribeInputSecurityGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputSecurityGroup +func (c *MediaLive) DescribeInputSecurityGroupRequest(input *DescribeInputSecurityGroupInput) (req *request.Request, output *DescribeInputSecurityGroupOutput) { + op := &request.Operation{ + Name: opDescribeInputSecurityGroup, + HTTPMethod: "GET", + HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", + } + + if input == nil { + input = &DescribeInputSecurityGroupInput{} + } + + output = &DescribeInputSecurityGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInputSecurityGroup API operation for AWS Elemental MediaLive. +// +// Produces a summary of an Input Security Group +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeInputSecurityGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputSecurityGroup +func (c *MediaLive) DescribeInputSecurityGroup(input *DescribeInputSecurityGroupInput) (*DescribeInputSecurityGroupOutput, error) { + req, out := c.DescribeInputSecurityGroupRequest(input) + return out, req.Send() +} + +// DescribeInputSecurityGroupWithContext is the same as DescribeInputSecurityGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInputSecurityGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeInputSecurityGroupWithContext(ctx aws.Context, input *DescribeInputSecurityGroupInput, opts ...request.Option) (*DescribeInputSecurityGroupOutput, error) { + req, out := c.DescribeInputSecurityGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeOffering = "DescribeOffering" + +// DescribeOfferingRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeOffering for more information on using the DescribeOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeOfferingRequest method. +// req, resp := client.DescribeOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeOffering +func (c *MediaLive) DescribeOfferingRequest(input *DescribeOfferingInput) (req *request.Request, output *DescribeOfferingOutput) { + op := &request.Operation{ + Name: opDescribeOffering, + HTTPMethod: "GET", + HTTPPath: "/prod/offerings/{offeringId}", + } + + if input == nil { + input = &DescribeOfferingInput{} + } + + output = &DescribeOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOffering API operation for AWS Elemental MediaLive. +// +// Get details for an offering. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeOffering +func (c *MediaLive) DescribeOffering(input *DescribeOfferingInput) (*DescribeOfferingOutput, error) { + req, out := c.DescribeOfferingRequest(input) + return out, req.Send() +} + +// DescribeOfferingWithContext is the same as DescribeOffering with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOffering for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeOfferingWithContext(ctx aws.Context, input *DescribeOfferingInput, opts ...request.Option) (*DescribeOfferingOutput, error) { + req, out := c.DescribeOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeReservation = "DescribeReservation" + +// DescribeReservationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReservation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeReservation for more information on using the DescribeReservation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeReservationRequest method. +// req, resp := client.DescribeReservationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeReservation +func (c *MediaLive) DescribeReservationRequest(input *DescribeReservationInput) (req *request.Request, output *DescribeReservationOutput) { + op := &request.Operation{ + Name: opDescribeReservation, + HTTPMethod: "GET", + HTTPPath: "/prod/reservations/{reservationId}", + } + + if input == nil { + input = &DescribeReservationInput{} + } + + output = &DescribeReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReservation API operation for AWS Elemental MediaLive. +// +// Get details for a reservation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeReservation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeReservation +func (c *MediaLive) DescribeReservation(input *DescribeReservationInput) (*DescribeReservationOutput, error) { + req, out := c.DescribeReservationRequest(input) + return out, req.Send() +} + +// DescribeReservationWithContext is the same as DescribeReservation with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReservation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeReservationWithContext(ctx aws.Context, input *DescribeReservationInput, opts ...request.Option) (*DescribeReservationOutput, error) { + req, out := c.DescribeReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSchedule = "DescribeSchedule" + +// DescribeScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSchedule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSchedule for more information on using the DescribeSchedule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeScheduleRequest method. +// req, resp := client.DescribeScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeSchedule +func (c *MediaLive) DescribeScheduleRequest(input *DescribeScheduleInput) (req *request.Request, output *DescribeScheduleOutput) { + op := &request.Operation{ + Name: opDescribeSchedule, + HTTPMethod: "GET", + HTTPPath: "/prod/channels/{channelId}/schedule", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeScheduleInput{} + } + + output = &DescribeScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSchedule API operation for AWS Elemental MediaLive. +// +// Get a channel schedule +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation DescribeSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeSchedule +func (c *MediaLive) DescribeSchedule(input *DescribeScheduleInput) (*DescribeScheduleOutput, error) { + req, out := c.DescribeScheduleRequest(input) + return out, req.Send() +} + +// DescribeScheduleWithContext is the same as DescribeSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSchedule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeScheduleWithContext(ctx aws.Context, input *DescribeScheduleInput, opts ...request.Option) (*DescribeScheduleOutput, error) { + req, out := c.DescribeScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeSchedulePages iterates over the pages of a DescribeSchedule operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeSchedule method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeSchedule operation. +// pageNum := 0 +// err := client.DescribeSchedulePages(params, +// func(page *DescribeScheduleOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) DescribeSchedulePages(input *DescribeScheduleInput, fn func(*DescribeScheduleOutput, bool) bool) error { + return c.DescribeSchedulePagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeSchedulePagesWithContext same as DescribeSchedulePages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) DescribeSchedulePagesWithContext(ctx aws.Context, input *DescribeScheduleInput, fn func(*DescribeScheduleOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeScheduleInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeScheduleRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeScheduleOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListChannels = "ListChannels" + +// ListChannelsRequest generates a "aws/request.Request" representing the +// client's request for the ListChannels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListChannels for more information on using the ListChannels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListChannelsRequest method. +// req, resp := client.ListChannelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListChannels +func (c *MediaLive) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) { + op := &request.Operation{ + Name: opListChannels, + HTTPMethod: "GET", + HTTPPath: "/prod/channels", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListChannelsInput{} + } + + output = &ListChannelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListChannels API operation for AWS Elemental MediaLive. +// +// Produces list of channels that have been created +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListChannels for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListChannels +func (c *MediaLive) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) { + req, out := c.ListChannelsRequest(input) + return out, req.Send() +} + +// ListChannelsWithContext is the same as ListChannels with the addition of +// the ability to pass a context and additional request options. +// +// See ListChannels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) { + req, out := c.ListChannelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListChannelsPages iterates over the pages of a ListChannels operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListChannels method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListChannels operation. +// pageNum := 0 +// err := client.ListChannelsPages(params, +// func(page *ListChannelsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error { + return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListChannelsPagesWithContext same as ListChannelsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListChannelsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListChannelsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListInputSecurityGroups = "ListInputSecurityGroups" + +// ListInputSecurityGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListInputSecurityGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInputSecurityGroups for more information on using the ListInputSecurityGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInputSecurityGroupsRequest method. +// req, resp := client.ListInputSecurityGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroups +func (c *MediaLive) ListInputSecurityGroupsRequest(input *ListInputSecurityGroupsInput) (req *request.Request, output *ListInputSecurityGroupsOutput) { + op := &request.Operation{ + Name: opListInputSecurityGroups, + HTTPMethod: "GET", + HTTPPath: "/prod/inputSecurityGroups", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListInputSecurityGroupsInput{} + } + + output = &ListInputSecurityGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInputSecurityGroups API operation for AWS Elemental MediaLive. +// +// Produces a list of Input Security Groups for an account +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListInputSecurityGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroups +func (c *MediaLive) ListInputSecurityGroups(input *ListInputSecurityGroupsInput) (*ListInputSecurityGroupsOutput, error) { + req, out := c.ListInputSecurityGroupsRequest(input) + return out, req.Send() +} + +// ListInputSecurityGroupsWithContext is the same as ListInputSecurityGroups with the addition of +// the ability to pass a context and additional request options. +// +// See ListInputSecurityGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListInputSecurityGroupsWithContext(ctx aws.Context, input *ListInputSecurityGroupsInput, opts ...request.Option) (*ListInputSecurityGroupsOutput, error) { + req, out := c.ListInputSecurityGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListInputSecurityGroupsPages iterates over the pages of a ListInputSecurityGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListInputSecurityGroups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListInputSecurityGroups operation. +// pageNum := 0 +// err := client.ListInputSecurityGroupsPages(params, +// func(page *ListInputSecurityGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListInputSecurityGroupsPages(input *ListInputSecurityGroupsInput, fn func(*ListInputSecurityGroupsOutput, bool) bool) error { + return c.ListInputSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListInputSecurityGroupsPagesWithContext same as ListInputSecurityGroupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListInputSecurityGroupsPagesWithContext(ctx aws.Context, input *ListInputSecurityGroupsInput, fn func(*ListInputSecurityGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListInputSecurityGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListInputSecurityGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListInputSecurityGroupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListInputs = "ListInputs" + +// ListInputsRequest generates a "aws/request.Request" representing the +// client's request for the ListInputs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInputs for more information on using the ListInputs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInputsRequest method. +// req, resp := client.ListInputsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputs +func (c *MediaLive) ListInputsRequest(input *ListInputsInput) (req *request.Request, output *ListInputsOutput) { + op := &request.Operation{ + Name: opListInputs, + HTTPMethod: "GET", + HTTPPath: "/prod/inputs", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListInputsInput{} + } + + output = &ListInputsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInputs API operation for AWS Elemental MediaLive. +// +// Produces list of inputs that have been created +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListInputs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputs +func (c *MediaLive) ListInputs(input *ListInputsInput) (*ListInputsOutput, error) { + req, out := c.ListInputsRequest(input) + return out, req.Send() +} + +// ListInputsWithContext is the same as ListInputs with the addition of +// the ability to pass a context and additional request options. +// +// See ListInputs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListInputsWithContext(ctx aws.Context, input *ListInputsInput, opts ...request.Option) (*ListInputsOutput, error) { + req, out := c.ListInputsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListInputsPages iterates over the pages of a ListInputs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListInputs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListInputs operation. +// pageNum := 0 +// err := client.ListInputsPages(params, +// func(page *ListInputsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListInputsPages(input *ListInputsInput, fn func(*ListInputsOutput, bool) bool) error { + return c.ListInputsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListInputsPagesWithContext same as ListInputsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListInputsPagesWithContext(ctx aws.Context, input *ListInputsInput, fn func(*ListInputsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListInputsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListInputsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListInputsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListOfferings = "ListOfferings" + +// ListOfferingsRequest generates a "aws/request.Request" representing the +// client's request for the ListOfferings operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListOfferings for more information on using the ListOfferings +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListOfferingsRequest method. +// req, resp := client.ListOfferingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListOfferings +func (c *MediaLive) ListOfferingsRequest(input *ListOfferingsInput) (req *request.Request, output *ListOfferingsOutput) { + op := &request.Operation{ + Name: opListOfferings, + HTTPMethod: "GET", + HTTPPath: "/prod/offerings", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListOfferingsInput{} + } + + output = &ListOfferingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListOfferings API operation for AWS Elemental MediaLive. +// +// List offerings available for purchase. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListOfferings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListOfferings +func (c *MediaLive) ListOfferings(input *ListOfferingsInput) (*ListOfferingsOutput, error) { + req, out := c.ListOfferingsRequest(input) + return out, req.Send() +} + +// ListOfferingsWithContext is the same as ListOfferings with the addition of +// the ability to pass a context and additional request options. +// +// See ListOfferings for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListOfferingsWithContext(ctx aws.Context, input *ListOfferingsInput, opts ...request.Option) (*ListOfferingsOutput, error) { + req, out := c.ListOfferingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListOfferingsPages iterates over the pages of a ListOfferings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListOfferings method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListOfferings operation. +// pageNum := 0 +// err := client.ListOfferingsPages(params, +// func(page *ListOfferingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListOfferingsPages(input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool) error { + return c.ListOfferingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListOfferingsPagesWithContext same as ListOfferingsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListOfferingsPagesWithContext(ctx aws.Context, input *ListOfferingsInput, fn func(*ListOfferingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListOfferingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListOfferingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListOfferingsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListReservations = "ListReservations" + +// ListReservationsRequest generates a "aws/request.Request" representing the +// client's request for the ListReservations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListReservations for more information on using the ListReservations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListReservationsRequest method. +// req, resp := client.ListReservationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListReservations +func (c *MediaLive) ListReservationsRequest(input *ListReservationsInput) (req *request.Request, output *ListReservationsOutput) { + op := &request.Operation{ + Name: opListReservations, + HTTPMethod: "GET", + HTTPPath: "/prod/reservations", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListReservationsInput{} + } + + output = &ListReservationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListReservations API operation for AWS Elemental MediaLive. +// +// List purchased reservations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation ListReservations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListReservations +func (c *MediaLive) ListReservations(input *ListReservationsInput) (*ListReservationsOutput, error) { + req, out := c.ListReservationsRequest(input) + return out, req.Send() +} + +// ListReservationsWithContext is the same as ListReservations with the addition of +// the ability to pass a context and additional request options. +// +// See ListReservations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListReservationsWithContext(ctx aws.Context, input *ListReservationsInput, opts ...request.Option) (*ListReservationsOutput, error) { + req, out := c.ListReservationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListReservationsPages iterates over the pages of a ListReservations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListReservations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListReservations operation. +// pageNum := 0 +// err := client.ListReservationsPages(params, +// func(page *ListReservationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaLive) ListReservationsPages(input *ListReservationsInput, fn func(*ListReservationsOutput, bool) bool) error { + return c.ListReservationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListReservationsPagesWithContext same as ListReservationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) ListReservationsPagesWithContext(ctx aws.Context, input *ListReservationsInput, fn func(*ListReservationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListReservationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListReservationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListReservationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPurchaseOffering = "PurchaseOffering" + +// PurchaseOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseOffering operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PurchaseOffering for more information on using the PurchaseOffering +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PurchaseOfferingRequest method. +// req, resp := client.PurchaseOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PurchaseOffering +func (c *MediaLive) PurchaseOfferingRequest(input *PurchaseOfferingInput) (req *request.Request, output *PurchaseOfferingOutput) { + op := &request.Operation{ + Name: opPurchaseOffering, + HTTPMethod: "POST", + HTTPPath: "/prod/offerings/{offeringId}/purchase", + } + + if input == nil { + input = &PurchaseOfferingInput{} + } + + output = &PurchaseOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PurchaseOffering API operation for AWS Elemental MediaLive. +// +// Purchase an offering and create a reservation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation PurchaseOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PurchaseOffering +func (c *MediaLive) PurchaseOffering(input *PurchaseOfferingInput) (*PurchaseOfferingOutput, error) { + req, out := c.PurchaseOfferingRequest(input) + return out, req.Send() +} + +// PurchaseOfferingWithContext is the same as PurchaseOffering with the addition of +// the ability to pass a context and additional request options. +// +// See PurchaseOffering for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) PurchaseOfferingWithContext(ctx aws.Context, input *PurchaseOfferingInput, opts ...request.Option) (*PurchaseOfferingOutput, error) { + req, out := c.PurchaseOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartChannel = "StartChannel" + +// StartChannelRequest generates a "aws/request.Request" representing the +// client's request for the StartChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartChannel for more information on using the StartChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartChannelRequest method. +// req, resp := client.StartChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel +func (c *MediaLive) StartChannelRequest(input *StartChannelInput) (req *request.Request, output *StartChannelOutput) { + op := &request.Operation{ + Name: opStartChannel, + HTTPMethod: "POST", + HTTPPath: "/prod/channels/{channelId}/start", + } + + if input == nil { + input = &StartChannelInput{} + } + + output = &StartChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartChannel API operation for AWS Elemental MediaLive. +// +// Starts an existing channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation StartChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannel +func (c *MediaLive) StartChannel(input *StartChannelInput) (*StartChannelOutput, error) { + req, out := c.StartChannelRequest(input) + return out, req.Send() +} + +// StartChannelWithContext is the same as StartChannel with the addition of +// the ability to pass a context and additional request options. +// +// See StartChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) StartChannelWithContext(ctx aws.Context, input *StartChannelInput, opts ...request.Option) (*StartChannelOutput, error) { + req, out := c.StartChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopChannel = "StopChannel" + +// StopChannelRequest generates a "aws/request.Request" representing the +// client's request for the StopChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopChannel for more information on using the StopChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopChannelRequest method. +// req, resp := client.StopChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StopChannel +func (c *MediaLive) StopChannelRequest(input *StopChannelInput) (req *request.Request, output *StopChannelOutput) { + op := &request.Operation{ + Name: opStopChannel, + HTTPMethod: "POST", + HTTPPath: "/prod/channels/{channelId}/stop", + } + + if input == nil { + input = &StopChannelInput{} + } + + output = &StopChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopChannel API operation for AWS Elemental MediaLive. +// +// Stops a running channel +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation StopChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StopChannel +func (c *MediaLive) StopChannel(input *StopChannelInput) (*StopChannelOutput, error) { + req, out := c.StopChannelRequest(input) + return out, req.Send() +} + +// StopChannelWithContext is the same as StopChannel with the addition of +// the ability to pass a context and additional request options. +// +// See StopChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) StopChannelWithContext(ctx aws.Context, input *StopChannelInput, opts ...request.Option) (*StopChannelOutput, error) { + req, out := c.StopChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateChannel = "UpdateChannel" + +// UpdateChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateChannel for more information on using the UpdateChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateChannelRequest method. +// req, resp := client.UpdateChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateChannel +func (c *MediaLive) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) { + op := &request.Operation{ + Name: opUpdateChannel, + HTTPMethod: "PUT", + HTTPPath: "/prod/channels/{channelId}", + } + + if input == nil { + input = &UpdateChannelInput{} + } + + output = &UpdateChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateChannel API operation for AWS Elemental MediaLive. +// +// Updates a channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation UpdateChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateChannel +func (c *MediaLive) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) { + req, out := c.UpdateChannelRequest(input) + return out, req.Send() +} + +// UpdateChannelWithContext is the same as UpdateChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) { + req, out := c.UpdateChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateInput = "UpdateInput" + +// UpdateInputRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInput operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInput for more information on using the UpdateInput +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInputRequest method. +// req, resp := client.UpdateInputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInput +func (c *MediaLive) UpdateInputRequest(input *UpdateInputInput) (req *request.Request, output *UpdateInputOutput) { + op := &request.Operation{ + Name: opUpdateInput, + HTTPMethod: "PUT", + HTTPPath: "/prod/inputs/{inputId}", + } + + if input == nil { + input = &UpdateInputInput{} + } + + output = &UpdateInputOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateInput API operation for AWS Elemental MediaLive. +// +// Updates an input. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation UpdateInput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInput +func (c *MediaLive) UpdateInput(input *UpdateInputInput) (*UpdateInputOutput, error) { + req, out := c.UpdateInputRequest(input) + return out, req.Send() +} + +// UpdateInputWithContext is the same as UpdateInput with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInput for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) UpdateInputWithContext(ctx aws.Context, input *UpdateInputInput, opts ...request.Option) (*UpdateInputOutput, error) { + req, out := c.UpdateInputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateInputSecurityGroup = "UpdateInputSecurityGroup" + +// UpdateInputSecurityGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateInputSecurityGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateInputSecurityGroup for more information on using the UpdateInputSecurityGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateInputSecurityGroupRequest method. +// req, resp := client.UpdateInputSecurityGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroup +func (c *MediaLive) UpdateInputSecurityGroupRequest(input *UpdateInputSecurityGroupInput) (req *request.Request, output *UpdateInputSecurityGroupOutput) { + op := &request.Operation{ + Name: opUpdateInputSecurityGroup, + HTTPMethod: "PUT", + HTTPPath: "/prod/inputSecurityGroups/{inputSecurityGroupId}", + } + + if input == nil { + input = &UpdateInputSecurityGroupInput{} + } + + output = &UpdateInputSecurityGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateInputSecurityGroup API operation for AWS Elemental MediaLive. +// +// Update an Input Security Group's Whilelists. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaLive's +// API operation UpdateInputSecurityGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeBadGatewayException "BadGatewayException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeGatewayTimeoutException "GatewayTimeoutException" +// +// * ErrCodeConflictException "ConflictException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UpdateInputSecurityGroup +func (c *MediaLive) UpdateInputSecurityGroup(input *UpdateInputSecurityGroupInput) (*UpdateInputSecurityGroupOutput, error) { + req, out := c.UpdateInputSecurityGroupRequest(input) + return out, req.Send() +} + +// UpdateInputSecurityGroupWithContext is the same as UpdateInputSecurityGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateInputSecurityGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaLive) UpdateInputSecurityGroupWithContext(ctx aws.Context, input *UpdateInputSecurityGroupInput, opts ...request.Option) (*UpdateInputSecurityGroupOutput, error) { + req, out := c.UpdateInputSecurityGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AacSettings struct { + _ struct{} `type:"structure"` + + // Average bitrate in bits/second. Valid values depend on rate control mode + // and profile. + Bitrate *float64 `locationName:"bitrate" type:"double"` + + // Mono, Stereo, or 5.1 channel layout. Valid values depend on rate control + // mode and profile. The adReceiverMix setting receives a stereo description + // plus control track and emits a mono AAC encode of the description track, + // with control data emitted in the PES header as per ETSI TS 101 154 Annex + // E. + CodingMode *string `locationName:"codingMode" type:"string" enum:"AacCodingMode"` + + // Set to "broadcasterMixedAd" when input contains pre-mixed main audio + AD + // (narration) as a stereo pair. The Audio Type field (audioType) will be set + // to 3, which signals to downstream systems that this stream contains "broadcaster + // mixed AD". Note that the input received by the encoder must contain pre-mixed + // audio; the encoder does not perform the mixing. The values in audioTypeControl + // and audioType (in AudioDescription) are ignored when set to broadcasterMixedAd.Leave + // set to "normal" when input does not contain pre-mixed audio + AD. + InputType *string `locationName:"inputType" type:"string" enum:"AacInputType"` + + // AAC Profile. + Profile *string `locationName:"profile" type:"string" enum:"AacProfile"` + + // Rate Control Mode. + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"AacRateControlMode"` + + // Sets LATM / LOAS AAC output for raw containers. + RawFormat *string `locationName:"rawFormat" type:"string" enum:"AacRawFormat"` + + // Sample rate in Hz. Valid values depend on rate control mode and profile. + SampleRate *float64 `locationName:"sampleRate" type:"double"` + + // Use MPEG-2 AAC audio instead of MPEG-4 AAC audio for raw or MPEG-2 Transport + // Stream containers. + Spec *string `locationName:"spec" type:"string" enum:"AacSpec"` + + // VBR Quality Level - Only used if rateControlMode is VBR. + VbrQuality *string `locationName:"vbrQuality" type:"string" enum:"AacVbrQuality"` +} + +// String returns the string representation +func (s AacSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AacSettings) GoString() string { + return s.String() +} + +// SetBitrate sets the Bitrate field's value. +func (s *AacSettings) SetBitrate(v float64) *AacSettings { + s.Bitrate = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *AacSettings) SetCodingMode(v string) *AacSettings { + s.CodingMode = &v + return s +} + +// SetInputType sets the InputType field's value. +func (s *AacSettings) SetInputType(v string) *AacSettings { + s.InputType = &v + return s +} + +// SetProfile sets the Profile field's value. +func (s *AacSettings) SetProfile(v string) *AacSettings { + s.Profile = &v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *AacSettings) SetRateControlMode(v string) *AacSettings { + s.RateControlMode = &v + return s +} + +// SetRawFormat sets the RawFormat field's value. +func (s *AacSettings) SetRawFormat(v string) *AacSettings { + s.RawFormat = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *AacSettings) SetSampleRate(v float64) *AacSettings { + s.SampleRate = &v + return s +} + +// SetSpec sets the Spec field's value. +func (s *AacSettings) SetSpec(v string) *AacSettings { + s.Spec = &v + return s +} + +// SetVbrQuality sets the VbrQuality field's value. +func (s *AacSettings) SetVbrQuality(v string) *AacSettings { + s.VbrQuality = &v + return s +} + +type Ac3Settings struct { + _ struct{} `type:"structure"` + + // Average bitrate in bits/second. Valid bitrates depend on the coding mode. + Bitrate *float64 `locationName:"bitrate" type:"double"` + + // Specifies the bitstream mode (bsmod) for the emitted AC-3 stream. See ATSC + // A/52-2012 for background on these values. + BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Ac3BitstreamMode"` + + // Dolby Digital coding mode. Determines number of channels. + CodingMode *string `locationName:"codingMode" type:"string" enum:"Ac3CodingMode"` + + // Sets the dialnorm for the output. If excluded and input audio is Dolby Digital, + // dialnorm will be passed through. + Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` + + // If set to filmStandard, adds dynamic range compression signaling to the output + // bitstream as defined in the Dolby Digital specification. + DrcProfile *string `locationName:"drcProfile" type:"string" enum:"Ac3DrcProfile"` + + // When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior + // to encoding. Only valid in codingMode32Lfe mode. + LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Ac3LfeFilter"` + + // When set to "followInput", encoder metadata will be sourced from the DD, + // DD+, or DolbyE decoder that supplied this audio data. If audio was not supplied + // from one of these streams, then the static metadata settings will be used. + MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Ac3MetadataControl"` +} + +// String returns the string representation +func (s Ac3Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Ac3Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Ac3Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Ac3Settings"} + if s.Dialnorm != nil && *s.Dialnorm < 1 { + invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBitrate sets the Bitrate field's value. +func (s *Ac3Settings) SetBitrate(v float64) *Ac3Settings { + s.Bitrate = &v + return s +} + +// SetBitstreamMode sets the BitstreamMode field's value. +func (s *Ac3Settings) SetBitstreamMode(v string) *Ac3Settings { + s.BitstreamMode = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *Ac3Settings) SetCodingMode(v string) *Ac3Settings { + s.CodingMode = &v + return s +} + +// SetDialnorm sets the Dialnorm field's value. +func (s *Ac3Settings) SetDialnorm(v int64) *Ac3Settings { + s.Dialnorm = &v + return s +} + +// SetDrcProfile sets the DrcProfile field's value. +func (s *Ac3Settings) SetDrcProfile(v string) *Ac3Settings { + s.DrcProfile = &v + return s +} + +// SetLfeFilter sets the LfeFilter field's value. +func (s *Ac3Settings) SetLfeFilter(v string) *Ac3Settings { + s.LfeFilter = &v + return s +} + +// SetMetadataControl sets the MetadataControl field's value. +func (s *Ac3Settings) SetMetadataControl(v string) *Ac3Settings { + s.MetadataControl = &v + return s +} + +type ArchiveContainerSettings struct { + _ struct{} `type:"structure"` + + M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"` +} + +// String returns the string representation +func (s ArchiveContainerSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArchiveContainerSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ArchiveContainerSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ArchiveContainerSettings"} + if s.M2tsSettings != nil { + if err := s.M2tsSettings.Validate(); err != nil { + invalidParams.AddNested("M2tsSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetM2tsSettings sets the M2tsSettings field's value. +func (s *ArchiveContainerSettings) SetM2tsSettings(v *M2tsSettings) *ArchiveContainerSettings { + s.M2tsSettings = v + return s +} + +type ArchiveGroupSettings struct { + _ struct{} `type:"structure"` + + // A directory and base filename where archive files should be written. + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` + + // Number of seconds to write to archive file before closing and starting a + // new one. + RolloverInterval *int64 `locationName:"rolloverInterval" min:"1" type:"integer"` +} + +// String returns the string representation +func (s ArchiveGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArchiveGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ArchiveGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ArchiveGroupSettings"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.RolloverInterval != nil && *s.RolloverInterval < 1 { + invalidParams.Add(request.NewErrParamMinValue("RolloverInterval", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *ArchiveGroupSettings) SetDestination(v *OutputLocationRef) *ArchiveGroupSettings { + s.Destination = v + return s +} + +// SetRolloverInterval sets the RolloverInterval field's value. +func (s *ArchiveGroupSettings) SetRolloverInterval(v int64) *ArchiveGroupSettings { + s.RolloverInterval = &v + return s +} + +type ArchiveOutputSettings struct { + _ struct{} `type:"structure"` + + // Settings specific to the container type of the file. + // + // ContainerSettings is a required field + ContainerSettings *ArchiveContainerSettings `locationName:"containerSettings" type:"structure" required:"true"` + + // Output file extension. If excluded, this will be auto-selected from the container + // type. + Extension *string `locationName:"extension" type:"string"` + + // String concatenated to the end of the destination filename. Required for + // multiple outputs of the same type. + NameModifier *string `locationName:"nameModifier" type:"string"` +} + +// String returns the string representation +func (s ArchiveOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ArchiveOutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ArchiveOutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ArchiveOutputSettings"} + if s.ContainerSettings == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerSettings")) + } + if s.ContainerSettings != nil { + if err := s.ContainerSettings.Validate(); err != nil { + invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerSettings sets the ContainerSettings field's value. +func (s *ArchiveOutputSettings) SetContainerSettings(v *ArchiveContainerSettings) *ArchiveOutputSettings { + s.ContainerSettings = v + return s +} + +// SetExtension sets the Extension field's value. +func (s *ArchiveOutputSettings) SetExtension(v string) *ArchiveOutputSettings { + s.Extension = &v + return s +} + +// SetNameModifier sets the NameModifier field's value. +func (s *ArchiveOutputSettings) SetNameModifier(v string) *ArchiveOutputSettings { + s.NameModifier = &v + return s +} + +type AribDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AribDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AribDestinationSettings) GoString() string { + return s.String() +} + +type AribSourceSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AribSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AribSourceSettings) GoString() string { + return s.String() +} + +type AudioChannelMapping struct { + _ struct{} `type:"structure"` + + // Indices and gain values for each input channel that should be remixed into + // this output channel. + // + // InputChannelLevels is a required field + InputChannelLevels []*InputChannelLevel `locationName:"inputChannelLevels" type:"list" required:"true"` + + // The index of the output channel being produced. + // + // OutputChannel is a required field + OutputChannel *int64 `locationName:"outputChannel" type:"integer" required:"true"` +} + +// String returns the string representation +func (s AudioChannelMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioChannelMapping) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioChannelMapping) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioChannelMapping"} + if s.InputChannelLevels == nil { + invalidParams.Add(request.NewErrParamRequired("InputChannelLevels")) + } + if s.OutputChannel == nil { + invalidParams.Add(request.NewErrParamRequired("OutputChannel")) + } + if s.InputChannelLevels != nil { + for i, v := range s.InputChannelLevels { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputChannelLevels", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputChannelLevels sets the InputChannelLevels field's value. +func (s *AudioChannelMapping) SetInputChannelLevels(v []*InputChannelLevel) *AudioChannelMapping { + s.InputChannelLevels = v + return s +} + +// SetOutputChannel sets the OutputChannel field's value. +func (s *AudioChannelMapping) SetOutputChannel(v int64) *AudioChannelMapping { + s.OutputChannel = &v + return s +} + +type AudioCodecSettings struct { + _ struct{} `type:"structure"` + + AacSettings *AacSettings `locationName:"aacSettings" type:"structure"` + + Ac3Settings *Ac3Settings `locationName:"ac3Settings" type:"structure"` + + Eac3Settings *Eac3Settings `locationName:"eac3Settings" type:"structure"` + + Mp2Settings *Mp2Settings `locationName:"mp2Settings" type:"structure"` + + PassThroughSettings *PassThroughSettings `locationName:"passThroughSettings" type:"structure"` +} + +// String returns the string representation +func (s AudioCodecSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioCodecSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioCodecSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioCodecSettings"} + if s.Ac3Settings != nil { + if err := s.Ac3Settings.Validate(); err != nil { + invalidParams.AddNested("Ac3Settings", err.(request.ErrInvalidParams)) + } + } + if s.Eac3Settings != nil { + if err := s.Eac3Settings.Validate(); err != nil { + invalidParams.AddNested("Eac3Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAacSettings sets the AacSettings field's value. +func (s *AudioCodecSettings) SetAacSettings(v *AacSettings) *AudioCodecSettings { + s.AacSettings = v + return s +} + +// SetAc3Settings sets the Ac3Settings field's value. +func (s *AudioCodecSettings) SetAc3Settings(v *Ac3Settings) *AudioCodecSettings { + s.Ac3Settings = v + return s +} + +// SetEac3Settings sets the Eac3Settings field's value. +func (s *AudioCodecSettings) SetEac3Settings(v *Eac3Settings) *AudioCodecSettings { + s.Eac3Settings = v + return s +} + +// SetMp2Settings sets the Mp2Settings field's value. +func (s *AudioCodecSettings) SetMp2Settings(v *Mp2Settings) *AudioCodecSettings { + s.Mp2Settings = v + return s +} + +// SetPassThroughSettings sets the PassThroughSettings field's value. +func (s *AudioCodecSettings) SetPassThroughSettings(v *PassThroughSettings) *AudioCodecSettings { + s.PassThroughSettings = v + return s +} + +type AudioDescription struct { + _ struct{} `type:"structure"` + + // Advanced audio normalization settings. + AudioNormalizationSettings *AudioNormalizationSettings `locationName:"audioNormalizationSettings" type:"structure"` + + // The name of the AudioSelector used as the source for this AudioDescription. + // + // AudioSelectorName is a required field + AudioSelectorName *string `locationName:"audioSelectorName" type:"string" required:"true"` + + // Applies only if audioTypeControl is useConfigured. The values for audioType + // are defined in ISO-IEC 13818-1. + AudioType *string `locationName:"audioType" type:"string" enum:"AudioType"` + + // Determines how audio type is determined. followInput: If the input contains + // an ISO 639 audioType, then that value is passed through to the output. If + // the input contains no ISO 639 audioType, the value in Audio Type is included + // in the output. useConfigured: The value in Audio Type is included in the + // output.Note that this field and audioType are both ignored if inputType is + // broadcasterMixedAd. + AudioTypeControl *string `locationName:"audioTypeControl" type:"string" enum:"AudioDescriptionAudioTypeControl"` + + // Audio codec settings. + CodecSettings *AudioCodecSettings `locationName:"codecSettings" type:"structure"` + + // Indicates the language of the audio output track. Only used if languageControlMode + // is useConfigured, or there is no ISO 639 language code specified in the input. + LanguageCode *string `locationName:"languageCode" min:"3" type:"string"` + + // Choosing followInput will cause the ISO 639 language code of the output to + // follow the ISO 639 language code of the input. The languageCode will be used + // when useConfigured is set, or when followInput is selected but there is no + // ISO 639 language code specified by the input. + LanguageCodeControl *string `locationName:"languageCodeControl" type:"string" enum:"AudioDescriptionLanguageCodeControl"` + + // The name of this AudioDescription. Outputs will use this name to uniquely + // identify this AudioDescription. Description names should be unique within + // this Live Event. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Settings that control how input audio channels are remixed into the output + // audio channels. + RemixSettings *RemixSettings `locationName:"remixSettings" type:"structure"` + + // Used for MS Smooth and Apple HLS outputs. Indicates the name displayed by + // the player (eg. English, or Director Commentary). + StreamName *string `locationName:"streamName" type:"string"` +} + +// String returns the string representation +func (s AudioDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioDescription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioDescription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioDescription"} + if s.AudioSelectorName == nil { + invalidParams.Add(request.NewErrParamRequired("AudioSelectorName")) + } + if s.LanguageCode != nil && len(*s.LanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LanguageCode", 3)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.CodecSettings != nil { + if err := s.CodecSettings.Validate(); err != nil { + invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) + } + } + if s.RemixSettings != nil { + if err := s.RemixSettings.Validate(); err != nil { + invalidParams.AddNested("RemixSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioNormalizationSettings sets the AudioNormalizationSettings field's value. +func (s *AudioDescription) SetAudioNormalizationSettings(v *AudioNormalizationSettings) *AudioDescription { + s.AudioNormalizationSettings = v + return s +} + +// SetAudioSelectorName sets the AudioSelectorName field's value. +func (s *AudioDescription) SetAudioSelectorName(v string) *AudioDescription { + s.AudioSelectorName = &v + return s +} + +// SetAudioType sets the AudioType field's value. +func (s *AudioDescription) SetAudioType(v string) *AudioDescription { + s.AudioType = &v + return s +} + +// SetAudioTypeControl sets the AudioTypeControl field's value. +func (s *AudioDescription) SetAudioTypeControl(v string) *AudioDescription { + s.AudioTypeControl = &v + return s +} + +// SetCodecSettings sets the CodecSettings field's value. +func (s *AudioDescription) SetCodecSettings(v *AudioCodecSettings) *AudioDescription { + s.CodecSettings = v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *AudioDescription) SetLanguageCode(v string) *AudioDescription { + s.LanguageCode = &v + return s +} + +// SetLanguageCodeControl sets the LanguageCodeControl field's value. +func (s *AudioDescription) SetLanguageCodeControl(v string) *AudioDescription { + s.LanguageCodeControl = &v + return s +} + +// SetName sets the Name field's value. +func (s *AudioDescription) SetName(v string) *AudioDescription { + s.Name = &v + return s +} + +// SetRemixSettings sets the RemixSettings field's value. +func (s *AudioDescription) SetRemixSettings(v *RemixSettings) *AudioDescription { + s.RemixSettings = v + return s +} + +// SetStreamName sets the StreamName field's value. +func (s *AudioDescription) SetStreamName(v string) *AudioDescription { + s.StreamName = &v + return s +} + +type AudioLanguageSelection struct { + _ struct{} `type:"structure"` + + // Selects a specific three-letter language code from within an audio source. + // + // LanguageCode is a required field + LanguageCode *string `locationName:"languageCode" type:"string" required:"true"` + + // When set to "strict", the transport stream demux strictly identifies audio + // streams by their language descriptor. If a PMT update occurs such that an + // audio stream matching the initially selected language is no longer present + // then mute will be encoded until the language returns. If "loose", then on + // a PMT update the demux will choose another audio stream in the program with + // the same stream type if it can't find one with the same language. + LanguageSelectionPolicy *string `locationName:"languageSelectionPolicy" type:"string" enum:"AudioLanguageSelectionPolicy"` +} + +// String returns the string representation +func (s AudioLanguageSelection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioLanguageSelection) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioLanguageSelection) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioLanguageSelection"} + if s.LanguageCode == nil { + invalidParams.Add(request.NewErrParamRequired("LanguageCode")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *AudioLanguageSelection) SetLanguageCode(v string) *AudioLanguageSelection { + s.LanguageCode = &v + return s +} + +// SetLanguageSelectionPolicy sets the LanguageSelectionPolicy field's value. +func (s *AudioLanguageSelection) SetLanguageSelectionPolicy(v string) *AudioLanguageSelection { + s.LanguageSelectionPolicy = &v + return s +} + +type AudioNormalizationSettings struct { + _ struct{} `type:"structure"` + + // Audio normalization algorithm to use. itu17701 conforms to the CALM Act specification, + // itu17702 conforms to the EBU R-128 specification. + Algorithm *string `locationName:"algorithm" type:"string" enum:"AudioNormalizationAlgorithm"` + + // When set to correctAudio the output audio is corrected using the chosen algorithm. + // If set to measureOnly, the audio will be measured but not adjusted. + AlgorithmControl *string `locationName:"algorithmControl" type:"string" enum:"AudioNormalizationAlgorithmControl"` + + // Target LKFS(loudness) to adjust volume to. If no value is entered, a default + // value will be used according to the chosen algorithm. The CALM Act (1770-1) + // recommends a target of -24 LKFS. The EBU R-128 specification (1770-2) recommends + // a target of -23 LKFS. + TargetLkfs *float64 `locationName:"targetLkfs" type:"double"` +} + +// String returns the string representation +func (s AudioNormalizationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioNormalizationSettings) GoString() string { + return s.String() +} + +// SetAlgorithm sets the Algorithm field's value. +func (s *AudioNormalizationSettings) SetAlgorithm(v string) *AudioNormalizationSettings { + s.Algorithm = &v + return s +} + +// SetAlgorithmControl sets the AlgorithmControl field's value. +func (s *AudioNormalizationSettings) SetAlgorithmControl(v string) *AudioNormalizationSettings { + s.AlgorithmControl = &v + return s +} + +// SetTargetLkfs sets the TargetLkfs field's value. +func (s *AudioNormalizationSettings) SetTargetLkfs(v float64) *AudioNormalizationSettings { + s.TargetLkfs = &v + return s +} + +type AudioOnlyHlsSettings struct { + _ struct{} `type:"structure"` + + // Specifies the group to which the audio Rendition belongs. + AudioGroupId *string `locationName:"audioGroupId" type:"string"` + + // For use with an audio only Stream. Must be a .jpg or .png file. If given, + // this image will be used as the cover-art for the audio only output. Ideally, + // it should be formatted for an iPhone screen for two reasons. The iPhone does + // not resize the image, it crops a centered image on the top/bottom and left/right. + // Additionally, this image file gets saved bit-for-bit into every 10-second + // segment file, so will increase bandwidth by {image file size} * {segment + // count} * {user count.}. + AudioOnlyImage *InputLocation `locationName:"audioOnlyImage" type:"structure"` + + // Four types of audio-only tracks are supported:Audio-Only Variant StreamThe + // client can play back this audio-only stream instead of video in low-bandwidth + // scenarios. Represented as an EXT-X-STREAM-INF in the HLS manifest.Alternate + // Audio, Auto Select, DefaultAlternate rendition that the client should try + // to play back by default. Represented as an EXT-X-MEDIA in the HLS manifest + // with DEFAULT=YES, AUTOSELECT=YESAlternate Audio, Auto Select, Not DefaultAlternate + // rendition that the client may try to play back by default. Represented as + // an EXT-X-MEDIA in the HLS manifest with DEFAULT=NO, AUTOSELECT=YESAlternate + // Audio, not Auto SelectAlternate rendition that the client will not try to + // play back by default. Represented as an EXT-X-MEDIA in the HLS manifest with + // DEFAULT=NO, AUTOSELECT=NO + AudioTrackType *string `locationName:"audioTrackType" type:"string" enum:"AudioOnlyHlsTrackType"` +} + +// String returns the string representation +func (s AudioOnlyHlsSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioOnlyHlsSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioOnlyHlsSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioOnlyHlsSettings"} + if s.AudioOnlyImage != nil { + if err := s.AudioOnlyImage.Validate(); err != nil { + invalidParams.AddNested("AudioOnlyImage", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioGroupId sets the AudioGroupId field's value. +func (s *AudioOnlyHlsSettings) SetAudioGroupId(v string) *AudioOnlyHlsSettings { + s.AudioGroupId = &v + return s +} + +// SetAudioOnlyImage sets the AudioOnlyImage field's value. +func (s *AudioOnlyHlsSettings) SetAudioOnlyImage(v *InputLocation) *AudioOnlyHlsSettings { + s.AudioOnlyImage = v + return s +} + +// SetAudioTrackType sets the AudioTrackType field's value. +func (s *AudioOnlyHlsSettings) SetAudioTrackType(v string) *AudioOnlyHlsSettings { + s.AudioTrackType = &v + return s +} + +type AudioPidSelection struct { + _ struct{} `type:"structure"` + + // Selects a specific PID from within a source. + // + // Pid is a required field + Pid *int64 `locationName:"pid" type:"integer" required:"true"` +} + +// String returns the string representation +func (s AudioPidSelection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioPidSelection) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioPidSelection) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioPidSelection"} + if s.Pid == nil { + invalidParams.Add(request.NewErrParamRequired("Pid")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPid sets the Pid field's value. +func (s *AudioPidSelection) SetPid(v int64) *AudioPidSelection { + s.Pid = &v + return s +} + +type AudioSelector struct { + _ struct{} `type:"structure"` + + // The name of this AudioSelector. AudioDescriptions will use this name to uniquely + // identify this Selector. Selector names should be unique per input. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // The audio selector settings. + SelectorSettings *AudioSelectorSettings `locationName:"selectorSettings" type:"structure"` +} + +// String returns the string representation +func (s AudioSelector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioSelector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioSelector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioSelector"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.SelectorSettings != nil { + if err := s.SelectorSettings.Validate(); err != nil { + invalidParams.AddNested("SelectorSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *AudioSelector) SetName(v string) *AudioSelector { + s.Name = &v + return s +} + +// SetSelectorSettings sets the SelectorSettings field's value. +func (s *AudioSelector) SetSelectorSettings(v *AudioSelectorSettings) *AudioSelector { + s.SelectorSettings = v + return s +} + +type AudioSelectorSettings struct { + _ struct{} `type:"structure"` + + AudioLanguageSelection *AudioLanguageSelection `locationName:"audioLanguageSelection" type:"structure"` + + AudioPidSelection *AudioPidSelection `locationName:"audioPidSelection" type:"structure"` +} + +// String returns the string representation +func (s AudioSelectorSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AudioSelectorSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AudioSelectorSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AudioSelectorSettings"} + if s.AudioLanguageSelection != nil { + if err := s.AudioLanguageSelection.Validate(); err != nil { + invalidParams.AddNested("AudioLanguageSelection", err.(request.ErrInvalidParams)) + } + } + if s.AudioPidSelection != nil { + if err := s.AudioPidSelection.Validate(); err != nil { + invalidParams.AddNested("AudioPidSelection", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioLanguageSelection sets the AudioLanguageSelection field's value. +func (s *AudioSelectorSettings) SetAudioLanguageSelection(v *AudioLanguageSelection) *AudioSelectorSettings { + s.AudioLanguageSelection = v + return s +} + +// SetAudioPidSelection sets the AudioPidSelection field's value. +func (s *AudioSelectorSettings) SetAudioPidSelection(v *AudioPidSelection) *AudioSelectorSettings { + s.AudioPidSelection = v + return s +} + +type AvailBlanking struct { + _ struct{} `type:"structure"` + + // Blanking image to be used. Leave empty for solid black. Only bmp and png + // images are supported. + AvailBlankingImage *InputLocation `locationName:"availBlankingImage" type:"structure"` + + // When set to enabled, causes video, audio and captions to be blanked when + // insertion metadata is added. + State *string `locationName:"state" type:"string" enum:"AvailBlankingState"` +} + +// String returns the string representation +func (s AvailBlanking) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailBlanking) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AvailBlanking) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AvailBlanking"} + if s.AvailBlankingImage != nil { + if err := s.AvailBlankingImage.Validate(); err != nil { + invalidParams.AddNested("AvailBlankingImage", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailBlankingImage sets the AvailBlankingImage field's value. +func (s *AvailBlanking) SetAvailBlankingImage(v *InputLocation) *AvailBlanking { + s.AvailBlankingImage = v + return s +} + +// SetState sets the State field's value. +func (s *AvailBlanking) SetState(v string) *AvailBlanking { + s.State = &v + return s +} + +type AvailConfiguration struct { + _ struct{} `type:"structure"` + + // Ad avail settings. + AvailSettings *AvailSettings `locationName:"availSettings" type:"structure"` +} + +// String returns the string representation +func (s AvailConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AvailConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AvailConfiguration"} + if s.AvailSettings != nil { + if err := s.AvailSettings.Validate(); err != nil { + invalidParams.AddNested("AvailSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailSettings sets the AvailSettings field's value. +func (s *AvailConfiguration) SetAvailSettings(v *AvailSettings) *AvailConfiguration { + s.AvailSettings = v + return s +} + +type AvailSettings struct { + _ struct{} `type:"structure"` + + Scte35SpliceInsert *Scte35SpliceInsert `locationName:"scte35SpliceInsert" type:"structure"` + + Scte35TimeSignalApos *Scte35TimeSignalApos `locationName:"scte35TimeSignalApos" type:"structure"` +} + +// String returns the string representation +func (s AvailSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AvailSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AvailSettings"} + if s.Scte35SpliceInsert != nil { + if err := s.Scte35SpliceInsert.Validate(); err != nil { + invalidParams.AddNested("Scte35SpliceInsert", err.(request.ErrInvalidParams)) + } + } + if s.Scte35TimeSignalApos != nil { + if err := s.Scte35TimeSignalApos.Validate(); err != nil { + invalidParams.AddNested("Scte35TimeSignalApos", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScte35SpliceInsert sets the Scte35SpliceInsert field's value. +func (s *AvailSettings) SetScte35SpliceInsert(v *Scte35SpliceInsert) *AvailSettings { + s.Scte35SpliceInsert = v + return s +} + +// SetScte35TimeSignalApos sets the Scte35TimeSignalApos field's value. +func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailSettings { + s.Scte35TimeSignalApos = v + return s +} + +// A list of schedule actions to create (in a request) or that have been created +// (in a response). +type BatchScheduleActionCreateRequest struct { + _ struct{} `type:"structure"` + + // A list of schedule actions to create. + // + // ScheduleActions is a required field + ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchScheduleActionCreateRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchScheduleActionCreateRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchScheduleActionCreateRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchScheduleActionCreateRequest"} + if s.ScheduleActions == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduleActions")) + } + if s.ScheduleActions != nil { + for i, v := range s.ScheduleActions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ScheduleActions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScheduleActions sets the ScheduleActions field's value. +func (s *BatchScheduleActionCreateRequest) SetScheduleActions(v []*ScheduleAction) *BatchScheduleActionCreateRequest { + s.ScheduleActions = v + return s +} + +// List of actions that have been created in the schedule. +type BatchScheduleActionCreateResult struct { + _ struct{} `type:"structure"` + + // List of actions that have been created in the schedule. + // + // ScheduleActions is a required field + ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchScheduleActionCreateResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchScheduleActionCreateResult) GoString() string { + return s.String() +} + +// SetScheduleActions sets the ScheduleActions field's value. +func (s *BatchScheduleActionCreateResult) SetScheduleActions(v []*ScheduleAction) *BatchScheduleActionCreateResult { + s.ScheduleActions = v + return s +} + +// A list of schedule actions to delete. +type BatchScheduleActionDeleteRequest struct { + _ struct{} `type:"structure"` + + // A list of schedule actions to delete. + // + // ActionNames is a required field + ActionNames []*string `locationName:"actionNames" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchScheduleActionDeleteRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchScheduleActionDeleteRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchScheduleActionDeleteRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchScheduleActionDeleteRequest"} + if s.ActionNames == nil { + invalidParams.Add(request.NewErrParamRequired("ActionNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionNames sets the ActionNames field's value. +func (s *BatchScheduleActionDeleteRequest) SetActionNames(v []*string) *BatchScheduleActionDeleteRequest { + s.ActionNames = v + return s +} + +// List of actions that have been deleted from the schedule. +type BatchScheduleActionDeleteResult struct { + _ struct{} `type:"structure"` + + // List of actions that have been deleted from the schedule. + // + // ScheduleActions is a required field + ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchScheduleActionDeleteResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchScheduleActionDeleteResult) GoString() string { + return s.String() +} + +// SetScheduleActions sets the ScheduleActions field's value. +func (s *BatchScheduleActionDeleteResult) SetScheduleActions(v []*ScheduleAction) *BatchScheduleActionDeleteResult { + s.ScheduleActions = v + return s +} + +// A request to create actions (add actions to the schedule), delete actions +// (remove actions from the schedule), or both create and delete actions. +type BatchUpdateScheduleInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` + + // Schedule actions to create in the schedule. + Creates *BatchScheduleActionCreateRequest `locationName:"creates" type:"structure"` + + // Schedule actions to delete from the schedule. + Deletes *BatchScheduleActionDeleteRequest `locationName:"deletes" type:"structure"` +} + +// String returns the string representation +func (s BatchUpdateScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchUpdateScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchUpdateScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchUpdateScheduleInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + if s.Creates != nil { + if err := s.Creates.Validate(); err != nil { + invalidParams.AddNested("Creates", err.(request.ErrInvalidParams)) + } + } + if s.Deletes != nil { + if err := s.Deletes.Validate(); err != nil { + invalidParams.AddNested("Deletes", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *BatchUpdateScheduleInput) SetChannelId(v string) *BatchUpdateScheduleInput { + s.ChannelId = &v + return s +} + +// SetCreates sets the Creates field's value. +func (s *BatchUpdateScheduleInput) SetCreates(v *BatchScheduleActionCreateRequest) *BatchUpdateScheduleInput { + s.Creates = v + return s +} + +// SetDeletes sets the Deletes field's value. +func (s *BatchUpdateScheduleInput) SetDeletes(v *BatchScheduleActionDeleteRequest) *BatchUpdateScheduleInput { + s.Deletes = v + return s +} + +type BatchUpdateScheduleOutput struct { + _ struct{} `type:"structure"` + + // List of actions that have been created in the schedule. + Creates *BatchScheduleActionCreateResult `locationName:"creates" type:"structure"` + + // List of actions that have been deleted from the schedule. + Deletes *BatchScheduleActionDeleteResult `locationName:"deletes" type:"structure"` +} + +// String returns the string representation +func (s BatchUpdateScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchUpdateScheduleOutput) GoString() string { + return s.String() +} + +// SetCreates sets the Creates field's value. +func (s *BatchUpdateScheduleOutput) SetCreates(v *BatchScheduleActionCreateResult) *BatchUpdateScheduleOutput { + s.Creates = v + return s +} + +// SetDeletes sets the Deletes field's value. +func (s *BatchUpdateScheduleOutput) SetDeletes(v *BatchScheduleActionDeleteResult) *BatchUpdateScheduleOutput { + s.Deletes = v + return s +} + +type BlackoutSlate struct { + _ struct{} `type:"structure"` + + // Blackout slate image to be used. Leave empty for solid black. Only bmp and + // png images are supported. + BlackoutSlateImage *InputLocation `locationName:"blackoutSlateImage" type:"structure"` + + // Setting to enabled causes the encoder to blackout the video, audio, and captions, + // and raise the "Network Blackout Image" slate when an SCTE104/35 Network End + // Segmentation Descriptor is encountered. The blackout will be lifted when + // the Network Start Segmentation Descriptor is encountered. The Network End + // and Network Start descriptors must contain a network ID that matches the + // value entered in "Network ID". + NetworkEndBlackout *string `locationName:"networkEndBlackout" type:"string" enum:"BlackoutSlateNetworkEndBlackout"` + + // Path to local file to use as Network End Blackout image. Image will be scaled + // to fill the entire output raster. + NetworkEndBlackoutImage *InputLocation `locationName:"networkEndBlackoutImage" type:"structure"` + + // Provides Network ID that matches EIDR ID format (e.g., "10.XXXX/XXXX-XXXX-XXXX-XXXX-XXXX-C"). + NetworkId *string `locationName:"networkId" min:"34" type:"string"` + + // When set to enabled, causes video, audio and captions to be blanked when + // indicated by program metadata. + State *string `locationName:"state" type:"string" enum:"BlackoutSlateState"` +} + +// String returns the string representation +func (s BlackoutSlate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BlackoutSlate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BlackoutSlate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BlackoutSlate"} + if s.NetworkId != nil && len(*s.NetworkId) < 34 { + invalidParams.Add(request.NewErrParamMinLen("NetworkId", 34)) + } + if s.BlackoutSlateImage != nil { + if err := s.BlackoutSlateImage.Validate(); err != nil { + invalidParams.AddNested("BlackoutSlateImage", err.(request.ErrInvalidParams)) + } + } + if s.NetworkEndBlackoutImage != nil { + if err := s.NetworkEndBlackoutImage.Validate(); err != nil { + invalidParams.AddNested("NetworkEndBlackoutImage", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBlackoutSlateImage sets the BlackoutSlateImage field's value. +func (s *BlackoutSlate) SetBlackoutSlateImage(v *InputLocation) *BlackoutSlate { + s.BlackoutSlateImage = v + return s +} + +// SetNetworkEndBlackout sets the NetworkEndBlackout field's value. +func (s *BlackoutSlate) SetNetworkEndBlackout(v string) *BlackoutSlate { + s.NetworkEndBlackout = &v + return s +} + +// SetNetworkEndBlackoutImage sets the NetworkEndBlackoutImage field's value. +func (s *BlackoutSlate) SetNetworkEndBlackoutImage(v *InputLocation) *BlackoutSlate { + s.NetworkEndBlackoutImage = v + return s +} + +// SetNetworkId sets the NetworkId field's value. +func (s *BlackoutSlate) SetNetworkId(v string) *BlackoutSlate { + s.NetworkId = &v + return s +} + +// SetState sets the State field's value. +func (s *BlackoutSlate) SetState(v string) *BlackoutSlate { + s.State = &v + return s +} + +type BurnInDestinationSettings struct { + _ struct{} `type:"structure"` + + // If no explicit xPosition or yPosition is provided, setting alignment to centered + // will place the captions at the bottom center of the output. Similarly, setting + // a left alignment will align captions to the bottom left of the output. If + // x and y positions are given in conjunction with the alignment parameter, + // the font will be justified (either left or centered) relative to those coordinates. + // Selecting "smart" justification will left-justify live subtitles and center-justify + // pre-recorded subtitles. All burn-in and DVB-Sub font settings must match. + Alignment *string `locationName:"alignment" type:"string" enum:"BurnInAlignment"` + + // Specifies the color of the rectangle behind the captions. All burn-in and + // DVB-Sub font settings must match. + BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"BurnInBackgroundColor"` + + // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. + // Leaving this parameter out is equivalent to setting it to 0 (transparent). + // All burn-in and DVB-Sub font settings must match. + BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` + + // External font file used for caption burn-in. File extension must be 'ttf' + // or 'tte'. Although the user can select output fonts for many different types + // of input captions, embedded, STL and teletext sources use a strict grid system. + // Using external fonts with these caption sources could cause unexpected display + // of proportional fonts. All burn-in and DVB-Sub font settings must match. + Font *InputLocation `locationName:"font" type:"structure"` + + // Specifies the color of the burned-in captions. This option is not valid for + // source captions that are STL, 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + FontColor *string `locationName:"fontColor" type:"string" enum:"BurnInFontColor"` + + // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent. + // All burn-in and DVB-Sub font settings must match. + FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` + + // Font resolution in DPI (dots per inch); default is 96 dpi. All burn-in and + // DVB-Sub font settings must match. + FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` + + // When set to 'auto' fontSize will scale depending on the size of the output. + // Giving a positive integer will specify the exact font size in points. All + // burn-in and DVB-Sub font settings must match. + FontSize *string `locationName:"fontSize" type:"string"` + + // Specifies font outline color. This option is not valid for source captions + // that are either 608/embedded or teletext. These source settings are already + // pre-defined by the caption stream. All burn-in and DVB-Sub font settings + // must match. + OutlineColor *string `locationName:"outlineColor" type:"string" enum:"BurnInOutlineColor"` + + // Specifies font outline size in pixels. This option is not valid for source + // captions that are either 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + OutlineSize *int64 `locationName:"outlineSize" type:"integer"` + + // Specifies the color of the shadow cast by the captions. All burn-in and DVB-Sub + // font settings must match. + ShadowColor *string `locationName:"shadowColor" type:"string" enum:"BurnInShadowColor"` + + // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving + // this parameter out is equivalent to setting it to 0 (transparent). All burn-in + // and DVB-Sub font settings must match. + ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` + + // Specifies the horizontal offset of the shadow relative to the captions in + // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. + // All burn-in and DVB-Sub font settings must match. + ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` + + // Specifies the vertical offset of the shadow relative to the captions in pixels. + // A value of -2 would result in a shadow offset 2 pixels above the text. All + // burn-in and DVB-Sub font settings must match. + ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` + + // Controls whether a fixed grid size will be used to generate the output subtitles + // bitmap. Only applicable for Teletext inputs and DVB-Sub/Burn-in outputs. + TeletextGridControl *string `locationName:"teletextGridControl" type:"string" enum:"BurnInTeletextGridControl"` + + // Specifies the horizontal position of the caption relative to the left side + // of the output in pixels. A value of 10 would result in the captions starting + // 10 pixels from the left of the output. If no explicit xPosition is provided, + // the horizontal caption position will be determined by the alignment parameter. + // All burn-in and DVB-Sub font settings must match. + XPosition *int64 `locationName:"xPosition" type:"integer"` + + // Specifies the vertical position of the caption relative to the top of the + // output in pixels. A value of 10 would result in the captions starting 10 + // pixels from the top of the output. If no explicit yPosition is provided, + // the caption will be positioned towards the bottom of the output. All burn-in + // and DVB-Sub font settings must match. + YPosition *int64 `locationName:"yPosition" type:"integer"` +} + +// String returns the string representation +func (s BurnInDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BurnInDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BurnInDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BurnInDestinationSettings"} + if s.FontResolution != nil && *s.FontResolution < 96 { + invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) + } + if s.Font != nil { + if err := s.Font.Validate(); err != nil { + invalidParams.AddNested("Font", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlignment sets the Alignment field's value. +func (s *BurnInDestinationSettings) SetAlignment(v string) *BurnInDestinationSettings { + s.Alignment = &v + return s +} + +// SetBackgroundColor sets the BackgroundColor field's value. +func (s *BurnInDestinationSettings) SetBackgroundColor(v string) *BurnInDestinationSettings { + s.BackgroundColor = &v + return s +} + +// SetBackgroundOpacity sets the BackgroundOpacity field's value. +func (s *BurnInDestinationSettings) SetBackgroundOpacity(v int64) *BurnInDestinationSettings { + s.BackgroundOpacity = &v + return s +} + +// SetFont sets the Font field's value. +func (s *BurnInDestinationSettings) SetFont(v *InputLocation) *BurnInDestinationSettings { + s.Font = v + return s +} + +// SetFontColor sets the FontColor field's value. +func (s *BurnInDestinationSettings) SetFontColor(v string) *BurnInDestinationSettings { + s.FontColor = &v + return s +} + +// SetFontOpacity sets the FontOpacity field's value. +func (s *BurnInDestinationSettings) SetFontOpacity(v int64) *BurnInDestinationSettings { + s.FontOpacity = &v + return s +} + +// SetFontResolution sets the FontResolution field's value. +func (s *BurnInDestinationSettings) SetFontResolution(v int64) *BurnInDestinationSettings { + s.FontResolution = &v + return s +} + +// SetFontSize sets the FontSize field's value. +func (s *BurnInDestinationSettings) SetFontSize(v string) *BurnInDestinationSettings { + s.FontSize = &v + return s +} + +// SetOutlineColor sets the OutlineColor field's value. +func (s *BurnInDestinationSettings) SetOutlineColor(v string) *BurnInDestinationSettings { + s.OutlineColor = &v + return s +} + +// SetOutlineSize sets the OutlineSize field's value. +func (s *BurnInDestinationSettings) SetOutlineSize(v int64) *BurnInDestinationSettings { + s.OutlineSize = &v + return s +} + +// SetShadowColor sets the ShadowColor field's value. +func (s *BurnInDestinationSettings) SetShadowColor(v string) *BurnInDestinationSettings { + s.ShadowColor = &v + return s +} + +// SetShadowOpacity sets the ShadowOpacity field's value. +func (s *BurnInDestinationSettings) SetShadowOpacity(v int64) *BurnInDestinationSettings { + s.ShadowOpacity = &v + return s +} + +// SetShadowXOffset sets the ShadowXOffset field's value. +func (s *BurnInDestinationSettings) SetShadowXOffset(v int64) *BurnInDestinationSettings { + s.ShadowXOffset = &v + return s +} + +// SetShadowYOffset sets the ShadowYOffset field's value. +func (s *BurnInDestinationSettings) SetShadowYOffset(v int64) *BurnInDestinationSettings { + s.ShadowYOffset = &v + return s +} + +// SetTeletextGridControl sets the TeletextGridControl field's value. +func (s *BurnInDestinationSettings) SetTeletextGridControl(v string) *BurnInDestinationSettings { + s.TeletextGridControl = &v + return s +} + +// SetXPosition sets the XPosition field's value. +func (s *BurnInDestinationSettings) SetXPosition(v int64) *BurnInDestinationSettings { + s.XPosition = &v + return s +} + +// SetYPosition sets the YPosition field's value. +func (s *BurnInDestinationSettings) SetYPosition(v int64) *BurnInDestinationSettings { + s.YPosition = &v + return s +} + +// Output groups for this Live Event. Output groups contain information about +// where streams should be distributed. +type CaptionDescription struct { + _ struct{} `type:"structure"` + + // Specifies which input caption selector to use as a caption source when generating + // output captions. This field should match a captionSelector name. + // + // CaptionSelectorName is a required field + CaptionSelectorName *string `locationName:"captionSelectorName" type:"string" required:"true"` + + // Additional settings for captions destination that depend on the destination + // type. + DestinationSettings *CaptionDestinationSettings `locationName:"destinationSettings" type:"structure"` + + // ISO 639-2 three-digit code: http://www.loc.gov/standards/iso639-2/ + LanguageCode *string `locationName:"languageCode" type:"string"` + + // Human readable information to indicate captions available for players (eg. + // English, or Spanish). + LanguageDescription *string `locationName:"languageDescription" type:"string"` + + // Name of the caption description. Used to associate a caption description + // with an output. Names must be unique within an event. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` +} + +// String returns the string representation +func (s CaptionDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionDescription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionDescription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionDescription"} + if s.CaptionSelectorName == nil { + invalidParams.Add(request.NewErrParamRequired("CaptionSelectorName")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.DestinationSettings != nil { + if err := s.DestinationSettings.Validate(); err != nil { + invalidParams.AddNested("DestinationSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCaptionSelectorName sets the CaptionSelectorName field's value. +func (s *CaptionDescription) SetCaptionSelectorName(v string) *CaptionDescription { + s.CaptionSelectorName = &v + return s +} + +// SetDestinationSettings sets the DestinationSettings field's value. +func (s *CaptionDescription) SetDestinationSettings(v *CaptionDestinationSettings) *CaptionDescription { + s.DestinationSettings = v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CaptionDescription) SetLanguageCode(v string) *CaptionDescription { + s.LanguageCode = &v + return s +} + +// SetLanguageDescription sets the LanguageDescription field's value. +func (s *CaptionDescription) SetLanguageDescription(v string) *CaptionDescription { + s.LanguageDescription = &v + return s +} + +// SetName sets the Name field's value. +func (s *CaptionDescription) SetName(v string) *CaptionDescription { + s.Name = &v + return s +} + +type CaptionDestinationSettings struct { + _ struct{} `type:"structure"` + + AribDestinationSettings *AribDestinationSettings `locationName:"aribDestinationSettings" type:"structure"` + + BurnInDestinationSettings *BurnInDestinationSettings `locationName:"burnInDestinationSettings" type:"structure"` + + DvbSubDestinationSettings *DvbSubDestinationSettings `locationName:"dvbSubDestinationSettings" type:"structure"` + + EmbeddedDestinationSettings *EmbeddedDestinationSettings `locationName:"embeddedDestinationSettings" type:"structure"` + + EmbeddedPlusScte20DestinationSettings *EmbeddedPlusScte20DestinationSettings `locationName:"embeddedPlusScte20DestinationSettings" type:"structure"` + + RtmpCaptionInfoDestinationSettings *RtmpCaptionInfoDestinationSettings `locationName:"rtmpCaptionInfoDestinationSettings" type:"structure"` + + Scte20PlusEmbeddedDestinationSettings *Scte20PlusEmbeddedDestinationSettings `locationName:"scte20PlusEmbeddedDestinationSettings" type:"structure"` + + Scte27DestinationSettings *Scte27DestinationSettings `locationName:"scte27DestinationSettings" type:"structure"` + + SmpteTtDestinationSettings *SmpteTtDestinationSettings `locationName:"smpteTtDestinationSettings" type:"structure"` + + TeletextDestinationSettings *TeletextDestinationSettings `locationName:"teletextDestinationSettings" type:"structure"` + + TtmlDestinationSettings *TtmlDestinationSettings `locationName:"ttmlDestinationSettings" type:"structure"` + + WebvttDestinationSettings *WebvttDestinationSettings `locationName:"webvttDestinationSettings" type:"structure"` +} + +// String returns the string representation +func (s CaptionDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionDestinationSettings"} + if s.BurnInDestinationSettings != nil { + if err := s.BurnInDestinationSettings.Validate(); err != nil { + invalidParams.AddNested("BurnInDestinationSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbSubDestinationSettings != nil { + if err := s.DvbSubDestinationSettings.Validate(); err != nil { + invalidParams.AddNested("DvbSubDestinationSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAribDestinationSettings sets the AribDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetAribDestinationSettings(v *AribDestinationSettings) *CaptionDestinationSettings { + s.AribDestinationSettings = v + return s +} + +// SetBurnInDestinationSettings sets the BurnInDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetBurnInDestinationSettings(v *BurnInDestinationSettings) *CaptionDestinationSettings { + s.BurnInDestinationSettings = v + return s +} + +// SetDvbSubDestinationSettings sets the DvbSubDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetDvbSubDestinationSettings(v *DvbSubDestinationSettings) *CaptionDestinationSettings { + s.DvbSubDestinationSettings = v + return s +} + +// SetEmbeddedDestinationSettings sets the EmbeddedDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetEmbeddedDestinationSettings(v *EmbeddedDestinationSettings) *CaptionDestinationSettings { + s.EmbeddedDestinationSettings = v + return s +} + +// SetEmbeddedPlusScte20DestinationSettings sets the EmbeddedPlusScte20DestinationSettings field's value. +func (s *CaptionDestinationSettings) SetEmbeddedPlusScte20DestinationSettings(v *EmbeddedPlusScte20DestinationSettings) *CaptionDestinationSettings { + s.EmbeddedPlusScte20DestinationSettings = v + return s +} + +// SetRtmpCaptionInfoDestinationSettings sets the RtmpCaptionInfoDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetRtmpCaptionInfoDestinationSettings(v *RtmpCaptionInfoDestinationSettings) *CaptionDestinationSettings { + s.RtmpCaptionInfoDestinationSettings = v + return s +} + +// SetScte20PlusEmbeddedDestinationSettings sets the Scte20PlusEmbeddedDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetScte20PlusEmbeddedDestinationSettings(v *Scte20PlusEmbeddedDestinationSettings) *CaptionDestinationSettings { + s.Scte20PlusEmbeddedDestinationSettings = v + return s +} + +// SetScte27DestinationSettings sets the Scte27DestinationSettings field's value. +func (s *CaptionDestinationSettings) SetScte27DestinationSettings(v *Scte27DestinationSettings) *CaptionDestinationSettings { + s.Scte27DestinationSettings = v + return s +} + +// SetSmpteTtDestinationSettings sets the SmpteTtDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetSmpteTtDestinationSettings(v *SmpteTtDestinationSettings) *CaptionDestinationSettings { + s.SmpteTtDestinationSettings = v + return s +} + +// SetTeletextDestinationSettings sets the TeletextDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetTeletextDestinationSettings(v *TeletextDestinationSettings) *CaptionDestinationSettings { + s.TeletextDestinationSettings = v + return s +} + +// SetTtmlDestinationSettings sets the TtmlDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetTtmlDestinationSettings(v *TtmlDestinationSettings) *CaptionDestinationSettings { + s.TtmlDestinationSettings = v + return s +} + +// SetWebvttDestinationSettings sets the WebvttDestinationSettings field's value. +func (s *CaptionDestinationSettings) SetWebvttDestinationSettings(v *WebvttDestinationSettings) *CaptionDestinationSettings { + s.WebvttDestinationSettings = v + return s +} + +// Maps a caption channel to an ISO 693-2 language code (http://www.loc.gov/standards/iso639-2), +// with an optional description. +type CaptionLanguageMapping struct { + _ struct{} `type:"structure"` + + // The closed caption channel being described by this CaptionLanguageMapping. + // Each channel mapping must have a unique channel number (maximum of 4) + // + // CaptionChannel is a required field + CaptionChannel *int64 `locationName:"captionChannel" min:"1" type:"integer" required:"true"` + + // Three character ISO 639-2 language code (see http://www.loc.gov/standards/iso639-2) + // + // LanguageCode is a required field + LanguageCode *string `locationName:"languageCode" min:"3" type:"string" required:"true"` + + // Textual description of language + // + // LanguageDescription is a required field + LanguageDescription *string `locationName:"languageDescription" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CaptionLanguageMapping) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionLanguageMapping) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionLanguageMapping) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionLanguageMapping"} + if s.CaptionChannel == nil { + invalidParams.Add(request.NewErrParamRequired("CaptionChannel")) + } + if s.CaptionChannel != nil && *s.CaptionChannel < 1 { + invalidParams.Add(request.NewErrParamMinValue("CaptionChannel", 1)) + } + if s.LanguageCode == nil { + invalidParams.Add(request.NewErrParamRequired("LanguageCode")) + } + if s.LanguageCode != nil && len(*s.LanguageCode) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LanguageCode", 3)) + } + if s.LanguageDescription == nil { + invalidParams.Add(request.NewErrParamRequired("LanguageDescription")) + } + if s.LanguageDescription != nil && len(*s.LanguageDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LanguageDescription", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCaptionChannel sets the CaptionChannel field's value. +func (s *CaptionLanguageMapping) SetCaptionChannel(v int64) *CaptionLanguageMapping { + s.CaptionChannel = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CaptionLanguageMapping) SetLanguageCode(v string) *CaptionLanguageMapping { + s.LanguageCode = &v + return s +} + +// SetLanguageDescription sets the LanguageDescription field's value. +func (s *CaptionLanguageMapping) SetLanguageDescription(v string) *CaptionLanguageMapping { + s.LanguageDescription = &v + return s +} + +// Output groups for this Live Event. Output groups contain information about +// where streams should be distributed. +type CaptionSelector struct { + _ struct{} `type:"structure"` + + // When specified this field indicates the three letter language code of the + // caption track to extract from the source. + LanguageCode *string `locationName:"languageCode" type:"string"` + + // Name identifier for a caption selector. This name is used to associate this + // caption selector with one or more caption descriptions. Names must be unique + // within an event. + // + // Name is a required field + Name *string `locationName:"name" min:"1" type:"string" required:"true"` + + // Caption selector settings. + SelectorSettings *CaptionSelectorSettings `locationName:"selectorSettings" type:"structure"` +} + +// String returns the string representation +func (s CaptionSelector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionSelector) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionSelector) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionSelector"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.SelectorSettings != nil { + if err := s.SelectorSettings.Validate(); err != nil { + invalidParams.AddNested("SelectorSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *CaptionSelector) SetLanguageCode(v string) *CaptionSelector { + s.LanguageCode = &v + return s +} + +// SetName sets the Name field's value. +func (s *CaptionSelector) SetName(v string) *CaptionSelector { + s.Name = &v + return s +} + +// SetSelectorSettings sets the SelectorSettings field's value. +func (s *CaptionSelector) SetSelectorSettings(v *CaptionSelectorSettings) *CaptionSelector { + s.SelectorSettings = v + return s +} + +type CaptionSelectorSettings struct { + _ struct{} `type:"structure"` + + AribSourceSettings *AribSourceSettings `locationName:"aribSourceSettings" type:"structure"` + + DvbSubSourceSettings *DvbSubSourceSettings `locationName:"dvbSubSourceSettings" type:"structure"` + + EmbeddedSourceSettings *EmbeddedSourceSettings `locationName:"embeddedSourceSettings" type:"structure"` + + Scte20SourceSettings *Scte20SourceSettings `locationName:"scte20SourceSettings" type:"structure"` + + Scte27SourceSettings *Scte27SourceSettings `locationName:"scte27SourceSettings" type:"structure"` + + TeletextSourceSettings *TeletextSourceSettings `locationName:"teletextSourceSettings" type:"structure"` +} + +// String returns the string representation +func (s CaptionSelectorSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CaptionSelectorSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CaptionSelectorSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CaptionSelectorSettings"} + if s.DvbSubSourceSettings != nil { + if err := s.DvbSubSourceSettings.Validate(); err != nil { + invalidParams.AddNested("DvbSubSourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.EmbeddedSourceSettings != nil { + if err := s.EmbeddedSourceSettings.Validate(); err != nil { + invalidParams.AddNested("EmbeddedSourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.Scte20SourceSettings != nil { + if err := s.Scte20SourceSettings.Validate(); err != nil { + invalidParams.AddNested("Scte20SourceSettings", err.(request.ErrInvalidParams)) + } + } + if s.Scte27SourceSettings != nil { + if err := s.Scte27SourceSettings.Validate(); err != nil { + invalidParams.AddNested("Scte27SourceSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAribSourceSettings sets the AribSourceSettings field's value. +func (s *CaptionSelectorSettings) SetAribSourceSettings(v *AribSourceSettings) *CaptionSelectorSettings { + s.AribSourceSettings = v + return s +} + +// SetDvbSubSourceSettings sets the DvbSubSourceSettings field's value. +func (s *CaptionSelectorSettings) SetDvbSubSourceSettings(v *DvbSubSourceSettings) *CaptionSelectorSettings { + s.DvbSubSourceSettings = v + return s +} + +// SetEmbeddedSourceSettings sets the EmbeddedSourceSettings field's value. +func (s *CaptionSelectorSettings) SetEmbeddedSourceSettings(v *EmbeddedSourceSettings) *CaptionSelectorSettings { + s.EmbeddedSourceSettings = v + return s +} + +// SetScte20SourceSettings sets the Scte20SourceSettings field's value. +func (s *CaptionSelectorSettings) SetScte20SourceSettings(v *Scte20SourceSettings) *CaptionSelectorSettings { + s.Scte20SourceSettings = v + return s +} + +// SetScte27SourceSettings sets the Scte27SourceSettings field's value. +func (s *CaptionSelectorSettings) SetScte27SourceSettings(v *Scte27SourceSettings) *CaptionSelectorSettings { + s.Scte27SourceSettings = v + return s +} + +// SetTeletextSourceSettings sets the TeletextSourceSettings field's value. +func (s *CaptionSelectorSettings) SetTeletextSourceSettings(v *TeletextSourceSettings) *CaptionSelectorSettings { + s.TeletextSourceSettings = v + return s +} + +type Channel struct { + _ struct{} `type:"structure"` + + // The unique arn of the channel. + Arn *string `locationName:"arn" type:"string"` + + // A list of destinations of the channel. For UDP outputs, there is onedestination + // per output. For other types (HLS, for example), there isone destination per + // packager. + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + // The endpoints where outgoing connections initiate from + EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + // The unique id of the channel. + Id *string `locationName:"id" type:"string"` + + // List of input attachments for channel. + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level being written to CloudWatch Logs. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + // The name of the channel. (user-mutable) + Name *string `locationName:"name" type:"string"` + + // The number of currently healthy pipelines. + PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` + + // The Amazon Resource Name (ARN) of the role assumed when running the Channel. + RoleArn *string `locationName:"roleArn" type:"string"` + + State *string `locationName:"state" type:"string" enum:"ChannelState"` +} + +// String returns the string representation +func (s Channel) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Channel) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Channel) SetArn(v string) *Channel { + s.Arn = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *Channel) SetDestinations(v []*OutputDestination) *Channel { + s.Destinations = v + return s +} + +// SetEgressEndpoints sets the EgressEndpoints field's value. +func (s *Channel) SetEgressEndpoints(v []*ChannelEgressEndpoint) *Channel { + s.EgressEndpoints = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *Channel) SetEncoderSettings(v *EncoderSettings) *Channel { + s.EncoderSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *Channel) SetId(v string) *Channel { + s.Id = &v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *Channel) SetInputAttachments(v []*InputAttachment) *Channel { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *Channel) SetInputSpecification(v *InputSpecification) *Channel { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *Channel) SetLogLevel(v string) *Channel { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *Channel) SetName(v string) *Channel { + s.Name = &v + return s +} + +// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. +func (s *Channel) SetPipelinesRunningCount(v int64) *Channel { + s.PipelinesRunningCount = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *Channel) SetRoleArn(v string) *Channel { + s.RoleArn = &v + return s +} + +// SetState sets the State field's value. +func (s *Channel) SetState(v string) *Channel { + s.State = &v + return s +} + +type ChannelEgressEndpoint struct { + _ struct{} `type:"structure"` + + // Public IP of where a channel's output comes from + SourceIp *string `locationName:"sourceIp" type:"string"` +} + +// String returns the string representation +func (s ChannelEgressEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelEgressEndpoint) GoString() string { + return s.String() +} + +// SetSourceIp sets the SourceIp field's value. +func (s *ChannelEgressEndpoint) SetSourceIp(v string) *ChannelEgressEndpoint { + s.SourceIp = &v + return s +} + +type ChannelSummary struct { + _ struct{} `type:"structure"` + + // The unique arn of the channel. + Arn *string `locationName:"arn" type:"string"` + + // A list of destinations of the channel. For UDP outputs, there is onedestination + // per output. For other types (HLS, for example), there isone destination per + // packager. + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + // The endpoints where outgoing connections initiate from + EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` + + // The unique id of the channel. + Id *string `locationName:"id" type:"string"` + + // List of input attachments for channel. + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level being written to CloudWatch Logs. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + // The name of the channel. (user-mutable) + Name *string `locationName:"name" type:"string"` + + // The number of currently healthy pipelines. + PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` + + // The Amazon Resource Name (ARN) of the role assumed when running the Channel. + RoleArn *string `locationName:"roleArn" type:"string"` + + State *string `locationName:"state" type:"string" enum:"ChannelState"` +} + +// String returns the string representation +func (s ChannelSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelSummary) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ChannelSummary) SetArn(v string) *ChannelSummary { + s.Arn = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *ChannelSummary) SetDestinations(v []*OutputDestination) *ChannelSummary { + s.Destinations = v + return s +} + +// SetEgressEndpoints sets the EgressEndpoints field's value. +func (s *ChannelSummary) SetEgressEndpoints(v []*ChannelEgressEndpoint) *ChannelSummary { + s.EgressEndpoints = v + return s +} + +// SetId sets the Id field's value. +func (s *ChannelSummary) SetId(v string) *ChannelSummary { + s.Id = &v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *ChannelSummary) SetInputAttachments(v []*InputAttachment) *ChannelSummary { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *ChannelSummary) SetInputSpecification(v *InputSpecification) *ChannelSummary { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *ChannelSummary) SetLogLevel(v string) *ChannelSummary { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *ChannelSummary) SetName(v string) *ChannelSummary { + s.Name = &v + return s +} + +// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. +func (s *ChannelSummary) SetPipelinesRunningCount(v int64) *ChannelSummary { + s.PipelinesRunningCount = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ChannelSummary) SetRoleArn(v string) *ChannelSummary { + s.RoleArn = &v + return s +} + +// SetState sets the State field's value. +func (s *ChannelSummary) SetState(v string) *ChannelSummary { + s.State = &v + return s +} + +type CreateChannelInput struct { + _ struct{} `type:"structure"` + + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level the user wants for their channel. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + Name *string `locationName:"name" type:"string"` + + RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` + + Reserved *string `locationName:"reserved" deprecated:"true" type:"string"` + + RoleArn *string `locationName:"roleArn" type:"string"` +} + +// String returns the string representation +func (s CreateChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"} + if s.EncoderSettings != nil { + if err := s.EncoderSettings.Validate(); err != nil { + invalidParams.AddNested("EncoderSettings", err.(request.ErrInvalidParams)) + } + } + if s.InputAttachments != nil { + for i, v := range s.InputAttachments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputAttachments", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinations sets the Destinations field's value. +func (s *CreateChannelInput) SetDestinations(v []*OutputDestination) *CreateChannelInput { + s.Destinations = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *CreateChannelInput) SetEncoderSettings(v *EncoderSettings) *CreateChannelInput { + s.EncoderSettings = v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *CreateChannelInput) SetInputAttachments(v []*InputAttachment) *CreateChannelInput { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *CreateChannelInput) SetInputSpecification(v *InputSpecification) *CreateChannelInput { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *CreateChannelInput) SetLogLevel(v string) *CreateChannelInput { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateChannelInput) SetName(v string) *CreateChannelInput { + s.Name = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *CreateChannelInput) SetRequestId(v string) *CreateChannelInput { + s.RequestId = &v + return s +} + +// SetReserved sets the Reserved field's value. +func (s *CreateChannelInput) SetReserved(v string) *CreateChannelInput { + s.Reserved = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateChannelInput) SetRoleArn(v string) *CreateChannelInput { + s.RoleArn = &v + return s +} + +type CreateChannelOutput struct { + _ struct{} `type:"structure"` + + Channel *Channel `locationName:"channel" type:"structure"` +} + +// String returns the string representation +func (s CreateChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateChannelOutput) GoString() string { + return s.String() +} + +// SetChannel sets the Channel field's value. +func (s *CreateChannelOutput) SetChannel(v *Channel) *CreateChannelOutput { + s.Channel = v + return s +} + +type CreateInputInput struct { + _ struct{} `type:"structure"` + + Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` + + InputSecurityGroups []*string `locationName:"inputSecurityGroups" type:"list"` + + MediaConnectFlows []*MediaConnectFlowRequest `locationName:"mediaConnectFlows" type:"list"` + + Name *string `locationName:"name" type:"string"` + + RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + Sources []*InputSourceRequest `locationName:"sources" type:"list"` + + Type *string `locationName:"type" type:"string" enum:"InputType"` +} + +// String returns the string representation +func (s CreateInputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInputInput) GoString() string { + return s.String() +} + +// SetDestinations sets the Destinations field's value. +func (s *CreateInputInput) SetDestinations(v []*InputDestinationRequest) *CreateInputInput { + s.Destinations = v + return s +} + +// SetInputSecurityGroups sets the InputSecurityGroups field's value. +func (s *CreateInputInput) SetInputSecurityGroups(v []*string) *CreateInputInput { + s.InputSecurityGroups = v + return s +} + +// SetMediaConnectFlows sets the MediaConnectFlows field's value. +func (s *CreateInputInput) SetMediaConnectFlows(v []*MediaConnectFlowRequest) *CreateInputInput { + s.MediaConnectFlows = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateInputInput) SetName(v string) *CreateInputInput { + s.Name = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *CreateInputInput) SetRequestId(v string) *CreateInputInput { + s.RequestId = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateInputInput) SetRoleArn(v string) *CreateInputInput { + s.RoleArn = &v + return s +} + +// SetSources sets the Sources field's value. +func (s *CreateInputInput) SetSources(v []*InputSourceRequest) *CreateInputInput { + s.Sources = v + return s +} + +// SetType sets the Type field's value. +func (s *CreateInputInput) SetType(v string) *CreateInputInput { + s.Type = &v + return s +} + +type CreateInputOutput struct { + _ struct{} `type:"structure"` + + Input *Input `locationName:"input" type:"structure"` +} + +// String returns the string representation +func (s CreateInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInputOutput) GoString() string { + return s.String() +} + +// SetInput sets the Input field's value. +func (s *CreateInputOutput) SetInput(v *Input) *CreateInputOutput { + s.Input = v + return s +} + +type CreateInputSecurityGroupInput struct { + _ struct{} `type:"structure"` + + WhitelistRules []*InputWhitelistRuleCidr `locationName:"whitelistRules" type:"list"` +} + +// String returns the string representation +func (s CreateInputSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInputSecurityGroupInput) GoString() string { + return s.String() +} + +// SetWhitelistRules sets the WhitelistRules field's value. +func (s *CreateInputSecurityGroupInput) SetWhitelistRules(v []*InputWhitelistRuleCidr) *CreateInputSecurityGroupInput { + s.WhitelistRules = v + return s +} + +type CreateInputSecurityGroupOutput struct { + _ struct{} `type:"structure"` + + // An Input Security Group + SecurityGroup *InputSecurityGroup `locationName:"securityGroup" type:"structure"` +} + +// String returns the string representation +func (s CreateInputSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInputSecurityGroupOutput) GoString() string { + return s.String() +} + +// SetSecurityGroup sets the SecurityGroup field's value. +func (s *CreateInputSecurityGroupOutput) SetSecurityGroup(v *InputSecurityGroup) *CreateInputSecurityGroupOutput { + s.SecurityGroup = v + return s +} + +type DeleteChannelInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *DeleteChannelInput) SetChannelId(v string) *DeleteChannelInput { + s.ChannelId = &v + return s +} + +type DeleteChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level the user wants for their channel. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + Name *string `locationName:"name" type:"string"` + + PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + State *string `locationName:"state" type:"string" enum:"ChannelState"` +} + +// String returns the string representation +func (s DeleteChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DeleteChannelOutput) SetArn(v string) *DeleteChannelOutput { + s.Arn = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *DeleteChannelOutput) SetDestinations(v []*OutputDestination) *DeleteChannelOutput { + s.Destinations = v + return s +} + +// SetEgressEndpoints sets the EgressEndpoints field's value. +func (s *DeleteChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *DeleteChannelOutput { + s.EgressEndpoints = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *DeleteChannelOutput) SetEncoderSettings(v *EncoderSettings) *DeleteChannelOutput { + s.EncoderSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteChannelOutput) SetId(v string) *DeleteChannelOutput { + s.Id = &v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *DeleteChannelOutput) SetInputAttachments(v []*InputAttachment) *DeleteChannelOutput { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *DeleteChannelOutput) SetInputSpecification(v *InputSpecification) *DeleteChannelOutput { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *DeleteChannelOutput) SetLogLevel(v string) *DeleteChannelOutput { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteChannelOutput) SetName(v string) *DeleteChannelOutput { + s.Name = &v + return s +} + +// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. +func (s *DeleteChannelOutput) SetPipelinesRunningCount(v int64) *DeleteChannelOutput { + s.PipelinesRunningCount = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DeleteChannelOutput) SetRoleArn(v string) *DeleteChannelOutput { + s.RoleArn = &v + return s +} + +// SetState sets the State field's value. +func (s *DeleteChannelOutput) SetState(v string) *DeleteChannelOutput { + s.State = &v + return s +} + +type DeleteInputInput struct { + _ struct{} `type:"structure"` + + // InputId is a required field + InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInputInput"} + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + if s.InputId != nil && len(*s.InputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputId sets the InputId field's value. +func (s *DeleteInputInput) SetInputId(v string) *DeleteInputInput { + s.InputId = &v + return s +} + +type DeleteInputOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputOutput) GoString() string { + return s.String() +} + +type DeleteInputSecurityGroupInput struct { + _ struct{} `type:"structure"` + + // InputSecurityGroupId is a required field + InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInputSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputSecurityGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInputSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInputSecurityGroupInput"} + if s.InputSecurityGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) + } + if s.InputSecurityGroupId != nil && len(*s.InputSecurityGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputSecurityGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. +func (s *DeleteInputSecurityGroupInput) SetInputSecurityGroupId(v string) *DeleteInputSecurityGroupInput { + s.InputSecurityGroupId = &v + return s +} + +type DeleteInputSecurityGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteInputSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInputSecurityGroupOutput) GoString() string { + return s.String() +} + +type DeleteReservationInput struct { + _ struct{} `type:"structure"` + + // ReservationId is a required field + ReservationId *string `location:"uri" locationName:"reservationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteReservationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteReservationInput"} + if s.ReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservationId")) + } + if s.ReservationId != nil && len(*s.ReservationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReservationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReservationId sets the ReservationId field's value. +func (s *DeleteReservationInput) SetReservationId(v string) *DeleteReservationInput { + s.ReservationId = &v + return s +} + +type DeleteReservationOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Count *int64 `locationName:"count" type:"integer"` + + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + End *string `locationName:"end" type:"string"` + + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + Name *string `locationName:"name" type:"string"` + + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + Region *string `locationName:"region" type:"string"` + + ReservationId *string `locationName:"reservationId" type:"string"` + + // Resource configuration (codec, resolution, bitrate, ...) + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + Start *string `locationName:"start" type:"string"` + + // Current reservation state + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s DeleteReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteReservationOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DeleteReservationOutput) SetArn(v string) *DeleteReservationOutput { + s.Arn = &v + return s +} + +// SetCount sets the Count field's value. +func (s *DeleteReservationOutput) SetCount(v int64) *DeleteReservationOutput { + s.Count = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *DeleteReservationOutput) SetCurrencyCode(v string) *DeleteReservationOutput { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DeleteReservationOutput) SetDuration(v int64) *DeleteReservationOutput { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *DeleteReservationOutput) SetDurationUnits(v string) *DeleteReservationOutput { + s.DurationUnits = &v + return s +} + +// SetEnd sets the End field's value. +func (s *DeleteReservationOutput) SetEnd(v string) *DeleteReservationOutput { + s.End = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *DeleteReservationOutput) SetFixedPrice(v float64) *DeleteReservationOutput { + s.FixedPrice = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteReservationOutput) SetName(v string) *DeleteReservationOutput { + s.Name = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *DeleteReservationOutput) SetOfferingDescription(v string) *DeleteReservationOutput { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DeleteReservationOutput) SetOfferingId(v string) *DeleteReservationOutput { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DeleteReservationOutput) SetOfferingType(v string) *DeleteReservationOutput { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *DeleteReservationOutput) SetRegion(v string) *DeleteReservationOutput { + s.Region = &v + return s +} + +// SetReservationId sets the ReservationId field's value. +func (s *DeleteReservationOutput) SetReservationId(v string) *DeleteReservationOutput { + s.ReservationId = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *DeleteReservationOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DeleteReservationOutput { + s.ResourceSpecification = v + return s +} + +// SetStart sets the Start field's value. +func (s *DeleteReservationOutput) SetStart(v string) *DeleteReservationOutput { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *DeleteReservationOutput) SetState(v string) *DeleteReservationOutput { + s.State = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *DeleteReservationOutput) SetUsagePrice(v float64) *DeleteReservationOutput { + s.UsagePrice = &v + return s +} + +type DescribeChannelInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeChannelInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *DescribeChannelInput) SetChannelId(v string) *DescribeChannelInput { + s.ChannelId = &v + return s +} + +type DescribeChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level the user wants for their channel. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + Name *string `locationName:"name" type:"string"` + + PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + State *string `locationName:"state" type:"string" enum:"ChannelState"` +} + +// String returns the string representation +func (s DescribeChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeChannelOutput) SetArn(v string) *DescribeChannelOutput { + s.Arn = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *DescribeChannelOutput) SetDestinations(v []*OutputDestination) *DescribeChannelOutput { + s.Destinations = v + return s +} + +// SetEgressEndpoints sets the EgressEndpoints field's value. +func (s *DescribeChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *DescribeChannelOutput { + s.EgressEndpoints = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *DescribeChannelOutput) SetEncoderSettings(v *EncoderSettings) *DescribeChannelOutput { + s.EncoderSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeChannelOutput) SetId(v string) *DescribeChannelOutput { + s.Id = &v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *DescribeChannelOutput) SetInputAttachments(v []*InputAttachment) *DescribeChannelOutput { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *DescribeChannelOutput) SetInputSpecification(v *InputSpecification) *DescribeChannelOutput { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *DescribeChannelOutput) SetLogLevel(v string) *DescribeChannelOutput { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeChannelOutput) SetName(v string) *DescribeChannelOutput { + s.Name = &v + return s +} + +// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. +func (s *DescribeChannelOutput) SetPipelinesRunningCount(v int64) *DescribeChannelOutput { + s.PipelinesRunningCount = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeChannelOutput) SetRoleArn(v string) *DescribeChannelOutput { + s.RoleArn = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeChannelOutput) SetState(v string) *DescribeChannelOutput { + s.State = &v + return s +} + +type DescribeInputInput struct { + _ struct{} `type:"structure"` + + // InputId is a required field + InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeInputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInputInput"} + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + if s.InputId != nil && len(*s.InputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputId sets the InputId field's value. +func (s *DescribeInputInput) SetInputId(v string) *DescribeInputInput { + s.InputId = &v + return s +} + +type DescribeInputOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + AttachedChannels []*string `locationName:"attachedChannels" type:"list"` + + Destinations []*InputDestination `locationName:"destinations" type:"list"` + + Id *string `locationName:"id" type:"string"` + + MediaConnectFlows []*MediaConnectFlow `locationName:"mediaConnectFlows" type:"list"` + + Name *string `locationName:"name" type:"string"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + SecurityGroups []*string `locationName:"securityGroups" type:"list"` + + Sources []*InputSource `locationName:"sources" type:"list"` + + State *string `locationName:"state" type:"string" enum:"InputState"` + + Type *string `locationName:"type" type:"string" enum:"InputType"` +} + +// String returns the string representation +func (s DescribeInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInputOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeInputOutput) SetArn(v string) *DescribeInputOutput { + s.Arn = &v + return s +} + +// SetAttachedChannels sets the AttachedChannels field's value. +func (s *DescribeInputOutput) SetAttachedChannels(v []*string) *DescribeInputOutput { + s.AttachedChannels = v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *DescribeInputOutput) SetDestinations(v []*InputDestination) *DescribeInputOutput { + s.Destinations = v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeInputOutput) SetId(v string) *DescribeInputOutput { + s.Id = &v + return s +} + +// SetMediaConnectFlows sets the MediaConnectFlows field's value. +func (s *DescribeInputOutput) SetMediaConnectFlows(v []*MediaConnectFlow) *DescribeInputOutput { + s.MediaConnectFlows = v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeInputOutput) SetName(v string) *DescribeInputOutput { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeInputOutput) SetRoleArn(v string) *DescribeInputOutput { + s.RoleArn = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *DescribeInputOutput) SetSecurityGroups(v []*string) *DescribeInputOutput { + s.SecurityGroups = v + return s +} + +// SetSources sets the Sources field's value. +func (s *DescribeInputOutput) SetSources(v []*InputSource) *DescribeInputOutput { + s.Sources = v + return s +} + +// SetState sets the State field's value. +func (s *DescribeInputOutput) SetState(v string) *DescribeInputOutput { + s.State = &v + return s +} + +// SetType sets the Type field's value. +func (s *DescribeInputOutput) SetType(v string) *DescribeInputOutput { + s.Type = &v + return s +} + +type DescribeInputSecurityGroupInput struct { + _ struct{} `type:"structure"` + + // InputSecurityGroupId is a required field + InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeInputSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInputSecurityGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInputSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInputSecurityGroupInput"} + if s.InputSecurityGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) + } + if s.InputSecurityGroupId != nil && len(*s.InputSecurityGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputSecurityGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. +func (s *DescribeInputSecurityGroupInput) SetInputSecurityGroupId(v string) *DescribeInputSecurityGroupInput { + s.InputSecurityGroupId = &v + return s +} + +type DescribeInputSecurityGroupOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Id *string `locationName:"id" type:"string"` + + Inputs []*string `locationName:"inputs" type:"list"` + + State *string `locationName:"state" type:"string" enum:"InputSecurityGroupState"` + + WhitelistRules []*InputWhitelistRule `locationName:"whitelistRules" type:"list"` +} + +// String returns the string representation +func (s DescribeInputSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInputSecurityGroupOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeInputSecurityGroupOutput) SetArn(v string) *DescribeInputSecurityGroupOutput { + s.Arn = &v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeInputSecurityGroupOutput) SetId(v string) *DescribeInputSecurityGroupOutput { + s.Id = &v + return s +} + +// SetInputs sets the Inputs field's value. +func (s *DescribeInputSecurityGroupOutput) SetInputs(v []*string) *DescribeInputSecurityGroupOutput { + s.Inputs = v + return s +} + +// SetState sets the State field's value. +func (s *DescribeInputSecurityGroupOutput) SetState(v string) *DescribeInputSecurityGroupOutput { + s.State = &v + return s +} + +// SetWhitelistRules sets the WhitelistRules field's value. +func (s *DescribeInputSecurityGroupOutput) SetWhitelistRules(v []*InputWhitelistRule) *DescribeInputSecurityGroupOutput { + s.WhitelistRules = v + return s +} + +type DescribeOfferingInput struct { + _ struct{} `type:"structure"` + + // OfferingId is a required field + OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOfferingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOfferingInput"} + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) + } + if s.OfferingId != nil && len(*s.OfferingId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OfferingId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeOfferingInput) SetOfferingId(v string) *DescribeOfferingInput { + s.OfferingId = &v + return s +} + +type DescribeOfferingOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + Region *string `locationName:"region" type:"string"` + + // Resource configuration (codec, resolution, bitrate, ...) + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s DescribeOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOfferingOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeOfferingOutput) SetArn(v string) *DescribeOfferingOutput { + s.Arn = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *DescribeOfferingOutput) SetCurrencyCode(v string) *DescribeOfferingOutput { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DescribeOfferingOutput) SetDuration(v int64) *DescribeOfferingOutput { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *DescribeOfferingOutput) SetDurationUnits(v string) *DescribeOfferingOutput { + s.DurationUnits = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *DescribeOfferingOutput) SetFixedPrice(v float64) *DescribeOfferingOutput { + s.FixedPrice = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *DescribeOfferingOutput) SetOfferingDescription(v string) *DescribeOfferingOutput { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeOfferingOutput) SetOfferingId(v string) *DescribeOfferingOutput { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeOfferingOutput) SetOfferingType(v string) *DescribeOfferingOutput { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *DescribeOfferingOutput) SetRegion(v string) *DescribeOfferingOutput { + s.Region = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *DescribeOfferingOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DescribeOfferingOutput { + s.ResourceSpecification = v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *DescribeOfferingOutput) SetUsagePrice(v float64) *DescribeOfferingOutput { + s.UsagePrice = &v + return s +} + +type DescribeReservationInput struct { + _ struct{} `type:"structure"` + + // ReservationId is a required field + ReservationId *string `location:"uri" locationName:"reservationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeReservationInput"} + if s.ReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservationId")) + } + if s.ReservationId != nil && len(*s.ReservationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReservationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReservationId sets the ReservationId field's value. +func (s *DescribeReservationInput) SetReservationId(v string) *DescribeReservationInput { + s.ReservationId = &v + return s +} + +type DescribeReservationOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Count *int64 `locationName:"count" type:"integer"` + + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + End *string `locationName:"end" type:"string"` + + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + Name *string `locationName:"name" type:"string"` + + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + Region *string `locationName:"region" type:"string"` + + ReservationId *string `locationName:"reservationId" type:"string"` + + // Resource configuration (codec, resolution, bitrate, ...) + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + Start *string `locationName:"start" type:"string"` + + // Current reservation state + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s DescribeReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservationOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeReservationOutput) SetArn(v string) *DescribeReservationOutput { + s.Arn = &v + return s +} + +// SetCount sets the Count field's value. +func (s *DescribeReservationOutput) SetCount(v int64) *DescribeReservationOutput { + s.Count = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *DescribeReservationOutput) SetCurrencyCode(v string) *DescribeReservationOutput { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *DescribeReservationOutput) SetDuration(v int64) *DescribeReservationOutput { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *DescribeReservationOutput) SetDurationUnits(v string) *DescribeReservationOutput { + s.DurationUnits = &v + return s +} + +// SetEnd sets the End field's value. +func (s *DescribeReservationOutput) SetEnd(v string) *DescribeReservationOutput { + s.End = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *DescribeReservationOutput) SetFixedPrice(v float64) *DescribeReservationOutput { + s.FixedPrice = &v + return s +} + +// SetName sets the Name field's value. +func (s *DescribeReservationOutput) SetName(v string) *DescribeReservationOutput { + s.Name = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *DescribeReservationOutput) SetOfferingDescription(v string) *DescribeReservationOutput { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeReservationOutput) SetOfferingId(v string) *DescribeReservationOutput { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeReservationOutput) SetOfferingType(v string) *DescribeReservationOutput { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *DescribeReservationOutput) SetRegion(v string) *DescribeReservationOutput { + s.Region = &v + return s +} + +// SetReservationId sets the ReservationId field's value. +func (s *DescribeReservationOutput) SetReservationId(v string) *DescribeReservationOutput { + s.ReservationId = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *DescribeReservationOutput) SetResourceSpecification(v *ReservationResourceSpecification) *DescribeReservationOutput { + s.ResourceSpecification = v + return s +} + +// SetStart sets the Start field's value. +func (s *DescribeReservationOutput) SetStart(v string) *DescribeReservationOutput { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *DescribeReservationOutput) SetState(v string) *DescribeReservationOutput { + s.State = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *DescribeReservationOutput) SetUsagePrice(v float64) *DescribeReservationOutput { + s.UsagePrice = &v + return s +} + +type DescribeScheduleInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScheduleInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *DescribeScheduleInput) SetChannelId(v string) *DescribeScheduleInput { + s.ChannelId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeScheduleInput) SetMaxResults(v int64) *DescribeScheduleInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduleInput) SetNextToken(v string) *DescribeScheduleInput { + s.NextToken = &v + return s +} + +type DescribeScheduleOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + ScheduleActions []*ScheduleAction `locationName:"scheduleActions" type:"list"` +} + +// String returns the string representation +func (s DescribeScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduleOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduleOutput) SetNextToken(v string) *DescribeScheduleOutput { + s.NextToken = &v + return s +} + +// SetScheduleActions sets the ScheduleActions field's value. +func (s *DescribeScheduleOutput) SetScheduleActions(v []*ScheduleAction) *DescribeScheduleOutput { + s.ScheduleActions = v + return s +} + +// DVB Network Information Table (NIT) +type DvbNitSettings struct { + _ struct{} `type:"structure"` + + // The numeric value placed in the Network Information Table (NIT). + // + // NetworkId is a required field + NetworkId *int64 `locationName:"networkId" type:"integer" required:"true"` + + // The network name text placed in the networkNameDescriptor inside the Network + // Information Table. Maximum length is 256 characters. + // + // NetworkName is a required field + NetworkName *string `locationName:"networkName" min:"1" type:"string" required:"true"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + RepInterval *int64 `locationName:"repInterval" min:"25" type:"integer"` +} + +// String returns the string representation +func (s DvbNitSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbNitSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbNitSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbNitSettings"} + if s.NetworkId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkId")) + } + if s.NetworkName == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkName")) + } + if s.NetworkName != nil && len(*s.NetworkName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NetworkName", 1)) + } + if s.RepInterval != nil && *s.RepInterval < 25 { + invalidParams.Add(request.NewErrParamMinValue("RepInterval", 25)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNetworkId sets the NetworkId field's value. +func (s *DvbNitSettings) SetNetworkId(v int64) *DvbNitSettings { + s.NetworkId = &v + return s +} + +// SetNetworkName sets the NetworkName field's value. +func (s *DvbNitSettings) SetNetworkName(v string) *DvbNitSettings { + s.NetworkName = &v + return s +} + +// SetRepInterval sets the RepInterval field's value. +func (s *DvbNitSettings) SetRepInterval(v int64) *DvbNitSettings { + s.RepInterval = &v + return s +} + +// DVB Service Description Table (SDT) +type DvbSdtSettings struct { + _ struct{} `type:"structure"` + + // Selects method of inserting SDT information into output stream. The sdtFollow + // setting copies SDT information from input stream to output stream. The sdtFollowIfPresent + // setting copies SDT information from input stream to output stream if SDT + // information is present in the input, otherwise it will fall back on the user-defined + // values. The sdtManual setting means user will enter the SDT information. + // The sdtNone setting means output stream will not contain SDT information. + OutputSdt *string `locationName:"outputSdt" type:"string" enum:"DvbSdtOutputSdt"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + RepInterval *int64 `locationName:"repInterval" min:"25" type:"integer"` + + // The service name placed in the serviceDescriptor in the Service Description + // Table. Maximum length is 256 characters. + ServiceName *string `locationName:"serviceName" min:"1" type:"string"` + + // The service provider name placed in the serviceDescriptor in the Service + // Description Table. Maximum length is 256 characters. + ServiceProviderName *string `locationName:"serviceProviderName" min:"1" type:"string"` +} + +// String returns the string representation +func (s DvbSdtSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbSdtSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbSdtSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbSdtSettings"} + if s.RepInterval != nil && *s.RepInterval < 25 { + invalidParams.Add(request.NewErrParamMinValue("RepInterval", 25)) + } + if s.ServiceName != nil && len(*s.ServiceName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceName", 1)) + } + if s.ServiceProviderName != nil && len(*s.ServiceProviderName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceProviderName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOutputSdt sets the OutputSdt field's value. +func (s *DvbSdtSettings) SetOutputSdt(v string) *DvbSdtSettings { + s.OutputSdt = &v + return s +} + +// SetRepInterval sets the RepInterval field's value. +func (s *DvbSdtSettings) SetRepInterval(v int64) *DvbSdtSettings { + s.RepInterval = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *DvbSdtSettings) SetServiceName(v string) *DvbSdtSettings { + s.ServiceName = &v + return s +} + +// SetServiceProviderName sets the ServiceProviderName field's value. +func (s *DvbSdtSettings) SetServiceProviderName(v string) *DvbSdtSettings { + s.ServiceProviderName = &v + return s +} + +type DvbSubDestinationSettings struct { + _ struct{} `type:"structure"` + + // If no explicit xPosition or yPosition is provided, setting alignment to centered + // will place the captions at the bottom center of the output. Similarly, setting + // a left alignment will align captions to the bottom left of the output. If + // x and y positions are given in conjunction with the alignment parameter, + // the font will be justified (either left or centered) relative to those coordinates. + // Selecting "smart" justification will left-justify live subtitles and center-justify + // pre-recorded subtitles. This option is not valid for source captions that + // are STL or 608/embedded. These source settings are already pre-defined by + // the caption stream. All burn-in and DVB-Sub font settings must match. + Alignment *string `locationName:"alignment" type:"string" enum:"DvbSubDestinationAlignment"` + + // Specifies the color of the rectangle behind the captions. All burn-in and + // DVB-Sub font settings must match. + BackgroundColor *string `locationName:"backgroundColor" type:"string" enum:"DvbSubDestinationBackgroundColor"` + + // Specifies the opacity of the background rectangle. 255 is opaque; 0 is transparent. + // Leaving this parameter blank is equivalent to setting it to 0 (transparent). + // All burn-in and DVB-Sub font settings must match. + BackgroundOpacity *int64 `locationName:"backgroundOpacity" type:"integer"` + + // External font file used for caption burn-in. File extension must be 'ttf' + // or 'tte'. Although the user can select output fonts for many different types + // of input captions, embedded, STL and teletext sources use a strict grid system. + // Using external fonts with these caption sources could cause unexpected display + // of proportional fonts. All burn-in and DVB-Sub font settings must match. + Font *InputLocation `locationName:"font" type:"structure"` + + // Specifies the color of the burned-in captions. This option is not valid for + // source captions that are STL, 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + FontColor *string `locationName:"fontColor" type:"string" enum:"DvbSubDestinationFontColor"` + + // Specifies the opacity of the burned-in captions. 255 is opaque; 0 is transparent. + // All burn-in and DVB-Sub font settings must match. + FontOpacity *int64 `locationName:"fontOpacity" type:"integer"` + + // Font resolution in DPI (dots per inch); default is 96 dpi. All burn-in and + // DVB-Sub font settings must match. + FontResolution *int64 `locationName:"fontResolution" min:"96" type:"integer"` + + // When set to auto fontSize will scale depending on the size of the output. + // Giving a positive integer will specify the exact font size in points. All + // burn-in and DVB-Sub font settings must match. + FontSize *string `locationName:"fontSize" type:"string"` + + // Specifies font outline color. This option is not valid for source captions + // that are either 608/embedded or teletext. These source settings are already + // pre-defined by the caption stream. All burn-in and DVB-Sub font settings + // must match. + OutlineColor *string `locationName:"outlineColor" type:"string" enum:"DvbSubDestinationOutlineColor"` + + // Specifies font outline size in pixels. This option is not valid for source + // captions that are either 608/embedded or teletext. These source settings + // are already pre-defined by the caption stream. All burn-in and DVB-Sub font + // settings must match. + OutlineSize *int64 `locationName:"outlineSize" type:"integer"` + + // Specifies the color of the shadow cast by the captions. All burn-in and DVB-Sub + // font settings must match. + ShadowColor *string `locationName:"shadowColor" type:"string" enum:"DvbSubDestinationShadowColor"` + + // Specifies the opacity of the shadow. 255 is opaque; 0 is transparent. Leaving + // this parameter blank is equivalent to setting it to 0 (transparent). All + // burn-in and DVB-Sub font settings must match. + ShadowOpacity *int64 `locationName:"shadowOpacity" type:"integer"` + + // Specifies the horizontal offset of the shadow relative to the captions in + // pixels. A value of -2 would result in a shadow offset 2 pixels to the left. + // All burn-in and DVB-Sub font settings must match. + ShadowXOffset *int64 `locationName:"shadowXOffset" type:"integer"` + + // Specifies the vertical offset of the shadow relative to the captions in pixels. + // A value of -2 would result in a shadow offset 2 pixels above the text. All + // burn-in and DVB-Sub font settings must match. + ShadowYOffset *int64 `locationName:"shadowYOffset" type:"integer"` + + // Controls whether a fixed grid size will be used to generate the output subtitles + // bitmap. Only applicable for Teletext inputs and DVB-Sub/Burn-in outputs. + TeletextGridControl *string `locationName:"teletextGridControl" type:"string" enum:"DvbSubDestinationTeletextGridControl"` + + // Specifies the horizontal position of the caption relative to the left side + // of the output in pixels. A value of 10 would result in the captions starting + // 10 pixels from the left of the output. If no explicit xPosition is provided, + // the horizontal caption position will be determined by the alignment parameter. + // This option is not valid for source captions that are STL, 608/embedded or + // teletext. These source settings are already pre-defined by the caption stream. + // All burn-in and DVB-Sub font settings must match. + XPosition *int64 `locationName:"xPosition" type:"integer"` + + // Specifies the vertical position of the caption relative to the top of the + // output in pixels. A value of 10 would result in the captions starting 10 + // pixels from the top of the output. If no explicit yPosition is provided, + // the caption will be positioned towards the bottom of the output. This option + // is not valid for source captions that are STL, 608/embedded or teletext. + // These source settings are already pre-defined by the caption stream. All + // burn-in and DVB-Sub font settings must match. + YPosition *int64 `locationName:"yPosition" type:"integer"` +} + +// String returns the string representation +func (s DvbSubDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbSubDestinationSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbSubDestinationSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbSubDestinationSettings"} + if s.FontResolution != nil && *s.FontResolution < 96 { + invalidParams.Add(request.NewErrParamMinValue("FontResolution", 96)) + } + if s.Font != nil { + if err := s.Font.Validate(); err != nil { + invalidParams.AddNested("Font", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlignment sets the Alignment field's value. +func (s *DvbSubDestinationSettings) SetAlignment(v string) *DvbSubDestinationSettings { + s.Alignment = &v + return s +} + +// SetBackgroundColor sets the BackgroundColor field's value. +func (s *DvbSubDestinationSettings) SetBackgroundColor(v string) *DvbSubDestinationSettings { + s.BackgroundColor = &v + return s +} + +// SetBackgroundOpacity sets the BackgroundOpacity field's value. +func (s *DvbSubDestinationSettings) SetBackgroundOpacity(v int64) *DvbSubDestinationSettings { + s.BackgroundOpacity = &v + return s +} + +// SetFont sets the Font field's value. +func (s *DvbSubDestinationSettings) SetFont(v *InputLocation) *DvbSubDestinationSettings { + s.Font = v + return s +} + +// SetFontColor sets the FontColor field's value. +func (s *DvbSubDestinationSettings) SetFontColor(v string) *DvbSubDestinationSettings { + s.FontColor = &v + return s +} + +// SetFontOpacity sets the FontOpacity field's value. +func (s *DvbSubDestinationSettings) SetFontOpacity(v int64) *DvbSubDestinationSettings { + s.FontOpacity = &v + return s +} + +// SetFontResolution sets the FontResolution field's value. +func (s *DvbSubDestinationSettings) SetFontResolution(v int64) *DvbSubDestinationSettings { + s.FontResolution = &v + return s +} + +// SetFontSize sets the FontSize field's value. +func (s *DvbSubDestinationSettings) SetFontSize(v string) *DvbSubDestinationSettings { + s.FontSize = &v + return s +} + +// SetOutlineColor sets the OutlineColor field's value. +func (s *DvbSubDestinationSettings) SetOutlineColor(v string) *DvbSubDestinationSettings { + s.OutlineColor = &v + return s +} + +// SetOutlineSize sets the OutlineSize field's value. +func (s *DvbSubDestinationSettings) SetOutlineSize(v int64) *DvbSubDestinationSettings { + s.OutlineSize = &v + return s +} + +// SetShadowColor sets the ShadowColor field's value. +func (s *DvbSubDestinationSettings) SetShadowColor(v string) *DvbSubDestinationSettings { + s.ShadowColor = &v + return s +} + +// SetShadowOpacity sets the ShadowOpacity field's value. +func (s *DvbSubDestinationSettings) SetShadowOpacity(v int64) *DvbSubDestinationSettings { + s.ShadowOpacity = &v + return s +} + +// SetShadowXOffset sets the ShadowXOffset field's value. +func (s *DvbSubDestinationSettings) SetShadowXOffset(v int64) *DvbSubDestinationSettings { + s.ShadowXOffset = &v + return s +} + +// SetShadowYOffset sets the ShadowYOffset field's value. +func (s *DvbSubDestinationSettings) SetShadowYOffset(v int64) *DvbSubDestinationSettings { + s.ShadowYOffset = &v + return s +} + +// SetTeletextGridControl sets the TeletextGridControl field's value. +func (s *DvbSubDestinationSettings) SetTeletextGridControl(v string) *DvbSubDestinationSettings { + s.TeletextGridControl = &v + return s +} + +// SetXPosition sets the XPosition field's value. +func (s *DvbSubDestinationSettings) SetXPosition(v int64) *DvbSubDestinationSettings { + s.XPosition = &v + return s +} + +// SetYPosition sets the YPosition field's value. +func (s *DvbSubDestinationSettings) SetYPosition(v int64) *DvbSubDestinationSettings { + s.YPosition = &v + return s +} + +type DvbSubSourceSettings struct { + _ struct{} `type:"structure"` + + // When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source + // content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, + // regardless of selectors. + Pid *int64 `locationName:"pid" min:"1" type:"integer"` +} + +// String returns the string representation +func (s DvbSubSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbSubSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbSubSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbSubSourceSettings"} + if s.Pid != nil && *s.Pid < 1 { + invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPid sets the Pid field's value. +func (s *DvbSubSourceSettings) SetPid(v int64) *DvbSubSourceSettings { + s.Pid = &v + return s +} + +// DVB Time and Date Table (SDT) +type DvbTdtSettings struct { + _ struct{} `type:"structure"` + + // The number of milliseconds between instances of this table in the output + // transport stream. + RepInterval *int64 `locationName:"repInterval" min:"1000" type:"integer"` +} + +// String returns the string representation +func (s DvbTdtSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DvbTdtSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DvbTdtSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DvbTdtSettings"} + if s.RepInterval != nil && *s.RepInterval < 1000 { + invalidParams.Add(request.NewErrParamMinValue("RepInterval", 1000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRepInterval sets the RepInterval field's value. +func (s *DvbTdtSettings) SetRepInterval(v int64) *DvbTdtSettings { + s.RepInterval = &v + return s +} + +type Eac3Settings struct { + _ struct{} `type:"structure"` + + // When set to attenuate3Db, applies a 3 dB attenuation to the surround channels. + // Only used for 3/2 coding mode. + AttenuationControl *string `locationName:"attenuationControl" type:"string" enum:"Eac3AttenuationControl"` + + // Average bitrate in bits/second. Valid bitrates depend on the coding mode. + Bitrate *float64 `locationName:"bitrate" type:"double"` + + // Specifies the bitstream mode (bsmod) for the emitted E-AC-3 stream. See ATSC + // A/52-2012 (Annex E) for background on these values. + BitstreamMode *string `locationName:"bitstreamMode" type:"string" enum:"Eac3BitstreamMode"` + + // Dolby Digital Plus coding mode. Determines number of channels. + CodingMode *string `locationName:"codingMode" type:"string" enum:"Eac3CodingMode"` + + // When set to enabled, activates a DC highpass filter for all input channels. + DcFilter *string `locationName:"dcFilter" type:"string" enum:"Eac3DcFilter"` + + // Sets the dialnorm for the output. If blank and input audio is Dolby Digital + // Plus, dialnorm will be passed through. + Dialnorm *int64 `locationName:"dialnorm" min:"1" type:"integer"` + + // Sets the Dolby dynamic range compression profile. + DrcLine *string `locationName:"drcLine" type:"string" enum:"Eac3DrcLine"` + + // Sets the profile for heavy Dolby dynamic range compression, ensures that + // the instantaneous signal peaks do not exceed specified levels. + DrcRf *string `locationName:"drcRf" type:"string" enum:"Eac3DrcRf"` + + // When encoding 3/2 audio, setting to lfe enables the LFE channel + LfeControl *string `locationName:"lfeControl" type:"string" enum:"Eac3LfeControl"` + + // When set to enabled, applies a 120Hz lowpass filter to the LFE channel prior + // to encoding. Only valid with codingMode32 coding mode. + LfeFilter *string `locationName:"lfeFilter" type:"string" enum:"Eac3LfeFilter"` + + // Left only/Right only center mix level. Only used for 3/2 coding mode. + LoRoCenterMixLevel *float64 `locationName:"loRoCenterMixLevel" type:"double"` + + // Left only/Right only surround mix level. Only used for 3/2 coding mode. + LoRoSurroundMixLevel *float64 `locationName:"loRoSurroundMixLevel" type:"double"` + + // Left total/Right total center mix level. Only used for 3/2 coding mode. + LtRtCenterMixLevel *float64 `locationName:"ltRtCenterMixLevel" type:"double"` + + // Left total/Right total surround mix level. Only used for 3/2 coding mode. + LtRtSurroundMixLevel *float64 `locationName:"ltRtSurroundMixLevel" type:"double"` + + // When set to followInput, encoder metadata will be sourced from the DD, DD+, + // or DolbyE decoder that supplied this audio data. If audio was not supplied + // from one of these streams, then the static metadata settings will be used. + MetadataControl *string `locationName:"metadataControl" type:"string" enum:"Eac3MetadataControl"` + + // When set to whenPossible, input DD+ audio will be passed through if it is + // present on the input. This detection is dynamic over the life of the transcode. + // Inputs that alternate between DD+ and non-DD+ content will have a consistent + // DD+ output as the system alternates between passthrough and encoding. + PassthroughControl *string `locationName:"passthroughControl" type:"string" enum:"Eac3PassthroughControl"` + + // When set to shift90Degrees, applies a 90-degree phase shift to the surround + // channels. Only used for 3/2 coding mode. + PhaseControl *string `locationName:"phaseControl" type:"string" enum:"Eac3PhaseControl"` + + // Stereo downmix preference. Only used for 3/2 coding mode. + StereoDownmix *string `locationName:"stereoDownmix" type:"string" enum:"Eac3StereoDownmix"` + + // When encoding 3/2 audio, sets whether an extra center back surround channel + // is matrix encoded into the left and right surround channels. + SurroundExMode *string `locationName:"surroundExMode" type:"string" enum:"Eac3SurroundExMode"` + + // When encoding 2/0 audio, sets whether Dolby Surround is matrix encoded into + // the two channels. + SurroundMode *string `locationName:"surroundMode" type:"string" enum:"Eac3SurroundMode"` +} + +// String returns the string representation +func (s Eac3Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Eac3Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Eac3Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Eac3Settings"} + if s.Dialnorm != nil && *s.Dialnorm < 1 { + invalidParams.Add(request.NewErrParamMinValue("Dialnorm", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttenuationControl sets the AttenuationControl field's value. +func (s *Eac3Settings) SetAttenuationControl(v string) *Eac3Settings { + s.AttenuationControl = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *Eac3Settings) SetBitrate(v float64) *Eac3Settings { + s.Bitrate = &v + return s +} + +// SetBitstreamMode sets the BitstreamMode field's value. +func (s *Eac3Settings) SetBitstreamMode(v string) *Eac3Settings { + s.BitstreamMode = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *Eac3Settings) SetCodingMode(v string) *Eac3Settings { + s.CodingMode = &v + return s +} + +// SetDcFilter sets the DcFilter field's value. +func (s *Eac3Settings) SetDcFilter(v string) *Eac3Settings { + s.DcFilter = &v + return s +} + +// SetDialnorm sets the Dialnorm field's value. +func (s *Eac3Settings) SetDialnorm(v int64) *Eac3Settings { + s.Dialnorm = &v + return s +} + +// SetDrcLine sets the DrcLine field's value. +func (s *Eac3Settings) SetDrcLine(v string) *Eac3Settings { + s.DrcLine = &v + return s +} + +// SetDrcRf sets the DrcRf field's value. +func (s *Eac3Settings) SetDrcRf(v string) *Eac3Settings { + s.DrcRf = &v + return s +} + +// SetLfeControl sets the LfeControl field's value. +func (s *Eac3Settings) SetLfeControl(v string) *Eac3Settings { + s.LfeControl = &v + return s +} + +// SetLfeFilter sets the LfeFilter field's value. +func (s *Eac3Settings) SetLfeFilter(v string) *Eac3Settings { + s.LfeFilter = &v + return s +} + +// SetLoRoCenterMixLevel sets the LoRoCenterMixLevel field's value. +func (s *Eac3Settings) SetLoRoCenterMixLevel(v float64) *Eac3Settings { + s.LoRoCenterMixLevel = &v + return s +} + +// SetLoRoSurroundMixLevel sets the LoRoSurroundMixLevel field's value. +func (s *Eac3Settings) SetLoRoSurroundMixLevel(v float64) *Eac3Settings { + s.LoRoSurroundMixLevel = &v + return s +} + +// SetLtRtCenterMixLevel sets the LtRtCenterMixLevel field's value. +func (s *Eac3Settings) SetLtRtCenterMixLevel(v float64) *Eac3Settings { + s.LtRtCenterMixLevel = &v + return s +} + +// SetLtRtSurroundMixLevel sets the LtRtSurroundMixLevel field's value. +func (s *Eac3Settings) SetLtRtSurroundMixLevel(v float64) *Eac3Settings { + s.LtRtSurroundMixLevel = &v + return s +} + +// SetMetadataControl sets the MetadataControl field's value. +func (s *Eac3Settings) SetMetadataControl(v string) *Eac3Settings { + s.MetadataControl = &v + return s +} + +// SetPassthroughControl sets the PassthroughControl field's value. +func (s *Eac3Settings) SetPassthroughControl(v string) *Eac3Settings { + s.PassthroughControl = &v + return s +} + +// SetPhaseControl sets the PhaseControl field's value. +func (s *Eac3Settings) SetPhaseControl(v string) *Eac3Settings { + s.PhaseControl = &v + return s +} + +// SetStereoDownmix sets the StereoDownmix field's value. +func (s *Eac3Settings) SetStereoDownmix(v string) *Eac3Settings { + s.StereoDownmix = &v + return s +} + +// SetSurroundExMode sets the SurroundExMode field's value. +func (s *Eac3Settings) SetSurroundExMode(v string) *Eac3Settings { + s.SurroundExMode = &v + return s +} + +// SetSurroundMode sets the SurroundMode field's value. +func (s *Eac3Settings) SetSurroundMode(v string) *Eac3Settings { + s.SurroundMode = &v + return s +} + +type EmbeddedDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EmbeddedDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmbeddedDestinationSettings) GoString() string { + return s.String() +} + +type EmbeddedPlusScte20DestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EmbeddedPlusScte20DestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmbeddedPlusScte20DestinationSettings) GoString() string { + return s.String() +} + +type EmbeddedSourceSettings struct { + _ struct{} `type:"structure"` + + // If upconvert, 608 data is both passed through via the "608 compatibility + // bytes" fields of the 708 wrapper as well as translated into 708. 708 data + // present in the source content will be discarded. + Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"EmbeddedConvert608To708"` + + // Set to "auto" to handle streams with intermittent and/or non-aligned SCTE-20 + // and Embedded captions. + Scte20Detection *string `locationName:"scte20Detection" type:"string" enum:"EmbeddedScte20Detection"` + + // Specifies the 608/708 channel number within the video track from which to + // extract captions. Unused for passthrough. + Source608ChannelNumber *int64 `locationName:"source608ChannelNumber" min:"1" type:"integer"` + + // This field is unused and deprecated. + Source608TrackNumber *int64 `locationName:"source608TrackNumber" min:"1" type:"integer"` +} + +// String returns the string representation +func (s EmbeddedSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmbeddedSourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EmbeddedSourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EmbeddedSourceSettings"} + if s.Source608ChannelNumber != nil && *s.Source608ChannelNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("Source608ChannelNumber", 1)) + } + if s.Source608TrackNumber != nil && *s.Source608TrackNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("Source608TrackNumber", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConvert608To708 sets the Convert608To708 field's value. +func (s *EmbeddedSourceSettings) SetConvert608To708(v string) *EmbeddedSourceSettings { + s.Convert608To708 = &v + return s +} + +// SetScte20Detection sets the Scte20Detection field's value. +func (s *EmbeddedSourceSettings) SetScte20Detection(v string) *EmbeddedSourceSettings { + s.Scte20Detection = &v + return s +} + +// SetSource608ChannelNumber sets the Source608ChannelNumber field's value. +func (s *EmbeddedSourceSettings) SetSource608ChannelNumber(v int64) *EmbeddedSourceSettings { + s.Source608ChannelNumber = &v + return s +} + +// SetSource608TrackNumber sets the Source608TrackNumber field's value. +func (s *EmbeddedSourceSettings) SetSource608TrackNumber(v int64) *EmbeddedSourceSettings { + s.Source608TrackNumber = &v + return s +} + +type EncoderSettings struct { + _ struct{} `type:"structure"` + + // AudioDescriptions is a required field + AudioDescriptions []*AudioDescription `locationName:"audioDescriptions" type:"list" required:"true"` + + // Settings for ad avail blanking. + AvailBlanking *AvailBlanking `locationName:"availBlanking" type:"structure"` + + // Event-wide configuration settings for ad avail insertion. + AvailConfiguration *AvailConfiguration `locationName:"availConfiguration" type:"structure"` + + // Settings for blackout slate. + BlackoutSlate *BlackoutSlate `locationName:"blackoutSlate" type:"structure"` + + // Settings for caption decriptions + CaptionDescriptions []*CaptionDescription `locationName:"captionDescriptions" type:"list"` + + // Configuration settings that apply to the event as a whole. + GlobalConfiguration *GlobalConfiguration `locationName:"globalConfiguration" type:"structure"` + + // OutputGroups is a required field + OutputGroups []*OutputGroup `locationName:"outputGroups" type:"list" required:"true"` + + // Contains settings used to acquire and adjust timecode information from inputs. + // + // TimecodeConfig is a required field + TimecodeConfig *TimecodeConfig `locationName:"timecodeConfig" type:"structure" required:"true"` + + // VideoDescriptions is a required field + VideoDescriptions []*VideoDescription `locationName:"videoDescriptions" type:"list" required:"true"` +} + +// String returns the string representation +func (s EncoderSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EncoderSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EncoderSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EncoderSettings"} + if s.AudioDescriptions == nil { + invalidParams.Add(request.NewErrParamRequired("AudioDescriptions")) + } + if s.OutputGroups == nil { + invalidParams.Add(request.NewErrParamRequired("OutputGroups")) + } + if s.TimecodeConfig == nil { + invalidParams.Add(request.NewErrParamRequired("TimecodeConfig")) + } + if s.VideoDescriptions == nil { + invalidParams.Add(request.NewErrParamRequired("VideoDescriptions")) + } + if s.AudioDescriptions != nil { + for i, v := range s.AudioDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.AvailBlanking != nil { + if err := s.AvailBlanking.Validate(); err != nil { + invalidParams.AddNested("AvailBlanking", err.(request.ErrInvalidParams)) + } + } + if s.AvailConfiguration != nil { + if err := s.AvailConfiguration.Validate(); err != nil { + invalidParams.AddNested("AvailConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.BlackoutSlate != nil { + if err := s.BlackoutSlate.Validate(); err != nil { + invalidParams.AddNested("BlackoutSlate", err.(request.ErrInvalidParams)) + } + } + if s.CaptionDescriptions != nil { + for i, v := range s.CaptionDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.GlobalConfiguration != nil { + if err := s.GlobalConfiguration.Validate(); err != nil { + invalidParams.AddNested("GlobalConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.OutputGroups != nil { + for i, v := range s.OutputGroups { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputGroups", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TimecodeConfig != nil { + if err := s.TimecodeConfig.Validate(); err != nil { + invalidParams.AddNested("TimecodeConfig", err.(request.ErrInvalidParams)) + } + } + if s.VideoDescriptions != nil { + for i, v := range s.VideoDescriptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "VideoDescriptions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioDescriptions sets the AudioDescriptions field's value. +func (s *EncoderSettings) SetAudioDescriptions(v []*AudioDescription) *EncoderSettings { + s.AudioDescriptions = v + return s +} + +// SetAvailBlanking sets the AvailBlanking field's value. +func (s *EncoderSettings) SetAvailBlanking(v *AvailBlanking) *EncoderSettings { + s.AvailBlanking = v + return s +} + +// SetAvailConfiguration sets the AvailConfiguration field's value. +func (s *EncoderSettings) SetAvailConfiguration(v *AvailConfiguration) *EncoderSettings { + s.AvailConfiguration = v + return s +} + +// SetBlackoutSlate sets the BlackoutSlate field's value. +func (s *EncoderSettings) SetBlackoutSlate(v *BlackoutSlate) *EncoderSettings { + s.BlackoutSlate = v + return s +} + +// SetCaptionDescriptions sets the CaptionDescriptions field's value. +func (s *EncoderSettings) SetCaptionDescriptions(v []*CaptionDescription) *EncoderSettings { + s.CaptionDescriptions = v + return s +} + +// SetGlobalConfiguration sets the GlobalConfiguration field's value. +func (s *EncoderSettings) SetGlobalConfiguration(v *GlobalConfiguration) *EncoderSettings { + s.GlobalConfiguration = v + return s +} + +// SetOutputGroups sets the OutputGroups field's value. +func (s *EncoderSettings) SetOutputGroups(v []*OutputGroup) *EncoderSettings { + s.OutputGroups = v + return s +} + +// SetTimecodeConfig sets the TimecodeConfig field's value. +func (s *EncoderSettings) SetTimecodeConfig(v *TimecodeConfig) *EncoderSettings { + s.TimecodeConfig = v + return s +} + +// SetVideoDescriptions sets the VideoDescriptions field's value. +func (s *EncoderSettings) SetVideoDescriptions(v []*VideoDescription) *EncoderSettings { + s.VideoDescriptions = v + return s +} + +type FecOutputSettings struct { + _ struct{} `type:"structure"` + + // Parameter D from SMPTE 2022-1. The height of the FEC protection matrix. The + // number of transport stream packets per column error correction packet. Must + // be between 4 and 20, inclusive. + ColumnDepth *int64 `locationName:"columnDepth" min:"4" type:"integer"` + + // Enables column only or column and row based FEC + IncludeFec *string `locationName:"includeFec" type:"string" enum:"FecOutputIncludeFec"` + + // Parameter L from SMPTE 2022-1. The width of the FEC protection matrix. Must + // be between 1 and 20, inclusive. If only Column FEC is used, then larger values + // increase robustness. If Row FEC is used, then this is the number of transport + // stream packets per row error correction packet, and the value must be between + // 4 and 20, inclusive, if includeFec is columnAndRow. If includeFec is column, + // this value must be 1 to 20, inclusive. + RowLength *int64 `locationName:"rowLength" min:"1" type:"integer"` +} + +// String returns the string representation +func (s FecOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FecOutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FecOutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FecOutputSettings"} + if s.ColumnDepth != nil && *s.ColumnDepth < 4 { + invalidParams.Add(request.NewErrParamMinValue("ColumnDepth", 4)) + } + if s.RowLength != nil && *s.RowLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("RowLength", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetColumnDepth sets the ColumnDepth field's value. +func (s *FecOutputSettings) SetColumnDepth(v int64) *FecOutputSettings { + s.ColumnDepth = &v + return s +} + +// SetIncludeFec sets the IncludeFec field's value. +func (s *FecOutputSettings) SetIncludeFec(v string) *FecOutputSettings { + s.IncludeFec = &v + return s +} + +// SetRowLength sets the RowLength field's value. +func (s *FecOutputSettings) SetRowLength(v int64) *FecOutputSettings { + s.RowLength = &v + return s +} + +// Start time for the action. +type FixedModeScheduleActionStartSettings struct { + _ struct{} `type:"structure"` + + // Start time for the action to start in the channel. (Not the time for the + // action to be added to the schedule: actions are always added to the schedule + // immediately.) UTC format: yyyy-mm-ddThh:mm:ss.nnnZ. All the letters are digits + // (for example, mm might be 01) except for the two constants "T" for time and + // "Z" for "UTC format". + // + // Time is a required field + Time *string `locationName:"time" type:"string" required:"true"` +} + +// String returns the string representation +func (s FixedModeScheduleActionStartSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FixedModeScheduleActionStartSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FixedModeScheduleActionStartSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FixedModeScheduleActionStartSettings"} + if s.Time == nil { + invalidParams.Add(request.NewErrParamRequired("Time")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTime sets the Time field's value. +func (s *FixedModeScheduleActionStartSettings) SetTime(v string) *FixedModeScheduleActionStartSettings { + s.Time = &v + return s +} + +// Settings to specify if an action follows another. +type FollowModeScheduleActionStartSettings struct { + _ struct{} `type:"structure"` + + // Identifies whether this action starts relative to the start or relative to + // the end of the reference action. + // + // FollowPoint is a required field + FollowPoint *string `locationName:"followPoint" type:"string" required:"true" enum:"FollowPoint"` + + // The action name of another action that this one refers to. + // + // ReferenceActionName is a required field + ReferenceActionName *string `locationName:"referenceActionName" type:"string" required:"true"` +} + +// String returns the string representation +func (s FollowModeScheduleActionStartSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FollowModeScheduleActionStartSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FollowModeScheduleActionStartSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FollowModeScheduleActionStartSettings"} + if s.FollowPoint == nil { + invalidParams.Add(request.NewErrParamRequired("FollowPoint")) + } + if s.ReferenceActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ReferenceActionName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFollowPoint sets the FollowPoint field's value. +func (s *FollowModeScheduleActionStartSettings) SetFollowPoint(v string) *FollowModeScheduleActionStartSettings { + s.FollowPoint = &v + return s +} + +// SetReferenceActionName sets the ReferenceActionName field's value. +func (s *FollowModeScheduleActionStartSettings) SetReferenceActionName(v string) *FollowModeScheduleActionStartSettings { + s.ReferenceActionName = &v + return s +} + +// Frame Capture Group Settings +type FrameCaptureGroupSettings struct { + _ struct{} `type:"structure"` + + // The destination for the frame capture files. Either the URI for an Amazon + // S3 bucket and object, plus a file name prefix (for example, s3ssl://sportsDelivery/highlights/20180820/curling_) + // or the URI for a MediaStore container, plus a file name prefix (for example, + // mediastoressl://sportsDelivery/20180820/curling_). The final file names consist + // of the prefix from the destination field (for example, "curling_") + name + // modifier + the counter (5 digits, starting from 00001) + extension (which + // is always .jpg). For example, curlingLow.00001.jpg + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` +} + +// String returns the string representation +func (s FrameCaptureGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FrameCaptureGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FrameCaptureGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FrameCaptureGroupSettings"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestination sets the Destination field's value. +func (s *FrameCaptureGroupSettings) SetDestination(v *OutputLocationRef) *FrameCaptureGroupSettings { + s.Destination = v + return s +} + +// Frame Capture Output Settings +type FrameCaptureOutputSettings struct { + _ struct{} `type:"structure"` + + // Required if the output group contains more than one output. This modifier + // forms part of the output file name. + NameModifier *string `locationName:"nameModifier" type:"string"` +} + +// String returns the string representation +func (s FrameCaptureOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FrameCaptureOutputSettings) GoString() string { + return s.String() +} + +// SetNameModifier sets the NameModifier field's value. +func (s *FrameCaptureOutputSettings) SetNameModifier(v string) *FrameCaptureOutputSettings { + s.NameModifier = &v + return s +} + +// Frame Capture Settings +type FrameCaptureSettings struct { + _ struct{} `type:"structure"` + + // The frequency, in seconds, for capturing frames for inclusion in the output. + // For example, "10" means capture a frame every 10 seconds. + // + // CaptureInterval is a required field + CaptureInterval *int64 `locationName:"captureInterval" min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s FrameCaptureSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FrameCaptureSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *FrameCaptureSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FrameCaptureSettings"} + if s.CaptureInterval == nil { + invalidParams.Add(request.NewErrParamRequired("CaptureInterval")) + } + if s.CaptureInterval != nil && *s.CaptureInterval < 1 { + invalidParams.Add(request.NewErrParamMinValue("CaptureInterval", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCaptureInterval sets the CaptureInterval field's value. +func (s *FrameCaptureSettings) SetCaptureInterval(v int64) *FrameCaptureSettings { + s.CaptureInterval = &v + return s +} + +type GlobalConfiguration struct { + _ struct{} `type:"structure"` + + // Value to set the initial audio gain for the Live Event. + InitialAudioGain *int64 `locationName:"initialAudioGain" type:"integer"` + + // Indicates the action to take when the current input completes (e.g. end-of-file). + // When switchAndLoopInputs is configured the encoder will restart at the beginning + // of the first input. When "none" is configured the encoder will transcode + // either black, a solid color, or a user specified slate images per the "Input + // Loss Behavior" configuration until the next input switch occurs (which is + // controlled through the Channel Schedule API). + InputEndAction *string `locationName:"inputEndAction" type:"string" enum:"GlobalConfigurationInputEndAction"` + + // Settings for system actions when input is lost. + InputLossBehavior *InputLossBehavior `locationName:"inputLossBehavior" type:"structure"` + + // Indicates whether the rate of frames emitted by the Live encoder should be + // paced by its system clock (which optionally may be locked to another source + // via NTP) or should be locked to the clock of the source that is providing + // the input stream. + OutputTimingSource *string `locationName:"outputTimingSource" type:"string" enum:"GlobalConfigurationOutputTimingSource"` + + // Adjusts video input buffer for streams with very low video framerates. This + // is commonly set to enabled for music channels with less than one video frame + // per second. + SupportLowFramerateInputs *string `locationName:"supportLowFramerateInputs" type:"string" enum:"GlobalConfigurationLowFramerateInputs"` +} + +// String returns the string representation +func (s GlobalConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GlobalConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GlobalConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GlobalConfiguration"} + if s.InitialAudioGain != nil && *s.InitialAudioGain < -60 { + invalidParams.Add(request.NewErrParamMinValue("InitialAudioGain", -60)) + } + if s.InputLossBehavior != nil { + if err := s.InputLossBehavior.Validate(); err != nil { + invalidParams.AddNested("InputLossBehavior", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInitialAudioGain sets the InitialAudioGain field's value. +func (s *GlobalConfiguration) SetInitialAudioGain(v int64) *GlobalConfiguration { + s.InitialAudioGain = &v + return s +} + +// SetInputEndAction sets the InputEndAction field's value. +func (s *GlobalConfiguration) SetInputEndAction(v string) *GlobalConfiguration { + s.InputEndAction = &v + return s +} + +// SetInputLossBehavior sets the InputLossBehavior field's value. +func (s *GlobalConfiguration) SetInputLossBehavior(v *InputLossBehavior) *GlobalConfiguration { + s.InputLossBehavior = v + return s +} + +// SetOutputTimingSource sets the OutputTimingSource field's value. +func (s *GlobalConfiguration) SetOutputTimingSource(v string) *GlobalConfiguration { + s.OutputTimingSource = &v + return s +} + +// SetSupportLowFramerateInputs sets the SupportLowFramerateInputs field's value. +func (s *GlobalConfiguration) SetSupportLowFramerateInputs(v string) *GlobalConfiguration { + s.SupportLowFramerateInputs = &v + return s +} + +type H264Settings struct { + _ struct{} `type:"structure"` + + // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual + // quality. + AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H264AdaptiveQuantization"` + + // Indicates that AFD values will be written into the output stream. If afdSignaling + // is "auto", the system will try to preserve the input AFD value (in cases + // where multiple AFD values are valid). If set to "fixed", the AFD value will + // be the value configured in the fixedAfd parameter. + AfdSignaling *string `locationName:"afdSignaling" type:"string" enum:"AfdSignaling"` + + // Average bitrate in bits/second. Required when the rate control mode is VBR + // or CBR. Not used for QVBR. In an MS Smooth output group, each output must + // have a unique value when its bitrate is rounded down to the nearest multiple + // of 1000. + Bitrate *int64 `locationName:"bitrate" min:"1000" type:"integer"` + + // Percentage of the buffer that should initially be filled (HRD buffer model). + BufFillPct *int64 `locationName:"bufFillPct" type:"integer"` + + // Size of buffer (HRD buffer model) in bits/second. + BufSize *int64 `locationName:"bufSize" type:"integer"` + + // Includes colorspace metadata in the output. + ColorMetadata *string `locationName:"colorMetadata" type:"string" enum:"H264ColorMetadata"` + + // Entropy encoding mode. Use cabac (must be in Main or High profile) or cavlc. + EntropyEncoding *string `locationName:"entropyEncoding" type:"string" enum:"H264EntropyEncoding"` + + // Four bit AFD value to write on all frames of video in the output stream. + // Only valid when afdSignaling is set to 'Fixed'. + FixedAfd *string `locationName:"fixedAfd" type:"string" enum:"FixedAfd"` + + // If set to enabled, adjust quantization within each frame to reduce flicker + // or 'pop' on I-frames. + FlickerAq *string `locationName:"flickerAq" type:"string" enum:"H264FlickerAq"` + + // This field indicates how the output video frame rate is specified. If "specified" + // is selected then the output video frame rate is determined by framerateNumerator + // and framerateDenominator, else if "initializeFromSource" is selected then + // the output video frame rate will be set equal to the input video frame rate + // of the first input. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H264FramerateControl"` + + // Framerate denominator. + FramerateDenominator *int64 `locationName:"framerateDenominator" min:"1" type:"integer"` + + // Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 + // fps. + FramerateNumerator *int64 `locationName:"framerateNumerator" min:"1" type:"integer"` + + // If enabled, use reference B frames for GOP structures that have B frames + // > 1. + GopBReference *string `locationName:"gopBReference" type:"string" enum:"H264GopBReference"` + + // Frequency of closed GOPs. In streaming applications, it is recommended that + // this be set to 1 so a decoder joining mid-stream will receive an IDR frame + // as quickly as possible. Setting this value to 0 will break output segmenting. + GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` + + // Number of B-frames between reference frames. + GopNumBFrames *int64 `locationName:"gopNumBFrames" type:"integer"` + + // GOP size (keyframe interval) in units of either frames or seconds per gopSizeUnits. + // Must be greater than zero. + GopSize *float64 `locationName:"gopSize" type:"double"` + + // Indicates if the gopSize is specified in frames or seconds. If seconds the + // system will convert the gopSize into a frame count at run time. + GopSizeUnits *string `locationName:"gopSizeUnits" type:"string" enum:"H264GopSizeUnits"` + + // H.264 Level. + Level *string `locationName:"level" type:"string" enum:"H264Level"` + + // Amount of lookahead. A value of low can decrease latency and memory usage, + // while high can produce better quality for certain content. + LookAheadRateControl *string `locationName:"lookAheadRateControl" type:"string" enum:"H264LookAheadRateControl"` + + // For QVBR: See the tooltip for Quality level For VBR: Set the maximum bitrate + // in order to accommodate expected spikes in the complexity of the video. + MaxBitrate *int64 `locationName:"maxBitrate" min:"1000" type:"integer"` + + // Only meaningful if sceneChangeDetect is set to enabled. Enforces separation + // between repeated (cadence) I-frames and I-frames inserted by Scene Change + // Detection. If a scene change I-frame is within I-interval frames of a cadence + // I-frame, the GOP is shrunk and/or stretched to the scene change I-frame. + // GOP stretch requires enabling lookahead as well as setting I-interval. The + // normal cadence resumes for the next GOP. Note: Maximum GOP stretch = GOP + // size + Min-I-interval - 1 + MinIInterval *int64 `locationName:"minIInterval" type:"integer"` + + // Number of reference frames to use. The encoder may use more than requested + // if using B-frames and/or interlaced encoding. + NumRefFrames *int64 `locationName:"numRefFrames" min:"1" type:"integer"` + + // This field indicates how the output pixel aspect ratio is specified. If "specified" + // is selected then the output video pixel aspect ratio is determined by parNumerator + // and parDenominator, else if "initializeFromSource" is selected then the output + // pixsel aspect ratio will be set equal to the input video pixel aspect ratio + // of the first input. + ParControl *string `locationName:"parControl" type:"string" enum:"H264ParControl"` + + // Pixel Aspect Ratio denominator. + ParDenominator *int64 `locationName:"parDenominator" min:"1" type:"integer"` + + // Pixel Aspect Ratio numerator. + ParNumerator *int64 `locationName:"parNumerator" type:"integer"` + + // H.264 Profile. + Profile *string `locationName:"profile" type:"string" enum:"H264Profile"` + + // Controls the target quality for the video encode. Applies only when the rate + // control mode is QVBR. Set values for the QVBR quality level field and Max + // bitrate field that suit your most important viewing devices. Recommended + // values are:- Primary screen: Quality level: 8 to 10. Max bitrate: 4M- PC + // or tablet: Quality level: 7. Max bitrate: 1.5M to 3M- Smartphone: Quality + // level: 6. Max bitrate: 1M to 1.5M + QvbrQualityLevel *int64 `locationName:"qvbrQualityLevel" min:"1" type:"integer"` + + // Rate control mode. QVBR: Quality will match the specified quality level except + // when it is constrained by themaximum bitrate. Recommended if you or your + // viewers pay for bandwidth.VBR: Quality and bitrate vary, depending on the + // video complexity. Recommended instead of QVBRif you want to maintain a specific + // average bitrate over the duration of the channel.CBR: Quality varies, depending + // on the video complexity. Recommended only if you distributeyour assets to + // devices that cannot handle variable bitrates. + RateControlMode *string `locationName:"rateControlMode" type:"string" enum:"H264RateControlMode"` + + // Sets the scan type of the output to progressive or top-field-first interlaced. + ScanType *string `locationName:"scanType" type:"string" enum:"H264ScanType"` + + // Scene change detection.- On: inserts I-frames when scene change is detected.- + // Off: does not force an I-frame when scene change is detected. + SceneChangeDetect *string `locationName:"sceneChangeDetect" type:"string" enum:"H264SceneChangeDetect"` + + // Number of slices per picture. Must be less than or equal to the number of + // macroblock rows for progressive pictures, and less than or equal to half + // the number of macroblock rows for interlaced pictures.This field is optional; + // when no value is specified the encoder will choose the number of slices based + // on encode resolution. + Slices *int64 `locationName:"slices" min:"1" type:"integer"` + + // Softness. Selects quantizer matrix, larger values reduce high-frequency content + // in the encoded image. + Softness *int64 `locationName:"softness" type:"integer"` + + // If set to enabled, adjust quantization within each frame based on spatial + // variation of content complexity. + SpatialAq *string `locationName:"spatialAq" type:"string" enum:"H264SpatialAq"` + + // If set to fixed, use gopNumBFrames B-frames per sub-GOP. If set to dynamic, + // optimize the number of B-frames used for each sub-GOP to improve visual quality. + SubgopLength *string `locationName:"subgopLength" type:"string" enum:"H264SubGopLength"` + + // Produces a bitstream compliant with SMPTE RP-2027. + Syntax *string `locationName:"syntax" type:"string" enum:"H264Syntax"` + + // If set to enabled, adjust quantization within each frame based on temporal + // variation of content complexity. + TemporalAq *string `locationName:"temporalAq" type:"string" enum:"H264TemporalAq"` + + // Determines how timecodes should be inserted into the video elementary stream.- + // 'disabled': Do not include timecodes- 'picTimingSei': Pass through picture + // timing SEI messages from the source specified in Timecode Config + TimecodeInsertion *string `locationName:"timecodeInsertion" type:"string" enum:"H264TimecodeInsertionBehavior"` +} + +// String returns the string representation +func (s H264Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s H264Settings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *H264Settings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "H264Settings"} + if s.Bitrate != nil && *s.Bitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("Bitrate", 1000)) + } + if s.FramerateDenominator != nil && *s.FramerateDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateDenominator", 1)) + } + if s.FramerateNumerator != nil && *s.FramerateNumerator < 1 { + invalidParams.Add(request.NewErrParamMinValue("FramerateNumerator", 1)) + } + if s.MaxBitrate != nil && *s.MaxBitrate < 1000 { + invalidParams.Add(request.NewErrParamMinValue("MaxBitrate", 1000)) + } + if s.NumRefFrames != nil && *s.NumRefFrames < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumRefFrames", 1)) + } + if s.ParDenominator != nil && *s.ParDenominator < 1 { + invalidParams.Add(request.NewErrParamMinValue("ParDenominator", 1)) + } + if s.QvbrQualityLevel != nil && *s.QvbrQualityLevel < 1 { + invalidParams.Add(request.NewErrParamMinValue("QvbrQualityLevel", 1)) + } + if s.Slices != nil && *s.Slices < 1 { + invalidParams.Add(request.NewErrParamMinValue("Slices", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdaptiveQuantization sets the AdaptiveQuantization field's value. +func (s *H264Settings) SetAdaptiveQuantization(v string) *H264Settings { + s.AdaptiveQuantization = &v + return s +} + +// SetAfdSignaling sets the AfdSignaling field's value. +func (s *H264Settings) SetAfdSignaling(v string) *H264Settings { + s.AfdSignaling = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *H264Settings) SetBitrate(v int64) *H264Settings { + s.Bitrate = &v + return s +} + +// SetBufFillPct sets the BufFillPct field's value. +func (s *H264Settings) SetBufFillPct(v int64) *H264Settings { + s.BufFillPct = &v + return s +} + +// SetBufSize sets the BufSize field's value. +func (s *H264Settings) SetBufSize(v int64) *H264Settings { + s.BufSize = &v + return s +} + +// SetColorMetadata sets the ColorMetadata field's value. +func (s *H264Settings) SetColorMetadata(v string) *H264Settings { + s.ColorMetadata = &v + return s +} + +// SetEntropyEncoding sets the EntropyEncoding field's value. +func (s *H264Settings) SetEntropyEncoding(v string) *H264Settings { + s.EntropyEncoding = &v + return s +} + +// SetFixedAfd sets the FixedAfd field's value. +func (s *H264Settings) SetFixedAfd(v string) *H264Settings { + s.FixedAfd = &v + return s +} + +// SetFlickerAq sets the FlickerAq field's value. +func (s *H264Settings) SetFlickerAq(v string) *H264Settings { + s.FlickerAq = &v + return s +} + +// SetFramerateControl sets the FramerateControl field's value. +func (s *H264Settings) SetFramerateControl(v string) *H264Settings { + s.FramerateControl = &v + return s +} + +// SetFramerateDenominator sets the FramerateDenominator field's value. +func (s *H264Settings) SetFramerateDenominator(v int64) *H264Settings { + s.FramerateDenominator = &v + return s +} + +// SetFramerateNumerator sets the FramerateNumerator field's value. +func (s *H264Settings) SetFramerateNumerator(v int64) *H264Settings { + s.FramerateNumerator = &v + return s +} + +// SetGopBReference sets the GopBReference field's value. +func (s *H264Settings) SetGopBReference(v string) *H264Settings { + s.GopBReference = &v + return s +} + +// SetGopClosedCadence sets the GopClosedCadence field's value. +func (s *H264Settings) SetGopClosedCadence(v int64) *H264Settings { + s.GopClosedCadence = &v + return s +} + +// SetGopNumBFrames sets the GopNumBFrames field's value. +func (s *H264Settings) SetGopNumBFrames(v int64) *H264Settings { + s.GopNumBFrames = &v + return s +} + +// SetGopSize sets the GopSize field's value. +func (s *H264Settings) SetGopSize(v float64) *H264Settings { + s.GopSize = &v + return s +} + +// SetGopSizeUnits sets the GopSizeUnits field's value. +func (s *H264Settings) SetGopSizeUnits(v string) *H264Settings { + s.GopSizeUnits = &v + return s +} + +// SetLevel sets the Level field's value. +func (s *H264Settings) SetLevel(v string) *H264Settings { + s.Level = &v + return s +} + +// SetLookAheadRateControl sets the LookAheadRateControl field's value. +func (s *H264Settings) SetLookAheadRateControl(v string) *H264Settings { + s.LookAheadRateControl = &v + return s +} + +// SetMaxBitrate sets the MaxBitrate field's value. +func (s *H264Settings) SetMaxBitrate(v int64) *H264Settings { + s.MaxBitrate = &v + return s +} + +// SetMinIInterval sets the MinIInterval field's value. +func (s *H264Settings) SetMinIInterval(v int64) *H264Settings { + s.MinIInterval = &v + return s +} + +// SetNumRefFrames sets the NumRefFrames field's value. +func (s *H264Settings) SetNumRefFrames(v int64) *H264Settings { + s.NumRefFrames = &v + return s +} + +// SetParControl sets the ParControl field's value. +func (s *H264Settings) SetParControl(v string) *H264Settings { + s.ParControl = &v + return s +} + +// SetParDenominator sets the ParDenominator field's value. +func (s *H264Settings) SetParDenominator(v int64) *H264Settings { + s.ParDenominator = &v + return s +} + +// SetParNumerator sets the ParNumerator field's value. +func (s *H264Settings) SetParNumerator(v int64) *H264Settings { + s.ParNumerator = &v + return s +} + +// SetProfile sets the Profile field's value. +func (s *H264Settings) SetProfile(v string) *H264Settings { + s.Profile = &v + return s +} + +// SetQvbrQualityLevel sets the QvbrQualityLevel field's value. +func (s *H264Settings) SetQvbrQualityLevel(v int64) *H264Settings { + s.QvbrQualityLevel = &v + return s +} + +// SetRateControlMode sets the RateControlMode field's value. +func (s *H264Settings) SetRateControlMode(v string) *H264Settings { + s.RateControlMode = &v + return s +} + +// SetScanType sets the ScanType field's value. +func (s *H264Settings) SetScanType(v string) *H264Settings { + s.ScanType = &v + return s +} + +// SetSceneChangeDetect sets the SceneChangeDetect field's value. +func (s *H264Settings) SetSceneChangeDetect(v string) *H264Settings { + s.SceneChangeDetect = &v + return s +} + +// SetSlices sets the Slices field's value. +func (s *H264Settings) SetSlices(v int64) *H264Settings { + s.Slices = &v + return s +} + +// SetSoftness sets the Softness field's value. +func (s *H264Settings) SetSoftness(v int64) *H264Settings { + s.Softness = &v + return s +} + +// SetSpatialAq sets the SpatialAq field's value. +func (s *H264Settings) SetSpatialAq(v string) *H264Settings { + s.SpatialAq = &v + return s +} + +// SetSubgopLength sets the SubgopLength field's value. +func (s *H264Settings) SetSubgopLength(v string) *H264Settings { + s.SubgopLength = &v + return s +} + +// SetSyntax sets the Syntax field's value. +func (s *H264Settings) SetSyntax(v string) *H264Settings { + s.Syntax = &v + return s +} + +// SetTemporalAq sets the TemporalAq field's value. +func (s *H264Settings) SetTemporalAq(v string) *H264Settings { + s.TemporalAq = &v + return s +} + +// SetTimecodeInsertion sets the TimecodeInsertion field's value. +func (s *H264Settings) SetTimecodeInsertion(v string) *H264Settings { + s.TimecodeInsertion = &v + return s +} + +type HlsAkamaiSettings struct { + _ struct{} `type:"structure"` + + // Number of seconds to wait before retrying connection to the CDN if the connection + // is lost. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` + + // Size in seconds of file cache for streaming outputs. + FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` + + // Specify whether or not to use chunked transfer encoding to Akamai. User should + // contact Akamai to enable this feature. + HttpTransferMode *string `locationName:"httpTransferMode" type:"string" enum:"HlsAkamaiHttpTransferMode"` + + // Number of retry attempts that will be made before the Live Event is put into + // an error state. + NumRetries *int64 `locationName:"numRetries" type:"integer"` + + // If a streaming output fails, number of seconds to wait until a restart is + // initiated. A value of 0 means never restart. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` + + // Salt for authenticated Akamai. + Salt *string `locationName:"salt" type:"string"` + + // Token parameter for authenticated akamai. If not specified, _gda_ is used. + Token *string `locationName:"token" type:"string"` +} + +// String returns the string representation +func (s HlsAkamaiSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsAkamaiSettings) GoString() string { + return s.String() +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *HlsAkamaiSettings) SetConnectionRetryInterval(v int64) *HlsAkamaiSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetFilecacheDuration sets the FilecacheDuration field's value. +func (s *HlsAkamaiSettings) SetFilecacheDuration(v int64) *HlsAkamaiSettings { + s.FilecacheDuration = &v + return s +} + +// SetHttpTransferMode sets the HttpTransferMode field's value. +func (s *HlsAkamaiSettings) SetHttpTransferMode(v string) *HlsAkamaiSettings { + s.HttpTransferMode = &v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *HlsAkamaiSettings) SetNumRetries(v int64) *HlsAkamaiSettings { + s.NumRetries = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *HlsAkamaiSettings) SetRestartDelay(v int64) *HlsAkamaiSettings { + s.RestartDelay = &v + return s +} + +// SetSalt sets the Salt field's value. +func (s *HlsAkamaiSettings) SetSalt(v string) *HlsAkamaiSettings { + s.Salt = &v + return s +} + +// SetToken sets the Token field's value. +func (s *HlsAkamaiSettings) SetToken(v string) *HlsAkamaiSettings { + s.Token = &v + return s +} + +type HlsBasicPutSettings struct { + _ struct{} `type:"structure"` + + // Number of seconds to wait before retrying connection to the CDN if the connection + // is lost. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` + + // Size in seconds of file cache for streaming outputs. + FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` + + // Number of retry attempts that will be made before the Live Event is put into + // an error state. + NumRetries *int64 `locationName:"numRetries" type:"integer"` + + // If a streaming output fails, number of seconds to wait until a restart is + // initiated. A value of 0 means never restart. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` +} + +// String returns the string representation +func (s HlsBasicPutSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsBasicPutSettings) GoString() string { + return s.String() +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *HlsBasicPutSettings) SetConnectionRetryInterval(v int64) *HlsBasicPutSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetFilecacheDuration sets the FilecacheDuration field's value. +func (s *HlsBasicPutSettings) SetFilecacheDuration(v int64) *HlsBasicPutSettings { + s.FilecacheDuration = &v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *HlsBasicPutSettings) SetNumRetries(v int64) *HlsBasicPutSettings { + s.NumRetries = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *HlsBasicPutSettings) SetRestartDelay(v int64) *HlsBasicPutSettings { + s.RestartDelay = &v + return s +} + +type HlsCdnSettings struct { + _ struct{} `type:"structure"` + + HlsAkamaiSettings *HlsAkamaiSettings `locationName:"hlsAkamaiSettings" type:"structure"` + + HlsBasicPutSettings *HlsBasicPutSettings `locationName:"hlsBasicPutSettings" type:"structure"` + + HlsMediaStoreSettings *HlsMediaStoreSettings `locationName:"hlsMediaStoreSettings" type:"structure"` + + HlsWebdavSettings *HlsWebdavSettings `locationName:"hlsWebdavSettings" type:"structure"` +} + +// String returns the string representation +func (s HlsCdnSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsCdnSettings) GoString() string { + return s.String() +} + +// SetHlsAkamaiSettings sets the HlsAkamaiSettings field's value. +func (s *HlsCdnSettings) SetHlsAkamaiSettings(v *HlsAkamaiSettings) *HlsCdnSettings { + s.HlsAkamaiSettings = v + return s +} + +// SetHlsBasicPutSettings sets the HlsBasicPutSettings field's value. +func (s *HlsCdnSettings) SetHlsBasicPutSettings(v *HlsBasicPutSettings) *HlsCdnSettings { + s.HlsBasicPutSettings = v + return s +} + +// SetHlsMediaStoreSettings sets the HlsMediaStoreSettings field's value. +func (s *HlsCdnSettings) SetHlsMediaStoreSettings(v *HlsMediaStoreSettings) *HlsCdnSettings { + s.HlsMediaStoreSettings = v + return s +} + +// SetHlsWebdavSettings sets the HlsWebdavSettings field's value. +func (s *HlsCdnSettings) SetHlsWebdavSettings(v *HlsWebdavSettings) *HlsCdnSettings { + s.HlsWebdavSettings = v + return s +} + +type HlsGroupSettings struct { + _ struct{} `type:"structure"` + + // Choose one or more ad marker types to pass SCTE35 signals through to this + // group of Apple HLS outputs. + AdMarkers []*string `locationName:"adMarkers" type:"list"` + + // A partial URI prefix that will be prepended to each output in the media .m3u8 + // file. Can be used if base manifest is delivered from a different URL than + // the main .m3u8 file. + BaseUrlContent *string `locationName:"baseUrlContent" type:"string"` + + // A partial URI prefix that will be prepended to each output in the media .m3u8 + // file. Can be used if base manifest is delivered from a different URL than + // the main .m3u8 file. + BaseUrlManifest *string `locationName:"baseUrlManifest" type:"string"` + + // Mapping of up to 4 caption channels to caption languages. Is only meaningful + // if captionLanguageSetting is set to "insert". + CaptionLanguageMappings []*CaptionLanguageMapping `locationName:"captionLanguageMappings" type:"list"` + + // Applies only to 608 Embedded output captions.insert: Include CLOSED-CAPTIONS + // lines in the manifest. Specify at least one language in the CC1 Language + // Code field. One CLOSED-CAPTION line is added for each Language Code you specify. + // Make sure to specify the languages in the order in which they appear in the + // original source (if the source is embedded format) or the order of the caption + // selectors (if the source is other than embedded). Otherwise, languages in + // the manifest will not match up properly with the output captions.none: Include + // CLOSED-CAPTIONS=NONE line in the manifest.omit: Omit any CLOSED-CAPTIONS + // line from the manifest. + CaptionLanguageSetting *string `locationName:"captionLanguageSetting" type:"string" enum:"HlsCaptionLanguageSetting"` + + // When set to "disabled", sets the #EXT-X-ALLOW-CACHE:no tag in the manifest, + // which prevents clients from saving media segments for later replay. + ClientCache *string `locationName:"clientCache" type:"string" enum:"HlsClientCache"` + + // Specification to use (RFC-6381 or the default RFC-4281) during m3u8 playlist + // generation. + CodecSpecification *string `locationName:"codecSpecification" type:"string" enum:"HlsCodecSpecification"` + + // For use with encryptionType. This is a 128-bit, 16-byte hex value represented + // by a 32-character text string. If ivSource is set to "explicit" then this + // parameter is required and is used as the IV for encryption. + ConstantIv *string `locationName:"constantIv" min:"32" type:"string"` + + // A directory or HTTP destination for the HLS segments, manifest files, and + // encryption keys (if enabled). + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` + + // Place segments in subdirectories. + DirectoryStructure *string `locationName:"directoryStructure" type:"string" enum:"HlsDirectoryStructure"` + + // Encrypts the segments with the given encryption scheme. Exclude this parameter + // if no encryption is desired. + EncryptionType *string `locationName:"encryptionType" type:"string" enum:"HlsEncryptionType"` + + // Parameters that control interactions with the CDN. + HlsCdnSettings *HlsCdnSettings `locationName:"hlsCdnSettings" type:"structure"` + + // If enabled, writes out I-Frame only playlists in addition to media playlists. + IFrameOnlyPlaylists *string `locationName:"iFrameOnlyPlaylists" type:"string" enum:"IFrameOnlyPlaylistType"` + + // If mode is "live", the number of segments to retain in the manifest (.m3u8) + // file. This number must be less than or equal to keepSegments. If mode is + // "vod", this parameter has no effect. + IndexNSegments *int64 `locationName:"indexNSegments" min:"3" type:"integer"` + + // Parameter that control output group behavior on input loss. + InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForHlsOut"` + + // For use with encryptionType. The IV (Initialization Vector) is a 128-bit + // number used in conjunction with the key for encrypting blocks. If set to + // "include", IV is listed in the manifest, otherwise the IV is not in the manifest. + IvInManifest *string `locationName:"ivInManifest" type:"string" enum:"HlsIvInManifest"` + + // For use with encryptionType. The IV (Initialization Vector) is a 128-bit + // number used in conjunction with the key for encrypting blocks. If this setting + // is "followsSegmentNumber", it will cause the IV to change every segment (to + // match the segment number). If this is set to "explicit", you must enter a + // constantIv value. + IvSource *string `locationName:"ivSource" type:"string" enum:"HlsIvSource"` + + // If mode is "live", the number of TS segments to retain in the destination + // directory. If mode is "vod", this parameter has no effect. + KeepSegments *int64 `locationName:"keepSegments" min:"1" type:"integer"` + + // The value specifies how the key is represented in the resource identified + // by the URI. If parameter is absent, an implicit value of "identity" is used. + // A reverse DNS string can also be given. + KeyFormat *string `locationName:"keyFormat" type:"string"` + + // Either a single positive integer version value or a slash delimited list + // of version values (1/2/3). + KeyFormatVersions *string `locationName:"keyFormatVersions" type:"string"` + + // The key provider settings. + KeyProviderSettings *KeyProviderSettings `locationName:"keyProviderSettings" type:"structure"` + + // When set to gzip, compresses HLS playlist. + ManifestCompression *string `locationName:"manifestCompression" type:"string" enum:"HlsManifestCompression"` + + // Indicates whether the output manifest should use floating point or integer + // values for segment duration. + ManifestDurationFormat *string `locationName:"manifestDurationFormat" type:"string" enum:"HlsManifestDurationFormat"` + + // When set, minimumSegmentLength is enforced by looking ahead and back within + // the specified range for a nearby avail and extending the segment size if + // needed. + MinSegmentLength *int64 `locationName:"minSegmentLength" type:"integer"` + + // If "vod", all segments are indexed and kept permanently in the destination + // and manifest. If "live", only the number segments specified in keepSegments + // and indexNSegments are kept; newer segments replace older segments, which + // may prevent players from rewinding all the way to the beginning of the event.VOD + // mode uses HLS EXT-X-PLAYLIST-TYPE of EVENT while the channel is running, + // converting it to a "VOD" type manifest on completion of the stream. + Mode *string `locationName:"mode" type:"string" enum:"HlsMode"` + + // Generates the .m3u8 playlist file for this HLS output group. The segmentsOnly + // option will output segments without the .m3u8 file. + OutputSelection *string `locationName:"outputSelection" type:"string" enum:"HlsOutputSelection"` + + // Includes or excludes EXT-X-PROGRAM-DATE-TIME tag in .m3u8 manifest files. + // The value is calculated as follows: either the program date and time are + // initialized using the input timecode source, or the time is initialized using + // the input timecode source and the date is initialized using the timestampOffset. + ProgramDateTime *string `locationName:"programDateTime" type:"string" enum:"HlsProgramDateTime"` + + // Period of insertion of EXT-X-PROGRAM-DATE-TIME entry, in seconds. + ProgramDateTimePeriod *int64 `locationName:"programDateTimePeriod" type:"integer"` + + // When set to "enabled", includes the media playlists from both pipelines in + // the master manifest (.m3u8) file. + RedundantManifest *string `locationName:"redundantManifest" type:"string" enum:"HlsRedundantManifest"` + + // Length of MPEG-2 Transport Stream segments to create (in seconds). Note that + // segments will end on the next keyframe after this number of seconds, so actual + // segment length may be longer. + SegmentLength *int64 `locationName:"segmentLength" min:"1" type:"integer"` + + // useInputSegmentation has been deprecated. The configured segment size is + // always used. + SegmentationMode *string `locationName:"segmentationMode" type:"string" enum:"HlsSegmentationMode"` + + // Number of segments to write to a subdirectory before starting a new one. + // directoryStructure must be subdirectoryPerStream for this setting to have + // an effect. + SegmentsPerSubdirectory *int64 `locationName:"segmentsPerSubdirectory" min:"1" type:"integer"` + + // Include or exclude RESOLUTION attribute for video in EXT-X-STREAM-INF tag + // of variant manifest. + StreamInfResolution *string `locationName:"streamInfResolution" type:"string" enum:"HlsStreamInfResolution"` + + // Indicates ID3 frame that has the timecode. + TimedMetadataId3Frame *string `locationName:"timedMetadataId3Frame" type:"string" enum:"HlsTimedMetadataId3Frame"` + + // Timed Metadata interval in seconds. + TimedMetadataId3Period *int64 `locationName:"timedMetadataId3Period" type:"integer"` + + // Provides an extra millisecond delta offset to fine tune the timestamps. + TimestampDeltaMilliseconds *int64 `locationName:"timestampDeltaMilliseconds" type:"integer"` + + // When set to "singleFile", emits the program as a single media resource (.ts) + // file, and uses #EXT-X-BYTERANGE tags to index segment for playback. Playback + // of VOD mode content during event is not guaranteed due to HTTP server caching. + TsFileMode *string `locationName:"tsFileMode" type:"string" enum:"HlsTsFileMode"` +} + +// String returns the string representation +func (s HlsGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsGroupSettings"} + if s.ConstantIv != nil && len(*s.ConstantIv) < 32 { + invalidParams.Add(request.NewErrParamMinLen("ConstantIv", 32)) + } + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.IndexNSegments != nil && *s.IndexNSegments < 3 { + invalidParams.Add(request.NewErrParamMinValue("IndexNSegments", 3)) + } + if s.KeepSegments != nil && *s.KeepSegments < 1 { + invalidParams.Add(request.NewErrParamMinValue("KeepSegments", 1)) + } + if s.SegmentLength != nil && *s.SegmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("SegmentLength", 1)) + } + if s.SegmentsPerSubdirectory != nil && *s.SegmentsPerSubdirectory < 1 { + invalidParams.Add(request.NewErrParamMinValue("SegmentsPerSubdirectory", 1)) + } + if s.CaptionLanguageMappings != nil { + for i, v := range s.CaptionLanguageMappings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionLanguageMappings", i), err.(request.ErrInvalidParams)) + } + } + } + if s.KeyProviderSettings != nil { + if err := s.KeyProviderSettings.Validate(); err != nil { + invalidParams.AddNested("KeyProviderSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsGroupSettings) SetAdMarkers(v []*string) *HlsGroupSettings { + s.AdMarkers = v + return s +} + +// SetBaseUrlContent sets the BaseUrlContent field's value. +func (s *HlsGroupSettings) SetBaseUrlContent(v string) *HlsGroupSettings { + s.BaseUrlContent = &v + return s +} + +// SetBaseUrlManifest sets the BaseUrlManifest field's value. +func (s *HlsGroupSettings) SetBaseUrlManifest(v string) *HlsGroupSettings { + s.BaseUrlManifest = &v + return s +} + +// SetCaptionLanguageMappings sets the CaptionLanguageMappings field's value. +func (s *HlsGroupSettings) SetCaptionLanguageMappings(v []*CaptionLanguageMapping) *HlsGroupSettings { + s.CaptionLanguageMappings = v + return s +} + +// SetCaptionLanguageSetting sets the CaptionLanguageSetting field's value. +func (s *HlsGroupSettings) SetCaptionLanguageSetting(v string) *HlsGroupSettings { + s.CaptionLanguageSetting = &v + return s +} + +// SetClientCache sets the ClientCache field's value. +func (s *HlsGroupSettings) SetClientCache(v string) *HlsGroupSettings { + s.ClientCache = &v + return s +} + +// SetCodecSpecification sets the CodecSpecification field's value. +func (s *HlsGroupSettings) SetCodecSpecification(v string) *HlsGroupSettings { + s.CodecSpecification = &v + return s +} + +// SetConstantIv sets the ConstantIv field's value. +func (s *HlsGroupSettings) SetConstantIv(v string) *HlsGroupSettings { + s.ConstantIv = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *HlsGroupSettings) SetDestination(v *OutputLocationRef) *HlsGroupSettings { + s.Destination = v + return s +} + +// SetDirectoryStructure sets the DirectoryStructure field's value. +func (s *HlsGroupSettings) SetDirectoryStructure(v string) *HlsGroupSettings { + s.DirectoryStructure = &v + return s +} + +// SetEncryptionType sets the EncryptionType field's value. +func (s *HlsGroupSettings) SetEncryptionType(v string) *HlsGroupSettings { + s.EncryptionType = &v + return s +} + +// SetHlsCdnSettings sets the HlsCdnSettings field's value. +func (s *HlsGroupSettings) SetHlsCdnSettings(v *HlsCdnSettings) *HlsGroupSettings { + s.HlsCdnSettings = v + return s +} + +// SetIFrameOnlyPlaylists sets the IFrameOnlyPlaylists field's value. +func (s *HlsGroupSettings) SetIFrameOnlyPlaylists(v string) *HlsGroupSettings { + s.IFrameOnlyPlaylists = &v + return s +} + +// SetIndexNSegments sets the IndexNSegments field's value. +func (s *HlsGroupSettings) SetIndexNSegments(v int64) *HlsGroupSettings { + s.IndexNSegments = &v + return s +} + +// SetInputLossAction sets the InputLossAction field's value. +func (s *HlsGroupSettings) SetInputLossAction(v string) *HlsGroupSettings { + s.InputLossAction = &v + return s +} + +// SetIvInManifest sets the IvInManifest field's value. +func (s *HlsGroupSettings) SetIvInManifest(v string) *HlsGroupSettings { + s.IvInManifest = &v + return s +} + +// SetIvSource sets the IvSource field's value. +func (s *HlsGroupSettings) SetIvSource(v string) *HlsGroupSettings { + s.IvSource = &v + return s +} + +// SetKeepSegments sets the KeepSegments field's value. +func (s *HlsGroupSettings) SetKeepSegments(v int64) *HlsGroupSettings { + s.KeepSegments = &v + return s +} + +// SetKeyFormat sets the KeyFormat field's value. +func (s *HlsGroupSettings) SetKeyFormat(v string) *HlsGroupSettings { + s.KeyFormat = &v + return s +} + +// SetKeyFormatVersions sets the KeyFormatVersions field's value. +func (s *HlsGroupSettings) SetKeyFormatVersions(v string) *HlsGroupSettings { + s.KeyFormatVersions = &v + return s +} + +// SetKeyProviderSettings sets the KeyProviderSettings field's value. +func (s *HlsGroupSettings) SetKeyProviderSettings(v *KeyProviderSettings) *HlsGroupSettings { + s.KeyProviderSettings = v + return s +} + +// SetManifestCompression sets the ManifestCompression field's value. +func (s *HlsGroupSettings) SetManifestCompression(v string) *HlsGroupSettings { + s.ManifestCompression = &v + return s +} + +// SetManifestDurationFormat sets the ManifestDurationFormat field's value. +func (s *HlsGroupSettings) SetManifestDurationFormat(v string) *HlsGroupSettings { + s.ManifestDurationFormat = &v + return s +} + +// SetMinSegmentLength sets the MinSegmentLength field's value. +func (s *HlsGroupSettings) SetMinSegmentLength(v int64) *HlsGroupSettings { + s.MinSegmentLength = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *HlsGroupSettings) SetMode(v string) *HlsGroupSettings { + s.Mode = &v + return s +} + +// SetOutputSelection sets the OutputSelection field's value. +func (s *HlsGroupSettings) SetOutputSelection(v string) *HlsGroupSettings { + s.OutputSelection = &v + return s +} + +// SetProgramDateTime sets the ProgramDateTime field's value. +func (s *HlsGroupSettings) SetProgramDateTime(v string) *HlsGroupSettings { + s.ProgramDateTime = &v + return s +} + +// SetProgramDateTimePeriod sets the ProgramDateTimePeriod field's value. +func (s *HlsGroupSettings) SetProgramDateTimePeriod(v int64) *HlsGroupSettings { + s.ProgramDateTimePeriod = &v + return s +} + +// SetRedundantManifest sets the RedundantManifest field's value. +func (s *HlsGroupSettings) SetRedundantManifest(v string) *HlsGroupSettings { + s.RedundantManifest = &v + return s +} + +// SetSegmentLength sets the SegmentLength field's value. +func (s *HlsGroupSettings) SetSegmentLength(v int64) *HlsGroupSettings { + s.SegmentLength = &v + return s +} + +// SetSegmentationMode sets the SegmentationMode field's value. +func (s *HlsGroupSettings) SetSegmentationMode(v string) *HlsGroupSettings { + s.SegmentationMode = &v + return s +} + +// SetSegmentsPerSubdirectory sets the SegmentsPerSubdirectory field's value. +func (s *HlsGroupSettings) SetSegmentsPerSubdirectory(v int64) *HlsGroupSettings { + s.SegmentsPerSubdirectory = &v + return s +} + +// SetStreamInfResolution sets the StreamInfResolution field's value. +func (s *HlsGroupSettings) SetStreamInfResolution(v string) *HlsGroupSettings { + s.StreamInfResolution = &v + return s +} + +// SetTimedMetadataId3Frame sets the TimedMetadataId3Frame field's value. +func (s *HlsGroupSettings) SetTimedMetadataId3Frame(v string) *HlsGroupSettings { + s.TimedMetadataId3Frame = &v + return s +} + +// SetTimedMetadataId3Period sets the TimedMetadataId3Period field's value. +func (s *HlsGroupSettings) SetTimedMetadataId3Period(v int64) *HlsGroupSettings { + s.TimedMetadataId3Period = &v + return s +} + +// SetTimestampDeltaMilliseconds sets the TimestampDeltaMilliseconds field's value. +func (s *HlsGroupSettings) SetTimestampDeltaMilliseconds(v int64) *HlsGroupSettings { + s.TimestampDeltaMilliseconds = &v + return s +} + +// SetTsFileMode sets the TsFileMode field's value. +func (s *HlsGroupSettings) SetTsFileMode(v string) *HlsGroupSettings { + s.TsFileMode = &v + return s +} + +type HlsInputSettings struct { + _ struct{} `type:"structure"` + + // When specified the HLS stream with the m3u8 BANDWIDTH that most closely matches + // this value will be chosen, otherwise the highest bandwidth stream in the + // m3u8 will be chosen. The bitrate is specified in bits per second, as in an + // HLS manifest. + Bandwidth *int64 `locationName:"bandwidth" type:"integer"` + + // When specified, reading of the HLS input will begin this many buffer segments + // from the end (most recently written segment). When not specified, the HLS + // input will begin with the first segment specified in the m3u8. + BufferSegments *int64 `locationName:"bufferSegments" type:"integer"` + + // The number of consecutive times that attempts to read a manifest or segment + // must fail before the input is considered unavailable. + Retries *int64 `locationName:"retries" type:"integer"` + + // The number of seconds between retries when an attempt to read a manifest + // or segment fails. + RetryInterval *int64 `locationName:"retryInterval" type:"integer"` +} + +// String returns the string representation +func (s HlsInputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsInputSettings) GoString() string { + return s.String() +} + +// SetBandwidth sets the Bandwidth field's value. +func (s *HlsInputSettings) SetBandwidth(v int64) *HlsInputSettings { + s.Bandwidth = &v + return s +} + +// SetBufferSegments sets the BufferSegments field's value. +func (s *HlsInputSettings) SetBufferSegments(v int64) *HlsInputSettings { + s.BufferSegments = &v + return s +} + +// SetRetries sets the Retries field's value. +func (s *HlsInputSettings) SetRetries(v int64) *HlsInputSettings { + s.Retries = &v + return s +} + +// SetRetryInterval sets the RetryInterval field's value. +func (s *HlsInputSettings) SetRetryInterval(v int64) *HlsInputSettings { + s.RetryInterval = &v + return s +} + +type HlsMediaStoreSettings struct { + _ struct{} `type:"structure"` + + // Number of seconds to wait before retrying connection to the CDN if the connection + // is lost. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` + + // Size in seconds of file cache for streaming outputs. + FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` + + // When set to temporal, output files are stored in non-persistent memory for + // faster reading and writing. + MediaStoreStorageClass *string `locationName:"mediaStoreStorageClass" type:"string" enum:"HlsMediaStoreStorageClass"` + + // Number of retry attempts that will be made before the Live Event is put into + // an error state. + NumRetries *int64 `locationName:"numRetries" type:"integer"` + + // If a streaming output fails, number of seconds to wait until a restart is + // initiated. A value of 0 means never restart. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` +} + +// String returns the string representation +func (s HlsMediaStoreSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsMediaStoreSettings) GoString() string { + return s.String() +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *HlsMediaStoreSettings) SetConnectionRetryInterval(v int64) *HlsMediaStoreSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetFilecacheDuration sets the FilecacheDuration field's value. +func (s *HlsMediaStoreSettings) SetFilecacheDuration(v int64) *HlsMediaStoreSettings { + s.FilecacheDuration = &v + return s +} + +// SetMediaStoreStorageClass sets the MediaStoreStorageClass field's value. +func (s *HlsMediaStoreSettings) SetMediaStoreStorageClass(v string) *HlsMediaStoreSettings { + s.MediaStoreStorageClass = &v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *HlsMediaStoreSettings) SetNumRetries(v int64) *HlsMediaStoreSettings { + s.NumRetries = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *HlsMediaStoreSettings) SetRestartDelay(v int64) *HlsMediaStoreSettings { + s.RestartDelay = &v + return s +} + +type HlsOutputSettings struct { + _ struct{} `type:"structure"` + + // Settings regarding the underlying stream. These settings are different for + // audio-only outputs. + // + // HlsSettings is a required field + HlsSettings *HlsSettings `locationName:"hlsSettings" type:"structure" required:"true"` + + // String concatenated to the end of the destination filename. Accepts \"Format + // Identifiers\":#formatIdentifierParameters. + NameModifier *string `locationName:"nameModifier" min:"1" type:"string"` + + // String concatenated to end of segment filenames. + SegmentModifier *string `locationName:"segmentModifier" type:"string"` +} + +// String returns the string representation +func (s HlsOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsOutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsOutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsOutputSettings"} + if s.HlsSettings == nil { + invalidParams.Add(request.NewErrParamRequired("HlsSettings")) + } + if s.NameModifier != nil && len(*s.NameModifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameModifier", 1)) + } + if s.HlsSettings != nil { + if err := s.HlsSettings.Validate(); err != nil { + invalidParams.AddNested("HlsSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHlsSettings sets the HlsSettings field's value. +func (s *HlsOutputSettings) SetHlsSettings(v *HlsSettings) *HlsOutputSettings { + s.HlsSettings = v + return s +} + +// SetNameModifier sets the NameModifier field's value. +func (s *HlsOutputSettings) SetNameModifier(v string) *HlsOutputSettings { + s.NameModifier = &v + return s +} + +// SetSegmentModifier sets the SegmentModifier field's value. +func (s *HlsOutputSettings) SetSegmentModifier(v string) *HlsOutputSettings { + s.SegmentModifier = &v + return s +} + +type HlsSettings struct { + _ struct{} `type:"structure"` + + AudioOnlyHlsSettings *AudioOnlyHlsSettings `locationName:"audioOnlyHlsSettings" type:"structure"` + + StandardHlsSettings *StandardHlsSettings `locationName:"standardHlsSettings" type:"structure"` +} + +// String returns the string representation +func (s HlsSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsSettings"} + if s.AudioOnlyHlsSettings != nil { + if err := s.AudioOnlyHlsSettings.Validate(); err != nil { + invalidParams.AddNested("AudioOnlyHlsSettings", err.(request.ErrInvalidParams)) + } + } + if s.StandardHlsSettings != nil { + if err := s.StandardHlsSettings.Validate(); err != nil { + invalidParams.AddNested("StandardHlsSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioOnlyHlsSettings sets the AudioOnlyHlsSettings field's value. +func (s *HlsSettings) SetAudioOnlyHlsSettings(v *AudioOnlyHlsSettings) *HlsSettings { + s.AudioOnlyHlsSettings = v + return s +} + +// SetStandardHlsSettings sets the StandardHlsSettings field's value. +func (s *HlsSettings) SetStandardHlsSettings(v *StandardHlsSettings) *HlsSettings { + s.StandardHlsSettings = v + return s +} + +// Settings for the action to emit HLS metadata +type HlsTimedMetadataScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // Base64 string formatted according to the ID3 specification: http://id3.org/id3v2.4.0-structure + // + // Id3 is a required field + Id3 *string `locationName:"id3" type:"string" required:"true"` +} + +// String returns the string representation +func (s HlsTimedMetadataScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsTimedMetadataScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsTimedMetadataScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsTimedMetadataScheduleActionSettings"} + if s.Id3 == nil { + invalidParams.Add(request.NewErrParamRequired("Id3")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId3 sets the Id3 field's value. +func (s *HlsTimedMetadataScheduleActionSettings) SetId3(v string) *HlsTimedMetadataScheduleActionSettings { + s.Id3 = &v + return s +} + +type HlsWebdavSettings struct { + _ struct{} `type:"structure"` + + // Number of seconds to wait before retrying connection to the CDN if the connection + // is lost. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` + + // Size in seconds of file cache for streaming outputs. + FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` + + // Specify whether or not to use chunked transfer encoding to WebDAV. + HttpTransferMode *string `locationName:"httpTransferMode" type:"string" enum:"HlsWebdavHttpTransferMode"` + + // Number of retry attempts that will be made before the Live Event is put into + // an error state. + NumRetries *int64 `locationName:"numRetries" type:"integer"` + + // If a streaming output fails, number of seconds to wait until a restart is + // initiated. A value of 0 means never restart. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` +} + +// String returns the string representation +func (s HlsWebdavSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsWebdavSettings) GoString() string { + return s.String() +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *HlsWebdavSettings) SetConnectionRetryInterval(v int64) *HlsWebdavSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetFilecacheDuration sets the FilecacheDuration field's value. +func (s *HlsWebdavSettings) SetFilecacheDuration(v int64) *HlsWebdavSettings { + s.FilecacheDuration = &v + return s +} + +// SetHttpTransferMode sets the HttpTransferMode field's value. +func (s *HlsWebdavSettings) SetHttpTransferMode(v string) *HlsWebdavSettings { + s.HttpTransferMode = &v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *HlsWebdavSettings) SetNumRetries(v int64) *HlsWebdavSettings { + s.NumRetries = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *HlsWebdavSettings) SetRestartDelay(v int64) *HlsWebdavSettings { + s.RestartDelay = &v + return s +} + +type Input struct { + _ struct{} `type:"structure"` + + // The Unique ARN of the input (generated, immutable). + Arn *string `locationName:"arn" type:"string"` + + // A list of channel IDs that that input is attached to (currently an input + // can only be attached to one channel). + AttachedChannels []*string `locationName:"attachedChannels" type:"list"` + + // A list of the destinations of the input (PUSH-type). + Destinations []*InputDestination `locationName:"destinations" type:"list"` + + // The generated ID of the input (unique for user account, immutable). + Id *string `locationName:"id" type:"string"` + + // A list of MediaConnect Flows for this input. + MediaConnectFlows []*MediaConnectFlow `locationName:"mediaConnectFlows" type:"list"` + + // The user-assigned name (This is a mutable value). + Name *string `locationName:"name" type:"string"` + + // The Amazon Resource Name (ARN) of the role this input assumes during and + // after creation. + RoleArn *string `locationName:"roleArn" type:"string"` + + // A list of IDs for all the security groups attached to the input. + SecurityGroups []*string `locationName:"securityGroups" type:"list"` + + // A list of the sources of the input (PULL-type). + Sources []*InputSource `locationName:"sources" type:"list"` + + State *string `locationName:"state" type:"string" enum:"InputState"` + + Type *string `locationName:"type" type:"string" enum:"InputType"` +} + +// String returns the string representation +func (s Input) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Input) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Input) SetArn(v string) *Input { + s.Arn = &v + return s +} + +// SetAttachedChannels sets the AttachedChannels field's value. +func (s *Input) SetAttachedChannels(v []*string) *Input { + s.AttachedChannels = v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *Input) SetDestinations(v []*InputDestination) *Input { + s.Destinations = v + return s +} + +// SetId sets the Id field's value. +func (s *Input) SetId(v string) *Input { + s.Id = &v + return s +} + +// SetMediaConnectFlows sets the MediaConnectFlows field's value. +func (s *Input) SetMediaConnectFlows(v []*MediaConnectFlow) *Input { + s.MediaConnectFlows = v + return s +} + +// SetName sets the Name field's value. +func (s *Input) SetName(v string) *Input { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *Input) SetRoleArn(v string) *Input { + s.RoleArn = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *Input) SetSecurityGroups(v []*string) *Input { + s.SecurityGroups = v + return s +} + +// SetSources sets the Sources field's value. +func (s *Input) SetSources(v []*InputSource) *Input { + s.Sources = v + return s +} + +// SetState sets the State field's value. +func (s *Input) SetState(v string) *Input { + s.State = &v + return s +} + +// SetType sets the Type field's value. +func (s *Input) SetType(v string) *Input { + s.Type = &v + return s +} + +type InputAttachment struct { + _ struct{} `type:"structure"` + + // User-specified name for the attachment. This is required if the user wants + // to use this input in an input switch action. + InputAttachmentName *string `locationName:"inputAttachmentName" type:"string"` + + // The ID of the input + InputId *string `locationName:"inputId" type:"string"` + + // Settings of an input (caption selector, etc.) + InputSettings *InputSettings `locationName:"inputSettings" type:"structure"` +} + +// String returns the string representation +func (s InputAttachment) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputAttachment) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputAttachment) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputAttachment"} + if s.InputSettings != nil { + if err := s.InputSettings.Validate(); err != nil { + invalidParams.AddNested("InputSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputAttachmentName sets the InputAttachmentName field's value. +func (s *InputAttachment) SetInputAttachmentName(v string) *InputAttachment { + s.InputAttachmentName = &v + return s +} + +// SetInputId sets the InputId field's value. +func (s *InputAttachment) SetInputId(v string) *InputAttachment { + s.InputId = &v + return s +} + +// SetInputSettings sets the InputSettings field's value. +func (s *InputAttachment) SetInputSettings(v *InputSettings) *InputAttachment { + s.InputSettings = v + return s +} + +type InputChannelLevel struct { + _ struct{} `type:"structure"` + + // Remixing value. Units are in dB and acceptable values are within the range + // from -60 (mute) and 6 dB. + // + // Gain is a required field + Gain *int64 `locationName:"gain" type:"integer" required:"true"` + + // The index of the input channel used as a source. + // + // InputChannel is a required field + InputChannel *int64 `locationName:"inputChannel" type:"integer" required:"true"` +} + +// String returns the string representation +func (s InputChannelLevel) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputChannelLevel) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputChannelLevel) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputChannelLevel"} + if s.Gain == nil { + invalidParams.Add(request.NewErrParamRequired("Gain")) + } + if s.Gain != nil && *s.Gain < -60 { + invalidParams.Add(request.NewErrParamMinValue("Gain", -60)) + } + if s.InputChannel == nil { + invalidParams.Add(request.NewErrParamRequired("InputChannel")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGain sets the Gain field's value. +func (s *InputChannelLevel) SetGain(v int64) *InputChannelLevel { + s.Gain = &v + return s +} + +// SetInputChannel sets the InputChannel field's value. +func (s *InputChannelLevel) SetInputChannel(v int64) *InputChannelLevel { + s.InputChannel = &v + return s +} + +// The settings for a PUSH type input. +type InputDestination struct { + _ struct{} `type:"structure"` + + // The system-generated static IP address of endpoint.It remains fixed for the + // lifetime of the input. + Ip *string `locationName:"ip" type:"string"` + + // The port number for the input. + Port *string `locationName:"port" type:"string"` + + // This represents the endpoint that the customer stream will bepushed to. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s InputDestination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDestination) GoString() string { + return s.String() +} + +// SetIp sets the Ip field's value. +func (s *InputDestination) SetIp(v string) *InputDestination { + s.Ip = &v + return s +} + +// SetPort sets the Port field's value. +func (s *InputDestination) SetPort(v string) *InputDestination { + s.Port = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *InputDestination) SetUrl(v string) *InputDestination { + s.Url = &v + return s +} + +// Endpoint settings for a PUSH type input. +type InputDestinationRequest struct { + _ struct{} `type:"structure"` + + // A unique name for the location the RTMP stream is being pushedto. + StreamName *string `locationName:"streamName" type:"string"` +} + +// String returns the string representation +func (s InputDestinationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDestinationRequest) GoString() string { + return s.String() +} + +// SetStreamName sets the StreamName field's value. +func (s *InputDestinationRequest) SetStreamName(v string) *InputDestinationRequest { + s.StreamName = &v + return s +} + +type InputLocation struct { + _ struct{} `type:"structure"` + + // key used to extract the password from EC2 Parameter store + PasswordParam *string `locationName:"passwordParam" type:"string"` + + // Uniform Resource Identifier - This should be a path to a file accessible + // to the Live system (eg. a http:// URI) depending on the output type. For + // example, a RTMP destination should have a uri simliar to: "rtmp://fmsserver/live". + // + // Uri is a required field + Uri *string `locationName:"uri" type:"string" required:"true"` + + // Username if credentials are required to access a file or publishing point. + // This can be either a plaintext username, or a reference to an AWS parameter + // store name from which the username can be retrieved. AWS Parameter store + // format: "ssm://" + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s InputLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputLocation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputLocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputLocation"} + if s.Uri == nil { + invalidParams.Add(request.NewErrParamRequired("Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPasswordParam sets the PasswordParam field's value. +func (s *InputLocation) SetPasswordParam(v string) *InputLocation { + s.PasswordParam = &v + return s +} + +// SetUri sets the Uri field's value. +func (s *InputLocation) SetUri(v string) *InputLocation { + s.Uri = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *InputLocation) SetUsername(v string) *InputLocation { + s.Username = &v + return s +} + +type InputLossBehavior struct { + _ struct{} `type:"structure"` + + // On input loss, the number of milliseconds to substitute black into the output + // before switching to the frame specified by inputLossImageType. A value x, + // where 0 <= x <= 1,000,000 and a value of 1,000,000 will be interpreted as + // infinite. + BlackFrameMsec *int64 `locationName:"blackFrameMsec" type:"integer"` + + // When input loss image type is "color" this field specifies the color to use. + // Value: 6 hex characters representing the values of RGB. + InputLossImageColor *string `locationName:"inputLossImageColor" min:"6" type:"string"` + + // When input loss image type is "slate" these fields specify the parameters + // for accessing the slate. + InputLossImageSlate *InputLocation `locationName:"inputLossImageSlate" type:"structure"` + + // Indicates whether to substitute a solid color or a slate into the output + // after input loss exceeds blackFrameMsec. + InputLossImageType *string `locationName:"inputLossImageType" type:"string" enum:"InputLossImageType"` + + // On input loss, the number of milliseconds to repeat the previous picture + // before substituting black into the output. A value x, where 0 <= x <= 1,000,000 + // and a value of 1,000,000 will be interpreted as infinite. + RepeatFrameMsec *int64 `locationName:"repeatFrameMsec" type:"integer"` +} + +// String returns the string representation +func (s InputLossBehavior) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputLossBehavior) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputLossBehavior) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputLossBehavior"} + if s.InputLossImageColor != nil && len(*s.InputLossImageColor) < 6 { + invalidParams.Add(request.NewErrParamMinLen("InputLossImageColor", 6)) + } + if s.InputLossImageSlate != nil { + if err := s.InputLossImageSlate.Validate(); err != nil { + invalidParams.AddNested("InputLossImageSlate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBlackFrameMsec sets the BlackFrameMsec field's value. +func (s *InputLossBehavior) SetBlackFrameMsec(v int64) *InputLossBehavior { + s.BlackFrameMsec = &v + return s +} + +// SetInputLossImageColor sets the InputLossImageColor field's value. +func (s *InputLossBehavior) SetInputLossImageColor(v string) *InputLossBehavior { + s.InputLossImageColor = &v + return s +} + +// SetInputLossImageSlate sets the InputLossImageSlate field's value. +func (s *InputLossBehavior) SetInputLossImageSlate(v *InputLocation) *InputLossBehavior { + s.InputLossImageSlate = v + return s +} + +// SetInputLossImageType sets the InputLossImageType field's value. +func (s *InputLossBehavior) SetInputLossImageType(v string) *InputLossBehavior { + s.InputLossImageType = &v + return s +} + +// SetRepeatFrameMsec sets the RepeatFrameMsec field's value. +func (s *InputLossBehavior) SetRepeatFrameMsec(v int64) *InputLossBehavior { + s.RepeatFrameMsec = &v + return s +} + +// An Input Security Group +type InputSecurityGroup struct { + _ struct{} `type:"structure"` + + // Unique ARN of Input Security Group + Arn *string `locationName:"arn" type:"string"` + + // The Id of the Input Security Group + Id *string `locationName:"id" type:"string"` + + // The list of inputs currently using this Input Security Group. + Inputs []*string `locationName:"inputs" type:"list"` + + // The current state of the Input Security Group. + State *string `locationName:"state" type:"string" enum:"InputSecurityGroupState"` + + // Whitelist rules and their sync status + WhitelistRules []*InputWhitelistRule `locationName:"whitelistRules" type:"list"` +} + +// String returns the string representation +func (s InputSecurityGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSecurityGroup) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *InputSecurityGroup) SetArn(v string) *InputSecurityGroup { + s.Arn = &v + return s +} + +// SetId sets the Id field's value. +func (s *InputSecurityGroup) SetId(v string) *InputSecurityGroup { + s.Id = &v + return s +} + +// SetInputs sets the Inputs field's value. +func (s *InputSecurityGroup) SetInputs(v []*string) *InputSecurityGroup { + s.Inputs = v + return s +} + +// SetState sets the State field's value. +func (s *InputSecurityGroup) SetState(v string) *InputSecurityGroup { + s.State = &v + return s +} + +// SetWhitelistRules sets the WhitelistRules field's value. +func (s *InputSecurityGroup) SetWhitelistRules(v []*InputWhitelistRule) *InputSecurityGroup { + s.WhitelistRules = v + return s +} + +// Live Event input parameters. There can be multiple inputs in a single Live +// Event. +type InputSettings struct { + _ struct{} `type:"structure"` + + // Used to select the audio stream to decode for inputs that have multiple available. + AudioSelectors []*AudioSelector `locationName:"audioSelectors" type:"list"` + + // Used to select the caption input to use for inputs that have multiple available. + CaptionSelectors []*CaptionSelector `locationName:"captionSelectors" type:"list"` + + // Enable or disable the deblock filter when filtering. + DeblockFilter *string `locationName:"deblockFilter" type:"string" enum:"InputDeblockFilter"` + + // Enable or disable the denoise filter when filtering. + DenoiseFilter *string `locationName:"denoiseFilter" type:"string" enum:"InputDenoiseFilter"` + + // Adjusts the magnitude of filtering from 1 (minimal) to 5 (strongest). + FilterStrength *int64 `locationName:"filterStrength" min:"1" type:"integer"` + + // Turns on the filter for this input. MPEG-2 inputs have the deblocking filter + // enabled by default.1) auto - filtering will be applied depending on input + // type/quality2) disabled - no filtering will be applied to the input3) forced + // - filtering will be applied regardless of input type + InputFilter *string `locationName:"inputFilter" type:"string" enum:"InputFilter"` + + // Input settings. + NetworkInputSettings *NetworkInputSettings `locationName:"networkInputSettings" type:"structure"` + + // Loop input if it is a file. This allows a file input to be streamed indefinitely. + SourceEndBehavior *string `locationName:"sourceEndBehavior" type:"string" enum:"InputSourceEndBehavior"` + + // Informs which video elementary stream to decode for input types that have + // multiple available. + VideoSelector *VideoSelector `locationName:"videoSelector" type:"structure"` +} + +// String returns the string representation +func (s InputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputSettings"} + if s.FilterStrength != nil && *s.FilterStrength < 1 { + invalidParams.Add(request.NewErrParamMinValue("FilterStrength", 1)) + } + if s.AudioSelectors != nil { + for i, v := range s.AudioSelectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AudioSelectors", i), err.(request.ErrInvalidParams)) + } + } + } + if s.CaptionSelectors != nil { + for i, v := range s.CaptionSelectors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CaptionSelectors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioSelectors sets the AudioSelectors field's value. +func (s *InputSettings) SetAudioSelectors(v []*AudioSelector) *InputSettings { + s.AudioSelectors = v + return s +} + +// SetCaptionSelectors sets the CaptionSelectors field's value. +func (s *InputSettings) SetCaptionSelectors(v []*CaptionSelector) *InputSettings { + s.CaptionSelectors = v + return s +} + +// SetDeblockFilter sets the DeblockFilter field's value. +func (s *InputSettings) SetDeblockFilter(v string) *InputSettings { + s.DeblockFilter = &v + return s +} + +// SetDenoiseFilter sets the DenoiseFilter field's value. +func (s *InputSettings) SetDenoiseFilter(v string) *InputSettings { + s.DenoiseFilter = &v + return s +} + +// SetFilterStrength sets the FilterStrength field's value. +func (s *InputSettings) SetFilterStrength(v int64) *InputSettings { + s.FilterStrength = &v + return s +} + +// SetInputFilter sets the InputFilter field's value. +func (s *InputSettings) SetInputFilter(v string) *InputSettings { + s.InputFilter = &v + return s +} + +// SetNetworkInputSettings sets the NetworkInputSettings field's value. +func (s *InputSettings) SetNetworkInputSettings(v *NetworkInputSettings) *InputSettings { + s.NetworkInputSettings = v + return s +} + +// SetSourceEndBehavior sets the SourceEndBehavior field's value. +func (s *InputSettings) SetSourceEndBehavior(v string) *InputSettings { + s.SourceEndBehavior = &v + return s +} + +// SetVideoSelector sets the VideoSelector field's value. +func (s *InputSettings) SetVideoSelector(v *VideoSelector) *InputSettings { + s.VideoSelector = v + return s +} + +// The settings for a PULL type input. +type InputSource struct { + _ struct{} `type:"structure"` + + // The key used to extract the password from EC2 Parameter store. + PasswordParam *string `locationName:"passwordParam" type:"string"` + + // This represents the customer's source URL where stream ispulled from. + Url *string `locationName:"url" type:"string"` + + // The username for the input source. + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s InputSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSource) GoString() string { + return s.String() +} + +// SetPasswordParam sets the PasswordParam field's value. +func (s *InputSource) SetPasswordParam(v string) *InputSource { + s.PasswordParam = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *InputSource) SetUrl(v string) *InputSource { + s.Url = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *InputSource) SetUsername(v string) *InputSource { + s.Username = &v + return s +} + +// Settings for for a PULL type input. +type InputSourceRequest struct { + _ struct{} `type:"structure"` + + // The key used to extract the password from EC2 Parameter store. + PasswordParam *string `locationName:"passwordParam" type:"string"` + + // This represents the customer's source URL where stream ispulled from. + Url *string `locationName:"url" type:"string"` + + // The username for the input source. + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s InputSourceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSourceRequest) GoString() string { + return s.String() +} + +// SetPasswordParam sets the PasswordParam field's value. +func (s *InputSourceRequest) SetPasswordParam(v string) *InputSourceRequest { + s.PasswordParam = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *InputSourceRequest) SetUrl(v string) *InputSourceRequest { + s.Url = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *InputSourceRequest) SetUsername(v string) *InputSourceRequest { + s.Username = &v + return s +} + +type InputSpecification struct { + _ struct{} `type:"structure"` + + // Input codec + Codec *string `locationName:"codec" type:"string" enum:"InputCodec"` + + // Maximum input bitrate, categorized coarsely + MaximumBitrate *string `locationName:"maximumBitrate" type:"string" enum:"InputMaximumBitrate"` + + // Input resolution, categorized coarsely + Resolution *string `locationName:"resolution" type:"string" enum:"InputResolution"` +} + +// String returns the string representation +func (s InputSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSpecification) GoString() string { + return s.String() +} + +// SetCodec sets the Codec field's value. +func (s *InputSpecification) SetCodec(v string) *InputSpecification { + s.Codec = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *InputSpecification) SetMaximumBitrate(v string) *InputSpecification { + s.MaximumBitrate = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *InputSpecification) SetResolution(v string) *InputSpecification { + s.Resolution = &v + return s +} + +// Settings for the action to switch an input. +type InputSwitchScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // The name of the input attachment that should be switched to by this action. + // + // InputAttachmentNameReference is a required field + InputAttachmentNameReference *string `locationName:"inputAttachmentNameReference" type:"string" required:"true"` +} + +// String returns the string representation +func (s InputSwitchScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSwitchScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputSwitchScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputSwitchScheduleActionSettings"} + if s.InputAttachmentNameReference == nil { + invalidParams.Add(request.NewErrParamRequired("InputAttachmentNameReference")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputAttachmentNameReference sets the InputAttachmentNameReference field's value. +func (s *InputSwitchScheduleActionSettings) SetInputAttachmentNameReference(v string) *InputSwitchScheduleActionSettings { + s.InputAttachmentNameReference = &v + return s +} + +// Whitelist rule +type InputWhitelistRule struct { + _ struct{} `type:"structure"` + + // The IPv4 CIDR that's whitelisted. + Cidr *string `locationName:"cidr" type:"string"` +} + +// String returns the string representation +func (s InputWhitelistRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputWhitelistRule) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *InputWhitelistRule) SetCidr(v string) *InputWhitelistRule { + s.Cidr = &v + return s +} + +// An IPv4 CIDR to whitelist. +type InputWhitelistRuleCidr struct { + _ struct{} `type:"structure"` + + // The IPv4 CIDR to whitelist. + Cidr *string `locationName:"cidr" type:"string"` +} + +// String returns the string representation +func (s InputWhitelistRuleCidr) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputWhitelistRuleCidr) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *InputWhitelistRuleCidr) SetCidr(v string) *InputWhitelistRuleCidr { + s.Cidr = &v + return s +} + +type KeyProviderSettings struct { + _ struct{} `type:"structure"` + + StaticKeySettings *StaticKeySettings `locationName:"staticKeySettings" type:"structure"` +} + +// String returns the string representation +func (s KeyProviderSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KeyProviderSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KeyProviderSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KeyProviderSettings"} + if s.StaticKeySettings != nil { + if err := s.StaticKeySettings.Validate(); err != nil { + invalidParams.AddNested("StaticKeySettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStaticKeySettings sets the StaticKeySettings field's value. +func (s *KeyProviderSettings) SetStaticKeySettings(v *StaticKeySettings) *KeyProviderSettings { + s.StaticKeySettings = v + return s +} + +type ListChannelsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListChannelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListChannelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListChannelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { + s.NextToken = &v + return s +} + +type ListChannelsOutput struct { + _ struct{} `type:"structure"` + + Channels []*ChannelSummary `locationName:"channels" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListChannelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListChannelsOutput) GoString() string { + return s.String() +} + +// SetChannels sets the Channels field's value. +func (s *ListChannelsOutput) SetChannels(v []*ChannelSummary) *ListChannelsOutput { + s.Channels = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { + s.NextToken = &v + return s +} + +type ListInputSecurityGroupsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListInputSecurityGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInputSecurityGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInputSecurityGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInputSecurityGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListInputSecurityGroupsInput) SetMaxResults(v int64) *ListInputSecurityGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInputSecurityGroupsInput) SetNextToken(v string) *ListInputSecurityGroupsInput { + s.NextToken = &v + return s +} + +type ListInputSecurityGroupsOutput struct { + _ struct{} `type:"structure"` + + InputSecurityGroups []*InputSecurityGroup `locationName:"inputSecurityGroups" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListInputSecurityGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInputSecurityGroupsOutput) GoString() string { + return s.String() +} + +// SetInputSecurityGroups sets the InputSecurityGroups field's value. +func (s *ListInputSecurityGroupsOutput) SetInputSecurityGroups(v []*InputSecurityGroup) *ListInputSecurityGroupsOutput { + s.InputSecurityGroups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInputSecurityGroupsOutput) SetNextToken(v string) *ListInputSecurityGroupsOutput { + s.NextToken = &v + return s +} + +type ListInputsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListInputsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInputsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListInputsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListInputsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListInputsInput) SetMaxResults(v int64) *ListInputsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInputsInput) SetNextToken(v string) *ListInputsInput { + s.NextToken = &v + return s +} + +type ListInputsOutput struct { + _ struct{} `type:"structure"` + + Inputs []*Input `locationName:"inputs" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListInputsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListInputsOutput) GoString() string { + return s.String() +} + +// SetInputs sets the Inputs field's value. +func (s *ListInputsOutput) SetInputs(v []*Input) *ListInputsOutput { + s.Inputs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInputsOutput) SetNextToken(v string) *ListInputsOutput { + s.NextToken = &v + return s +} + +type ListOfferingsInput struct { + _ struct{} `type:"structure"` + + ChannelConfiguration *string `location:"querystring" locationName:"channelConfiguration" type:"string"` + + Codec *string `location:"querystring" locationName:"codec" type:"string"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + MaximumBitrate *string `location:"querystring" locationName:"maximumBitrate" type:"string"` + + MaximumFramerate *string `location:"querystring" locationName:"maximumFramerate" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + Resolution *string `location:"querystring" locationName:"resolution" type:"string"` + + ResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` + + SpecialFeature *string `location:"querystring" locationName:"specialFeature" type:"string"` + + VideoQuality *string `location:"querystring" locationName:"videoQuality" type:"string"` +} + +// String returns the string representation +func (s ListOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOfferingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListOfferingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOfferingsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelConfiguration sets the ChannelConfiguration field's value. +func (s *ListOfferingsInput) SetChannelConfiguration(v string) *ListOfferingsInput { + s.ChannelConfiguration = &v + return s +} + +// SetCodec sets the Codec field's value. +func (s *ListOfferingsInput) SetCodec(v string) *ListOfferingsInput { + s.Codec = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListOfferingsInput) SetMaxResults(v int64) *ListOfferingsInput { + s.MaxResults = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *ListOfferingsInput) SetMaximumBitrate(v string) *ListOfferingsInput { + s.MaximumBitrate = &v + return s +} + +// SetMaximumFramerate sets the MaximumFramerate field's value. +func (s *ListOfferingsInput) SetMaximumFramerate(v string) *ListOfferingsInput { + s.MaximumFramerate = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingsInput) SetNextToken(v string) *ListOfferingsInput { + s.NextToken = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *ListOfferingsInput) SetResolution(v string) *ListOfferingsInput { + s.Resolution = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListOfferingsInput) SetResourceType(v string) *ListOfferingsInput { + s.ResourceType = &v + return s +} + +// SetSpecialFeature sets the SpecialFeature field's value. +func (s *ListOfferingsInput) SetSpecialFeature(v string) *ListOfferingsInput { + s.SpecialFeature = &v + return s +} + +// SetVideoQuality sets the VideoQuality field's value. +func (s *ListOfferingsInput) SetVideoQuality(v string) *ListOfferingsInput { + s.VideoQuality = &v + return s +} + +type ListOfferingsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + Offerings []*Offering `locationName:"offerings" type:"list"` +} + +// String returns the string representation +func (s ListOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOfferingsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOfferingsOutput) SetNextToken(v string) *ListOfferingsOutput { + s.NextToken = &v + return s +} + +// SetOfferings sets the Offerings field's value. +func (s *ListOfferingsOutput) SetOfferings(v []*Offering) *ListOfferingsOutput { + s.Offerings = v + return s +} + +type ListReservationsInput struct { + _ struct{} `type:"structure"` + + Codec *string `location:"querystring" locationName:"codec" type:"string"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + MaximumBitrate *string `location:"querystring" locationName:"maximumBitrate" type:"string"` + + MaximumFramerate *string `location:"querystring" locationName:"maximumFramerate" type:"string"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + Resolution *string `location:"querystring" locationName:"resolution" type:"string"` + + ResourceType *string `location:"querystring" locationName:"resourceType" type:"string"` + + SpecialFeature *string `location:"querystring" locationName:"specialFeature" type:"string"` + + VideoQuality *string `location:"querystring" locationName:"videoQuality" type:"string"` +} + +// String returns the string representation +func (s ListReservationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListReservationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListReservationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListReservationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodec sets the Codec field's value. +func (s *ListReservationsInput) SetCodec(v string) *ListReservationsInput { + s.Codec = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListReservationsInput) SetMaxResults(v int64) *ListReservationsInput { + s.MaxResults = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *ListReservationsInput) SetMaximumBitrate(v string) *ListReservationsInput { + s.MaximumBitrate = &v + return s +} + +// SetMaximumFramerate sets the MaximumFramerate field's value. +func (s *ListReservationsInput) SetMaximumFramerate(v string) *ListReservationsInput { + s.MaximumFramerate = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListReservationsInput) SetNextToken(v string) *ListReservationsInput { + s.NextToken = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *ListReservationsInput) SetResolution(v string) *ListReservationsInput { + s.Resolution = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListReservationsInput) SetResourceType(v string) *ListReservationsInput { + s.ResourceType = &v + return s +} + +// SetSpecialFeature sets the SpecialFeature field's value. +func (s *ListReservationsInput) SetSpecialFeature(v string) *ListReservationsInput { + s.SpecialFeature = &v + return s +} + +// SetVideoQuality sets the VideoQuality field's value. +func (s *ListReservationsInput) SetVideoQuality(v string) *ListReservationsInput { + s.VideoQuality = &v + return s +} + +type ListReservationsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + Reservations []*Reservation `locationName:"reservations" type:"list"` +} + +// String returns the string representation +func (s ListReservationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListReservationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListReservationsOutput) SetNextToken(v string) *ListReservationsOutput { + s.NextToken = &v + return s +} + +// SetReservations sets the Reservations field's value. +func (s *ListReservationsOutput) SetReservations(v []*Reservation) *ListReservationsOutput { + s.Reservations = v + return s +} + +type M2tsSettings struct { + _ struct{} `type:"structure"` + + // When set to drop, output audio streams will be removed from the program if + // the selected input audio stream is removed from the input. This allows the + // output audio configuration to dynamically change based on input configuration. + // If this is set to encodeSilence, all output audio streams will output encoded + // silence when not connected to an active input stream. + AbsentInputAudioBehavior *string `locationName:"absentInputAudioBehavior" type:"string" enum:"M2tsAbsentInputAudioBehavior"` + + // When set to enabled, uses ARIB-compliant field muxing and removes video descriptor. + Arib *string `locationName:"arib" type:"string" enum:"M2tsArib"` + + // Packet Identifier (PID) for ARIB Captions in the transport stream. Can be + // entered as a decimal or hexadecimal value. Valid values are 32 (or 0x20)..8182 + // (or 0x1ff6). + AribCaptionsPid *string `locationName:"aribCaptionsPid" type:"string"` + + // If set to auto, pid number used for ARIB Captions will be auto-selected from + // unused pids. If set to useConfigured, ARIB Captions will be on the configured + // pid number. + AribCaptionsPidControl *string `locationName:"aribCaptionsPidControl" type:"string" enum:"M2tsAribCaptionsPidControl"` + + // When set to dvb, uses DVB buffer model for Dolby Digital audio. When set + // to atsc, the ATSC model is used. + AudioBufferModel *string `locationName:"audioBufferModel" type:"string" enum:"M2tsAudioBufferModel"` + + // The number of audio frames to insert for each PES packet. + AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` + + // Packet Identifier (PID) of the elementary audio stream(s) in the transport + // stream. Multiple values are accepted, and can be entered in ranges and/or + // by comma separation. Can be entered as decimal or hexadecimal values. Each + // PID specified must be in the range of 32 (or 0x20)..8182 (or 0x1ff6). + AudioPids *string `locationName:"audioPids" type:"string"` + + // When set to atsc, uses stream type = 0x81 for AC3 and stream type = 0x87 + // for EAC3. When set to dvb, uses stream type = 0x06. + AudioStreamType *string `locationName:"audioStreamType" type:"string" enum:"M2tsAudioStreamType"` + + // The output bitrate of the transport stream in bits per second. Setting to + // 0 lets the muxer automatically determine the appropriate bitrate. + Bitrate *int64 `locationName:"bitrate" type:"integer"` + + // If set to multiplex, use multiplex buffer model for accurate interleaving. + // Setting to bufferModel to none can lead to lower latency, but low-memory + // devices may not be able to play back the stream without interruptions. + BufferModel *string `locationName:"bufferModel" type:"string" enum:"M2tsBufferModel"` + + // When set to enabled, generates captionServiceDescriptor in PMT. + CcDescriptor *string `locationName:"ccDescriptor" type:"string" enum:"M2tsCcDescriptor"` + + // Inserts DVB Network Information Table (NIT) at the specified table repetition + // interval. + DvbNitSettings *DvbNitSettings `locationName:"dvbNitSettings" type:"structure"` + + // Inserts DVB Service Description Table (SDT) at the specified table repetition + // interval. + DvbSdtSettings *DvbSdtSettings `locationName:"dvbSdtSettings" type:"structure"` + + // Packet Identifier (PID) for input source DVB Subtitle data to this output. + // Multiple values are accepted, and can be entered in ranges and/or by comma + // separation. Can be entered as decimal or hexadecimal values. Each PID specified + // must be in the range of 32 (or 0x20)..8182 (or 0x1ff6). + DvbSubPids *string `locationName:"dvbSubPids" type:"string"` + + // Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. + DvbTdtSettings *DvbTdtSettings `locationName:"dvbTdtSettings" type:"structure"` + + // Packet Identifier (PID) for input source DVB Teletext data to this output. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + DvbTeletextPid *string `locationName:"dvbTeletextPid" type:"string"` + + // If set to passthrough, passes any EBIF data from the input source to this + // output. + Ebif *string `locationName:"ebif" type:"string" enum:"M2tsEbifControl"` + + // When videoAndFixedIntervals is selected, audio EBP markers will be added + // to partitions 3 and 4. The interval between these additional markers will + // be fixed, and will be slightly shorter than the video EBP marker interval. + // Only available when EBP Cablelabs segmentation markers are selected. Partitions + // 1 and 2 will always follow the video interval. + EbpAudioInterval *string `locationName:"ebpAudioInterval" type:"string" enum:"M2tsAudioInterval"` + + // When set, enforces that Encoder Boundary Points do not come within the specified + // time interval of each other by looking ahead at input video. If another EBP + // is going to come in within the specified time interval, the current EBP is + // not emitted, and the segment is "stretched" to the next marker. The lookahead + // value does not add latency to the system. The Live Event must be configured + // elsewhere to create sufficient latency to make the lookahead accurate. + EbpLookaheadMs *int64 `locationName:"ebpLookaheadMs" type:"integer"` + + // Controls placement of EBP on Audio PIDs. If set to videoAndAudioPids, EBP + // markers will be placed on the video PID and all audio PIDs. If set to videoPid, + // EBP markers will be placed on only the video PID. + EbpPlacement *string `locationName:"ebpPlacement" type:"string" enum:"M2tsEbpPlacement"` + + // This field is unused and deprecated. + EcmPid *string `locationName:"ecmPid" type:"string"` + + // Include or exclude the ES Rate field in the PES header. + EsRateInPes *string `locationName:"esRateInPes" type:"string" enum:"M2tsEsRateInPes"` + + // Packet Identifier (PID) for input source ETV Platform data to this output. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + EtvPlatformPid *string `locationName:"etvPlatformPid" type:"string"` + + // Packet Identifier (PID) for input source ETV Signal data to this output. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + EtvSignalPid *string `locationName:"etvSignalPid" type:"string"` + + // The length in seconds of each fragment. Only used with EBP markers. + FragmentTime *float64 `locationName:"fragmentTime" type:"double"` + + // If set to passthrough, passes any KLV data from the input source to this + // output. + Klv *string `locationName:"klv" type:"string" enum:"M2tsKlv"` + + // Packet Identifier (PID) for input source KLV data to this output. Multiple + // values are accepted, and can be entered in ranges and/or by comma separation. + // Can be entered as decimal or hexadecimal values. Each PID specified must + // be in the range of 32 (or 0x20)..8182 (or 0x1ff6). + KlvDataPids *string `locationName:"klvDataPids" type:"string"` + + // Value in bits per second of extra null packets to insert into the transport + // stream. This can be used if a downstream encryption system requires periodic + // null packets. + NullPacketBitrate *float64 `locationName:"nullPacketBitrate" type:"double"` + + // The number of milliseconds between instances of this table in the output + // transport stream. Valid values are 0, 10..1000. + PatInterval *int64 `locationName:"patInterval" type:"integer"` + + // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted + // for every Packetized Elementary Stream (PES) header. This parameter is effective + // only when the PCR PID is the same as the video or audio elementary stream. + PcrControl *string `locationName:"pcrControl" type:"string" enum:"M2tsPcrControl"` + + // Maximum time in milliseconds between Program Clock Reference (PCRs) inserted + // into the transport stream. + PcrPeriod *int64 `locationName:"pcrPeriod" type:"integer"` + + // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport + // stream. When no value is given, the encoder will assign the same value as + // the Video PID. Can be entered as a decimal or hexadecimal value. Valid values + // are 32 (or 0x20)..8182 (or 0x1ff6). + PcrPid *string `locationName:"pcrPid" type:"string"` + + // The number of milliseconds between instances of this table in the output + // transport stream. Valid values are 0, 10..1000. + PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` + + // Packet Identifier (PID) for the Program Map Table (PMT) in the transport + // stream. Can be entered as a decimal or hexadecimal value. Valid values are + // 32 (or 0x20)..8182 (or 0x1ff6). + PmtPid *string `locationName:"pmtPid" type:"string"` + + // The value of the program number field in the Program Map Table. + ProgramNum *int64 `locationName:"programNum" type:"integer"` + + // When vbr, does not insert null packets into transport stream to fill specified + // bitrate. The bitrate setting acts as the maximum bitrate when vbr is set. + RateMode *string `locationName:"rateMode" type:"string" enum:"M2tsRateMode"` + + // Packet Identifier (PID) for input source SCTE-27 data to this output. Multiple + // values are accepted, and can be entered in ranges and/or by comma separation. + // Can be entered as decimal or hexadecimal values. Each PID specified must + // be in the range of 32 (or 0x20)..8182 (or 0x1ff6). + Scte27Pids *string `locationName:"scte27Pids" type:"string"` + + // Optionally pass SCTE-35 signals from the input source to this output. + Scte35Control *string `locationName:"scte35Control" type:"string" enum:"M2tsScte35Control"` + + // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. Can + // be entered as a decimal or hexadecimal value. Valid values are 32 (or 0x20)..8182 + // (or 0x1ff6). + Scte35Pid *string `locationName:"scte35Pid" type:"string"` + + // Inserts segmentation markers at each segmentationTime period. raiSegstart + // sets the Random Access Indicator bit in the adaptation field. raiAdapt sets + // the RAI bit and adds the current timecode in the private data bytes. psiSegstart + // inserts PAT and PMT tables at the start of segments. ebp adds Encoder Boundary + // Point information to the adaptation field as per OpenCable specification + // OC-SP-EBP-I01-130118. ebpLegacy adds Encoder Boundary Point information to + // the adaptation field using a legacy proprietary format. + SegmentationMarkers *string `locationName:"segmentationMarkers" type:"string" enum:"M2tsSegmentationMarkers"` + + // The segmentation style parameter controls how segmentation markers are inserted + // into the transport stream. With avails, it is possible that segments may + // be truncated, which can influence where future segmentation markers are inserted.When + // a segmentation style of "resetCadence" is selected and a segment is truncated + // due to an avail, we will reset the segmentation cadence. This means the subsequent + // segment will have a duration of $segmentationTime seconds.When a segmentation + // style of "maintainCadence" is selected and a segment is truncated due to + // an avail, we will not reset the segmentation cadence. This means the subsequent + // segment will likely be truncated as well. However, all segments after that + // will have a duration of $segmentationTime seconds. Note that EBP lookahead + // is a slight exception to this rule. + SegmentationStyle *string `locationName:"segmentationStyle" type:"string" enum:"M2tsSegmentationStyle"` + + // The length in seconds of each segment. Required unless markers is set to + // None_. + SegmentationTime *float64 `locationName:"segmentationTime" type:"double"` + + // When set to passthrough, timed metadata will be passed through from input + // to output. + TimedMetadataBehavior *string `locationName:"timedMetadataBehavior" type:"string" enum:"M2tsTimedMetadataBehavior"` + + // Packet Identifier (PID) of the timed metadata stream in the transport stream. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + TimedMetadataPid *string `locationName:"timedMetadataPid" type:"string"` + + // The value of the transport stream ID field in the Program Map Table. + TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` + + // Packet Identifier (PID) of the elementary video stream in the transport stream. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + VideoPid *string `locationName:"videoPid" type:"string"` +} + +// String returns the string representation +func (s M2tsSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s M2tsSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *M2tsSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "M2tsSettings"} + if s.DvbNitSettings != nil { + if err := s.DvbNitSettings.Validate(); err != nil { + invalidParams.AddNested("DvbNitSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbSdtSettings != nil { + if err := s.DvbSdtSettings.Validate(); err != nil { + invalidParams.AddNested("DvbSdtSettings", err.(request.ErrInvalidParams)) + } + } + if s.DvbTdtSettings != nil { + if err := s.DvbTdtSettings.Validate(); err != nil { + invalidParams.AddNested("DvbTdtSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAbsentInputAudioBehavior sets the AbsentInputAudioBehavior field's value. +func (s *M2tsSettings) SetAbsentInputAudioBehavior(v string) *M2tsSettings { + s.AbsentInputAudioBehavior = &v + return s +} + +// SetArib sets the Arib field's value. +func (s *M2tsSettings) SetArib(v string) *M2tsSettings { + s.Arib = &v + return s +} + +// SetAribCaptionsPid sets the AribCaptionsPid field's value. +func (s *M2tsSettings) SetAribCaptionsPid(v string) *M2tsSettings { + s.AribCaptionsPid = &v + return s +} + +// SetAribCaptionsPidControl sets the AribCaptionsPidControl field's value. +func (s *M2tsSettings) SetAribCaptionsPidControl(v string) *M2tsSettings { + s.AribCaptionsPidControl = &v + return s +} + +// SetAudioBufferModel sets the AudioBufferModel field's value. +func (s *M2tsSettings) SetAudioBufferModel(v string) *M2tsSettings { + s.AudioBufferModel = &v + return s +} + +// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. +func (s *M2tsSettings) SetAudioFramesPerPes(v int64) *M2tsSettings { + s.AudioFramesPerPes = &v + return s +} + +// SetAudioPids sets the AudioPids field's value. +func (s *M2tsSettings) SetAudioPids(v string) *M2tsSettings { + s.AudioPids = &v + return s +} + +// SetAudioStreamType sets the AudioStreamType field's value. +func (s *M2tsSettings) SetAudioStreamType(v string) *M2tsSettings { + s.AudioStreamType = &v + return s +} + +// SetBitrate sets the Bitrate field's value. +func (s *M2tsSettings) SetBitrate(v int64) *M2tsSettings { + s.Bitrate = &v + return s +} + +// SetBufferModel sets the BufferModel field's value. +func (s *M2tsSettings) SetBufferModel(v string) *M2tsSettings { + s.BufferModel = &v + return s +} + +// SetCcDescriptor sets the CcDescriptor field's value. +func (s *M2tsSettings) SetCcDescriptor(v string) *M2tsSettings { + s.CcDescriptor = &v + return s +} + +// SetDvbNitSettings sets the DvbNitSettings field's value. +func (s *M2tsSettings) SetDvbNitSettings(v *DvbNitSettings) *M2tsSettings { + s.DvbNitSettings = v + return s +} + +// SetDvbSdtSettings sets the DvbSdtSettings field's value. +func (s *M2tsSettings) SetDvbSdtSettings(v *DvbSdtSettings) *M2tsSettings { + s.DvbSdtSettings = v + return s +} + +// SetDvbSubPids sets the DvbSubPids field's value. +func (s *M2tsSettings) SetDvbSubPids(v string) *M2tsSettings { + s.DvbSubPids = &v + return s +} + +// SetDvbTdtSettings sets the DvbTdtSettings field's value. +func (s *M2tsSettings) SetDvbTdtSettings(v *DvbTdtSettings) *M2tsSettings { + s.DvbTdtSettings = v + return s +} + +// SetDvbTeletextPid sets the DvbTeletextPid field's value. +func (s *M2tsSettings) SetDvbTeletextPid(v string) *M2tsSettings { + s.DvbTeletextPid = &v + return s +} + +// SetEbif sets the Ebif field's value. +func (s *M2tsSettings) SetEbif(v string) *M2tsSettings { + s.Ebif = &v + return s +} + +// SetEbpAudioInterval sets the EbpAudioInterval field's value. +func (s *M2tsSettings) SetEbpAudioInterval(v string) *M2tsSettings { + s.EbpAudioInterval = &v + return s +} + +// SetEbpLookaheadMs sets the EbpLookaheadMs field's value. +func (s *M2tsSettings) SetEbpLookaheadMs(v int64) *M2tsSettings { + s.EbpLookaheadMs = &v + return s +} + +// SetEbpPlacement sets the EbpPlacement field's value. +func (s *M2tsSettings) SetEbpPlacement(v string) *M2tsSettings { + s.EbpPlacement = &v + return s +} + +// SetEcmPid sets the EcmPid field's value. +func (s *M2tsSettings) SetEcmPid(v string) *M2tsSettings { + s.EcmPid = &v + return s +} + +// SetEsRateInPes sets the EsRateInPes field's value. +func (s *M2tsSettings) SetEsRateInPes(v string) *M2tsSettings { + s.EsRateInPes = &v + return s +} + +// SetEtvPlatformPid sets the EtvPlatformPid field's value. +func (s *M2tsSettings) SetEtvPlatformPid(v string) *M2tsSettings { + s.EtvPlatformPid = &v + return s +} + +// SetEtvSignalPid sets the EtvSignalPid field's value. +func (s *M2tsSettings) SetEtvSignalPid(v string) *M2tsSettings { + s.EtvSignalPid = &v + return s +} + +// SetFragmentTime sets the FragmentTime field's value. +func (s *M2tsSettings) SetFragmentTime(v float64) *M2tsSettings { + s.FragmentTime = &v + return s +} + +// SetKlv sets the Klv field's value. +func (s *M2tsSettings) SetKlv(v string) *M2tsSettings { + s.Klv = &v + return s +} + +// SetKlvDataPids sets the KlvDataPids field's value. +func (s *M2tsSettings) SetKlvDataPids(v string) *M2tsSettings { + s.KlvDataPids = &v + return s +} + +// SetNullPacketBitrate sets the NullPacketBitrate field's value. +func (s *M2tsSettings) SetNullPacketBitrate(v float64) *M2tsSettings { + s.NullPacketBitrate = &v + return s +} + +// SetPatInterval sets the PatInterval field's value. +func (s *M2tsSettings) SetPatInterval(v int64) *M2tsSettings { + s.PatInterval = &v + return s +} + +// SetPcrControl sets the PcrControl field's value. +func (s *M2tsSettings) SetPcrControl(v string) *M2tsSettings { + s.PcrControl = &v + return s +} + +// SetPcrPeriod sets the PcrPeriod field's value. +func (s *M2tsSettings) SetPcrPeriod(v int64) *M2tsSettings { + s.PcrPeriod = &v + return s +} + +// SetPcrPid sets the PcrPid field's value. +func (s *M2tsSettings) SetPcrPid(v string) *M2tsSettings { + s.PcrPid = &v + return s +} + +// SetPmtInterval sets the PmtInterval field's value. +func (s *M2tsSettings) SetPmtInterval(v int64) *M2tsSettings { + s.PmtInterval = &v + return s +} + +// SetPmtPid sets the PmtPid field's value. +func (s *M2tsSettings) SetPmtPid(v string) *M2tsSettings { + s.PmtPid = &v + return s +} + +// SetProgramNum sets the ProgramNum field's value. +func (s *M2tsSettings) SetProgramNum(v int64) *M2tsSettings { + s.ProgramNum = &v + return s +} + +// SetRateMode sets the RateMode field's value. +func (s *M2tsSettings) SetRateMode(v string) *M2tsSettings { + s.RateMode = &v + return s +} + +// SetScte27Pids sets the Scte27Pids field's value. +func (s *M2tsSettings) SetScte27Pids(v string) *M2tsSettings { + s.Scte27Pids = &v + return s +} + +// SetScte35Control sets the Scte35Control field's value. +func (s *M2tsSettings) SetScte35Control(v string) *M2tsSettings { + s.Scte35Control = &v + return s +} + +// SetScte35Pid sets the Scte35Pid field's value. +func (s *M2tsSettings) SetScte35Pid(v string) *M2tsSettings { + s.Scte35Pid = &v + return s +} + +// SetSegmentationMarkers sets the SegmentationMarkers field's value. +func (s *M2tsSettings) SetSegmentationMarkers(v string) *M2tsSettings { + s.SegmentationMarkers = &v + return s +} + +// SetSegmentationStyle sets the SegmentationStyle field's value. +func (s *M2tsSettings) SetSegmentationStyle(v string) *M2tsSettings { + s.SegmentationStyle = &v + return s +} + +// SetSegmentationTime sets the SegmentationTime field's value. +func (s *M2tsSettings) SetSegmentationTime(v float64) *M2tsSettings { + s.SegmentationTime = &v + return s +} + +// SetTimedMetadataBehavior sets the TimedMetadataBehavior field's value. +func (s *M2tsSettings) SetTimedMetadataBehavior(v string) *M2tsSettings { + s.TimedMetadataBehavior = &v + return s +} + +// SetTimedMetadataPid sets the TimedMetadataPid field's value. +func (s *M2tsSettings) SetTimedMetadataPid(v string) *M2tsSettings { + s.TimedMetadataPid = &v + return s +} + +// SetTransportStreamId sets the TransportStreamId field's value. +func (s *M2tsSettings) SetTransportStreamId(v int64) *M2tsSettings { + s.TransportStreamId = &v + return s +} + +// SetVideoPid sets the VideoPid field's value. +func (s *M2tsSettings) SetVideoPid(v string) *M2tsSettings { + s.VideoPid = &v + return s +} + +// Settings information for the .m3u8 container +type M3u8Settings struct { + _ struct{} `type:"structure"` + + // The number of audio frames to insert for each PES packet. + AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` + + // Packet Identifier (PID) of the elementary audio stream(s) in the transport + // stream. Multiple values are accepted, and can be entered in ranges and/or + // by comma separation. Can be entered as decimal or hexadecimal values. + AudioPids *string `locationName:"audioPids" type:"string"` + + // This parameter is unused and deprecated. + EcmPid *string `locationName:"ecmPid" type:"string"` + + // The number of milliseconds between instances of this table in the output + // transport stream. A value of \"0\" writes out the PMT once per segment file. + PatInterval *int64 `locationName:"patInterval" type:"integer"` + + // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted + // for every Packetized Elementary Stream (PES) header. This parameter is effective + // only when the PCR PID is the same as the video or audio elementary stream. + PcrControl *string `locationName:"pcrControl" type:"string" enum:"M3u8PcrControl"` + + // Maximum time in milliseconds between Program Clock References (PCRs) inserted + // into the transport stream. + PcrPeriod *int64 `locationName:"pcrPeriod" type:"integer"` + + // Packet Identifier (PID) of the Program Clock Reference (PCR) in the transport + // stream. When no value is given, the encoder will assign the same value as + // the Video PID. Can be entered as a decimal or hexadecimal value. + PcrPid *string `locationName:"pcrPid" type:"string"` + + // The number of milliseconds between instances of this table in the output + // transport stream. A value of \"0\" writes out the PMT once per segment file. + PmtInterval *int64 `locationName:"pmtInterval" type:"integer"` + + // Packet Identifier (PID) for the Program Map Table (PMT) in the transport + // stream. Can be entered as a decimal or hexadecimal value. + PmtPid *string `locationName:"pmtPid" type:"string"` + + // The value of the program number field in the Program Map Table. + ProgramNum *int64 `locationName:"programNum" type:"integer"` + + // If set to passthrough, passes any SCTE-35 signals from the input source to + // this output. + Scte35Behavior *string `locationName:"scte35Behavior" type:"string" enum:"M3u8Scte35Behavior"` + + // Packet Identifier (PID) of the SCTE-35 stream in the transport stream. Can + // be entered as a decimal or hexadecimal value. + Scte35Pid *string `locationName:"scte35Pid" type:"string"` + + // When set to passthrough, timed metadata is passed through from input to output. + TimedMetadataBehavior *string `locationName:"timedMetadataBehavior" type:"string" enum:"M3u8TimedMetadataBehavior"` + + // Packet Identifier (PID) of the timed metadata stream in the transport stream. + // Can be entered as a decimal or hexadecimal value. Valid values are 32 (or + // 0x20)..8182 (or 0x1ff6). + TimedMetadataPid *string `locationName:"timedMetadataPid" type:"string"` + + // The value of the transport stream ID field in the Program Map Table. + TransportStreamId *int64 `locationName:"transportStreamId" type:"integer"` + + // Packet Identifier (PID) of the elementary video stream in the transport stream. + // Can be entered as a decimal or hexadecimal value. + VideoPid *string `locationName:"videoPid" type:"string"` +} + +// String returns the string representation +func (s M3u8Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s M3u8Settings) GoString() string { + return s.String() +} + +// SetAudioFramesPerPes sets the AudioFramesPerPes field's value. +func (s *M3u8Settings) SetAudioFramesPerPes(v int64) *M3u8Settings { + s.AudioFramesPerPes = &v + return s +} + +// SetAudioPids sets the AudioPids field's value. +func (s *M3u8Settings) SetAudioPids(v string) *M3u8Settings { + s.AudioPids = &v + return s +} + +// SetEcmPid sets the EcmPid field's value. +func (s *M3u8Settings) SetEcmPid(v string) *M3u8Settings { + s.EcmPid = &v + return s +} + +// SetPatInterval sets the PatInterval field's value. +func (s *M3u8Settings) SetPatInterval(v int64) *M3u8Settings { + s.PatInterval = &v + return s +} + +// SetPcrControl sets the PcrControl field's value. +func (s *M3u8Settings) SetPcrControl(v string) *M3u8Settings { + s.PcrControl = &v + return s +} + +// SetPcrPeriod sets the PcrPeriod field's value. +func (s *M3u8Settings) SetPcrPeriod(v int64) *M3u8Settings { + s.PcrPeriod = &v + return s +} + +// SetPcrPid sets the PcrPid field's value. +func (s *M3u8Settings) SetPcrPid(v string) *M3u8Settings { + s.PcrPid = &v + return s +} + +// SetPmtInterval sets the PmtInterval field's value. +func (s *M3u8Settings) SetPmtInterval(v int64) *M3u8Settings { + s.PmtInterval = &v + return s +} + +// SetPmtPid sets the PmtPid field's value. +func (s *M3u8Settings) SetPmtPid(v string) *M3u8Settings { + s.PmtPid = &v + return s +} + +// SetProgramNum sets the ProgramNum field's value. +func (s *M3u8Settings) SetProgramNum(v int64) *M3u8Settings { + s.ProgramNum = &v + return s +} + +// SetScte35Behavior sets the Scte35Behavior field's value. +func (s *M3u8Settings) SetScte35Behavior(v string) *M3u8Settings { + s.Scte35Behavior = &v + return s +} + +// SetScte35Pid sets the Scte35Pid field's value. +func (s *M3u8Settings) SetScte35Pid(v string) *M3u8Settings { + s.Scte35Pid = &v + return s +} + +// SetTimedMetadataBehavior sets the TimedMetadataBehavior field's value. +func (s *M3u8Settings) SetTimedMetadataBehavior(v string) *M3u8Settings { + s.TimedMetadataBehavior = &v + return s +} + +// SetTimedMetadataPid sets the TimedMetadataPid field's value. +func (s *M3u8Settings) SetTimedMetadataPid(v string) *M3u8Settings { + s.TimedMetadataPid = &v + return s +} + +// SetTransportStreamId sets the TransportStreamId field's value. +func (s *M3u8Settings) SetTransportStreamId(v int64) *M3u8Settings { + s.TransportStreamId = &v + return s +} + +// SetVideoPid sets the VideoPid field's value. +func (s *M3u8Settings) SetVideoPid(v string) *M3u8Settings { + s.VideoPid = &v + return s +} + +// The settings for a MediaConnect Flow. +type MediaConnectFlow struct { + _ struct{} `type:"structure"` + + // The unique ARN of the MediaConnect Flow being used as a source. + FlowArn *string `locationName:"flowArn" type:"string"` +} + +// String returns the string representation +func (s MediaConnectFlow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MediaConnectFlow) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *MediaConnectFlow) SetFlowArn(v string) *MediaConnectFlow { + s.FlowArn = &v + return s +} + +// The settings for a MediaConnect Flow. +type MediaConnectFlowRequest struct { + _ struct{} `type:"structure"` + + // The ARN of the MediaConnect Flow that you want to use as a source. + FlowArn *string `locationName:"flowArn" type:"string"` +} + +// String returns the string representation +func (s MediaConnectFlowRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MediaConnectFlowRequest) GoString() string { + return s.String() +} + +// SetFlowArn sets the FlowArn field's value. +func (s *MediaConnectFlowRequest) SetFlowArn(v string) *MediaConnectFlowRequest { + s.FlowArn = &v + return s +} + +type Mp2Settings struct { + _ struct{} `type:"structure"` + + // Average bitrate in bits/second. + Bitrate *float64 `locationName:"bitrate" type:"double"` + + // The MPEG2 Audio coding mode. Valid values are codingMode10 (for mono) or + // codingMode20 (for stereo). + CodingMode *string `locationName:"codingMode" type:"string" enum:"Mp2CodingMode"` + + // Sample rate in Hz. + SampleRate *float64 `locationName:"sampleRate" type:"double"` +} + +// String returns the string representation +func (s Mp2Settings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Mp2Settings) GoString() string { + return s.String() +} + +// SetBitrate sets the Bitrate field's value. +func (s *Mp2Settings) SetBitrate(v float64) *Mp2Settings { + s.Bitrate = &v + return s +} + +// SetCodingMode sets the CodingMode field's value. +func (s *Mp2Settings) SetCodingMode(v string) *Mp2Settings { + s.CodingMode = &v + return s +} + +// SetSampleRate sets the SampleRate field's value. +func (s *Mp2Settings) SetSampleRate(v float64) *Mp2Settings { + s.SampleRate = &v + return s +} + +type MsSmoothGroupSettings struct { + _ struct{} `type:"structure"` + + // The value of the "Acquisition Point Identity" element used in each message + // placed in the sparse track. Only enabled if sparseTrackType is not "none". + AcquisitionPointId *string `locationName:"acquisitionPointId" type:"string"` + + // If set to passthrough for an audio-only MS Smooth output, the fragment absolute + // time will be set to the current timecode. This option does not write timecodes + // to the audio elementary stream. + AudioOnlyTimecodeControl *string `locationName:"audioOnlyTimecodeControl" type:"string" enum:"SmoothGroupAudioOnlyTimecodeControl"` + + // If set to verifyAuthenticity, verify the https certificate chain to a trusted + // Certificate Authority (CA). This will cause https outputs to self-signed + // certificates to fail. + CertificateMode *string `locationName:"certificateMode" type:"string" enum:"SmoothGroupCertificateMode"` + + // Number of seconds to wait before retrying connection to the IIS server if + // the connection is lost. Content will be cached during this time and the cache + // will be be delivered to the IIS server once the connection is re-established. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" type:"integer"` + + // Smooth Streaming publish point on an IIS server. Elemental Live acts as a + // "Push" encoder to IIS. + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` + + // MS Smooth event ID to be sent to the IIS server.Should only be specified + // if eventIdMode is set to useConfigured. + EventId *string `locationName:"eventId" type:"string"` + + // Specifies whether or not to send an event ID to the IIS server. If no event + // ID is sent and the same Live Event is used without changing the publishing + // point, clients might see cached video from the previous run.Options:- "useConfigured" + // - use the value provided in eventId- "useTimestamp" - generate and send an + // event ID based on the current timestamp- "noEventId" - do not send an event + // ID to the IIS server. + EventIdMode *string `locationName:"eventIdMode" type:"string" enum:"SmoothGroupEventIdMode"` + + // When set to sendEos, send EOS signal to IIS server when stopping the event + EventStopBehavior *string `locationName:"eventStopBehavior" type:"string" enum:"SmoothGroupEventStopBehavior"` + + // Size in seconds of file cache for streaming outputs. + FilecacheDuration *int64 `locationName:"filecacheDuration" type:"integer"` + + // Length of mp4 fragments to generate (in seconds). Fragment length must be + // compatible with GOP size and framerate. + FragmentLength *int64 `locationName:"fragmentLength" min:"1" type:"integer"` + + // Parameter that control output group behavior on input loss. + InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForMsSmoothOut"` + + // Number of retry attempts. + NumRetries *int64 `locationName:"numRetries" type:"integer"` + + // Number of seconds before initiating a restart due to output failure, due + // to exhausting the numRetries on one segment, or exceeding filecacheDuration. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` + + // useInputSegmentation has been deprecated. The configured segment size is + // always used. + SegmentationMode *string `locationName:"segmentationMode" type:"string" enum:"SmoothGroupSegmentationMode"` + + // Number of milliseconds to delay the output from the second pipeline. + SendDelayMs *int64 `locationName:"sendDelayMs" type:"integer"` + + // If set to scte35, use incoming SCTE-35 messages to generate a sparse track + // in this group of MS-Smooth outputs. + SparseTrackType *string `locationName:"sparseTrackType" type:"string" enum:"SmoothGroupSparseTrackType"` + + // When set to send, send stream manifest so publishing point doesn't start + // until all streams start. + StreamManifestBehavior *string `locationName:"streamManifestBehavior" type:"string" enum:"SmoothGroupStreamManifestBehavior"` + + // Timestamp offset for the event. Only used if timestampOffsetMode is set to + // useConfiguredOffset. + TimestampOffset *string `locationName:"timestampOffset" type:"string"` + + // Type of timestamp date offset to use.- useEventStartDate: Use the date the + // event was started as the offset- useConfiguredOffset: Use an explicitly configured + // date as the offset + TimestampOffsetMode *string `locationName:"timestampOffsetMode" type:"string" enum:"SmoothGroupTimestampOffsetMode"` +} + +// String returns the string representation +func (s MsSmoothGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MsSmoothGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MsSmoothGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MsSmoothGroupSettings"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.FragmentLength != nil && *s.FragmentLength < 1 { + invalidParams.Add(request.NewErrParamMinValue("FragmentLength", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcquisitionPointId sets the AcquisitionPointId field's value. +func (s *MsSmoothGroupSettings) SetAcquisitionPointId(v string) *MsSmoothGroupSettings { + s.AcquisitionPointId = &v + return s +} + +// SetAudioOnlyTimecodeControl sets the AudioOnlyTimecodeControl field's value. +func (s *MsSmoothGroupSettings) SetAudioOnlyTimecodeControl(v string) *MsSmoothGroupSettings { + s.AudioOnlyTimecodeControl = &v + return s +} + +// SetCertificateMode sets the CertificateMode field's value. +func (s *MsSmoothGroupSettings) SetCertificateMode(v string) *MsSmoothGroupSettings { + s.CertificateMode = &v + return s +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *MsSmoothGroupSettings) SetConnectionRetryInterval(v int64) *MsSmoothGroupSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *MsSmoothGroupSettings) SetDestination(v *OutputLocationRef) *MsSmoothGroupSettings { + s.Destination = v + return s +} + +// SetEventId sets the EventId field's value. +func (s *MsSmoothGroupSettings) SetEventId(v string) *MsSmoothGroupSettings { + s.EventId = &v + return s +} + +// SetEventIdMode sets the EventIdMode field's value. +func (s *MsSmoothGroupSettings) SetEventIdMode(v string) *MsSmoothGroupSettings { + s.EventIdMode = &v + return s +} + +// SetEventStopBehavior sets the EventStopBehavior field's value. +func (s *MsSmoothGroupSettings) SetEventStopBehavior(v string) *MsSmoothGroupSettings { + s.EventStopBehavior = &v + return s +} + +// SetFilecacheDuration sets the FilecacheDuration field's value. +func (s *MsSmoothGroupSettings) SetFilecacheDuration(v int64) *MsSmoothGroupSettings { + s.FilecacheDuration = &v + return s +} + +// SetFragmentLength sets the FragmentLength field's value. +func (s *MsSmoothGroupSettings) SetFragmentLength(v int64) *MsSmoothGroupSettings { + s.FragmentLength = &v + return s +} + +// SetInputLossAction sets the InputLossAction field's value. +func (s *MsSmoothGroupSettings) SetInputLossAction(v string) *MsSmoothGroupSettings { + s.InputLossAction = &v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *MsSmoothGroupSettings) SetNumRetries(v int64) *MsSmoothGroupSettings { + s.NumRetries = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *MsSmoothGroupSettings) SetRestartDelay(v int64) *MsSmoothGroupSettings { + s.RestartDelay = &v + return s +} + +// SetSegmentationMode sets the SegmentationMode field's value. +func (s *MsSmoothGroupSettings) SetSegmentationMode(v string) *MsSmoothGroupSettings { + s.SegmentationMode = &v + return s +} + +// SetSendDelayMs sets the SendDelayMs field's value. +func (s *MsSmoothGroupSettings) SetSendDelayMs(v int64) *MsSmoothGroupSettings { + s.SendDelayMs = &v + return s +} + +// SetSparseTrackType sets the SparseTrackType field's value. +func (s *MsSmoothGroupSettings) SetSparseTrackType(v string) *MsSmoothGroupSettings { + s.SparseTrackType = &v + return s +} + +// SetStreamManifestBehavior sets the StreamManifestBehavior field's value. +func (s *MsSmoothGroupSettings) SetStreamManifestBehavior(v string) *MsSmoothGroupSettings { + s.StreamManifestBehavior = &v + return s +} + +// SetTimestampOffset sets the TimestampOffset field's value. +func (s *MsSmoothGroupSettings) SetTimestampOffset(v string) *MsSmoothGroupSettings { + s.TimestampOffset = &v + return s +} + +// SetTimestampOffsetMode sets the TimestampOffsetMode field's value. +func (s *MsSmoothGroupSettings) SetTimestampOffsetMode(v string) *MsSmoothGroupSettings { + s.TimestampOffsetMode = &v + return s +} + +type MsSmoothOutputSettings struct { + _ struct{} `type:"structure"` + + // String concatenated to the end of the destination filename. Required for + // multiple outputs of the same type. + NameModifier *string `locationName:"nameModifier" type:"string"` +} + +// String returns the string representation +func (s MsSmoothOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MsSmoothOutputSettings) GoString() string { + return s.String() +} + +// SetNameModifier sets the NameModifier field's value. +func (s *MsSmoothOutputSettings) SetNameModifier(v string) *MsSmoothOutputSettings { + s.NameModifier = &v + return s +} + +// Network source to transcode. Must be accessible to the Elemental Live node +// that is running the live event through a network connection. +type NetworkInputSettings struct { + _ struct{} `type:"structure"` + + // Specifies HLS input settings when the uri is for a HLS manifest. + HlsInputSettings *HlsInputSettings `locationName:"hlsInputSettings" type:"structure"` + + // Check HTTPS server certificates. When set to checkCryptographyOnly, cryptography + // in the certificate will be checked, but not the server's name. Certain subdomains + // (notably S3 buckets that use dots in the bucket name) do not strictly match + // the corresponding certificate's wildcard pattern and would otherwise cause + // the event to error. This setting is ignored for protocols that do not use + // https. + ServerValidation *string `locationName:"serverValidation" type:"string" enum:"NetworkInputServerValidation"` +} + +// String returns the string representation +func (s NetworkInputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInputSettings) GoString() string { + return s.String() +} + +// SetHlsInputSettings sets the HlsInputSettings field's value. +func (s *NetworkInputSettings) SetHlsInputSettings(v *HlsInputSettings) *NetworkInputSettings { + s.HlsInputSettings = v + return s +} + +// SetServerValidation sets the ServerValidation field's value. +func (s *NetworkInputSettings) SetServerValidation(v string) *NetworkInputSettings { + s.ServerValidation = &v + return s +} + +// Reserved resources available for purchase +type Offering struct { + _ struct{} `type:"structure"` + + // Unique offering ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:offering:87654321' + Arn *string `locationName:"arn" type:"string"` + + // Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + // Lease duration, e.g. '12' + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + // One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + // Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard + // VQ in US West (Oregon)' + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + // Unique offering ID, e.g. '87654321' + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + // AWS region, e.g. 'us-west-2' + Region *string `locationName:"region" type:"string"` + + // Resource configuration details + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + // Recurring usage charge for each reserved resource, e.g. '157.0' + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s Offering) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Offering) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Offering) SetArn(v string) *Offering { + s.Arn = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *Offering) SetCurrencyCode(v string) *Offering { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *Offering) SetDuration(v int64) *Offering { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *Offering) SetDurationUnits(v string) *Offering { + s.DurationUnits = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *Offering) SetFixedPrice(v float64) *Offering { + s.FixedPrice = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *Offering) SetOfferingDescription(v string) *Offering { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *Offering) SetOfferingId(v string) *Offering { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *Offering) SetOfferingType(v string) *Offering { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Offering) SetRegion(v string) *Offering { + s.Region = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *Offering) SetResourceSpecification(v *ReservationResourceSpecification) *Offering { + s.ResourceSpecification = v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *Offering) SetUsagePrice(v float64) *Offering { + s.UsagePrice = &v + return s +} + +// Output settings. There can be multiple outputs within a group. +type Output struct { + _ struct{} `type:"structure"` + + // The names of the AudioDescriptions used as audio sources for this output. + AudioDescriptionNames []*string `locationName:"audioDescriptionNames" type:"list"` + + // The names of the CaptionDescriptions used as caption sources for this output. + CaptionDescriptionNames []*string `locationName:"captionDescriptionNames" type:"list"` + + // The name used to identify an output. + OutputName *string `locationName:"outputName" min:"1" type:"string"` + + // Output type-specific settings. + // + // OutputSettings is a required field + OutputSettings *OutputSettings `locationName:"outputSettings" type:"structure" required:"true"` + + // The name of the VideoDescription used as the source for this output. + VideoDescriptionName *string `locationName:"videoDescriptionName" type:"string"` +} + +// String returns the string representation +func (s Output) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Output) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Output) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Output"} + if s.OutputName != nil && len(*s.OutputName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OutputName", 1)) + } + if s.OutputSettings == nil { + invalidParams.Add(request.NewErrParamRequired("OutputSettings")) + } + if s.OutputSettings != nil { + if err := s.OutputSettings.Validate(); err != nil { + invalidParams.AddNested("OutputSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioDescriptionNames sets the AudioDescriptionNames field's value. +func (s *Output) SetAudioDescriptionNames(v []*string) *Output { + s.AudioDescriptionNames = v + return s +} + +// SetCaptionDescriptionNames sets the CaptionDescriptionNames field's value. +func (s *Output) SetCaptionDescriptionNames(v []*string) *Output { + s.CaptionDescriptionNames = v + return s +} + +// SetOutputName sets the OutputName field's value. +func (s *Output) SetOutputName(v string) *Output { + s.OutputName = &v + return s +} + +// SetOutputSettings sets the OutputSettings field's value. +func (s *Output) SetOutputSettings(v *OutputSettings) *Output { + s.OutputSettings = v + return s +} + +// SetVideoDescriptionName sets the VideoDescriptionName field's value. +func (s *Output) SetVideoDescriptionName(v string) *Output { + s.VideoDescriptionName = &v + return s +} + +type OutputDestination struct { + _ struct{} `type:"structure"` + + // User-specified id. This is used in an output group or an output. + Id *string `locationName:"id" type:"string"` + + // Destination settings for output; one for each redundant encoder. + Settings []*OutputDestinationSettings `locationName:"settings" type:"list"` +} + +// String returns the string representation +func (s OutputDestination) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputDestination) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *OutputDestination) SetId(v string) *OutputDestination { + s.Id = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *OutputDestination) SetSettings(v []*OutputDestinationSettings) *OutputDestination { + s.Settings = v + return s +} + +type OutputDestinationSettings struct { + _ struct{} `type:"structure"` + + // key used to extract the password from EC2 Parameter store + PasswordParam *string `locationName:"passwordParam" type:"string"` + + // Stream name for RTMP destinations (URLs of type rtmp://) + StreamName *string `locationName:"streamName" type:"string"` + + // A URL specifying a destination + Url *string `locationName:"url" type:"string"` + + // username for destination + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s OutputDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputDestinationSettings) GoString() string { + return s.String() +} + +// SetPasswordParam sets the PasswordParam field's value. +func (s *OutputDestinationSettings) SetPasswordParam(v string) *OutputDestinationSettings { + s.PasswordParam = &v + return s +} + +// SetStreamName sets the StreamName field's value. +func (s *OutputDestinationSettings) SetStreamName(v string) *OutputDestinationSettings { + s.StreamName = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *OutputDestinationSettings) SetUrl(v string) *OutputDestinationSettings { + s.Url = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *OutputDestinationSettings) SetUsername(v string) *OutputDestinationSettings { + s.Username = &v + return s +} + +// Output groups for this Live Event. Output groups contain information about +// where streams should be distributed. +type OutputGroup struct { + _ struct{} `type:"structure"` + + // Custom output group name optionally defined by the user. Only letters, numbers, + // and the underscore character allowed; only 32 characters allowed. + Name *string `locationName:"name" type:"string"` + + // Settings associated with the output group. + // + // OutputGroupSettings is a required field + OutputGroupSettings *OutputGroupSettings `locationName:"outputGroupSettings" type:"structure" required:"true"` + + // Outputs is a required field + Outputs []*Output `locationName:"outputs" type:"list" required:"true"` +} + +// String returns the string representation +func (s OutputGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputGroup) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputGroup) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputGroup"} + if s.OutputGroupSettings == nil { + invalidParams.Add(request.NewErrParamRequired("OutputGroupSettings")) + } + if s.Outputs == nil { + invalidParams.Add(request.NewErrParamRequired("Outputs")) + } + if s.OutputGroupSettings != nil { + if err := s.OutputGroupSettings.Validate(); err != nil { + invalidParams.AddNested("OutputGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.Outputs != nil { + for i, v := range s.Outputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *OutputGroup) SetName(v string) *OutputGroup { + s.Name = &v + return s +} + +// SetOutputGroupSettings sets the OutputGroupSettings field's value. +func (s *OutputGroup) SetOutputGroupSettings(v *OutputGroupSettings) *OutputGroup { + s.OutputGroupSettings = v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *OutputGroup) SetOutputs(v []*Output) *OutputGroup { + s.Outputs = v + return s +} + +type OutputGroupSettings struct { + _ struct{} `type:"structure"` + + ArchiveGroupSettings *ArchiveGroupSettings `locationName:"archiveGroupSettings" type:"structure"` + + // Frame Capture Group Settings + FrameCaptureGroupSettings *FrameCaptureGroupSettings `locationName:"frameCaptureGroupSettings" type:"structure"` + + HlsGroupSettings *HlsGroupSettings `locationName:"hlsGroupSettings" type:"structure"` + + MsSmoothGroupSettings *MsSmoothGroupSettings `locationName:"msSmoothGroupSettings" type:"structure"` + + RtmpGroupSettings *RtmpGroupSettings `locationName:"rtmpGroupSettings" type:"structure"` + + UdpGroupSettings *UdpGroupSettings `locationName:"udpGroupSettings" type:"structure"` +} + +// String returns the string representation +func (s OutputGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputGroupSettings"} + if s.ArchiveGroupSettings != nil { + if err := s.ArchiveGroupSettings.Validate(); err != nil { + invalidParams.AddNested("ArchiveGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.FrameCaptureGroupSettings != nil { + if err := s.FrameCaptureGroupSettings.Validate(); err != nil { + invalidParams.AddNested("FrameCaptureGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.HlsGroupSettings != nil { + if err := s.HlsGroupSettings.Validate(); err != nil { + invalidParams.AddNested("HlsGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.MsSmoothGroupSettings != nil { + if err := s.MsSmoothGroupSettings.Validate(); err != nil { + invalidParams.AddNested("MsSmoothGroupSettings", err.(request.ErrInvalidParams)) + } + } + if s.RtmpGroupSettings != nil { + if err := s.RtmpGroupSettings.Validate(); err != nil { + invalidParams.AddNested("RtmpGroupSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArchiveGroupSettings sets the ArchiveGroupSettings field's value. +func (s *OutputGroupSettings) SetArchiveGroupSettings(v *ArchiveGroupSettings) *OutputGroupSettings { + s.ArchiveGroupSettings = v + return s +} + +// SetFrameCaptureGroupSettings sets the FrameCaptureGroupSettings field's value. +func (s *OutputGroupSettings) SetFrameCaptureGroupSettings(v *FrameCaptureGroupSettings) *OutputGroupSettings { + s.FrameCaptureGroupSettings = v + return s +} + +// SetHlsGroupSettings sets the HlsGroupSettings field's value. +func (s *OutputGroupSettings) SetHlsGroupSettings(v *HlsGroupSettings) *OutputGroupSettings { + s.HlsGroupSettings = v + return s +} + +// SetMsSmoothGroupSettings sets the MsSmoothGroupSettings field's value. +func (s *OutputGroupSettings) SetMsSmoothGroupSettings(v *MsSmoothGroupSettings) *OutputGroupSettings { + s.MsSmoothGroupSettings = v + return s +} + +// SetRtmpGroupSettings sets the RtmpGroupSettings field's value. +func (s *OutputGroupSettings) SetRtmpGroupSettings(v *RtmpGroupSettings) *OutputGroupSettings { + s.RtmpGroupSettings = v + return s +} + +// SetUdpGroupSettings sets the UdpGroupSettings field's value. +func (s *OutputGroupSettings) SetUdpGroupSettings(v *UdpGroupSettings) *OutputGroupSettings { + s.UdpGroupSettings = v + return s +} + +// Reference to an OutputDestination ID defined in the channel +type OutputLocationRef struct { + _ struct{} `type:"structure"` + + DestinationRefId *string `locationName:"destinationRefId" type:"string"` +} + +// String returns the string representation +func (s OutputLocationRef) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputLocationRef) GoString() string { + return s.String() +} + +// SetDestinationRefId sets the DestinationRefId field's value. +func (s *OutputLocationRef) SetDestinationRefId(v string) *OutputLocationRef { + s.DestinationRefId = &v + return s +} + +type OutputSettings struct { + _ struct{} `type:"structure"` + + ArchiveOutputSettings *ArchiveOutputSettings `locationName:"archiveOutputSettings" type:"structure"` + + // Frame Capture Output Settings + FrameCaptureOutputSettings *FrameCaptureOutputSettings `locationName:"frameCaptureOutputSettings" type:"structure"` + + HlsOutputSettings *HlsOutputSettings `locationName:"hlsOutputSettings" type:"structure"` + + MsSmoothOutputSettings *MsSmoothOutputSettings `locationName:"msSmoothOutputSettings" type:"structure"` + + RtmpOutputSettings *RtmpOutputSettings `locationName:"rtmpOutputSettings" type:"structure"` + + UdpOutputSettings *UdpOutputSettings `locationName:"udpOutputSettings" type:"structure"` +} + +// String returns the string representation +func (s OutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputSettings"} + if s.ArchiveOutputSettings != nil { + if err := s.ArchiveOutputSettings.Validate(); err != nil { + invalidParams.AddNested("ArchiveOutputSettings", err.(request.ErrInvalidParams)) + } + } + if s.HlsOutputSettings != nil { + if err := s.HlsOutputSettings.Validate(); err != nil { + invalidParams.AddNested("HlsOutputSettings", err.(request.ErrInvalidParams)) + } + } + if s.RtmpOutputSettings != nil { + if err := s.RtmpOutputSettings.Validate(); err != nil { + invalidParams.AddNested("RtmpOutputSettings", err.(request.ErrInvalidParams)) + } + } + if s.UdpOutputSettings != nil { + if err := s.UdpOutputSettings.Validate(); err != nil { + invalidParams.AddNested("UdpOutputSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArchiveOutputSettings sets the ArchiveOutputSettings field's value. +func (s *OutputSettings) SetArchiveOutputSettings(v *ArchiveOutputSettings) *OutputSettings { + s.ArchiveOutputSettings = v + return s +} + +// SetFrameCaptureOutputSettings sets the FrameCaptureOutputSettings field's value. +func (s *OutputSettings) SetFrameCaptureOutputSettings(v *FrameCaptureOutputSettings) *OutputSettings { + s.FrameCaptureOutputSettings = v + return s +} + +// SetHlsOutputSettings sets the HlsOutputSettings field's value. +func (s *OutputSettings) SetHlsOutputSettings(v *HlsOutputSettings) *OutputSettings { + s.HlsOutputSettings = v + return s +} + +// SetMsSmoothOutputSettings sets the MsSmoothOutputSettings field's value. +func (s *OutputSettings) SetMsSmoothOutputSettings(v *MsSmoothOutputSettings) *OutputSettings { + s.MsSmoothOutputSettings = v + return s +} + +// SetRtmpOutputSettings sets the RtmpOutputSettings field's value. +func (s *OutputSettings) SetRtmpOutputSettings(v *RtmpOutputSettings) *OutputSettings { + s.RtmpOutputSettings = v + return s +} + +// SetUdpOutputSettings sets the UdpOutputSettings field's value. +func (s *OutputSettings) SetUdpOutputSettings(v *UdpOutputSettings) *OutputSettings { + s.UdpOutputSettings = v + return s +} + +type PassThroughSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PassThroughSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PassThroughSettings) GoString() string { + return s.String() +} + +type PurchaseOfferingInput struct { + _ struct{} `type:"structure"` + + // Count is a required field + Count *int64 `locationName:"count" min:"1" type:"integer" required:"true"` + + Name *string `locationName:"name" type:"string"` + + // OfferingId is a required field + OfferingId *string `location:"uri" locationName:"offeringId" type:"string" required:"true"` + + RequestId *string `locationName:"requestId" type:"string" idempotencyToken:"true"` + + Start *string `locationName:"start" type:"string"` +} + +// String returns the string representation +func (s PurchaseOfferingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseOfferingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseOfferingInput"} + if s.Count == nil { + invalidParams.Add(request.NewErrParamRequired("Count")) + } + if s.Count != nil && *s.Count < 1 { + invalidParams.Add(request.NewErrParamMinValue("Count", 1)) + } + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) + } + if s.OfferingId != nil && len(*s.OfferingId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OfferingId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCount sets the Count field's value. +func (s *PurchaseOfferingInput) SetCount(v int64) *PurchaseOfferingInput { + s.Count = &v + return s +} + +// SetName sets the Name field's value. +func (s *PurchaseOfferingInput) SetName(v string) *PurchaseOfferingInput { + s.Name = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *PurchaseOfferingInput) SetOfferingId(v string) *PurchaseOfferingInput { + s.OfferingId = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *PurchaseOfferingInput) SetRequestId(v string) *PurchaseOfferingInput { + s.RequestId = &v + return s +} + +// SetStart sets the Start field's value. +func (s *PurchaseOfferingInput) SetStart(v string) *PurchaseOfferingInput { + s.Start = &v + return s +} + +type PurchaseOfferingOutput struct { + _ struct{} `type:"structure"` + + // Reserved resources available to use + Reservation *Reservation `locationName:"reservation" type:"structure"` +} + +// String returns the string representation +func (s PurchaseOfferingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PurchaseOfferingOutput) GoString() string { + return s.String() +} + +// SetReservation sets the Reservation field's value. +func (s *PurchaseOfferingOutput) SetReservation(v *Reservation) *PurchaseOfferingOutput { + s.Reservation = v + return s +} + +type RemixSettings struct { + _ struct{} `type:"structure"` + + // Mapping of input channels to output channels, with appropriate gain adjustments. + // + // ChannelMappings is a required field + ChannelMappings []*AudioChannelMapping `locationName:"channelMappings" type:"list" required:"true"` + + // Number of input channels to be used. + ChannelsIn *int64 `locationName:"channelsIn" min:"1" type:"integer"` + + // Number of output channels to be produced.Valid values: 1, 2, 4, 6, 8 + ChannelsOut *int64 `locationName:"channelsOut" min:"1" type:"integer"` +} + +// String returns the string representation +func (s RemixSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemixSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemixSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemixSettings"} + if s.ChannelMappings == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelMappings")) + } + if s.ChannelsIn != nil && *s.ChannelsIn < 1 { + invalidParams.Add(request.NewErrParamMinValue("ChannelsIn", 1)) + } + if s.ChannelsOut != nil && *s.ChannelsOut < 1 { + invalidParams.Add(request.NewErrParamMinValue("ChannelsOut", 1)) + } + if s.ChannelMappings != nil { + for i, v := range s.ChannelMappings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ChannelMappings", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelMappings sets the ChannelMappings field's value. +func (s *RemixSettings) SetChannelMappings(v []*AudioChannelMapping) *RemixSettings { + s.ChannelMappings = v + return s +} + +// SetChannelsIn sets the ChannelsIn field's value. +func (s *RemixSettings) SetChannelsIn(v int64) *RemixSettings { + s.ChannelsIn = &v + return s +} + +// SetChannelsOut sets the ChannelsOut field's value. +func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { + s.ChannelsOut = &v + return s +} + +// Reserved resources available to use +type Reservation struct { + _ struct{} `type:"structure"` + + // Unique reservation ARN, e.g. 'arn:aws:medialive:us-west-2:123456789012:reservation:1234567' + Arn *string `locationName:"arn" type:"string"` + + // Number of reserved resources + Count *int64 `locationName:"count" type:"integer"` + + // Currency code for usagePrice and fixedPrice in ISO-4217 format, e.g. 'USD' + CurrencyCode *string `locationName:"currencyCode" type:"string"` + + // Lease duration, e.g. '12' + Duration *int64 `locationName:"duration" type:"integer"` + + // Units for duration, e.g. 'MONTHS' + DurationUnits *string `locationName:"durationUnits" type:"string" enum:"OfferingDurationUnits"` + + // Reservation UTC end date and time in ISO-8601 format, e.g. '2019-03-01T00:00:00' + End *string `locationName:"end" type:"string"` + + // One-time charge for each reserved resource, e.g. '0.0' for a NO_UPFRONT offering + FixedPrice *float64 `locationName:"fixedPrice" type:"double"` + + // User specified reservation name + Name *string `locationName:"name" type:"string"` + + // Offering description, e.g. 'HD AVC output at 10-20 Mbps, 30 fps, and standard + // VQ in US West (Oregon)' + OfferingDescription *string `locationName:"offeringDescription" type:"string"` + + // Unique offering ID, e.g. '87654321' + OfferingId *string `locationName:"offeringId" type:"string"` + + // Offering type, e.g. 'NO_UPFRONT' + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingType"` + + // AWS region, e.g. 'us-west-2' + Region *string `locationName:"region" type:"string"` + + // Unique reservation ID, e.g. '1234567' + ReservationId *string `locationName:"reservationId" type:"string"` + + // Resource configuration details + ResourceSpecification *ReservationResourceSpecification `locationName:"resourceSpecification" type:"structure"` + + // Reservation UTC start date and time in ISO-8601 format, e.g. '2018-03-01T00:00:00' + Start *string `locationName:"start" type:"string"` + + // Current state of reservation, e.g. 'ACTIVE' + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + // Recurring usage charge for each reserved resource, e.g. '157.0' + UsagePrice *float64 `locationName:"usagePrice" type:"double"` +} + +// String returns the string representation +func (s Reservation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Reservation) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Reservation) SetArn(v string) *Reservation { + s.Arn = &v + return s +} + +// SetCount sets the Count field's value. +func (s *Reservation) SetCount(v int64) *Reservation { + s.Count = &v + return s +} + +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *Reservation) SetCurrencyCode(v string) *Reservation { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *Reservation) SetDuration(v int64) *Reservation { + s.Duration = &v + return s +} + +// SetDurationUnits sets the DurationUnits field's value. +func (s *Reservation) SetDurationUnits(v string) *Reservation { + s.DurationUnits = &v + return s +} + +// SetEnd sets the End field's value. +func (s *Reservation) SetEnd(v string) *Reservation { + s.End = &v + return s +} + +// SetFixedPrice sets the FixedPrice field's value. +func (s *Reservation) SetFixedPrice(v float64) *Reservation { + s.FixedPrice = &v + return s +} + +// SetName sets the Name field's value. +func (s *Reservation) SetName(v string) *Reservation { + s.Name = &v + return s +} + +// SetOfferingDescription sets the OfferingDescription field's value. +func (s *Reservation) SetOfferingDescription(v string) *Reservation { + s.OfferingDescription = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *Reservation) SetOfferingId(v string) *Reservation { + s.OfferingId = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *Reservation) SetOfferingType(v string) *Reservation { + s.OfferingType = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *Reservation) SetRegion(v string) *Reservation { + s.Region = &v + return s +} + +// SetReservationId sets the ReservationId field's value. +func (s *Reservation) SetReservationId(v string) *Reservation { + s.ReservationId = &v + return s +} + +// SetResourceSpecification sets the ResourceSpecification field's value. +func (s *Reservation) SetResourceSpecification(v *ReservationResourceSpecification) *Reservation { + s.ResourceSpecification = v + return s +} + +// SetStart sets the Start field's value. +func (s *Reservation) SetStart(v string) *Reservation { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *Reservation) SetState(v string) *Reservation { + s.State = &v + return s +} + +// SetUsagePrice sets the UsagePrice field's value. +func (s *Reservation) SetUsagePrice(v float64) *Reservation { + s.UsagePrice = &v + return s +} + +// Resource configuration (codec, resolution, bitrate, ...) +type ReservationResourceSpecification struct { + _ struct{} `type:"structure"` + + // Codec, e.g. 'AVC' + Codec *string `locationName:"codec" type:"string" enum:"ReservationCodec"` + + // Maximum bitrate, e.g. 'MAX_20_MBPS' + MaximumBitrate *string `locationName:"maximumBitrate" type:"string" enum:"ReservationMaximumBitrate"` + + // Maximum framerate, e.g. 'MAX_30_FPS' (Outputs only) + MaximumFramerate *string `locationName:"maximumFramerate" type:"string" enum:"ReservationMaximumFramerate"` + + // Resolution, e.g. 'HD' + Resolution *string `locationName:"resolution" type:"string" enum:"ReservationResolution"` + + // Resource type, 'INPUT', 'OUTPUT', or 'CHANNEL' + ResourceType *string `locationName:"resourceType" type:"string" enum:"ReservationResourceType"` + + // Special feature, e.g. 'AUDIO_NORMALIZATION' (Channels only) + SpecialFeature *string `locationName:"specialFeature" type:"string" enum:"ReservationSpecialFeature"` + + // Video quality, e.g. 'STANDARD' (Outputs only) + VideoQuality *string `locationName:"videoQuality" type:"string" enum:"ReservationVideoQuality"` +} + +// String returns the string representation +func (s ReservationResourceSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservationResourceSpecification) GoString() string { + return s.String() +} + +// SetCodec sets the Codec field's value. +func (s *ReservationResourceSpecification) SetCodec(v string) *ReservationResourceSpecification { + s.Codec = &v + return s +} + +// SetMaximumBitrate sets the MaximumBitrate field's value. +func (s *ReservationResourceSpecification) SetMaximumBitrate(v string) *ReservationResourceSpecification { + s.MaximumBitrate = &v + return s +} + +// SetMaximumFramerate sets the MaximumFramerate field's value. +func (s *ReservationResourceSpecification) SetMaximumFramerate(v string) *ReservationResourceSpecification { + s.MaximumFramerate = &v + return s +} + +// SetResolution sets the Resolution field's value. +func (s *ReservationResourceSpecification) SetResolution(v string) *ReservationResourceSpecification { + s.Resolution = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ReservationResourceSpecification) SetResourceType(v string) *ReservationResourceSpecification { + s.ResourceType = &v + return s +} + +// SetSpecialFeature sets the SpecialFeature field's value. +func (s *ReservationResourceSpecification) SetSpecialFeature(v string) *ReservationResourceSpecification { + s.SpecialFeature = &v + return s +} + +// SetVideoQuality sets the VideoQuality field's value. +func (s *ReservationResourceSpecification) SetVideoQuality(v string) *ReservationResourceSpecification { + s.VideoQuality = &v + return s +} + +type RtmpCaptionInfoDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RtmpCaptionInfoDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RtmpCaptionInfoDestinationSettings) GoString() string { + return s.String() +} + +type RtmpGroupSettings struct { + _ struct{} `type:"structure"` + + // Authentication scheme to use when connecting with CDN + AuthenticationScheme *string `locationName:"authenticationScheme" type:"string" enum:"AuthenticationScheme"` + + // Controls behavior when content cache fills up. If remote origin server stalls + // the RTMP connection and does not accept content fast enough the 'Media Cache' + // will fill up. When the cache reaches the duration specified by cacheLength + // the cache will stop accepting new content. If set to disconnectImmediately, + // the RTMP output will force a disconnect. Clear the media cache, and reconnect + // after restartDelay seconds. If set to waitForServer, the RTMP output will + // wait up to 5 minutes to allow the origin server to begin accepting data again. + CacheFullBehavior *string `locationName:"cacheFullBehavior" type:"string" enum:"RtmpCacheFullBehavior"` + + // Cache length, in seconds, is used to calculate buffer size. + CacheLength *int64 `locationName:"cacheLength" min:"30" type:"integer"` + + // Controls the types of data that passes to onCaptionInfo outputs. If set to + // 'all' then 608 and 708 carried DTVCC data will be passed. If set to 'field1AndField2608' + // then DTVCC data will be stripped out, but 608 data from both fields will + // be passed. If set to 'field1608' then only the data carried in 608 from field + // 1 video will be passed. + CaptionData *string `locationName:"captionData" type:"string" enum:"RtmpCaptionData"` + + // Controls the behavior of this RTMP group if input becomes unavailable.- emitOutput: + // Emit a slate until input returns.- pauseOutput: Stop transmitting data until + // input returns. This does not close the underlying RTMP connection. + InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForRtmpOut"` + + // If a streaming output fails, number of seconds to wait until a restart is + // initiated. A value of 0 means never restart. + RestartDelay *int64 `locationName:"restartDelay" type:"integer"` +} + +// String returns the string representation +func (s RtmpGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RtmpGroupSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RtmpGroupSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RtmpGroupSettings"} + if s.CacheLength != nil && *s.CacheLength < 30 { + invalidParams.Add(request.NewErrParamMinValue("CacheLength", 30)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationScheme sets the AuthenticationScheme field's value. +func (s *RtmpGroupSettings) SetAuthenticationScheme(v string) *RtmpGroupSettings { + s.AuthenticationScheme = &v + return s +} + +// SetCacheFullBehavior sets the CacheFullBehavior field's value. +func (s *RtmpGroupSettings) SetCacheFullBehavior(v string) *RtmpGroupSettings { + s.CacheFullBehavior = &v + return s +} + +// SetCacheLength sets the CacheLength field's value. +func (s *RtmpGroupSettings) SetCacheLength(v int64) *RtmpGroupSettings { + s.CacheLength = &v + return s +} + +// SetCaptionData sets the CaptionData field's value. +func (s *RtmpGroupSettings) SetCaptionData(v string) *RtmpGroupSettings { + s.CaptionData = &v + return s +} + +// SetInputLossAction sets the InputLossAction field's value. +func (s *RtmpGroupSettings) SetInputLossAction(v string) *RtmpGroupSettings { + s.InputLossAction = &v + return s +} + +// SetRestartDelay sets the RestartDelay field's value. +func (s *RtmpGroupSettings) SetRestartDelay(v int64) *RtmpGroupSettings { + s.RestartDelay = &v + return s +} + +type RtmpOutputSettings struct { + _ struct{} `type:"structure"` + + // If set to verifyAuthenticity, verify the tls certificate chain to a trusted + // Certificate Authority (CA). This will cause rtmps outputs with self-signed + // certificates to fail. + CertificateMode *string `locationName:"certificateMode" type:"string" enum:"RtmpOutputCertificateMode"` + + // Number of seconds to wait before retrying a connection to the Flash Media + // server if the connection is lost. + ConnectionRetryInterval *int64 `locationName:"connectionRetryInterval" min:"1" type:"integer"` + + // The RTMP endpoint excluding the stream name (eg. rtmp://host/appname). For + // connection to Akamai, a username and password must be supplied. URI fields + // accept format identifiers. + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` + + // Number of retry attempts. + NumRetries *int64 `locationName:"numRetries" type:"integer"` +} + +// String returns the string representation +func (s RtmpOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RtmpOutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RtmpOutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RtmpOutputSettings"} + if s.ConnectionRetryInterval != nil && *s.ConnectionRetryInterval < 1 { + invalidParams.Add(request.NewErrParamMinValue("ConnectionRetryInterval", 1)) + } + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateMode sets the CertificateMode field's value. +func (s *RtmpOutputSettings) SetCertificateMode(v string) *RtmpOutputSettings { + s.CertificateMode = &v + return s +} + +// SetConnectionRetryInterval sets the ConnectionRetryInterval field's value. +func (s *RtmpOutputSettings) SetConnectionRetryInterval(v int64) *RtmpOutputSettings { + s.ConnectionRetryInterval = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *RtmpOutputSettings) SetDestination(v *OutputLocationRef) *RtmpOutputSettings { + s.Destination = v + return s +} + +// SetNumRetries sets the NumRetries field's value. +func (s *RtmpOutputSettings) SetNumRetries(v int64) *RtmpOutputSettings { + s.NumRetries = &v + return s +} + +// Contains information on a single schedule action. +type ScheduleAction struct { + _ struct{} `type:"structure"` + + // The name of the action, must be unique within the schedule. This name provides + // the main reference to an action once it is added to the schedule. A name + // is unique if it is no longer in the schedule. The schedule is automatically + // cleaned up to remove actions with a start time of more than 1 hour ago (approximately) + // so at that point a name can be reused. + // + // ActionName is a required field + ActionName *string `locationName:"actionName" type:"string" required:"true"` + + // Settings for this schedule action. + // + // ScheduleActionSettings is a required field + ScheduleActionSettings *ScheduleActionSettings `locationName:"scheduleActionSettings" type:"structure" required:"true"` + + // The time for the action to start in the channel. + // + // ScheduleActionStartSettings is a required field + ScheduleActionStartSettings *ScheduleActionStartSettings `locationName:"scheduleActionStartSettings" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ScheduleAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleAction"} + if s.ActionName == nil { + invalidParams.Add(request.NewErrParamRequired("ActionName")) + } + if s.ScheduleActionSettings == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduleActionSettings")) + } + if s.ScheduleActionStartSettings == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduleActionStartSettings")) + } + if s.ScheduleActionSettings != nil { + if err := s.ScheduleActionSettings.Validate(); err != nil { + invalidParams.AddNested("ScheduleActionSettings", err.(request.ErrInvalidParams)) + } + } + if s.ScheduleActionStartSettings != nil { + if err := s.ScheduleActionStartSettings.Validate(); err != nil { + invalidParams.AddNested("ScheduleActionStartSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionName sets the ActionName field's value. +func (s *ScheduleAction) SetActionName(v string) *ScheduleAction { + s.ActionName = &v + return s +} + +// SetScheduleActionSettings sets the ScheduleActionSettings field's value. +func (s *ScheduleAction) SetScheduleActionSettings(v *ScheduleActionSettings) *ScheduleAction { + s.ScheduleActionSettings = v + return s +} + +// SetScheduleActionStartSettings sets the ScheduleActionStartSettings field's value. +func (s *ScheduleAction) SetScheduleActionStartSettings(v *ScheduleActionStartSettings) *ScheduleAction { + s.ScheduleActionStartSettings = v + return s +} + +// Holds the settings for a single schedule action. +type ScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // Settings to emit HLS metadata + HlsTimedMetadataSettings *HlsTimedMetadataScheduleActionSettings `locationName:"hlsTimedMetadataSettings" type:"structure"` + + // Settings to switch an input + InputSwitchSettings *InputSwitchScheduleActionSettings `locationName:"inputSwitchSettings" type:"structure"` + + // Settings for SCTE-35 return_to_network message + Scte35ReturnToNetworkSettings *Scte35ReturnToNetworkScheduleActionSettings `locationName:"scte35ReturnToNetworkSettings" type:"structure"` + + // Settings for SCTE-35 splice_insert message + Scte35SpliceInsertSettings *Scte35SpliceInsertScheduleActionSettings `locationName:"scte35SpliceInsertSettings" type:"structure"` + + // Settings for SCTE-35 time_signal message + Scte35TimeSignalSettings *Scte35TimeSignalScheduleActionSettings `locationName:"scte35TimeSignalSettings" type:"structure"` + + // Settings to activate a static image overlay + StaticImageActivateSettings *StaticImageActivateScheduleActionSettings `locationName:"staticImageActivateSettings" type:"structure"` + + // Settings to deactivate a static image overlay + StaticImageDeactivateSettings *StaticImageDeactivateScheduleActionSettings `locationName:"staticImageDeactivateSettings" type:"structure"` +} + +// String returns the string representation +func (s ScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleActionSettings"} + if s.HlsTimedMetadataSettings != nil { + if err := s.HlsTimedMetadataSettings.Validate(); err != nil { + invalidParams.AddNested("HlsTimedMetadataSettings", err.(request.ErrInvalidParams)) + } + } + if s.InputSwitchSettings != nil { + if err := s.InputSwitchSettings.Validate(); err != nil { + invalidParams.AddNested("InputSwitchSettings", err.(request.ErrInvalidParams)) + } + } + if s.Scte35ReturnToNetworkSettings != nil { + if err := s.Scte35ReturnToNetworkSettings.Validate(); err != nil { + invalidParams.AddNested("Scte35ReturnToNetworkSettings", err.(request.ErrInvalidParams)) + } + } + if s.Scte35SpliceInsertSettings != nil { + if err := s.Scte35SpliceInsertSettings.Validate(); err != nil { + invalidParams.AddNested("Scte35SpliceInsertSettings", err.(request.ErrInvalidParams)) + } + } + if s.Scte35TimeSignalSettings != nil { + if err := s.Scte35TimeSignalSettings.Validate(); err != nil { + invalidParams.AddNested("Scte35TimeSignalSettings", err.(request.ErrInvalidParams)) + } + } + if s.StaticImageActivateSettings != nil { + if err := s.StaticImageActivateSettings.Validate(); err != nil { + invalidParams.AddNested("StaticImageActivateSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHlsTimedMetadataSettings sets the HlsTimedMetadataSettings field's value. +func (s *ScheduleActionSettings) SetHlsTimedMetadataSettings(v *HlsTimedMetadataScheduleActionSettings) *ScheduleActionSettings { + s.HlsTimedMetadataSettings = v + return s +} + +// SetInputSwitchSettings sets the InputSwitchSettings field's value. +func (s *ScheduleActionSettings) SetInputSwitchSettings(v *InputSwitchScheduleActionSettings) *ScheduleActionSettings { + s.InputSwitchSettings = v + return s +} + +// SetScte35ReturnToNetworkSettings sets the Scte35ReturnToNetworkSettings field's value. +func (s *ScheduleActionSettings) SetScte35ReturnToNetworkSettings(v *Scte35ReturnToNetworkScheduleActionSettings) *ScheduleActionSettings { + s.Scte35ReturnToNetworkSettings = v + return s +} + +// SetScte35SpliceInsertSettings sets the Scte35SpliceInsertSettings field's value. +func (s *ScheduleActionSettings) SetScte35SpliceInsertSettings(v *Scte35SpliceInsertScheduleActionSettings) *ScheduleActionSettings { + s.Scte35SpliceInsertSettings = v + return s +} + +// SetScte35TimeSignalSettings sets the Scte35TimeSignalSettings field's value. +func (s *ScheduleActionSettings) SetScte35TimeSignalSettings(v *Scte35TimeSignalScheduleActionSettings) *ScheduleActionSettings { + s.Scte35TimeSignalSettings = v + return s +} + +// SetStaticImageActivateSettings sets the StaticImageActivateSettings field's value. +func (s *ScheduleActionSettings) SetStaticImageActivateSettings(v *StaticImageActivateScheduleActionSettings) *ScheduleActionSettings { + s.StaticImageActivateSettings = v + return s +} + +// SetStaticImageDeactivateSettings sets the StaticImageDeactivateSettings field's value. +func (s *ScheduleActionSettings) SetStaticImageDeactivateSettings(v *StaticImageDeactivateScheduleActionSettings) *ScheduleActionSettings { + s.StaticImageDeactivateSettings = v + return s +} + +// Settings to specify the start time for an action. +type ScheduleActionStartSettings struct { + _ struct{} `type:"structure"` + + // Holds the start time for the action. + FixedModeScheduleActionStartSettings *FixedModeScheduleActionStartSettings `locationName:"fixedModeScheduleActionStartSettings" type:"structure"` + + // Specifies an action to follow for scheduling this action. + FollowModeScheduleActionStartSettings *FollowModeScheduleActionStartSettings `locationName:"followModeScheduleActionStartSettings" type:"structure"` +} + +// String returns the string representation +func (s ScheduleActionStartSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduleActionStartSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ScheduleActionStartSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduleActionStartSettings"} + if s.FixedModeScheduleActionStartSettings != nil { + if err := s.FixedModeScheduleActionStartSettings.Validate(); err != nil { + invalidParams.AddNested("FixedModeScheduleActionStartSettings", err.(request.ErrInvalidParams)) + } + } + if s.FollowModeScheduleActionStartSettings != nil { + if err := s.FollowModeScheduleActionStartSettings.Validate(); err != nil { + invalidParams.AddNested("FollowModeScheduleActionStartSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFixedModeScheduleActionStartSettings sets the FixedModeScheduleActionStartSettings field's value. +func (s *ScheduleActionStartSettings) SetFixedModeScheduleActionStartSettings(v *FixedModeScheduleActionStartSettings) *ScheduleActionStartSettings { + s.FixedModeScheduleActionStartSettings = v + return s +} + +// SetFollowModeScheduleActionStartSettings sets the FollowModeScheduleActionStartSettings field's value. +func (s *ScheduleActionStartSettings) SetFollowModeScheduleActionStartSettings(v *FollowModeScheduleActionStartSettings) *ScheduleActionStartSettings { + s.FollowModeScheduleActionStartSettings = v + return s +} + +type Scte20PlusEmbeddedDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s Scte20PlusEmbeddedDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte20PlusEmbeddedDestinationSettings) GoString() string { + return s.String() +} + +type Scte20SourceSettings struct { + _ struct{} `type:"structure"` + + // If upconvert, 608 data is both passed through via the "608 compatibility + // bytes" fields of the 708 wrapper as well as translated into 708. 708 data + // present in the source content will be discarded. + Convert608To708 *string `locationName:"convert608To708" type:"string" enum:"Scte20Convert608To708"` + + // Specifies the 608/708 channel number within the video track from which to + // extract captions. Unused for passthrough. + Source608ChannelNumber *int64 `locationName:"source608ChannelNumber" min:"1" type:"integer"` +} + +// String returns the string representation +func (s Scte20SourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte20SourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte20SourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte20SourceSettings"} + if s.Source608ChannelNumber != nil && *s.Source608ChannelNumber < 1 { + invalidParams.Add(request.NewErrParamMinValue("Source608ChannelNumber", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConvert608To708 sets the Convert608To708 field's value. +func (s *Scte20SourceSettings) SetConvert608To708(v string) *Scte20SourceSettings { + s.Convert608To708 = &v + return s +} + +// SetSource608ChannelNumber sets the Source608ChannelNumber field's value. +func (s *Scte20SourceSettings) SetSource608ChannelNumber(v int64) *Scte20SourceSettings { + s.Source608ChannelNumber = &v + return s +} + +type Scte27DestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s Scte27DestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte27DestinationSettings) GoString() string { + return s.String() +} + +type Scte27SourceSettings struct { + _ struct{} `type:"structure"` + + // The pid field is used in conjunction with the caption selector languageCode + // field as follows: - Specify PID and Language: Extracts captions from that + // PID; the language is "informational". - Specify PID and omit Language: Extracts + // the specified PID. - Omit PID and specify Language: Extracts the specified + // language, whichever PID that happens to be. - Omit PID and omit Language: + // Valid only if source is DVB-Sub that is being passed through; all languages + // will be passed through. + Pid *int64 `locationName:"pid" min:"1" type:"integer"` +} + +// String returns the string representation +func (s Scte27SourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte27SourceSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte27SourceSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte27SourceSettings"} + if s.Pid != nil && *s.Pid < 1 { + invalidParams.Add(request.NewErrParamMinValue("Pid", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPid sets the Pid field's value. +func (s *Scte27SourceSettings) SetPid(v int64) *Scte27SourceSettings { + s.Pid = &v + return s +} + +// Corresponds to SCTE-35 delivery_not_restricted_flag parameter. To declare +// delivery restrictions, include this element and its four "restriction" flags. +// To declare that there are no restrictions, omit this element. +type Scte35DeliveryRestrictions struct { + _ struct{} `type:"structure"` + + // Corresponds to SCTE-35 archive_allowed_flag. + // + // ArchiveAllowedFlag is a required field + ArchiveAllowedFlag *string `locationName:"archiveAllowedFlag" type:"string" required:"true" enum:"Scte35ArchiveAllowedFlag"` + + // Corresponds to SCTE-35 device_restrictions parameter. + // + // DeviceRestrictions is a required field + DeviceRestrictions *string `locationName:"deviceRestrictions" type:"string" required:"true" enum:"Scte35DeviceRestrictions"` + + // Corresponds to SCTE-35 no_regional_blackout_flag parameter. + // + // NoRegionalBlackoutFlag is a required field + NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" required:"true" enum:"Scte35NoRegionalBlackoutFlag"` + + // Corresponds to SCTE-35 web_delivery_allowed_flag parameter. + // + // WebDeliveryAllowedFlag is a required field + WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" required:"true" enum:"Scte35WebDeliveryAllowedFlag"` +} + +// String returns the string representation +func (s Scte35DeliveryRestrictions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35DeliveryRestrictions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35DeliveryRestrictions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35DeliveryRestrictions"} + if s.ArchiveAllowedFlag == nil { + invalidParams.Add(request.NewErrParamRequired("ArchiveAllowedFlag")) + } + if s.DeviceRestrictions == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceRestrictions")) + } + if s.NoRegionalBlackoutFlag == nil { + invalidParams.Add(request.NewErrParamRequired("NoRegionalBlackoutFlag")) + } + if s.WebDeliveryAllowedFlag == nil { + invalidParams.Add(request.NewErrParamRequired("WebDeliveryAllowedFlag")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArchiveAllowedFlag sets the ArchiveAllowedFlag field's value. +func (s *Scte35DeliveryRestrictions) SetArchiveAllowedFlag(v string) *Scte35DeliveryRestrictions { + s.ArchiveAllowedFlag = &v + return s +} + +// SetDeviceRestrictions sets the DeviceRestrictions field's value. +func (s *Scte35DeliveryRestrictions) SetDeviceRestrictions(v string) *Scte35DeliveryRestrictions { + s.DeviceRestrictions = &v + return s +} + +// SetNoRegionalBlackoutFlag sets the NoRegionalBlackoutFlag field's value. +func (s *Scte35DeliveryRestrictions) SetNoRegionalBlackoutFlag(v string) *Scte35DeliveryRestrictions { + s.NoRegionalBlackoutFlag = &v + return s +} + +// SetWebDeliveryAllowedFlag sets the WebDeliveryAllowedFlag field's value. +func (s *Scte35DeliveryRestrictions) SetWebDeliveryAllowedFlag(v string) *Scte35DeliveryRestrictions { + s.WebDeliveryAllowedFlag = &v + return s +} + +// Holds one set of SCTE-35 Descriptor Settings. +type Scte35Descriptor struct { + _ struct{} `type:"structure"` + + // SCTE-35 Descriptor Settings. + // + // Scte35DescriptorSettings is a required field + Scte35DescriptorSettings *Scte35DescriptorSettings `locationName:"scte35DescriptorSettings" type:"structure" required:"true"` +} + +// String returns the string representation +func (s Scte35Descriptor) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35Descriptor) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35Descriptor) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35Descriptor"} + if s.Scte35DescriptorSettings == nil { + invalidParams.Add(request.NewErrParamRequired("Scte35DescriptorSettings")) + } + if s.Scte35DescriptorSettings != nil { + if err := s.Scte35DescriptorSettings.Validate(); err != nil { + invalidParams.AddNested("Scte35DescriptorSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScte35DescriptorSettings sets the Scte35DescriptorSettings field's value. +func (s *Scte35Descriptor) SetScte35DescriptorSettings(v *Scte35DescriptorSettings) *Scte35Descriptor { + s.Scte35DescriptorSettings = v + return s +} + +// SCTE-35 Descriptor settings. +type Scte35DescriptorSettings struct { + _ struct{} `type:"structure"` + + // SCTE-35 Segmentation Descriptor. + // + // SegmentationDescriptorScte35DescriptorSettings is a required field + SegmentationDescriptorScte35DescriptorSettings *Scte35SegmentationDescriptor `locationName:"segmentationDescriptorScte35DescriptorSettings" type:"structure" required:"true"` +} + +// String returns the string representation +func (s Scte35DescriptorSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35DescriptorSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35DescriptorSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35DescriptorSettings"} + if s.SegmentationDescriptorScte35DescriptorSettings == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentationDescriptorScte35DescriptorSettings")) + } + if s.SegmentationDescriptorScte35DescriptorSettings != nil { + if err := s.SegmentationDescriptorScte35DescriptorSettings.Validate(); err != nil { + invalidParams.AddNested("SegmentationDescriptorScte35DescriptorSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSegmentationDescriptorScte35DescriptorSettings sets the SegmentationDescriptorScte35DescriptorSettings field's value. +func (s *Scte35DescriptorSettings) SetSegmentationDescriptorScte35DescriptorSettings(v *Scte35SegmentationDescriptor) *Scte35DescriptorSettings { + s.SegmentationDescriptorScte35DescriptorSettings = v + return s +} + +// Settings for a SCTE-35 return_to_network message. +type Scte35ReturnToNetworkScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // The splice_event_id for the SCTE-35 splice_insert, as defined in SCTE-35. + // + // SpliceEventId is a required field + SpliceEventId *int64 `locationName:"spliceEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s Scte35ReturnToNetworkScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35ReturnToNetworkScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35ReturnToNetworkScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35ReturnToNetworkScheduleActionSettings"} + if s.SpliceEventId == nil { + invalidParams.Add(request.NewErrParamRequired("SpliceEventId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSpliceEventId sets the SpliceEventId field's value. +func (s *Scte35ReturnToNetworkScheduleActionSettings) SetSpliceEventId(v int64) *Scte35ReturnToNetworkScheduleActionSettings { + s.SpliceEventId = &v + return s +} + +// Corresponds to SCTE-35 segmentation_descriptor. +type Scte35SegmentationDescriptor struct { + _ struct{} `type:"structure"` + + // Holds the four SCTE-35 delivery restriction parameters. + DeliveryRestrictions *Scte35DeliveryRestrictions `locationName:"deliveryRestrictions" type:"structure"` + + // Corresponds to SCTE-35 segment_num. A value that is valid for the specified + // segmentation_type_id. + SegmentNum *int64 `locationName:"segmentNum" type:"integer"` + + // Corresponds to SCTE-35 segmentation_event_cancel_indicator. + // + // SegmentationCancelIndicator is a required field + SegmentationCancelIndicator *string `locationName:"segmentationCancelIndicator" type:"string" required:"true" enum:"Scte35SegmentationCancelIndicator"` + + // Corresponds to SCTE-35 segmentation_duration. Optional. The duration for + // the time_signal, in 90 KHz ticks. To convert seconds to ticks, multiple the + // seconds by 90,000. Enter time in 90 KHz clock ticks. If you do not enter + // a duration, the time_signal will continue until you insert a cancellation + // message. + SegmentationDuration *int64 `locationName:"segmentationDuration" type:"long"` + + // Corresponds to SCTE-35 segmentation_event_id. + // + // SegmentationEventId is a required field + SegmentationEventId *int64 `locationName:"segmentationEventId" type:"long" required:"true"` + + // Corresponds to SCTE-35 segmentation_type_id. One of the segmentation_type_id + // values listed in the SCTE-35 specification. On the console, enter the ID + // in decimal (for example, "52"). In the CLI, API, or an SDK, enter the ID + // in hex (for example, "0x34") or decimal (for example, "52"). + SegmentationTypeId *int64 `locationName:"segmentationTypeId" type:"integer"` + + // Corresponds to SCTE-35 segmentation_upid. Enter a string containing the hexadecimal + // representation of the characters that make up the SCTE-35 segmentation_upid + // value. Must contain an even number of hex characters. Do not include spaces + // between each hex pair. For example, the ASCII "ADS Information" becomes hex + // "41445320496e666f726d6174696f6e. + SegmentationUpid *string `locationName:"segmentationUpid" type:"string"` + + // Corresponds to SCTE-35 segmentation_upid_type. On the console, enter one + // of the types listed in the SCTE-35 specification, converted to a decimal. + // For example, "0x0C" hex from the specification is "12" in decimal. In the + // CLI, API, or an SDK, enter one of the types listed in the SCTE-35 specification, + // in either hex (for example, "0x0C" ) or in decimal (for example, "12"). + SegmentationUpidType *int64 `locationName:"segmentationUpidType" type:"integer"` + + // Corresponds to SCTE-35 segments_expected. A value that is valid for the specified + // segmentation_type_id. + SegmentsExpected *int64 `locationName:"segmentsExpected" type:"integer"` + + // Corresponds to SCTE-35 sub_segment_num. A value that is valid for the specified + // segmentation_type_id. + SubSegmentNum *int64 `locationName:"subSegmentNum" type:"integer"` + + // Corresponds to SCTE-35 sub_segments_expected. A value that is valid for the + // specified segmentation_type_id. + SubSegmentsExpected *int64 `locationName:"subSegmentsExpected" type:"integer"` +} + +// String returns the string representation +func (s Scte35SegmentationDescriptor) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35SegmentationDescriptor) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35SegmentationDescriptor) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35SegmentationDescriptor"} + if s.SegmentationCancelIndicator == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentationCancelIndicator")) + } + if s.SegmentationEventId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentationEventId")) + } + if s.DeliveryRestrictions != nil { + if err := s.DeliveryRestrictions.Validate(); err != nil { + invalidParams.AddNested("DeliveryRestrictions", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryRestrictions sets the DeliveryRestrictions field's value. +func (s *Scte35SegmentationDescriptor) SetDeliveryRestrictions(v *Scte35DeliveryRestrictions) *Scte35SegmentationDescriptor { + s.DeliveryRestrictions = v + return s +} + +// SetSegmentNum sets the SegmentNum field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentNum(v int64) *Scte35SegmentationDescriptor { + s.SegmentNum = &v + return s +} + +// SetSegmentationCancelIndicator sets the SegmentationCancelIndicator field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentationCancelIndicator(v string) *Scte35SegmentationDescriptor { + s.SegmentationCancelIndicator = &v + return s +} + +// SetSegmentationDuration sets the SegmentationDuration field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentationDuration(v int64) *Scte35SegmentationDescriptor { + s.SegmentationDuration = &v + return s +} + +// SetSegmentationEventId sets the SegmentationEventId field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentationEventId(v int64) *Scte35SegmentationDescriptor { + s.SegmentationEventId = &v + return s +} + +// SetSegmentationTypeId sets the SegmentationTypeId field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentationTypeId(v int64) *Scte35SegmentationDescriptor { + s.SegmentationTypeId = &v + return s +} + +// SetSegmentationUpid sets the SegmentationUpid field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentationUpid(v string) *Scte35SegmentationDescriptor { + s.SegmentationUpid = &v + return s +} + +// SetSegmentationUpidType sets the SegmentationUpidType field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentationUpidType(v int64) *Scte35SegmentationDescriptor { + s.SegmentationUpidType = &v + return s +} + +// SetSegmentsExpected sets the SegmentsExpected field's value. +func (s *Scte35SegmentationDescriptor) SetSegmentsExpected(v int64) *Scte35SegmentationDescriptor { + s.SegmentsExpected = &v + return s +} + +// SetSubSegmentNum sets the SubSegmentNum field's value. +func (s *Scte35SegmentationDescriptor) SetSubSegmentNum(v int64) *Scte35SegmentationDescriptor { + s.SubSegmentNum = &v + return s +} + +// SetSubSegmentsExpected sets the SubSegmentsExpected field's value. +func (s *Scte35SegmentationDescriptor) SetSubSegmentsExpected(v int64) *Scte35SegmentationDescriptor { + s.SubSegmentsExpected = &v + return s +} + +type Scte35SpliceInsert struct { + _ struct{} `type:"structure"` + + // When specified, this offset (in milliseconds) is added to the input Ad Avail + // PTS time. This only applies to embedded SCTE 104/35 messages and does not + // apply to OOB messages. + AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` + + // When set to ignore, Segment Descriptors with noRegionalBlackoutFlag set to + // 0 will no longer trigger blackouts or Ad Avail slates + NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" enum:"Scte35SpliceInsertNoRegionalBlackoutBehavior"` + + // When set to ignore, Segment Descriptors with webDeliveryAllowedFlag set to + // 0 will no longer trigger blackouts or Ad Avail slates + WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" enum:"Scte35SpliceInsertWebDeliveryAllowedBehavior"` +} + +// String returns the string representation +func (s Scte35SpliceInsert) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35SpliceInsert) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35SpliceInsert) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35SpliceInsert"} + if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { + invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdAvailOffset sets the AdAvailOffset field's value. +func (s *Scte35SpliceInsert) SetAdAvailOffset(v int64) *Scte35SpliceInsert { + s.AdAvailOffset = &v + return s +} + +// SetNoRegionalBlackoutFlag sets the NoRegionalBlackoutFlag field's value. +func (s *Scte35SpliceInsert) SetNoRegionalBlackoutFlag(v string) *Scte35SpliceInsert { + s.NoRegionalBlackoutFlag = &v + return s +} + +// SetWebDeliveryAllowedFlag sets the WebDeliveryAllowedFlag field's value. +func (s *Scte35SpliceInsert) SetWebDeliveryAllowedFlag(v string) *Scte35SpliceInsert { + s.WebDeliveryAllowedFlag = &v + return s +} + +// Settings for a SCTE-35 splice_insert message. +type Scte35SpliceInsertScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // Optional, the duration for the splice_insert, in 90 KHz ticks. To convert + // seconds to ticks, multiple the seconds by 90,000. If you enter a duration, + // there is an expectation that the downstream system can read the duration + // and cue in at that time. If you do not enter a duration, the splice_insert + // will continue indefinitely and there is an expectation that you will enter + // a return_to_network to end the splice_insert at the appropriate time. + Duration *int64 `locationName:"duration" type:"long"` + + // The splice_event_id for the SCTE-35 splice_insert, as defined in SCTE-35. + // + // SpliceEventId is a required field + SpliceEventId *int64 `locationName:"spliceEventId" type:"long" required:"true"` +} + +// String returns the string representation +func (s Scte35SpliceInsertScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35SpliceInsertScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35SpliceInsertScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35SpliceInsertScheduleActionSettings"} + if s.SpliceEventId == nil { + invalidParams.Add(request.NewErrParamRequired("SpliceEventId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDuration sets the Duration field's value. +func (s *Scte35SpliceInsertScheduleActionSettings) SetDuration(v int64) *Scte35SpliceInsertScheduleActionSettings { + s.Duration = &v + return s +} + +// SetSpliceEventId sets the SpliceEventId field's value. +func (s *Scte35SpliceInsertScheduleActionSettings) SetSpliceEventId(v int64) *Scte35SpliceInsertScheduleActionSettings { + s.SpliceEventId = &v + return s +} + +type Scte35TimeSignalApos struct { + _ struct{} `type:"structure"` + + // When specified, this offset (in milliseconds) is added to the input Ad Avail + // PTS time. This only applies to embedded SCTE 104/35 messages and does not + // apply to OOB messages. + AdAvailOffset *int64 `locationName:"adAvailOffset" type:"integer"` + + // When set to ignore, Segment Descriptors with noRegionalBlackoutFlag set to + // 0 will no longer trigger blackouts or Ad Avail slates + NoRegionalBlackoutFlag *string `locationName:"noRegionalBlackoutFlag" type:"string" enum:"Scte35AposNoRegionalBlackoutBehavior"` + + // When set to ignore, Segment Descriptors with webDeliveryAllowedFlag set to + // 0 will no longer trigger blackouts or Ad Avail slates + WebDeliveryAllowedFlag *string `locationName:"webDeliveryAllowedFlag" type:"string" enum:"Scte35AposWebDeliveryAllowedBehavior"` +} + +// String returns the string representation +func (s Scte35TimeSignalApos) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35TimeSignalApos) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35TimeSignalApos) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35TimeSignalApos"} + if s.AdAvailOffset != nil && *s.AdAvailOffset < -1000 { + invalidParams.Add(request.NewErrParamMinValue("AdAvailOffset", -1000)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdAvailOffset sets the AdAvailOffset field's value. +func (s *Scte35TimeSignalApos) SetAdAvailOffset(v int64) *Scte35TimeSignalApos { + s.AdAvailOffset = &v + return s +} + +// SetNoRegionalBlackoutFlag sets the NoRegionalBlackoutFlag field's value. +func (s *Scte35TimeSignalApos) SetNoRegionalBlackoutFlag(v string) *Scte35TimeSignalApos { + s.NoRegionalBlackoutFlag = &v + return s +} + +// SetWebDeliveryAllowedFlag sets the WebDeliveryAllowedFlag field's value. +func (s *Scte35TimeSignalApos) SetWebDeliveryAllowedFlag(v string) *Scte35TimeSignalApos { + s.WebDeliveryAllowedFlag = &v + return s +} + +// Settings for a SCTE-35 time_signal. +type Scte35TimeSignalScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // The list of SCTE-35 descriptors accompanying the SCTE-35 time_signal. + // + // Scte35Descriptors is a required field + Scte35Descriptors []*Scte35Descriptor `locationName:"scte35Descriptors" type:"list" required:"true"` +} + +// String returns the string representation +func (s Scte35TimeSignalScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scte35TimeSignalScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Scte35TimeSignalScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Scte35TimeSignalScheduleActionSettings"} + if s.Scte35Descriptors == nil { + invalidParams.Add(request.NewErrParamRequired("Scte35Descriptors")) + } + if s.Scte35Descriptors != nil { + for i, v := range s.Scte35Descriptors { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Scte35Descriptors", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScte35Descriptors sets the Scte35Descriptors field's value. +func (s *Scte35TimeSignalScheduleActionSettings) SetScte35Descriptors(v []*Scte35Descriptor) *Scte35TimeSignalScheduleActionSettings { + s.Scte35Descriptors = v + return s +} + +type SmpteTtDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s SmpteTtDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SmpteTtDestinationSettings) GoString() string { + return s.String() +} + +type StandardHlsSettings struct { + _ struct{} `type:"structure"` + + // List all the audio groups that are used with the video output stream. Input + // all the audio GROUP-IDs that are associated to the video, separate by ','. + AudioRenditionSets *string `locationName:"audioRenditionSets" type:"string"` + + // Settings information for the .m3u8 container + // + // M3u8Settings is a required field + M3u8Settings *M3u8Settings `locationName:"m3u8Settings" type:"structure" required:"true"` +} + +// String returns the string representation +func (s StandardHlsSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StandardHlsSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StandardHlsSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StandardHlsSettings"} + if s.M3u8Settings == nil { + invalidParams.Add(request.NewErrParamRequired("M3u8Settings")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAudioRenditionSets sets the AudioRenditionSets field's value. +func (s *StandardHlsSettings) SetAudioRenditionSets(v string) *StandardHlsSettings { + s.AudioRenditionSets = &v + return s +} + +// SetM3u8Settings sets the M3u8Settings field's value. +func (s *StandardHlsSettings) SetM3u8Settings(v *M3u8Settings) *StandardHlsSettings { + s.M3u8Settings = v + return s +} + +type StartChannelInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartChannelInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *StartChannelInput) SetChannelId(v string) *StartChannelInput { + s.ChannelId = &v + return s +} + +type StartChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level the user wants for their channel. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + Name *string `locationName:"name" type:"string"` + + PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + State *string `locationName:"state" type:"string" enum:"ChannelState"` +} + +// String returns the string representation +func (s StartChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *StartChannelOutput) SetArn(v string) *StartChannelOutput { + s.Arn = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *StartChannelOutput) SetDestinations(v []*OutputDestination) *StartChannelOutput { + s.Destinations = v + return s +} + +// SetEgressEndpoints sets the EgressEndpoints field's value. +func (s *StartChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *StartChannelOutput { + s.EgressEndpoints = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *StartChannelOutput) SetEncoderSettings(v *EncoderSettings) *StartChannelOutput { + s.EncoderSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *StartChannelOutput) SetId(v string) *StartChannelOutput { + s.Id = &v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *StartChannelOutput) SetInputAttachments(v []*InputAttachment) *StartChannelOutput { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *StartChannelOutput) SetInputSpecification(v *InputSpecification) *StartChannelOutput { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *StartChannelOutput) SetLogLevel(v string) *StartChannelOutput { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *StartChannelOutput) SetName(v string) *StartChannelOutput { + s.Name = &v + return s +} + +// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. +func (s *StartChannelOutput) SetPipelinesRunningCount(v int64) *StartChannelOutput { + s.PipelinesRunningCount = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *StartChannelOutput) SetRoleArn(v string) *StartChannelOutput { + s.RoleArn = &v + return s +} + +// SetState sets the State field's value. +func (s *StartChannelOutput) SetState(v string) *StartChannelOutput { + s.State = &v + return s +} + +// Settings for the action to activate a static image. +type StaticImageActivateScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // The duration in milliseconds for the image to remain on the video. If omitted + // or set to 0 the duration is unlimited and the image will remain until it + // is explicitly deactivated. + Duration *int64 `locationName:"duration" type:"integer"` + + // The time in milliseconds for the image to fade in. The fade-in starts at + // the start time of the overlay. Default is 0 (no fade-in). + FadeIn *int64 `locationName:"fadeIn" type:"integer"` + + // Applies only if a duration is specified. The time in milliseconds for the + // image to fade out. The fade-out starts when the duration time is hit, so + // it effectively extends the duration. Default is 0 (no fade-out). + FadeOut *int64 `locationName:"fadeOut" type:"integer"` + + // The height of the image when inserted into the video, in pixels. The overlay + // will be scaled up or down to the specified height. Leave blank to use the + // native height of the overlay. + Height *int64 `locationName:"height" min:"1" type:"integer"` + + // The location and filename of the image file to overlay on the video. The + // file must be a 32-bit BMP, PNG, or TGA file, and must not be larger (in pixels) + // than the input video. + // + // Image is a required field + Image *InputLocation `locationName:"image" type:"structure" required:"true"` + + // Placement of the left edge of the overlay relative to the left edge of the + // video frame, in pixels. 0 (the default) is the left edge of the frame. If + // the placement causes the overlay to extend beyond the right edge of the underlying + // video, then the overlay is cropped on the right. + ImageX *int64 `locationName:"imageX" type:"integer"` + + // Placement of the top edge of the overlay relative to the top edge of the + // video frame, in pixels. 0 (the default) is the top edge of the frame. If + // the placement causes the overlay to extend beyond the bottom edge of the + // underlying video, then the overlay is cropped on the bottom. + ImageY *int64 `locationName:"imageY" type:"integer"` + + // The number of the layer, 0 to 7. There are 8 layers that can be overlaid + // on the video, each layer with a different image. The layers are in Z order, + // which means that overlays with higher values of layer are inserted on top + // of overlays with lower values of layer. Default is 0. + Layer *int64 `locationName:"layer" type:"integer"` + + // Opacity of image where 0 is transparent and 100 is fully opaque. Default + // is 100. + Opacity *int64 `locationName:"opacity" type:"integer"` + + // The width of the image when inserted into the video, in pixels. The overlay + // will be scaled up or down to the specified width. Leave blank to use the + // native width of the overlay. + Width *int64 `locationName:"width" min:"1" type:"integer"` +} + +// String returns the string representation +func (s StaticImageActivateScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StaticImageActivateScheduleActionSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StaticImageActivateScheduleActionSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StaticImageActivateScheduleActionSettings"} + if s.Height != nil && *s.Height < 1 { + invalidParams.Add(request.NewErrParamMinValue("Height", 1)) + } + if s.Image == nil { + invalidParams.Add(request.NewErrParamRequired("Image")) + } + if s.Width != nil && *s.Width < 1 { + invalidParams.Add(request.NewErrParamMinValue("Width", 1)) + } + if s.Image != nil { + if err := s.Image.Validate(); err != nil { + invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDuration sets the Duration field's value. +func (s *StaticImageActivateScheduleActionSettings) SetDuration(v int64) *StaticImageActivateScheduleActionSettings { + s.Duration = &v + return s +} + +// SetFadeIn sets the FadeIn field's value. +func (s *StaticImageActivateScheduleActionSettings) SetFadeIn(v int64) *StaticImageActivateScheduleActionSettings { + s.FadeIn = &v + return s +} + +// SetFadeOut sets the FadeOut field's value. +func (s *StaticImageActivateScheduleActionSettings) SetFadeOut(v int64) *StaticImageActivateScheduleActionSettings { + s.FadeOut = &v + return s +} + +// SetHeight sets the Height field's value. +func (s *StaticImageActivateScheduleActionSettings) SetHeight(v int64) *StaticImageActivateScheduleActionSettings { + s.Height = &v + return s +} + +// SetImage sets the Image field's value. +func (s *StaticImageActivateScheduleActionSettings) SetImage(v *InputLocation) *StaticImageActivateScheduleActionSettings { + s.Image = v + return s +} + +// SetImageX sets the ImageX field's value. +func (s *StaticImageActivateScheduleActionSettings) SetImageX(v int64) *StaticImageActivateScheduleActionSettings { + s.ImageX = &v + return s +} + +// SetImageY sets the ImageY field's value. +func (s *StaticImageActivateScheduleActionSettings) SetImageY(v int64) *StaticImageActivateScheduleActionSettings { + s.ImageY = &v + return s +} + +// SetLayer sets the Layer field's value. +func (s *StaticImageActivateScheduleActionSettings) SetLayer(v int64) *StaticImageActivateScheduleActionSettings { + s.Layer = &v + return s +} + +// SetOpacity sets the Opacity field's value. +func (s *StaticImageActivateScheduleActionSettings) SetOpacity(v int64) *StaticImageActivateScheduleActionSettings { + s.Opacity = &v + return s +} + +// SetWidth sets the Width field's value. +func (s *StaticImageActivateScheduleActionSettings) SetWidth(v int64) *StaticImageActivateScheduleActionSettings { + s.Width = &v + return s +} + +// Settings for the action to deactivate the image in a specific layer. +type StaticImageDeactivateScheduleActionSettings struct { + _ struct{} `type:"structure"` + + // The time in milliseconds for the image to fade out. Default is 0 (no fade-out). + FadeOut *int64 `locationName:"fadeOut" type:"integer"` + + // The image overlay layer to deactivate, 0 to 7. Default is 0. + Layer *int64 `locationName:"layer" type:"integer"` +} + +// String returns the string representation +func (s StaticImageDeactivateScheduleActionSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StaticImageDeactivateScheduleActionSettings) GoString() string { + return s.String() +} + +// SetFadeOut sets the FadeOut field's value. +func (s *StaticImageDeactivateScheduleActionSettings) SetFadeOut(v int64) *StaticImageDeactivateScheduleActionSettings { + s.FadeOut = &v + return s +} + +// SetLayer sets the Layer field's value. +func (s *StaticImageDeactivateScheduleActionSettings) SetLayer(v int64) *StaticImageDeactivateScheduleActionSettings { + s.Layer = &v + return s +} + +type StaticKeySettings struct { + _ struct{} `type:"structure"` + + // The URL of the license server used for protecting content. + KeyProviderServer *InputLocation `locationName:"keyProviderServer" type:"structure"` + + // Static key value as a 32 character hexadecimal string. + // + // StaticKeyValue is a required field + StaticKeyValue *string `locationName:"staticKeyValue" min:"32" type:"string" required:"true"` +} + +// String returns the string representation +func (s StaticKeySettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StaticKeySettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StaticKeySettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StaticKeySettings"} + if s.StaticKeyValue == nil { + invalidParams.Add(request.NewErrParamRequired("StaticKeyValue")) + } + if s.StaticKeyValue != nil && len(*s.StaticKeyValue) < 32 { + invalidParams.Add(request.NewErrParamMinLen("StaticKeyValue", 32)) + } + if s.KeyProviderServer != nil { + if err := s.KeyProviderServer.Validate(); err != nil { + invalidParams.AddNested("KeyProviderServer", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyProviderServer sets the KeyProviderServer field's value. +func (s *StaticKeySettings) SetKeyProviderServer(v *InputLocation) *StaticKeySettings { + s.KeyProviderServer = v + return s +} + +// SetStaticKeyValue sets the StaticKeyValue field's value. +func (s *StaticKeySettings) SetStaticKeyValue(v string) *StaticKeySettings { + s.StaticKeyValue = &v + return s +} + +type StopChannelInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopChannelInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *StopChannelInput) SetChannelId(v string) *StopChannelInput { + s.ChannelId = &v + return s +} + +type StopChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + EgressEndpoints []*ChannelEgressEndpoint `locationName:"egressEndpoints" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level the user wants for their channel. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + Name *string `locationName:"name" type:"string"` + + PipelinesRunningCount *int64 `locationName:"pipelinesRunningCount" type:"integer"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + State *string `locationName:"state" type:"string" enum:"ChannelState"` +} + +// String returns the string representation +func (s StopChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *StopChannelOutput) SetArn(v string) *StopChannelOutput { + s.Arn = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *StopChannelOutput) SetDestinations(v []*OutputDestination) *StopChannelOutput { + s.Destinations = v + return s +} + +// SetEgressEndpoints sets the EgressEndpoints field's value. +func (s *StopChannelOutput) SetEgressEndpoints(v []*ChannelEgressEndpoint) *StopChannelOutput { + s.EgressEndpoints = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *StopChannelOutput) SetEncoderSettings(v *EncoderSettings) *StopChannelOutput { + s.EncoderSettings = v + return s +} + +// SetId sets the Id field's value. +func (s *StopChannelOutput) SetId(v string) *StopChannelOutput { + s.Id = &v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *StopChannelOutput) SetInputAttachments(v []*InputAttachment) *StopChannelOutput { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *StopChannelOutput) SetInputSpecification(v *InputSpecification) *StopChannelOutput { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *StopChannelOutput) SetLogLevel(v string) *StopChannelOutput { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *StopChannelOutput) SetName(v string) *StopChannelOutput { + s.Name = &v + return s +} + +// SetPipelinesRunningCount sets the PipelinesRunningCount field's value. +func (s *StopChannelOutput) SetPipelinesRunningCount(v int64) *StopChannelOutput { + s.PipelinesRunningCount = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *StopChannelOutput) SetRoleArn(v string) *StopChannelOutput { + s.RoleArn = &v + return s +} + +// SetState sets the State field's value. +func (s *StopChannelOutput) SetState(v string) *StopChannelOutput { + s.State = &v + return s +} + +type TeletextDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TeletextDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TeletextDestinationSettings) GoString() string { + return s.String() +} + +type TeletextSourceSettings struct { + _ struct{} `type:"structure"` + + // Specifies the teletext page number within the data stream from which to extract + // captions. Range of 0x100 (256) to 0x8FF (2303). Unused for passthrough. Should + // be specified as a hexadecimal string with no "0x" prefix. + PageNumber *string `locationName:"pageNumber" type:"string"` +} + +// String returns the string representation +func (s TeletextSourceSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TeletextSourceSettings) GoString() string { + return s.String() +} + +// SetPageNumber sets the PageNumber field's value. +func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings { + s.PageNumber = &v + return s +} + +type TimecodeConfig struct { + _ struct{} `type:"structure"` + + // Identifies the source for the timecode that will be associated with the events + // outputs.-Embedded (embedded): Initialize the output timecode with timecode + // from the the source. If no embedded timecode is detected in the source, the + // system falls back to using "Start at 0" (zerobased).-System Clock (systemclock): + // Use the UTC time.-Start at 0 (zerobased): The time of the first frame of + // the event will be 00:00:00:00. + // + // Source is a required field + Source *string `locationName:"source" type:"string" required:"true" enum:"TimecodeConfigSource"` + + // Threshold in frames beyond which output timecode is resynchronized to the + // input timecode. Discrepancies below this threshold are permitted to avoid + // unnecessary discontinuities in the output timecode. No timecode sync when + // this is not specified. + SyncThreshold *int64 `locationName:"syncThreshold" min:"1" type:"integer"` +} + +// String returns the string representation +func (s TimecodeConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimecodeConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TimecodeConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TimecodeConfig"} + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + if s.SyncThreshold != nil && *s.SyncThreshold < 1 { + invalidParams.Add(request.NewErrParamMinValue("SyncThreshold", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSource sets the Source field's value. +func (s *TimecodeConfig) SetSource(v string) *TimecodeConfig { + s.Source = &v + return s +} + +// SetSyncThreshold sets the SyncThreshold field's value. +func (s *TimecodeConfig) SetSyncThreshold(v int64) *TimecodeConfig { + s.SyncThreshold = &v + return s +} + +type TtmlDestinationSettings struct { + _ struct{} `type:"structure"` + + // When set to passthrough, passes through style and position information from + // a TTML-like input source (TTML, SMPTE-TT, CFF-TT) to the CFF-TT output or + // TTML output. + StyleControl *string `locationName:"styleControl" type:"string" enum:"TtmlDestinationStyleControl"` +} + +// String returns the string representation +func (s TtmlDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TtmlDestinationSettings) GoString() string { + return s.String() +} + +// SetStyleControl sets the StyleControl field's value. +func (s *TtmlDestinationSettings) SetStyleControl(v string) *TtmlDestinationSettings { + s.StyleControl = &v + return s +} + +type UdpContainerSettings struct { + _ struct{} `type:"structure"` + + M2tsSettings *M2tsSettings `locationName:"m2tsSettings" type:"structure"` +} + +// String returns the string representation +func (s UdpContainerSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UdpContainerSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UdpContainerSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UdpContainerSettings"} + if s.M2tsSettings != nil { + if err := s.M2tsSettings.Validate(); err != nil { + invalidParams.AddNested("M2tsSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetM2tsSettings sets the M2tsSettings field's value. +func (s *UdpContainerSettings) SetM2tsSettings(v *M2tsSettings) *UdpContainerSettings { + s.M2tsSettings = v + return s +} + +type UdpGroupSettings struct { + _ struct{} `type:"structure"` + + // Specifies behavior of last resort when input video is lost, and no more backup + // inputs are available. When dropTs is selected the entire transport stream + // will stop being emitted. When dropProgram is selected the program can be + // dropped from the transport stream (and replaced with null packets to meet + // the TS bitrate requirement). Or, when emitProgram is chosen the transport + // stream will continue to be produced normally with repeat frames, black frames, + // or slate frames substituted for the absent input video. + InputLossAction *string `locationName:"inputLossAction" type:"string" enum:"InputLossActionForUdpOut"` + + // Indicates ID3 frame that has the timecode. + TimedMetadataId3Frame *string `locationName:"timedMetadataId3Frame" type:"string" enum:"UdpTimedMetadataId3Frame"` + + // Timed Metadata interval in seconds. + TimedMetadataId3Period *int64 `locationName:"timedMetadataId3Period" type:"integer"` +} + +// String returns the string representation +func (s UdpGroupSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UdpGroupSettings) GoString() string { + return s.String() +} + +// SetInputLossAction sets the InputLossAction field's value. +func (s *UdpGroupSettings) SetInputLossAction(v string) *UdpGroupSettings { + s.InputLossAction = &v + return s +} + +// SetTimedMetadataId3Frame sets the TimedMetadataId3Frame field's value. +func (s *UdpGroupSettings) SetTimedMetadataId3Frame(v string) *UdpGroupSettings { + s.TimedMetadataId3Frame = &v + return s +} + +// SetTimedMetadataId3Period sets the TimedMetadataId3Period field's value. +func (s *UdpGroupSettings) SetTimedMetadataId3Period(v int64) *UdpGroupSettings { + s.TimedMetadataId3Period = &v + return s +} + +type UdpOutputSettings struct { + _ struct{} `type:"structure"` + + // UDP output buffering in milliseconds. Larger values increase latency through + // the transcoder but simultaneously assist the transcoder in maintaining a + // constant, low-jitter UDP/RTP output while accommodating clock recovery, input + // switching, input disruptions, picture reordering, etc. + BufferMsec *int64 `locationName:"bufferMsec" type:"integer"` + + // ContainerSettings is a required field + ContainerSettings *UdpContainerSettings `locationName:"containerSettings" type:"structure" required:"true"` + + // Destination address and port number for RTP or UDP packets. Can be unicast + // or multicast RTP or UDP (eg. rtp://239.10.10.10:5001 or udp://10.100.100.100:5002). + // + // Destination is a required field + Destination *OutputLocationRef `locationName:"destination" type:"structure" required:"true"` + + // Settings for enabling and adjusting Forward Error Correction on UDP outputs. + FecOutputSettings *FecOutputSettings `locationName:"fecOutputSettings" type:"structure"` +} + +// String returns the string representation +func (s UdpOutputSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UdpOutputSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UdpOutputSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UdpOutputSettings"} + if s.ContainerSettings == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerSettings")) + } + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.ContainerSettings != nil { + if err := s.ContainerSettings.Validate(); err != nil { + invalidParams.AddNested("ContainerSettings", err.(request.ErrInvalidParams)) + } + } + if s.FecOutputSettings != nil { + if err := s.FecOutputSettings.Validate(); err != nil { + invalidParams.AddNested("FecOutputSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBufferMsec sets the BufferMsec field's value. +func (s *UdpOutputSettings) SetBufferMsec(v int64) *UdpOutputSettings { + s.BufferMsec = &v + return s +} + +// SetContainerSettings sets the ContainerSettings field's value. +func (s *UdpOutputSettings) SetContainerSettings(v *UdpContainerSettings) *UdpOutputSettings { + s.ContainerSettings = v + return s +} + +// SetDestination sets the Destination field's value. +func (s *UdpOutputSettings) SetDestination(v *OutputLocationRef) *UdpOutputSettings { + s.Destination = v + return s +} + +// SetFecOutputSettings sets the FecOutputSettings field's value. +func (s *UdpOutputSettings) SetFecOutputSettings(v *FecOutputSettings) *UdpOutputSettings { + s.FecOutputSettings = v + return s +} + +type UpdateChannelInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `location:"uri" locationName:"channelId" type:"string" required:"true"` + + Destinations []*OutputDestination `locationName:"destinations" type:"list"` + + EncoderSettings *EncoderSettings `locationName:"encoderSettings" type:"structure"` + + InputAttachments []*InputAttachment `locationName:"inputAttachments" type:"list"` + + InputSpecification *InputSpecification `locationName:"inputSpecification" type:"structure"` + + // The log level the user wants for their channel. + LogLevel *string `locationName:"logLevel" type:"string" enum:"LogLevel"` + + Name *string `locationName:"name" type:"string"` + + RoleArn *string `locationName:"roleArn" type:"string"` +} + +// String returns the string representation +func (s UpdateChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.ChannelId != nil && len(*s.ChannelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelId", 1)) + } + if s.EncoderSettings != nil { + if err := s.EncoderSettings.Validate(); err != nil { + invalidParams.AddNested("EncoderSettings", err.(request.ErrInvalidParams)) + } + } + if s.InputAttachments != nil { + for i, v := range s.InputAttachments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputAttachments", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *UpdateChannelInput) SetChannelId(v string) *UpdateChannelInput { + s.ChannelId = &v + return s +} + +// SetDestinations sets the Destinations field's value. +func (s *UpdateChannelInput) SetDestinations(v []*OutputDestination) *UpdateChannelInput { + s.Destinations = v + return s +} + +// SetEncoderSettings sets the EncoderSettings field's value. +func (s *UpdateChannelInput) SetEncoderSettings(v *EncoderSettings) *UpdateChannelInput { + s.EncoderSettings = v + return s +} + +// SetInputAttachments sets the InputAttachments field's value. +func (s *UpdateChannelInput) SetInputAttachments(v []*InputAttachment) *UpdateChannelInput { + s.InputAttachments = v + return s +} + +// SetInputSpecification sets the InputSpecification field's value. +func (s *UpdateChannelInput) SetInputSpecification(v *InputSpecification) *UpdateChannelInput { + s.InputSpecification = v + return s +} + +// SetLogLevel sets the LogLevel field's value. +func (s *UpdateChannelInput) SetLogLevel(v string) *UpdateChannelInput { + s.LogLevel = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateChannelInput) SetName(v string) *UpdateChannelInput { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *UpdateChannelInput) SetRoleArn(v string) *UpdateChannelInput { + s.RoleArn = &v + return s +} + +type UpdateChannelOutput struct { + _ struct{} `type:"structure"` + + Channel *Channel `locationName:"channel" type:"structure"` +} + +// String returns the string representation +func (s UpdateChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChannelOutput) GoString() string { + return s.String() +} + +// SetChannel sets the Channel field's value. +func (s *UpdateChannelOutput) SetChannel(v *Channel) *UpdateChannelOutput { + s.Channel = v + return s +} + +type UpdateInputInput struct { + _ struct{} `type:"structure"` + + Destinations []*InputDestinationRequest `locationName:"destinations" type:"list"` + + // InputId is a required field + InputId *string `location:"uri" locationName:"inputId" type:"string" required:"true"` + + InputSecurityGroups []*string `locationName:"inputSecurityGroups" type:"list"` + + MediaConnectFlows []*MediaConnectFlowRequest `locationName:"mediaConnectFlows" type:"list"` + + Name *string `locationName:"name" type:"string"` + + RoleArn *string `locationName:"roleArn" type:"string"` + + Sources []*InputSourceRequest `locationName:"sources" type:"list"` +} + +// String returns the string representation +func (s UpdateInputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInputInput"} + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + if s.InputId != nil && len(*s.InputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinations sets the Destinations field's value. +func (s *UpdateInputInput) SetDestinations(v []*InputDestinationRequest) *UpdateInputInput { + s.Destinations = v + return s +} + +// SetInputId sets the InputId field's value. +func (s *UpdateInputInput) SetInputId(v string) *UpdateInputInput { + s.InputId = &v + return s +} + +// SetInputSecurityGroups sets the InputSecurityGroups field's value. +func (s *UpdateInputInput) SetInputSecurityGroups(v []*string) *UpdateInputInput { + s.InputSecurityGroups = v + return s +} + +// SetMediaConnectFlows sets the MediaConnectFlows field's value. +func (s *UpdateInputInput) SetMediaConnectFlows(v []*MediaConnectFlowRequest) *UpdateInputInput { + s.MediaConnectFlows = v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateInputInput) SetName(v string) *UpdateInputInput { + s.Name = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *UpdateInputInput) SetRoleArn(v string) *UpdateInputInput { + s.RoleArn = &v + return s +} + +// SetSources sets the Sources field's value. +func (s *UpdateInputInput) SetSources(v []*InputSourceRequest) *UpdateInputInput { + s.Sources = v + return s +} + +type UpdateInputOutput struct { + _ struct{} `type:"structure"` + + Input *Input `locationName:"input" type:"structure"` +} + +// String returns the string representation +func (s UpdateInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputOutput) GoString() string { + return s.String() +} + +// SetInput sets the Input field's value. +func (s *UpdateInputOutput) SetInput(v *Input) *UpdateInputOutput { + s.Input = v + return s +} + +type UpdateInputSecurityGroupInput struct { + _ struct{} `type:"structure"` + + // InputSecurityGroupId is a required field + InputSecurityGroupId *string `location:"uri" locationName:"inputSecurityGroupId" type:"string" required:"true"` + + WhitelistRules []*InputWhitelistRuleCidr `locationName:"whitelistRules" type:"list"` +} + +// String returns the string representation +func (s UpdateInputSecurityGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputSecurityGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateInputSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateInputSecurityGroupInput"} + if s.InputSecurityGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("InputSecurityGroupId")) + } + if s.InputSecurityGroupId != nil && len(*s.InputSecurityGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputSecurityGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputSecurityGroupId sets the InputSecurityGroupId field's value. +func (s *UpdateInputSecurityGroupInput) SetInputSecurityGroupId(v string) *UpdateInputSecurityGroupInput { + s.InputSecurityGroupId = &v + return s +} + +// SetWhitelistRules sets the WhitelistRules field's value. +func (s *UpdateInputSecurityGroupInput) SetWhitelistRules(v []*InputWhitelistRuleCidr) *UpdateInputSecurityGroupInput { + s.WhitelistRules = v + return s +} + +type UpdateInputSecurityGroupOutput struct { + _ struct{} `type:"structure"` + + // An Input Security Group + SecurityGroup *InputSecurityGroup `locationName:"securityGroup" type:"structure"` +} + +// String returns the string representation +func (s UpdateInputSecurityGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateInputSecurityGroupOutput) GoString() string { + return s.String() +} + +// SetSecurityGroup sets the SecurityGroup field's value. +func (s *UpdateInputSecurityGroupOutput) SetSecurityGroup(v *InputSecurityGroup) *UpdateInputSecurityGroupOutput { + s.SecurityGroup = v + return s +} + +type ValidationError struct { + _ struct{} `type:"structure"` + + ElementPath *string `locationName:"elementPath" type:"string"` + + ErrorMessage *string `locationName:"errorMessage" type:"string"` +} + +// String returns the string representation +func (s ValidationError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ValidationError) GoString() string { + return s.String() +} + +// SetElementPath sets the ElementPath field's value. +func (s *ValidationError) SetElementPath(v string) *ValidationError { + s.ElementPath = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ValidationError) SetErrorMessage(v string) *ValidationError { + s.ErrorMessage = &v + return s +} + +type VideoCodecSettings struct { + _ struct{} `type:"structure"` + + // Frame Capture Settings + FrameCaptureSettings *FrameCaptureSettings `locationName:"frameCaptureSettings" type:"structure"` + + H264Settings *H264Settings `locationName:"h264Settings" type:"structure"` +} + +// String returns the string representation +func (s VideoCodecSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoCodecSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VideoCodecSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VideoCodecSettings"} + if s.FrameCaptureSettings != nil { + if err := s.FrameCaptureSettings.Validate(); err != nil { + invalidParams.AddNested("FrameCaptureSettings", err.(request.ErrInvalidParams)) + } + } + if s.H264Settings != nil { + if err := s.H264Settings.Validate(); err != nil { + invalidParams.AddNested("H264Settings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFrameCaptureSettings sets the FrameCaptureSettings field's value. +func (s *VideoCodecSettings) SetFrameCaptureSettings(v *FrameCaptureSettings) *VideoCodecSettings { + s.FrameCaptureSettings = v + return s +} + +// SetH264Settings sets the H264Settings field's value. +func (s *VideoCodecSettings) SetH264Settings(v *H264Settings) *VideoCodecSettings { + s.H264Settings = v + return s +} + +// Video settings for this stream. +type VideoDescription struct { + _ struct{} `type:"structure"` + + // Video codec settings. + CodecSettings *VideoCodecSettings `locationName:"codecSettings" type:"structure"` + + // Output video height, in pixels. Must be an even number. For most codecs, + // you can leave this field and width blank in order to use the height and width + // (resolution) from the source. Note, however, that leaving blank is not recommended. + // For the Frame Capture codec, height and width are required. + Height *int64 `locationName:"height" type:"integer"` + + // The name of this VideoDescription. Outputs will use this name to uniquely + // identify this Description. Description names should be unique within this + // Live Event. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Indicates how to respond to the AFD values in the input stream. RESPOND causes + // input video to be clipped, depending on the AFD value, input display aspect + // ratio, and output display aspect ratio, and (except for FRAMECAPTURE codec) + // includes the values in the output. PASSTHROUGH (does not apply to FRAMECAPTURE + // codec) ignores the AFD values and includes the values in the output, so input + // video is not clipped. NONE ignores the AFD values and does not include the + // values through to the output, so input video is not clipped. + RespondToAfd *string `locationName:"respondToAfd" type:"string" enum:"VideoDescriptionRespondToAfd"` + + // STRETCHTOOUTPUT configures the output position to stretch the video to the + // specified output resolution (height and width). This option will override + // any position value. DEFAULT may insert black boxes (pillar boxes or letter + // boxes) around the video to provide the specified output resolution. + ScalingBehavior *string `locationName:"scalingBehavior" type:"string" enum:"VideoDescriptionScalingBehavior"` + + // Changes the strength of the anti-alias filter used for scaling. 0 is the + // softest setting, 100 is the sharpest. A setting of 50 is recommended for + // most content. + Sharpness *int64 `locationName:"sharpness" type:"integer"` + + // Output video width, in pixels. Must be an even number. For most codecs, you + // can leave this field and height blank in order to use the height and width + // (resolution) from the source. Note, however, that leaving blank is not recommended. + // For the Frame Capture codec, height and width are required. + Width *int64 `locationName:"width" type:"integer"` +} + +// String returns the string representation +func (s VideoDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoDescription) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VideoDescription) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VideoDescription"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.CodecSettings != nil { + if err := s.CodecSettings.Validate(); err != nil { + invalidParams.AddNested("CodecSettings", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodecSettings sets the CodecSettings field's value. +func (s *VideoDescription) SetCodecSettings(v *VideoCodecSettings) *VideoDescription { + s.CodecSettings = v + return s +} + +// SetHeight sets the Height field's value. +func (s *VideoDescription) SetHeight(v int64) *VideoDescription { + s.Height = &v + return s +} + +// SetName sets the Name field's value. +func (s *VideoDescription) SetName(v string) *VideoDescription { + s.Name = &v + return s +} + +// SetRespondToAfd sets the RespondToAfd field's value. +func (s *VideoDescription) SetRespondToAfd(v string) *VideoDescription { + s.RespondToAfd = &v + return s +} + +// SetScalingBehavior sets the ScalingBehavior field's value. +func (s *VideoDescription) SetScalingBehavior(v string) *VideoDescription { + s.ScalingBehavior = &v + return s +} + +// SetSharpness sets the Sharpness field's value. +func (s *VideoDescription) SetSharpness(v int64) *VideoDescription { + s.Sharpness = &v + return s +} + +// SetWidth sets the Width field's value. +func (s *VideoDescription) SetWidth(v int64) *VideoDescription { + s.Width = &v + return s +} + +// Specifies a particular video stream within an input source. An input may +// have only a single video selector. +type VideoSelector struct { + _ struct{} `type:"structure"` + + // Specifies the colorspace of an input. This setting works in tandem with colorSpaceConversion + // to determine if any conversion will be performed. + ColorSpace *string `locationName:"colorSpace" type:"string" enum:"VideoSelectorColorSpace"` + + // Applies only if colorSpace is a value other than follow. This field controls + // how the value in the colorSpace field will be used. fallback means that when + // the input does include color space data, that data will be used, but when + // the input has no color space data, the value in colorSpace will be used. + // Choose fallback if your input is sometimes missing color space data, but + // when it does have color space data, that data is correct. force means to + // always use the value in colorSpace. Choose force if your input usually has + // no color space data or might have unreliable color space data. + ColorSpaceUsage *string `locationName:"colorSpaceUsage" type:"string" enum:"VideoSelectorColorSpaceUsage"` + + // The video selector settings. + SelectorSettings *VideoSelectorSettings `locationName:"selectorSettings" type:"structure"` +} + +// String returns the string representation +func (s VideoSelector) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoSelector) GoString() string { + return s.String() +} + +// SetColorSpace sets the ColorSpace field's value. +func (s *VideoSelector) SetColorSpace(v string) *VideoSelector { + s.ColorSpace = &v + return s +} + +// SetColorSpaceUsage sets the ColorSpaceUsage field's value. +func (s *VideoSelector) SetColorSpaceUsage(v string) *VideoSelector { + s.ColorSpaceUsage = &v + return s +} + +// SetSelectorSettings sets the SelectorSettings field's value. +func (s *VideoSelector) SetSelectorSettings(v *VideoSelectorSettings) *VideoSelector { + s.SelectorSettings = v + return s +} + +type VideoSelectorPid struct { + _ struct{} `type:"structure"` + + // Selects a specific PID from within a video source. + Pid *int64 `locationName:"pid" type:"integer"` +} + +// String returns the string representation +func (s VideoSelectorPid) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoSelectorPid) GoString() string { + return s.String() +} + +// SetPid sets the Pid field's value. +func (s *VideoSelectorPid) SetPid(v int64) *VideoSelectorPid { + s.Pid = &v + return s +} + +type VideoSelectorProgramId struct { + _ struct{} `type:"structure"` + + // Selects a specific program from within a multi-program transport stream. + // If the program doesn't exist, the first program within the transport stream + // will be selected by default. + ProgramId *int64 `locationName:"programId" type:"integer"` +} + +// String returns the string representation +func (s VideoSelectorProgramId) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoSelectorProgramId) GoString() string { + return s.String() +} + +// SetProgramId sets the ProgramId field's value. +func (s *VideoSelectorProgramId) SetProgramId(v int64) *VideoSelectorProgramId { + s.ProgramId = &v + return s +} + +type VideoSelectorSettings struct { + _ struct{} `type:"structure"` + + VideoSelectorPid *VideoSelectorPid `locationName:"videoSelectorPid" type:"structure"` + + VideoSelectorProgramId *VideoSelectorProgramId `locationName:"videoSelectorProgramId" type:"structure"` +} + +// String returns the string representation +func (s VideoSelectorSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VideoSelectorSettings) GoString() string { + return s.String() +} + +// SetVideoSelectorPid sets the VideoSelectorPid field's value. +func (s *VideoSelectorSettings) SetVideoSelectorPid(v *VideoSelectorPid) *VideoSelectorSettings { + s.VideoSelectorPid = v + return s +} + +// SetVideoSelectorProgramId sets the VideoSelectorProgramId field's value. +func (s *VideoSelectorSettings) SetVideoSelectorProgramId(v *VideoSelectorProgramId) *VideoSelectorSettings { + s.VideoSelectorProgramId = v + return s +} + +type WebvttDestinationSettings struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s WebvttDestinationSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebvttDestinationSettings) GoString() string { + return s.String() +} + +const ( + // AacCodingModeAdReceiverMix is a AacCodingMode enum value + AacCodingModeAdReceiverMix = "AD_RECEIVER_MIX" + + // AacCodingModeCodingMode10 is a AacCodingMode enum value + AacCodingModeCodingMode10 = "CODING_MODE_1_0" + + // AacCodingModeCodingMode11 is a AacCodingMode enum value + AacCodingModeCodingMode11 = "CODING_MODE_1_1" + + // AacCodingModeCodingMode20 is a AacCodingMode enum value + AacCodingModeCodingMode20 = "CODING_MODE_2_0" + + // AacCodingModeCodingMode51 is a AacCodingMode enum value + AacCodingModeCodingMode51 = "CODING_MODE_5_1" +) + +const ( + // AacInputTypeBroadcasterMixedAd is a AacInputType enum value + AacInputTypeBroadcasterMixedAd = "BROADCASTER_MIXED_AD" + + // AacInputTypeNormal is a AacInputType enum value + AacInputTypeNormal = "NORMAL" +) + +const ( + // AacProfileHev1 is a AacProfile enum value + AacProfileHev1 = "HEV1" + + // AacProfileHev2 is a AacProfile enum value + AacProfileHev2 = "HEV2" + + // AacProfileLc is a AacProfile enum value + AacProfileLc = "LC" +) + +const ( + // AacRateControlModeCbr is a AacRateControlMode enum value + AacRateControlModeCbr = "CBR" + + // AacRateControlModeVbr is a AacRateControlMode enum value + AacRateControlModeVbr = "VBR" +) + +const ( + // AacRawFormatLatmLoas is a AacRawFormat enum value + AacRawFormatLatmLoas = "LATM_LOAS" + + // AacRawFormatNone is a AacRawFormat enum value + AacRawFormatNone = "NONE" +) + +const ( + // AacSpecMpeg2 is a AacSpec enum value + AacSpecMpeg2 = "MPEG2" + + // AacSpecMpeg4 is a AacSpec enum value + AacSpecMpeg4 = "MPEG4" +) + +const ( + // AacVbrQualityHigh is a AacVbrQuality enum value + AacVbrQualityHigh = "HIGH" + + // AacVbrQualityLow is a AacVbrQuality enum value + AacVbrQualityLow = "LOW" + + // AacVbrQualityMediumHigh is a AacVbrQuality enum value + AacVbrQualityMediumHigh = "MEDIUM_HIGH" + + // AacVbrQualityMediumLow is a AacVbrQuality enum value + AacVbrQualityMediumLow = "MEDIUM_LOW" +) + +const ( + // Ac3BitstreamModeCommentary is a Ac3BitstreamMode enum value + Ac3BitstreamModeCommentary = "COMMENTARY" + + // Ac3BitstreamModeCompleteMain is a Ac3BitstreamMode enum value + Ac3BitstreamModeCompleteMain = "COMPLETE_MAIN" + + // Ac3BitstreamModeDialogue is a Ac3BitstreamMode enum value + Ac3BitstreamModeDialogue = "DIALOGUE" + + // Ac3BitstreamModeEmergency is a Ac3BitstreamMode enum value + Ac3BitstreamModeEmergency = "EMERGENCY" + + // Ac3BitstreamModeHearingImpaired is a Ac3BitstreamMode enum value + Ac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" + + // Ac3BitstreamModeMusicAndEffects is a Ac3BitstreamMode enum value + Ac3BitstreamModeMusicAndEffects = "MUSIC_AND_EFFECTS" + + // Ac3BitstreamModeVisuallyImpaired is a Ac3BitstreamMode enum value + Ac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" + + // Ac3BitstreamModeVoiceOver is a Ac3BitstreamMode enum value + Ac3BitstreamModeVoiceOver = "VOICE_OVER" +) + +const ( + // Ac3CodingModeCodingMode10 is a Ac3CodingMode enum value + Ac3CodingModeCodingMode10 = "CODING_MODE_1_0" + + // Ac3CodingModeCodingMode11 is a Ac3CodingMode enum value + Ac3CodingModeCodingMode11 = "CODING_MODE_1_1" + + // Ac3CodingModeCodingMode20 is a Ac3CodingMode enum value + Ac3CodingModeCodingMode20 = "CODING_MODE_2_0" + + // Ac3CodingModeCodingMode32Lfe is a Ac3CodingMode enum value + Ac3CodingModeCodingMode32Lfe = "CODING_MODE_3_2_LFE" +) + +const ( + // Ac3DrcProfileFilmStandard is a Ac3DrcProfile enum value + Ac3DrcProfileFilmStandard = "FILM_STANDARD" + + // Ac3DrcProfileNone is a Ac3DrcProfile enum value + Ac3DrcProfileNone = "NONE" +) + +const ( + // Ac3LfeFilterDisabled is a Ac3LfeFilter enum value + Ac3LfeFilterDisabled = "DISABLED" + + // Ac3LfeFilterEnabled is a Ac3LfeFilter enum value + Ac3LfeFilterEnabled = "ENABLED" +) + +const ( + // Ac3MetadataControlFollowInput is a Ac3MetadataControl enum value + Ac3MetadataControlFollowInput = "FOLLOW_INPUT" + + // Ac3MetadataControlUseConfigured is a Ac3MetadataControl enum value + Ac3MetadataControlUseConfigured = "USE_CONFIGURED" +) + +const ( + // AfdSignalingAuto is a AfdSignaling enum value + AfdSignalingAuto = "AUTO" + + // AfdSignalingFixed is a AfdSignaling enum value + AfdSignalingFixed = "FIXED" + + // AfdSignalingNone is a AfdSignaling enum value + AfdSignalingNone = "NONE" +) + +const ( + // AudioDescriptionAudioTypeControlFollowInput is a AudioDescriptionAudioTypeControl enum value + AudioDescriptionAudioTypeControlFollowInput = "FOLLOW_INPUT" + + // AudioDescriptionAudioTypeControlUseConfigured is a AudioDescriptionAudioTypeControl enum value + AudioDescriptionAudioTypeControlUseConfigured = "USE_CONFIGURED" +) + +const ( + // AudioDescriptionLanguageCodeControlFollowInput is a AudioDescriptionLanguageCodeControl enum value + AudioDescriptionLanguageCodeControlFollowInput = "FOLLOW_INPUT" + + // AudioDescriptionLanguageCodeControlUseConfigured is a AudioDescriptionLanguageCodeControl enum value + AudioDescriptionLanguageCodeControlUseConfigured = "USE_CONFIGURED" +) + +const ( + // AudioLanguageSelectionPolicyLoose is a AudioLanguageSelectionPolicy enum value + AudioLanguageSelectionPolicyLoose = "LOOSE" + + // AudioLanguageSelectionPolicyStrict is a AudioLanguageSelectionPolicy enum value + AudioLanguageSelectionPolicyStrict = "STRICT" +) + +const ( + // AudioNormalizationAlgorithmItu17701 is a AudioNormalizationAlgorithm enum value + AudioNormalizationAlgorithmItu17701 = "ITU_1770_1" + + // AudioNormalizationAlgorithmItu17702 is a AudioNormalizationAlgorithm enum value + AudioNormalizationAlgorithmItu17702 = "ITU_1770_2" +) + +const ( + // AudioNormalizationAlgorithmControlCorrectAudio is a AudioNormalizationAlgorithmControl enum value + AudioNormalizationAlgorithmControlCorrectAudio = "CORRECT_AUDIO" +) + +const ( + // AudioOnlyHlsTrackTypeAlternateAudioAutoSelect is a AudioOnlyHlsTrackType enum value + AudioOnlyHlsTrackTypeAlternateAudioAutoSelect = "ALTERNATE_AUDIO_AUTO_SELECT" + + // AudioOnlyHlsTrackTypeAlternateAudioAutoSelectDefault is a AudioOnlyHlsTrackType enum value + AudioOnlyHlsTrackTypeAlternateAudioAutoSelectDefault = "ALTERNATE_AUDIO_AUTO_SELECT_DEFAULT" + + // AudioOnlyHlsTrackTypeAlternateAudioNotAutoSelect is a AudioOnlyHlsTrackType enum value + AudioOnlyHlsTrackTypeAlternateAudioNotAutoSelect = "ALTERNATE_AUDIO_NOT_AUTO_SELECT" + + // AudioOnlyHlsTrackTypeAudioOnlyVariantStream is a AudioOnlyHlsTrackType enum value + AudioOnlyHlsTrackTypeAudioOnlyVariantStream = "AUDIO_ONLY_VARIANT_STREAM" +) + +const ( + // AudioTypeCleanEffects is a AudioType enum value + AudioTypeCleanEffects = "CLEAN_EFFECTS" + + // AudioTypeHearingImpaired is a AudioType enum value + AudioTypeHearingImpaired = "HEARING_IMPAIRED" + + // AudioTypeUndefined is a AudioType enum value + AudioTypeUndefined = "UNDEFINED" + + // AudioTypeVisualImpairedCommentary is a AudioType enum value + AudioTypeVisualImpairedCommentary = "VISUAL_IMPAIRED_COMMENTARY" +) + +const ( + // AuthenticationSchemeAkamai is a AuthenticationScheme enum value + AuthenticationSchemeAkamai = "AKAMAI" + + // AuthenticationSchemeCommon is a AuthenticationScheme enum value + AuthenticationSchemeCommon = "COMMON" +) + +const ( + // AvailBlankingStateDisabled is a AvailBlankingState enum value + AvailBlankingStateDisabled = "DISABLED" + + // AvailBlankingStateEnabled is a AvailBlankingState enum value + AvailBlankingStateEnabled = "ENABLED" +) + +const ( + // BlackoutSlateNetworkEndBlackoutDisabled is a BlackoutSlateNetworkEndBlackout enum value + BlackoutSlateNetworkEndBlackoutDisabled = "DISABLED" + + // BlackoutSlateNetworkEndBlackoutEnabled is a BlackoutSlateNetworkEndBlackout enum value + BlackoutSlateNetworkEndBlackoutEnabled = "ENABLED" +) + +const ( + // BlackoutSlateStateDisabled is a BlackoutSlateState enum value + BlackoutSlateStateDisabled = "DISABLED" + + // BlackoutSlateStateEnabled is a BlackoutSlateState enum value + BlackoutSlateStateEnabled = "ENABLED" +) + +const ( + // BurnInAlignmentCentered is a BurnInAlignment enum value + BurnInAlignmentCentered = "CENTERED" + + // BurnInAlignmentLeft is a BurnInAlignment enum value + BurnInAlignmentLeft = "LEFT" + + // BurnInAlignmentSmart is a BurnInAlignment enum value + BurnInAlignmentSmart = "SMART" +) + +const ( + // BurnInBackgroundColorBlack is a BurnInBackgroundColor enum value + BurnInBackgroundColorBlack = "BLACK" + + // BurnInBackgroundColorNone is a BurnInBackgroundColor enum value + BurnInBackgroundColorNone = "NONE" + + // BurnInBackgroundColorWhite is a BurnInBackgroundColor enum value + BurnInBackgroundColorWhite = "WHITE" +) + +const ( + // BurnInFontColorBlack is a BurnInFontColor enum value + BurnInFontColorBlack = "BLACK" + + // BurnInFontColorBlue is a BurnInFontColor enum value + BurnInFontColorBlue = "BLUE" + + // BurnInFontColorGreen is a BurnInFontColor enum value + BurnInFontColorGreen = "GREEN" + + // BurnInFontColorRed is a BurnInFontColor enum value + BurnInFontColorRed = "RED" + + // BurnInFontColorWhite is a BurnInFontColor enum value + BurnInFontColorWhite = "WHITE" + + // BurnInFontColorYellow is a BurnInFontColor enum value + BurnInFontColorYellow = "YELLOW" +) + +const ( + // BurnInOutlineColorBlack is a BurnInOutlineColor enum value + BurnInOutlineColorBlack = "BLACK" + + // BurnInOutlineColorBlue is a BurnInOutlineColor enum value + BurnInOutlineColorBlue = "BLUE" + + // BurnInOutlineColorGreen is a BurnInOutlineColor enum value + BurnInOutlineColorGreen = "GREEN" + + // BurnInOutlineColorRed is a BurnInOutlineColor enum value + BurnInOutlineColorRed = "RED" + + // BurnInOutlineColorWhite is a BurnInOutlineColor enum value + BurnInOutlineColorWhite = "WHITE" + + // BurnInOutlineColorYellow is a BurnInOutlineColor enum value + BurnInOutlineColorYellow = "YELLOW" +) + +const ( + // BurnInShadowColorBlack is a BurnInShadowColor enum value + BurnInShadowColorBlack = "BLACK" + + // BurnInShadowColorNone is a BurnInShadowColor enum value + BurnInShadowColorNone = "NONE" + + // BurnInShadowColorWhite is a BurnInShadowColor enum value + BurnInShadowColorWhite = "WHITE" +) + +const ( + // BurnInTeletextGridControlFixed is a BurnInTeletextGridControl enum value + BurnInTeletextGridControlFixed = "FIXED" + + // BurnInTeletextGridControlScaled is a BurnInTeletextGridControl enum value + BurnInTeletextGridControlScaled = "SCALED" +) + +const ( + // ChannelStateCreating is a ChannelState enum value + ChannelStateCreating = "CREATING" + + // ChannelStateCreateFailed is a ChannelState enum value + ChannelStateCreateFailed = "CREATE_FAILED" + + // ChannelStateIdle is a ChannelState enum value + ChannelStateIdle = "IDLE" + + // ChannelStateStarting is a ChannelState enum value + ChannelStateStarting = "STARTING" + + // ChannelStateRunning is a ChannelState enum value + ChannelStateRunning = "RUNNING" + + // ChannelStateRecovering is a ChannelState enum value + ChannelStateRecovering = "RECOVERING" + + // ChannelStateStopping is a ChannelState enum value + ChannelStateStopping = "STOPPING" + + // ChannelStateDeleting is a ChannelState enum value + ChannelStateDeleting = "DELETING" + + // ChannelStateDeleted is a ChannelState enum value + ChannelStateDeleted = "DELETED" +) + +const ( + // DvbSdtOutputSdtSdtFollow is a DvbSdtOutputSdt enum value + DvbSdtOutputSdtSdtFollow = "SDT_FOLLOW" + + // DvbSdtOutputSdtSdtFollowIfPresent is a DvbSdtOutputSdt enum value + DvbSdtOutputSdtSdtFollowIfPresent = "SDT_FOLLOW_IF_PRESENT" + + // DvbSdtOutputSdtSdtManual is a DvbSdtOutputSdt enum value + DvbSdtOutputSdtSdtManual = "SDT_MANUAL" + + // DvbSdtOutputSdtSdtNone is a DvbSdtOutputSdt enum value + DvbSdtOutputSdtSdtNone = "SDT_NONE" +) + +const ( + // DvbSubDestinationAlignmentCentered is a DvbSubDestinationAlignment enum value + DvbSubDestinationAlignmentCentered = "CENTERED" + + // DvbSubDestinationAlignmentLeft is a DvbSubDestinationAlignment enum value + DvbSubDestinationAlignmentLeft = "LEFT" + + // DvbSubDestinationAlignmentSmart is a DvbSubDestinationAlignment enum value + DvbSubDestinationAlignmentSmart = "SMART" +) + +const ( + // DvbSubDestinationBackgroundColorBlack is a DvbSubDestinationBackgroundColor enum value + DvbSubDestinationBackgroundColorBlack = "BLACK" + + // DvbSubDestinationBackgroundColorNone is a DvbSubDestinationBackgroundColor enum value + DvbSubDestinationBackgroundColorNone = "NONE" + + // DvbSubDestinationBackgroundColorWhite is a DvbSubDestinationBackgroundColor enum value + DvbSubDestinationBackgroundColorWhite = "WHITE" +) + +const ( + // DvbSubDestinationFontColorBlack is a DvbSubDestinationFontColor enum value + DvbSubDestinationFontColorBlack = "BLACK" + + // DvbSubDestinationFontColorBlue is a DvbSubDestinationFontColor enum value + DvbSubDestinationFontColorBlue = "BLUE" + + // DvbSubDestinationFontColorGreen is a DvbSubDestinationFontColor enum value + DvbSubDestinationFontColorGreen = "GREEN" + + // DvbSubDestinationFontColorRed is a DvbSubDestinationFontColor enum value + DvbSubDestinationFontColorRed = "RED" + + // DvbSubDestinationFontColorWhite is a DvbSubDestinationFontColor enum value + DvbSubDestinationFontColorWhite = "WHITE" + + // DvbSubDestinationFontColorYellow is a DvbSubDestinationFontColor enum value + DvbSubDestinationFontColorYellow = "YELLOW" +) + +const ( + // DvbSubDestinationOutlineColorBlack is a DvbSubDestinationOutlineColor enum value + DvbSubDestinationOutlineColorBlack = "BLACK" + + // DvbSubDestinationOutlineColorBlue is a DvbSubDestinationOutlineColor enum value + DvbSubDestinationOutlineColorBlue = "BLUE" + + // DvbSubDestinationOutlineColorGreen is a DvbSubDestinationOutlineColor enum value + DvbSubDestinationOutlineColorGreen = "GREEN" + + // DvbSubDestinationOutlineColorRed is a DvbSubDestinationOutlineColor enum value + DvbSubDestinationOutlineColorRed = "RED" + + // DvbSubDestinationOutlineColorWhite is a DvbSubDestinationOutlineColor enum value + DvbSubDestinationOutlineColorWhite = "WHITE" + + // DvbSubDestinationOutlineColorYellow is a DvbSubDestinationOutlineColor enum value + DvbSubDestinationOutlineColorYellow = "YELLOW" +) + +const ( + // DvbSubDestinationShadowColorBlack is a DvbSubDestinationShadowColor enum value + DvbSubDestinationShadowColorBlack = "BLACK" + + // DvbSubDestinationShadowColorNone is a DvbSubDestinationShadowColor enum value + DvbSubDestinationShadowColorNone = "NONE" + + // DvbSubDestinationShadowColorWhite is a DvbSubDestinationShadowColor enum value + DvbSubDestinationShadowColorWhite = "WHITE" +) + +const ( + // DvbSubDestinationTeletextGridControlFixed is a DvbSubDestinationTeletextGridControl enum value + DvbSubDestinationTeletextGridControlFixed = "FIXED" + + // DvbSubDestinationTeletextGridControlScaled is a DvbSubDestinationTeletextGridControl enum value + DvbSubDestinationTeletextGridControlScaled = "SCALED" +) + +const ( + // Eac3AttenuationControlAttenuate3Db is a Eac3AttenuationControl enum value + Eac3AttenuationControlAttenuate3Db = "ATTENUATE_3_DB" + + // Eac3AttenuationControlNone is a Eac3AttenuationControl enum value + Eac3AttenuationControlNone = "NONE" +) + +const ( + // Eac3BitstreamModeCommentary is a Eac3BitstreamMode enum value + Eac3BitstreamModeCommentary = "COMMENTARY" + + // Eac3BitstreamModeCompleteMain is a Eac3BitstreamMode enum value + Eac3BitstreamModeCompleteMain = "COMPLETE_MAIN" + + // Eac3BitstreamModeEmergency is a Eac3BitstreamMode enum value + Eac3BitstreamModeEmergency = "EMERGENCY" + + // Eac3BitstreamModeHearingImpaired is a Eac3BitstreamMode enum value + Eac3BitstreamModeHearingImpaired = "HEARING_IMPAIRED" + + // Eac3BitstreamModeVisuallyImpaired is a Eac3BitstreamMode enum value + Eac3BitstreamModeVisuallyImpaired = "VISUALLY_IMPAIRED" +) + +const ( + // Eac3CodingModeCodingMode10 is a Eac3CodingMode enum value + Eac3CodingModeCodingMode10 = "CODING_MODE_1_0" + + // Eac3CodingModeCodingMode20 is a Eac3CodingMode enum value + Eac3CodingModeCodingMode20 = "CODING_MODE_2_0" + + // Eac3CodingModeCodingMode32 is a Eac3CodingMode enum value + Eac3CodingModeCodingMode32 = "CODING_MODE_3_2" +) + +const ( + // Eac3DcFilterDisabled is a Eac3DcFilter enum value + Eac3DcFilterDisabled = "DISABLED" + + // Eac3DcFilterEnabled is a Eac3DcFilter enum value + Eac3DcFilterEnabled = "ENABLED" +) + +const ( + // Eac3DrcLineFilmLight is a Eac3DrcLine enum value + Eac3DrcLineFilmLight = "FILM_LIGHT" + + // Eac3DrcLineFilmStandard is a Eac3DrcLine enum value + Eac3DrcLineFilmStandard = "FILM_STANDARD" + + // Eac3DrcLineMusicLight is a Eac3DrcLine enum value + Eac3DrcLineMusicLight = "MUSIC_LIGHT" + + // Eac3DrcLineMusicStandard is a Eac3DrcLine enum value + Eac3DrcLineMusicStandard = "MUSIC_STANDARD" + + // Eac3DrcLineNone is a Eac3DrcLine enum value + Eac3DrcLineNone = "NONE" + + // Eac3DrcLineSpeech is a Eac3DrcLine enum value + Eac3DrcLineSpeech = "SPEECH" +) + +const ( + // Eac3DrcRfFilmLight is a Eac3DrcRf enum value + Eac3DrcRfFilmLight = "FILM_LIGHT" + + // Eac3DrcRfFilmStandard is a Eac3DrcRf enum value + Eac3DrcRfFilmStandard = "FILM_STANDARD" + + // Eac3DrcRfMusicLight is a Eac3DrcRf enum value + Eac3DrcRfMusicLight = "MUSIC_LIGHT" + + // Eac3DrcRfMusicStandard is a Eac3DrcRf enum value + Eac3DrcRfMusicStandard = "MUSIC_STANDARD" + + // Eac3DrcRfNone is a Eac3DrcRf enum value + Eac3DrcRfNone = "NONE" + + // Eac3DrcRfSpeech is a Eac3DrcRf enum value + Eac3DrcRfSpeech = "SPEECH" +) + +const ( + // Eac3LfeControlLfe is a Eac3LfeControl enum value + Eac3LfeControlLfe = "LFE" + + // Eac3LfeControlNoLfe is a Eac3LfeControl enum value + Eac3LfeControlNoLfe = "NO_LFE" +) + +const ( + // Eac3LfeFilterDisabled is a Eac3LfeFilter enum value + Eac3LfeFilterDisabled = "DISABLED" + + // Eac3LfeFilterEnabled is a Eac3LfeFilter enum value + Eac3LfeFilterEnabled = "ENABLED" +) + +const ( + // Eac3MetadataControlFollowInput is a Eac3MetadataControl enum value + Eac3MetadataControlFollowInput = "FOLLOW_INPUT" + + // Eac3MetadataControlUseConfigured is a Eac3MetadataControl enum value + Eac3MetadataControlUseConfigured = "USE_CONFIGURED" +) + +const ( + // Eac3PassthroughControlNoPassthrough is a Eac3PassthroughControl enum value + Eac3PassthroughControlNoPassthrough = "NO_PASSTHROUGH" + + // Eac3PassthroughControlWhenPossible is a Eac3PassthroughControl enum value + Eac3PassthroughControlWhenPossible = "WHEN_POSSIBLE" +) + +const ( + // Eac3PhaseControlNoShift is a Eac3PhaseControl enum value + Eac3PhaseControlNoShift = "NO_SHIFT" + + // Eac3PhaseControlShift90Degrees is a Eac3PhaseControl enum value + Eac3PhaseControlShift90Degrees = "SHIFT_90_DEGREES" +) + +const ( + // Eac3StereoDownmixDpl2 is a Eac3StereoDownmix enum value + Eac3StereoDownmixDpl2 = "DPL2" + + // Eac3StereoDownmixLoRo is a Eac3StereoDownmix enum value + Eac3StereoDownmixLoRo = "LO_RO" + + // Eac3StereoDownmixLtRt is a Eac3StereoDownmix enum value + Eac3StereoDownmixLtRt = "LT_RT" + + // Eac3StereoDownmixNotIndicated is a Eac3StereoDownmix enum value + Eac3StereoDownmixNotIndicated = "NOT_INDICATED" +) + +const ( + // Eac3SurroundExModeDisabled is a Eac3SurroundExMode enum value + Eac3SurroundExModeDisabled = "DISABLED" + + // Eac3SurroundExModeEnabled is a Eac3SurroundExMode enum value + Eac3SurroundExModeEnabled = "ENABLED" + + // Eac3SurroundExModeNotIndicated is a Eac3SurroundExMode enum value + Eac3SurroundExModeNotIndicated = "NOT_INDICATED" +) + +const ( + // Eac3SurroundModeDisabled is a Eac3SurroundMode enum value + Eac3SurroundModeDisabled = "DISABLED" + + // Eac3SurroundModeEnabled is a Eac3SurroundMode enum value + Eac3SurroundModeEnabled = "ENABLED" + + // Eac3SurroundModeNotIndicated is a Eac3SurroundMode enum value + Eac3SurroundModeNotIndicated = "NOT_INDICATED" +) + +const ( + // EmbeddedConvert608To708Disabled is a EmbeddedConvert608To708 enum value + EmbeddedConvert608To708Disabled = "DISABLED" + + // EmbeddedConvert608To708Upconvert is a EmbeddedConvert608To708 enum value + EmbeddedConvert608To708Upconvert = "UPCONVERT" +) + +const ( + // EmbeddedScte20DetectionAuto is a EmbeddedScte20Detection enum value + EmbeddedScte20DetectionAuto = "AUTO" + + // EmbeddedScte20DetectionOff is a EmbeddedScte20Detection enum value + EmbeddedScte20DetectionOff = "OFF" +) + +const ( + // FecOutputIncludeFecColumn is a FecOutputIncludeFec enum value + FecOutputIncludeFecColumn = "COLUMN" + + // FecOutputIncludeFecColumnAndRow is a FecOutputIncludeFec enum value + FecOutputIncludeFecColumnAndRow = "COLUMN_AND_ROW" +) + +const ( + // FixedAfdAfd0000 is a FixedAfd enum value + FixedAfdAfd0000 = "AFD_0000" + + // FixedAfdAfd0010 is a FixedAfd enum value + FixedAfdAfd0010 = "AFD_0010" + + // FixedAfdAfd0011 is a FixedAfd enum value + FixedAfdAfd0011 = "AFD_0011" + + // FixedAfdAfd0100 is a FixedAfd enum value + FixedAfdAfd0100 = "AFD_0100" + + // FixedAfdAfd1000 is a FixedAfd enum value + FixedAfdAfd1000 = "AFD_1000" + + // FixedAfdAfd1001 is a FixedAfd enum value + FixedAfdAfd1001 = "AFD_1001" + + // FixedAfdAfd1010 is a FixedAfd enum value + FixedAfdAfd1010 = "AFD_1010" + + // FixedAfdAfd1011 is a FixedAfd enum value + FixedAfdAfd1011 = "AFD_1011" + + // FixedAfdAfd1101 is a FixedAfd enum value + FixedAfdAfd1101 = "AFD_1101" + + // FixedAfdAfd1110 is a FixedAfd enum value + FixedAfdAfd1110 = "AFD_1110" + + // FixedAfdAfd1111 is a FixedAfd enum value + FixedAfdAfd1111 = "AFD_1111" +) + +// Follow reference point. +const ( + // FollowPointEnd is a FollowPoint enum value + FollowPointEnd = "END" + + // FollowPointStart is a FollowPoint enum value + FollowPointStart = "START" +) + +const ( + // GlobalConfigurationInputEndActionNone is a GlobalConfigurationInputEndAction enum value + GlobalConfigurationInputEndActionNone = "NONE" + + // GlobalConfigurationInputEndActionSwitchAndLoopInputs is a GlobalConfigurationInputEndAction enum value + GlobalConfigurationInputEndActionSwitchAndLoopInputs = "SWITCH_AND_LOOP_INPUTS" +) + +const ( + // GlobalConfigurationLowFramerateInputsDisabled is a GlobalConfigurationLowFramerateInputs enum value + GlobalConfigurationLowFramerateInputsDisabled = "DISABLED" + + // GlobalConfigurationLowFramerateInputsEnabled is a GlobalConfigurationLowFramerateInputs enum value + GlobalConfigurationLowFramerateInputsEnabled = "ENABLED" +) + +const ( + // GlobalConfigurationOutputTimingSourceInputClock is a GlobalConfigurationOutputTimingSource enum value + GlobalConfigurationOutputTimingSourceInputClock = "INPUT_CLOCK" + + // GlobalConfigurationOutputTimingSourceSystemClock is a GlobalConfigurationOutputTimingSource enum value + GlobalConfigurationOutputTimingSourceSystemClock = "SYSTEM_CLOCK" +) + +const ( + // H264AdaptiveQuantizationHigh is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationHigh = "HIGH" + + // H264AdaptiveQuantizationHigher is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationHigher = "HIGHER" + + // H264AdaptiveQuantizationLow is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationLow = "LOW" + + // H264AdaptiveQuantizationMax is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationMax = "MAX" + + // H264AdaptiveQuantizationMedium is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationMedium = "MEDIUM" + + // H264AdaptiveQuantizationOff is a H264AdaptiveQuantization enum value + H264AdaptiveQuantizationOff = "OFF" +) + +const ( + // H264ColorMetadataIgnore is a H264ColorMetadata enum value + H264ColorMetadataIgnore = "IGNORE" + + // H264ColorMetadataInsert is a H264ColorMetadata enum value + H264ColorMetadataInsert = "INSERT" +) + +const ( + // H264EntropyEncodingCabac is a H264EntropyEncoding enum value + H264EntropyEncodingCabac = "CABAC" + + // H264EntropyEncodingCavlc is a H264EntropyEncoding enum value + H264EntropyEncodingCavlc = "CAVLC" +) + +const ( + // H264FlickerAqDisabled is a H264FlickerAq enum value + H264FlickerAqDisabled = "DISABLED" + + // H264FlickerAqEnabled is a H264FlickerAq enum value + H264FlickerAqEnabled = "ENABLED" +) + +const ( + // H264FramerateControlInitializeFromSource is a H264FramerateControl enum value + H264FramerateControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // H264FramerateControlSpecified is a H264FramerateControl enum value + H264FramerateControlSpecified = "SPECIFIED" +) + +const ( + // H264GopBReferenceDisabled is a H264GopBReference enum value + H264GopBReferenceDisabled = "DISABLED" + + // H264GopBReferenceEnabled is a H264GopBReference enum value + H264GopBReferenceEnabled = "ENABLED" +) + +const ( + // H264GopSizeUnitsFrames is a H264GopSizeUnits enum value + H264GopSizeUnitsFrames = "FRAMES" + + // H264GopSizeUnitsSeconds is a H264GopSizeUnits enum value + H264GopSizeUnitsSeconds = "SECONDS" +) + +const ( + // H264LevelH264Level1 is a H264Level enum value + H264LevelH264Level1 = "H264_LEVEL_1" + + // H264LevelH264Level11 is a H264Level enum value + H264LevelH264Level11 = "H264_LEVEL_1_1" + + // H264LevelH264Level12 is a H264Level enum value + H264LevelH264Level12 = "H264_LEVEL_1_2" + + // H264LevelH264Level13 is a H264Level enum value + H264LevelH264Level13 = "H264_LEVEL_1_3" + + // H264LevelH264Level2 is a H264Level enum value + H264LevelH264Level2 = "H264_LEVEL_2" + + // H264LevelH264Level21 is a H264Level enum value + H264LevelH264Level21 = "H264_LEVEL_2_1" + + // H264LevelH264Level22 is a H264Level enum value + H264LevelH264Level22 = "H264_LEVEL_2_2" + + // H264LevelH264Level3 is a H264Level enum value + H264LevelH264Level3 = "H264_LEVEL_3" + + // H264LevelH264Level31 is a H264Level enum value + H264LevelH264Level31 = "H264_LEVEL_3_1" + + // H264LevelH264Level32 is a H264Level enum value + H264LevelH264Level32 = "H264_LEVEL_3_2" + + // H264LevelH264Level4 is a H264Level enum value + H264LevelH264Level4 = "H264_LEVEL_4" + + // H264LevelH264Level41 is a H264Level enum value + H264LevelH264Level41 = "H264_LEVEL_4_1" + + // H264LevelH264Level42 is a H264Level enum value + H264LevelH264Level42 = "H264_LEVEL_4_2" + + // H264LevelH264Level5 is a H264Level enum value + H264LevelH264Level5 = "H264_LEVEL_5" + + // H264LevelH264Level51 is a H264Level enum value + H264LevelH264Level51 = "H264_LEVEL_5_1" + + // H264LevelH264Level52 is a H264Level enum value + H264LevelH264Level52 = "H264_LEVEL_5_2" + + // H264LevelH264LevelAuto is a H264Level enum value + H264LevelH264LevelAuto = "H264_LEVEL_AUTO" +) + +const ( + // H264LookAheadRateControlHigh is a H264LookAheadRateControl enum value + H264LookAheadRateControlHigh = "HIGH" + + // H264LookAheadRateControlLow is a H264LookAheadRateControl enum value + H264LookAheadRateControlLow = "LOW" + + // H264LookAheadRateControlMedium is a H264LookAheadRateControl enum value + H264LookAheadRateControlMedium = "MEDIUM" +) + +const ( + // H264ParControlInitializeFromSource is a H264ParControl enum value + H264ParControlInitializeFromSource = "INITIALIZE_FROM_SOURCE" + + // H264ParControlSpecified is a H264ParControl enum value + H264ParControlSpecified = "SPECIFIED" +) + +const ( + // H264ProfileBaseline is a H264Profile enum value + H264ProfileBaseline = "BASELINE" + + // H264ProfileHigh is a H264Profile enum value + H264ProfileHigh = "HIGH" + + // H264ProfileHigh10bit is a H264Profile enum value + H264ProfileHigh10bit = "HIGH_10BIT" + + // H264ProfileHigh422 is a H264Profile enum value + H264ProfileHigh422 = "HIGH_422" + + // H264ProfileHigh42210bit is a H264Profile enum value + H264ProfileHigh42210bit = "HIGH_422_10BIT" + + // H264ProfileMain is a H264Profile enum value + H264ProfileMain = "MAIN" +) + +const ( + // H264RateControlModeCbr is a H264RateControlMode enum value + H264RateControlModeCbr = "CBR" + + // H264RateControlModeQvbr is a H264RateControlMode enum value + H264RateControlModeQvbr = "QVBR" + + // H264RateControlModeVbr is a H264RateControlMode enum value + H264RateControlModeVbr = "VBR" +) + +const ( + // H264ScanTypeInterlaced is a H264ScanType enum value + H264ScanTypeInterlaced = "INTERLACED" + + // H264ScanTypeProgressive is a H264ScanType enum value + H264ScanTypeProgressive = "PROGRESSIVE" +) + +const ( + // H264SceneChangeDetectDisabled is a H264SceneChangeDetect enum value + H264SceneChangeDetectDisabled = "DISABLED" + + // H264SceneChangeDetectEnabled is a H264SceneChangeDetect enum value + H264SceneChangeDetectEnabled = "ENABLED" +) + +const ( + // H264SpatialAqDisabled is a H264SpatialAq enum value + H264SpatialAqDisabled = "DISABLED" + + // H264SpatialAqEnabled is a H264SpatialAq enum value + H264SpatialAqEnabled = "ENABLED" +) + +const ( + // H264SubGopLengthDynamic is a H264SubGopLength enum value + H264SubGopLengthDynamic = "DYNAMIC" + + // H264SubGopLengthFixed is a H264SubGopLength enum value + H264SubGopLengthFixed = "FIXED" +) + +const ( + // H264SyntaxDefault is a H264Syntax enum value + H264SyntaxDefault = "DEFAULT" + + // H264SyntaxRp2027 is a H264Syntax enum value + H264SyntaxRp2027 = "RP2027" +) + +const ( + // H264TemporalAqDisabled is a H264TemporalAq enum value + H264TemporalAqDisabled = "DISABLED" + + // H264TemporalAqEnabled is a H264TemporalAq enum value + H264TemporalAqEnabled = "ENABLED" +) + +const ( + // H264TimecodeInsertionBehaviorDisabled is a H264TimecodeInsertionBehavior enum value + H264TimecodeInsertionBehaviorDisabled = "DISABLED" + + // H264TimecodeInsertionBehaviorPicTimingSei is a H264TimecodeInsertionBehavior enum value + H264TimecodeInsertionBehaviorPicTimingSei = "PIC_TIMING_SEI" +) + +const ( + // HlsAdMarkersAdobe is a HlsAdMarkers enum value + HlsAdMarkersAdobe = "ADOBE" + + // HlsAdMarkersElemental is a HlsAdMarkers enum value + HlsAdMarkersElemental = "ELEMENTAL" + + // HlsAdMarkersElementalScte35 is a HlsAdMarkers enum value + HlsAdMarkersElementalScte35 = "ELEMENTAL_SCTE35" +) + +const ( + // HlsAkamaiHttpTransferModeChunked is a HlsAkamaiHttpTransferMode enum value + HlsAkamaiHttpTransferModeChunked = "CHUNKED" + + // HlsAkamaiHttpTransferModeNonChunked is a HlsAkamaiHttpTransferMode enum value + HlsAkamaiHttpTransferModeNonChunked = "NON_CHUNKED" +) + +const ( + // HlsCaptionLanguageSettingInsert is a HlsCaptionLanguageSetting enum value + HlsCaptionLanguageSettingInsert = "INSERT" + + // HlsCaptionLanguageSettingNone is a HlsCaptionLanguageSetting enum value + HlsCaptionLanguageSettingNone = "NONE" + + // HlsCaptionLanguageSettingOmit is a HlsCaptionLanguageSetting enum value + HlsCaptionLanguageSettingOmit = "OMIT" +) + +const ( + // HlsClientCacheDisabled is a HlsClientCache enum value + HlsClientCacheDisabled = "DISABLED" + + // HlsClientCacheEnabled is a HlsClientCache enum value + HlsClientCacheEnabled = "ENABLED" +) + +const ( + // HlsCodecSpecificationRfc4281 is a HlsCodecSpecification enum value + HlsCodecSpecificationRfc4281 = "RFC_4281" + + // HlsCodecSpecificationRfc6381 is a HlsCodecSpecification enum value + HlsCodecSpecificationRfc6381 = "RFC_6381" +) + +const ( + // HlsDirectoryStructureSingleDirectory is a HlsDirectoryStructure enum value + HlsDirectoryStructureSingleDirectory = "SINGLE_DIRECTORY" + + // HlsDirectoryStructureSubdirectoryPerStream is a HlsDirectoryStructure enum value + HlsDirectoryStructureSubdirectoryPerStream = "SUBDIRECTORY_PER_STREAM" +) + +const ( + // HlsEncryptionTypeAes128 is a HlsEncryptionType enum value + HlsEncryptionTypeAes128 = "AES128" + + // HlsEncryptionTypeSampleAes is a HlsEncryptionType enum value + HlsEncryptionTypeSampleAes = "SAMPLE_AES" +) + +const ( + // HlsIvInManifestExclude is a HlsIvInManifest enum value + HlsIvInManifestExclude = "EXCLUDE" + + // HlsIvInManifestInclude is a HlsIvInManifest enum value + HlsIvInManifestInclude = "INCLUDE" +) + +const ( + // HlsIvSourceExplicit is a HlsIvSource enum value + HlsIvSourceExplicit = "EXPLICIT" + + // HlsIvSourceFollowsSegmentNumber is a HlsIvSource enum value + HlsIvSourceFollowsSegmentNumber = "FOLLOWS_SEGMENT_NUMBER" +) + +const ( + // HlsManifestCompressionGzip is a HlsManifestCompression enum value + HlsManifestCompressionGzip = "GZIP" + + // HlsManifestCompressionNone is a HlsManifestCompression enum value + HlsManifestCompressionNone = "NONE" +) + +const ( + // HlsManifestDurationFormatFloatingPoint is a HlsManifestDurationFormat enum value + HlsManifestDurationFormatFloatingPoint = "FLOATING_POINT" + + // HlsManifestDurationFormatInteger is a HlsManifestDurationFormat enum value + HlsManifestDurationFormatInteger = "INTEGER" +) + +const ( + // HlsMediaStoreStorageClassTemporal is a HlsMediaStoreStorageClass enum value + HlsMediaStoreStorageClassTemporal = "TEMPORAL" +) + +const ( + // HlsModeLive is a HlsMode enum value + HlsModeLive = "LIVE" + + // HlsModeVod is a HlsMode enum value + HlsModeVod = "VOD" +) + +const ( + // HlsOutputSelectionManifestsAndSegments is a HlsOutputSelection enum value + HlsOutputSelectionManifestsAndSegments = "MANIFESTS_AND_SEGMENTS" + + // HlsOutputSelectionSegmentsOnly is a HlsOutputSelection enum value + HlsOutputSelectionSegmentsOnly = "SEGMENTS_ONLY" +) + +const ( + // HlsProgramDateTimeExclude is a HlsProgramDateTime enum value + HlsProgramDateTimeExclude = "EXCLUDE" + + // HlsProgramDateTimeInclude is a HlsProgramDateTime enum value + HlsProgramDateTimeInclude = "INCLUDE" +) + +const ( + // HlsRedundantManifestDisabled is a HlsRedundantManifest enum value + HlsRedundantManifestDisabled = "DISABLED" + + // HlsRedundantManifestEnabled is a HlsRedundantManifest enum value + HlsRedundantManifestEnabled = "ENABLED" +) + +const ( + // HlsSegmentationModeUseInputSegmentation is a HlsSegmentationMode enum value + HlsSegmentationModeUseInputSegmentation = "USE_INPUT_SEGMENTATION" + + // HlsSegmentationModeUseSegmentDuration is a HlsSegmentationMode enum value + HlsSegmentationModeUseSegmentDuration = "USE_SEGMENT_DURATION" +) + +const ( + // HlsStreamInfResolutionExclude is a HlsStreamInfResolution enum value + HlsStreamInfResolutionExclude = "EXCLUDE" + + // HlsStreamInfResolutionInclude is a HlsStreamInfResolution enum value + HlsStreamInfResolutionInclude = "INCLUDE" +) + +const ( + // HlsTimedMetadataId3FrameNone is a HlsTimedMetadataId3Frame enum value + HlsTimedMetadataId3FrameNone = "NONE" + + // HlsTimedMetadataId3FramePriv is a HlsTimedMetadataId3Frame enum value + HlsTimedMetadataId3FramePriv = "PRIV" + + // HlsTimedMetadataId3FrameTdrl is a HlsTimedMetadataId3Frame enum value + HlsTimedMetadataId3FrameTdrl = "TDRL" +) + +const ( + // HlsTsFileModeSegmentedFiles is a HlsTsFileMode enum value + HlsTsFileModeSegmentedFiles = "SEGMENTED_FILES" + + // HlsTsFileModeSingleFile is a HlsTsFileMode enum value + HlsTsFileModeSingleFile = "SINGLE_FILE" +) + +const ( + // HlsWebdavHttpTransferModeChunked is a HlsWebdavHttpTransferMode enum value + HlsWebdavHttpTransferModeChunked = "CHUNKED" + + // HlsWebdavHttpTransferModeNonChunked is a HlsWebdavHttpTransferMode enum value + HlsWebdavHttpTransferModeNonChunked = "NON_CHUNKED" +) + +// When set to "standard", an I-Frame only playlist will be written out for +// each video output in the output group. This I-Frame only playlist will contain +// byte range offsets pointing to the I-frame(s) in each segment. +const ( + // IFrameOnlyPlaylistTypeDisabled is a IFrameOnlyPlaylistType enum value + IFrameOnlyPlaylistTypeDisabled = "DISABLED" + + // IFrameOnlyPlaylistTypeStandard is a IFrameOnlyPlaylistType enum value + IFrameOnlyPlaylistTypeStandard = "STANDARD" +) + +// codec in increasing order of complexity +const ( + // InputCodecMpeg2 is a InputCodec enum value + InputCodecMpeg2 = "MPEG2" + + // InputCodecAvc is a InputCodec enum value + InputCodecAvc = "AVC" + + // InputCodecHevc is a InputCodec enum value + InputCodecHevc = "HEVC" +) + +const ( + // InputDeblockFilterDisabled is a InputDeblockFilter enum value + InputDeblockFilterDisabled = "DISABLED" + + // InputDeblockFilterEnabled is a InputDeblockFilter enum value + InputDeblockFilterEnabled = "ENABLED" +) + +const ( + // InputDenoiseFilterDisabled is a InputDenoiseFilter enum value + InputDenoiseFilterDisabled = "DISABLED" + + // InputDenoiseFilterEnabled is a InputDenoiseFilter enum value + InputDenoiseFilterEnabled = "ENABLED" +) + +const ( + // InputFilterAuto is a InputFilter enum value + InputFilterAuto = "AUTO" + + // InputFilterDisabled is a InputFilter enum value + InputFilterDisabled = "DISABLED" + + // InputFilterForced is a InputFilter enum value + InputFilterForced = "FORCED" +) + +const ( + // InputLossActionForHlsOutEmitOutput is a InputLossActionForHlsOut enum value + InputLossActionForHlsOutEmitOutput = "EMIT_OUTPUT" + + // InputLossActionForHlsOutPauseOutput is a InputLossActionForHlsOut enum value + InputLossActionForHlsOutPauseOutput = "PAUSE_OUTPUT" +) + +const ( + // InputLossActionForMsSmoothOutEmitOutput is a InputLossActionForMsSmoothOut enum value + InputLossActionForMsSmoothOutEmitOutput = "EMIT_OUTPUT" + + // InputLossActionForMsSmoothOutPauseOutput is a InputLossActionForMsSmoothOut enum value + InputLossActionForMsSmoothOutPauseOutput = "PAUSE_OUTPUT" +) + +const ( + // InputLossActionForRtmpOutEmitOutput is a InputLossActionForRtmpOut enum value + InputLossActionForRtmpOutEmitOutput = "EMIT_OUTPUT" + + // InputLossActionForRtmpOutPauseOutput is a InputLossActionForRtmpOut enum value + InputLossActionForRtmpOutPauseOutput = "PAUSE_OUTPUT" +) + +const ( + // InputLossActionForUdpOutDropProgram is a InputLossActionForUdpOut enum value + InputLossActionForUdpOutDropProgram = "DROP_PROGRAM" + + // InputLossActionForUdpOutDropTs is a InputLossActionForUdpOut enum value + InputLossActionForUdpOutDropTs = "DROP_TS" + + // InputLossActionForUdpOutEmitProgram is a InputLossActionForUdpOut enum value + InputLossActionForUdpOutEmitProgram = "EMIT_PROGRAM" +) + +const ( + // InputLossImageTypeColor is a InputLossImageType enum value + InputLossImageTypeColor = "COLOR" + + // InputLossImageTypeSlate is a InputLossImageType enum value + InputLossImageTypeSlate = "SLATE" +) + +// Maximum input bitrate in megabits per second. Bitrates up to 50 Mbps are +// supported currently. +const ( + // InputMaximumBitrateMax10Mbps is a InputMaximumBitrate enum value + InputMaximumBitrateMax10Mbps = "MAX_10_MBPS" + + // InputMaximumBitrateMax20Mbps is a InputMaximumBitrate enum value + InputMaximumBitrateMax20Mbps = "MAX_20_MBPS" + + // InputMaximumBitrateMax50Mbps is a InputMaximumBitrate enum value + InputMaximumBitrateMax50Mbps = "MAX_50_MBPS" +) + +// Input resolution based on lines of vertical resolution in the input; SD is +// less than 720 lines, HD is 720 to 1080 lines, UHD is greater than 1080 lines +const ( + // InputResolutionSd is a InputResolution enum value + InputResolutionSd = "SD" + + // InputResolutionHd is a InputResolution enum value + InputResolutionHd = "HD" + + // InputResolutionUhd is a InputResolution enum value + InputResolutionUhd = "UHD" +) + +const ( + // InputSecurityGroupStateIdle is a InputSecurityGroupState enum value + InputSecurityGroupStateIdle = "IDLE" + + // InputSecurityGroupStateInUse is a InputSecurityGroupState enum value + InputSecurityGroupStateInUse = "IN_USE" + + // InputSecurityGroupStateUpdating is a InputSecurityGroupState enum value + InputSecurityGroupStateUpdating = "UPDATING" + + // InputSecurityGroupStateDeleted is a InputSecurityGroupState enum value + InputSecurityGroupStateDeleted = "DELETED" +) + +const ( + // InputSourceEndBehaviorContinue is a InputSourceEndBehavior enum value + InputSourceEndBehaviorContinue = "CONTINUE" + + // InputSourceEndBehaviorLoop is a InputSourceEndBehavior enum value + InputSourceEndBehaviorLoop = "LOOP" +) + +const ( + // InputStateCreating is a InputState enum value + InputStateCreating = "CREATING" + + // InputStateDetached is a InputState enum value + InputStateDetached = "DETACHED" + + // InputStateAttached is a InputState enum value + InputStateAttached = "ATTACHED" + + // InputStateDeleting is a InputState enum value + InputStateDeleting = "DELETING" + + // InputStateDeleted is a InputState enum value + InputStateDeleted = "DELETED" +) + +const ( + // InputTypeUdpPush is a InputType enum value + InputTypeUdpPush = "UDP_PUSH" + + // InputTypeRtpPush is a InputType enum value + InputTypeRtpPush = "RTP_PUSH" + + // InputTypeRtmpPush is a InputType enum value + InputTypeRtmpPush = "RTMP_PUSH" + + // InputTypeRtmpPull is a InputType enum value + InputTypeRtmpPull = "RTMP_PULL" + + // InputTypeUrlPull is a InputType enum value + InputTypeUrlPull = "URL_PULL" + + // InputTypeMp4File is a InputType enum value + InputTypeMp4File = "MP4_FILE" + + // InputTypeMediaconnect is a InputType enum value + InputTypeMediaconnect = "MEDIACONNECT" +) + +// The log level the user wants for their channel. +const ( + // LogLevelError is a LogLevel enum value + LogLevelError = "ERROR" + + // LogLevelWarning is a LogLevel enum value + LogLevelWarning = "WARNING" + + // LogLevelInfo is a LogLevel enum value + LogLevelInfo = "INFO" + + // LogLevelDebug is a LogLevel enum value + LogLevelDebug = "DEBUG" + + // LogLevelDisabled is a LogLevel enum value + LogLevelDisabled = "DISABLED" +) + +const ( + // M2tsAbsentInputAudioBehaviorDrop is a M2tsAbsentInputAudioBehavior enum value + M2tsAbsentInputAudioBehaviorDrop = "DROP" + + // M2tsAbsentInputAudioBehaviorEncodeSilence is a M2tsAbsentInputAudioBehavior enum value + M2tsAbsentInputAudioBehaviorEncodeSilence = "ENCODE_SILENCE" +) + +const ( + // M2tsAribDisabled is a M2tsArib enum value + M2tsAribDisabled = "DISABLED" + + // M2tsAribEnabled is a M2tsArib enum value + M2tsAribEnabled = "ENABLED" +) + +const ( + // M2tsAribCaptionsPidControlAuto is a M2tsAribCaptionsPidControl enum value + M2tsAribCaptionsPidControlAuto = "AUTO" + + // M2tsAribCaptionsPidControlUseConfigured is a M2tsAribCaptionsPidControl enum value + M2tsAribCaptionsPidControlUseConfigured = "USE_CONFIGURED" +) + +const ( + // M2tsAudioBufferModelAtsc is a M2tsAudioBufferModel enum value + M2tsAudioBufferModelAtsc = "ATSC" + + // M2tsAudioBufferModelDvb is a M2tsAudioBufferModel enum value + M2tsAudioBufferModelDvb = "DVB" +) + +const ( + // M2tsAudioIntervalVideoAndFixedIntervals is a M2tsAudioInterval enum value + M2tsAudioIntervalVideoAndFixedIntervals = "VIDEO_AND_FIXED_INTERVALS" + + // M2tsAudioIntervalVideoInterval is a M2tsAudioInterval enum value + M2tsAudioIntervalVideoInterval = "VIDEO_INTERVAL" +) + +const ( + // M2tsAudioStreamTypeAtsc is a M2tsAudioStreamType enum value + M2tsAudioStreamTypeAtsc = "ATSC" + + // M2tsAudioStreamTypeDvb is a M2tsAudioStreamType enum value + M2tsAudioStreamTypeDvb = "DVB" +) + +const ( + // M2tsBufferModelMultiplex is a M2tsBufferModel enum value + M2tsBufferModelMultiplex = "MULTIPLEX" + + // M2tsBufferModelNone is a M2tsBufferModel enum value + M2tsBufferModelNone = "NONE" +) + +const ( + // M2tsCcDescriptorDisabled is a M2tsCcDescriptor enum value + M2tsCcDescriptorDisabled = "DISABLED" + + // M2tsCcDescriptorEnabled is a M2tsCcDescriptor enum value + M2tsCcDescriptorEnabled = "ENABLED" +) + +const ( + // M2tsEbifControlNone is a M2tsEbifControl enum value + M2tsEbifControlNone = "NONE" + + // M2tsEbifControlPassthrough is a M2tsEbifControl enum value + M2tsEbifControlPassthrough = "PASSTHROUGH" +) + +const ( + // M2tsEbpPlacementVideoAndAudioPids is a M2tsEbpPlacement enum value + M2tsEbpPlacementVideoAndAudioPids = "VIDEO_AND_AUDIO_PIDS" + + // M2tsEbpPlacementVideoPid is a M2tsEbpPlacement enum value + M2tsEbpPlacementVideoPid = "VIDEO_PID" +) + +const ( + // M2tsEsRateInPesExclude is a M2tsEsRateInPes enum value + M2tsEsRateInPesExclude = "EXCLUDE" + + // M2tsEsRateInPesInclude is a M2tsEsRateInPes enum value + M2tsEsRateInPesInclude = "INCLUDE" +) + +const ( + // M2tsKlvNone is a M2tsKlv enum value + M2tsKlvNone = "NONE" + + // M2tsKlvPassthrough is a M2tsKlv enum value + M2tsKlvPassthrough = "PASSTHROUGH" +) + +const ( + // M2tsPcrControlConfiguredPcrPeriod is a M2tsPcrControl enum value + M2tsPcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" + + // M2tsPcrControlPcrEveryPesPacket is a M2tsPcrControl enum value + M2tsPcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" +) + +const ( + // M2tsRateModeCbr is a M2tsRateMode enum value + M2tsRateModeCbr = "CBR" + + // M2tsRateModeVbr is a M2tsRateMode enum value + M2tsRateModeVbr = "VBR" +) + +const ( + // M2tsScte35ControlNone is a M2tsScte35Control enum value + M2tsScte35ControlNone = "NONE" + + // M2tsScte35ControlPassthrough is a M2tsScte35Control enum value + M2tsScte35ControlPassthrough = "PASSTHROUGH" +) + +const ( + // M2tsSegmentationMarkersEbp is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersEbp = "EBP" + + // M2tsSegmentationMarkersEbpLegacy is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersEbpLegacy = "EBP_LEGACY" + + // M2tsSegmentationMarkersNone is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersNone = "NONE" + + // M2tsSegmentationMarkersPsiSegstart is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersPsiSegstart = "PSI_SEGSTART" + + // M2tsSegmentationMarkersRaiAdapt is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersRaiAdapt = "RAI_ADAPT" + + // M2tsSegmentationMarkersRaiSegstart is a M2tsSegmentationMarkers enum value + M2tsSegmentationMarkersRaiSegstart = "RAI_SEGSTART" +) + +const ( + // M2tsSegmentationStyleMaintainCadence is a M2tsSegmentationStyle enum value + M2tsSegmentationStyleMaintainCadence = "MAINTAIN_CADENCE" + + // M2tsSegmentationStyleResetCadence is a M2tsSegmentationStyle enum value + M2tsSegmentationStyleResetCadence = "RESET_CADENCE" +) + +const ( + // M2tsTimedMetadataBehaviorNoPassthrough is a M2tsTimedMetadataBehavior enum value + M2tsTimedMetadataBehaviorNoPassthrough = "NO_PASSTHROUGH" + + // M2tsTimedMetadataBehaviorPassthrough is a M2tsTimedMetadataBehavior enum value + M2tsTimedMetadataBehaviorPassthrough = "PASSTHROUGH" +) + +const ( + // M3u8PcrControlConfiguredPcrPeriod is a M3u8PcrControl enum value + M3u8PcrControlConfiguredPcrPeriod = "CONFIGURED_PCR_PERIOD" + + // M3u8PcrControlPcrEveryPesPacket is a M3u8PcrControl enum value + M3u8PcrControlPcrEveryPesPacket = "PCR_EVERY_PES_PACKET" +) + +const ( + // M3u8Scte35BehaviorNoPassthrough is a M3u8Scte35Behavior enum value + M3u8Scte35BehaviorNoPassthrough = "NO_PASSTHROUGH" + + // M3u8Scte35BehaviorPassthrough is a M3u8Scte35Behavior enum value + M3u8Scte35BehaviorPassthrough = "PASSTHROUGH" +) + +const ( + // M3u8TimedMetadataBehaviorNoPassthrough is a M3u8TimedMetadataBehavior enum value + M3u8TimedMetadataBehaviorNoPassthrough = "NO_PASSTHROUGH" + + // M3u8TimedMetadataBehaviorPassthrough is a M3u8TimedMetadataBehavior enum value + M3u8TimedMetadataBehaviorPassthrough = "PASSTHROUGH" +) + +const ( + // Mp2CodingModeCodingMode10 is a Mp2CodingMode enum value + Mp2CodingModeCodingMode10 = "CODING_MODE_1_0" + + // Mp2CodingModeCodingMode20 is a Mp2CodingMode enum value + Mp2CodingModeCodingMode20 = "CODING_MODE_2_0" +) + +const ( + // NetworkInputServerValidationCheckCryptographyAndValidateName is a NetworkInputServerValidation enum value + NetworkInputServerValidationCheckCryptographyAndValidateName = "CHECK_CRYPTOGRAPHY_AND_VALIDATE_NAME" + + // NetworkInputServerValidationCheckCryptographyOnly is a NetworkInputServerValidation enum value + NetworkInputServerValidationCheckCryptographyOnly = "CHECK_CRYPTOGRAPHY_ONLY" +) + +// Units for duration, e.g. 'MONTHS' +const ( + // OfferingDurationUnitsMonths is a OfferingDurationUnits enum value + OfferingDurationUnitsMonths = "MONTHS" +) + +// Offering type, e.g. 'NO_UPFRONT' +const ( + // OfferingTypeNoUpfront is a OfferingType enum value + OfferingTypeNoUpfront = "NO_UPFRONT" +) + +// Codec, 'MPEG2', 'AVC', 'HEVC', or 'AUDIO' +const ( + // ReservationCodecMpeg2 is a ReservationCodec enum value + ReservationCodecMpeg2 = "MPEG2" + + // ReservationCodecAvc is a ReservationCodec enum value + ReservationCodecAvc = "AVC" + + // ReservationCodecHevc is a ReservationCodec enum value + ReservationCodecHevc = "HEVC" + + // ReservationCodecAudio is a ReservationCodec enum value + ReservationCodecAudio = "AUDIO" +) + +// Maximum bitrate in megabits per second +const ( + // ReservationMaximumBitrateMax10Mbps is a ReservationMaximumBitrate enum value + ReservationMaximumBitrateMax10Mbps = "MAX_10_MBPS" + + // ReservationMaximumBitrateMax20Mbps is a ReservationMaximumBitrate enum value + ReservationMaximumBitrateMax20Mbps = "MAX_20_MBPS" + + // ReservationMaximumBitrateMax50Mbps is a ReservationMaximumBitrate enum value + ReservationMaximumBitrateMax50Mbps = "MAX_50_MBPS" +) + +// Maximum framerate in frames per second (Outputs only) +const ( + // ReservationMaximumFramerateMax30Fps is a ReservationMaximumFramerate enum value + ReservationMaximumFramerateMax30Fps = "MAX_30_FPS" + + // ReservationMaximumFramerateMax60Fps is a ReservationMaximumFramerate enum value + ReservationMaximumFramerateMax60Fps = "MAX_60_FPS" +) + +// Resolution based on lines of vertical resolution; SD is less than 720 lines, +// HD is 720 to 1080 lines, UHD is greater than 1080 lines +const ( + // ReservationResolutionSd is a ReservationResolution enum value + ReservationResolutionSd = "SD" + + // ReservationResolutionHd is a ReservationResolution enum value + ReservationResolutionHd = "HD" + + // ReservationResolutionUhd is a ReservationResolution enum value + ReservationResolutionUhd = "UHD" +) + +// Resource type, 'INPUT', 'OUTPUT', or 'CHANNEL' +const ( + // ReservationResourceTypeInput is a ReservationResourceType enum value + ReservationResourceTypeInput = "INPUT" + + // ReservationResourceTypeOutput is a ReservationResourceType enum value + ReservationResourceTypeOutput = "OUTPUT" + + // ReservationResourceTypeChannel is a ReservationResourceType enum value + ReservationResourceTypeChannel = "CHANNEL" +) + +// Special features, 'ADVANCED_AUDIO' or 'AUDIO_NORMALIZATION' +const ( + // ReservationSpecialFeatureAdvancedAudio is a ReservationSpecialFeature enum value + ReservationSpecialFeatureAdvancedAudio = "ADVANCED_AUDIO" + + // ReservationSpecialFeatureAudioNormalization is a ReservationSpecialFeature enum value + ReservationSpecialFeatureAudioNormalization = "AUDIO_NORMALIZATION" +) + +// Current reservation state +const ( + // ReservationStateActive is a ReservationState enum value + ReservationStateActive = "ACTIVE" + + // ReservationStateExpired is a ReservationState enum value + ReservationStateExpired = "EXPIRED" + + // ReservationStateCanceled is a ReservationState enum value + ReservationStateCanceled = "CANCELED" + + // ReservationStateDeleted is a ReservationState enum value + ReservationStateDeleted = "DELETED" +) + +// Video quality, e.g. 'STANDARD' (Outputs only) +const ( + // ReservationVideoQualityStandard is a ReservationVideoQuality enum value + ReservationVideoQualityStandard = "STANDARD" + + // ReservationVideoQualityEnhanced is a ReservationVideoQuality enum value + ReservationVideoQualityEnhanced = "ENHANCED" + + // ReservationVideoQualityPremium is a ReservationVideoQuality enum value + ReservationVideoQualityPremium = "PREMIUM" +) + +const ( + // RtmpCacheFullBehaviorDisconnectImmediately is a RtmpCacheFullBehavior enum value + RtmpCacheFullBehaviorDisconnectImmediately = "DISCONNECT_IMMEDIATELY" + + // RtmpCacheFullBehaviorWaitForServer is a RtmpCacheFullBehavior enum value + RtmpCacheFullBehaviorWaitForServer = "WAIT_FOR_SERVER" +) + +const ( + // RtmpCaptionDataAll is a RtmpCaptionData enum value + RtmpCaptionDataAll = "ALL" + + // RtmpCaptionDataField1608 is a RtmpCaptionData enum value + RtmpCaptionDataField1608 = "FIELD1_608" + + // RtmpCaptionDataField1AndField2608 is a RtmpCaptionData enum value + RtmpCaptionDataField1AndField2608 = "FIELD1_AND_FIELD2_608" +) + +const ( + // RtmpOutputCertificateModeSelfSigned is a RtmpOutputCertificateMode enum value + RtmpOutputCertificateModeSelfSigned = "SELF_SIGNED" + + // RtmpOutputCertificateModeVerifyAuthenticity is a RtmpOutputCertificateMode enum value + RtmpOutputCertificateModeVerifyAuthenticity = "VERIFY_AUTHENTICITY" +) + +const ( + // Scte20Convert608To708Disabled is a Scte20Convert608To708 enum value + Scte20Convert608To708Disabled = "DISABLED" + + // Scte20Convert608To708Upconvert is a Scte20Convert608To708 enum value + Scte20Convert608To708Upconvert = "UPCONVERT" +) + +const ( + // Scte35AposNoRegionalBlackoutBehaviorFollow is a Scte35AposNoRegionalBlackoutBehavior enum value + Scte35AposNoRegionalBlackoutBehaviorFollow = "FOLLOW" + + // Scte35AposNoRegionalBlackoutBehaviorIgnore is a Scte35AposNoRegionalBlackoutBehavior enum value + Scte35AposNoRegionalBlackoutBehaviorIgnore = "IGNORE" +) + +const ( + // Scte35AposWebDeliveryAllowedBehaviorFollow is a Scte35AposWebDeliveryAllowedBehavior enum value + Scte35AposWebDeliveryAllowedBehaviorFollow = "FOLLOW" + + // Scte35AposWebDeliveryAllowedBehaviorIgnore is a Scte35AposWebDeliveryAllowedBehavior enum value + Scte35AposWebDeliveryAllowedBehaviorIgnore = "IGNORE" +) + +// Corresponds to the archive_allowed parameter. A value of ARCHIVE_NOT_ALLOWED +// corresponds to 0 (false) in the SCTE-35 specification. If you include one +// of the "restriction" flags then you must include all four of them. +const ( + // Scte35ArchiveAllowedFlagArchiveNotAllowed is a Scte35ArchiveAllowedFlag enum value + Scte35ArchiveAllowedFlagArchiveNotAllowed = "ARCHIVE_NOT_ALLOWED" + + // Scte35ArchiveAllowedFlagArchiveAllowed is a Scte35ArchiveAllowedFlag enum value + Scte35ArchiveAllowedFlagArchiveAllowed = "ARCHIVE_ALLOWED" +) + +// Corresponds to the device_restrictions parameter in a segmentation_descriptor. +// If you include one of the "restriction" flags then you must include all four +// of them. +const ( + // Scte35DeviceRestrictionsNone is a Scte35DeviceRestrictions enum value + Scte35DeviceRestrictionsNone = "NONE" + + // Scte35DeviceRestrictionsRestrictGroup0 is a Scte35DeviceRestrictions enum value + Scte35DeviceRestrictionsRestrictGroup0 = "RESTRICT_GROUP0" + + // Scte35DeviceRestrictionsRestrictGroup1 is a Scte35DeviceRestrictions enum value + Scte35DeviceRestrictionsRestrictGroup1 = "RESTRICT_GROUP1" + + // Scte35DeviceRestrictionsRestrictGroup2 is a Scte35DeviceRestrictions enum value + Scte35DeviceRestrictionsRestrictGroup2 = "RESTRICT_GROUP2" +) + +// Corresponds to the no_regional_blackout_flag parameter. A value of REGIONAL_BLACKOUT +// corresponds to 0 (false) in the SCTE-35 specification. If you include one +// of the "restriction" flags then you must include all four of them. +const ( + // Scte35NoRegionalBlackoutFlagRegionalBlackout is a Scte35NoRegionalBlackoutFlag enum value + Scte35NoRegionalBlackoutFlagRegionalBlackout = "REGIONAL_BLACKOUT" + + // Scte35NoRegionalBlackoutFlagNoRegionalBlackout is a Scte35NoRegionalBlackoutFlag enum value + Scte35NoRegionalBlackoutFlagNoRegionalBlackout = "NO_REGIONAL_BLACKOUT" +) + +// Corresponds to SCTE-35 segmentation_event_cancel_indicator. SEGMENTATION_EVENT_NOT_CANCELED +// corresponds to 0 in the SCTE-35 specification and indicates that this is +// an insertion request. SEGMENTATION_EVENT_CANCELED corresponds to 1 in the +// SCTE-35 specification and indicates that this is a cancelation request, in +// which case complete this field and the existing event ID to cancel. +const ( + // Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled is a Scte35SegmentationCancelIndicator enum value + Scte35SegmentationCancelIndicatorSegmentationEventNotCanceled = "SEGMENTATION_EVENT_NOT_CANCELED" + + // Scte35SegmentationCancelIndicatorSegmentationEventCanceled is a Scte35SegmentationCancelIndicator enum value + Scte35SegmentationCancelIndicatorSegmentationEventCanceled = "SEGMENTATION_EVENT_CANCELED" +) + +const ( + // Scte35SpliceInsertNoRegionalBlackoutBehaviorFollow is a Scte35SpliceInsertNoRegionalBlackoutBehavior enum value + Scte35SpliceInsertNoRegionalBlackoutBehaviorFollow = "FOLLOW" + + // Scte35SpliceInsertNoRegionalBlackoutBehaviorIgnore is a Scte35SpliceInsertNoRegionalBlackoutBehavior enum value + Scte35SpliceInsertNoRegionalBlackoutBehaviorIgnore = "IGNORE" +) + +const ( + // Scte35SpliceInsertWebDeliveryAllowedBehaviorFollow is a Scte35SpliceInsertWebDeliveryAllowedBehavior enum value + Scte35SpliceInsertWebDeliveryAllowedBehaviorFollow = "FOLLOW" + + // Scte35SpliceInsertWebDeliveryAllowedBehaviorIgnore is a Scte35SpliceInsertWebDeliveryAllowedBehavior enum value + Scte35SpliceInsertWebDeliveryAllowedBehaviorIgnore = "IGNORE" +) + +// Corresponds to the web_delivery_allowed_flag parameter. A value of WEB_DELIVERY_NOT_ALLOWED +// corresponds to 0 (false) in the SCTE-35 specification. If you include one +// of the "restriction" flags then you must include all four of them. +const ( + // Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed is a Scte35WebDeliveryAllowedFlag enum value + Scte35WebDeliveryAllowedFlagWebDeliveryNotAllowed = "WEB_DELIVERY_NOT_ALLOWED" + + // Scte35WebDeliveryAllowedFlagWebDeliveryAllowed is a Scte35WebDeliveryAllowedFlag enum value + Scte35WebDeliveryAllowedFlagWebDeliveryAllowed = "WEB_DELIVERY_ALLOWED" +) + +const ( + // SmoothGroupAudioOnlyTimecodeControlPassthrough is a SmoothGroupAudioOnlyTimecodeControl enum value + SmoothGroupAudioOnlyTimecodeControlPassthrough = "PASSTHROUGH" + + // SmoothGroupAudioOnlyTimecodeControlUseConfiguredClock is a SmoothGroupAudioOnlyTimecodeControl enum value + SmoothGroupAudioOnlyTimecodeControlUseConfiguredClock = "USE_CONFIGURED_CLOCK" +) + +const ( + // SmoothGroupCertificateModeSelfSigned is a SmoothGroupCertificateMode enum value + SmoothGroupCertificateModeSelfSigned = "SELF_SIGNED" + + // SmoothGroupCertificateModeVerifyAuthenticity is a SmoothGroupCertificateMode enum value + SmoothGroupCertificateModeVerifyAuthenticity = "VERIFY_AUTHENTICITY" +) + +const ( + // SmoothGroupEventIdModeNoEventId is a SmoothGroupEventIdMode enum value + SmoothGroupEventIdModeNoEventId = "NO_EVENT_ID" + + // SmoothGroupEventIdModeUseConfigured is a SmoothGroupEventIdMode enum value + SmoothGroupEventIdModeUseConfigured = "USE_CONFIGURED" + + // SmoothGroupEventIdModeUseTimestamp is a SmoothGroupEventIdMode enum value + SmoothGroupEventIdModeUseTimestamp = "USE_TIMESTAMP" +) + +const ( + // SmoothGroupEventStopBehaviorNone is a SmoothGroupEventStopBehavior enum value + SmoothGroupEventStopBehaviorNone = "NONE" + + // SmoothGroupEventStopBehaviorSendEos is a SmoothGroupEventStopBehavior enum value + SmoothGroupEventStopBehaviorSendEos = "SEND_EOS" +) + +const ( + // SmoothGroupSegmentationModeUseInputSegmentation is a SmoothGroupSegmentationMode enum value + SmoothGroupSegmentationModeUseInputSegmentation = "USE_INPUT_SEGMENTATION" + + // SmoothGroupSegmentationModeUseSegmentDuration is a SmoothGroupSegmentationMode enum value + SmoothGroupSegmentationModeUseSegmentDuration = "USE_SEGMENT_DURATION" +) + +const ( + // SmoothGroupSparseTrackTypeNone is a SmoothGroupSparseTrackType enum value + SmoothGroupSparseTrackTypeNone = "NONE" + + // SmoothGroupSparseTrackTypeScte35 is a SmoothGroupSparseTrackType enum value + SmoothGroupSparseTrackTypeScte35 = "SCTE_35" +) + +const ( + // SmoothGroupStreamManifestBehaviorDoNotSend is a SmoothGroupStreamManifestBehavior enum value + SmoothGroupStreamManifestBehaviorDoNotSend = "DO_NOT_SEND" + + // SmoothGroupStreamManifestBehaviorSend is a SmoothGroupStreamManifestBehavior enum value + SmoothGroupStreamManifestBehaviorSend = "SEND" +) + +const ( + // SmoothGroupTimestampOffsetModeUseConfiguredOffset is a SmoothGroupTimestampOffsetMode enum value + SmoothGroupTimestampOffsetModeUseConfiguredOffset = "USE_CONFIGURED_OFFSET" + + // SmoothGroupTimestampOffsetModeUseEventStartDate is a SmoothGroupTimestampOffsetMode enum value + SmoothGroupTimestampOffsetModeUseEventStartDate = "USE_EVENT_START_DATE" +) + +const ( + // TimecodeConfigSourceEmbedded is a TimecodeConfigSource enum value + TimecodeConfigSourceEmbedded = "EMBEDDED" + + // TimecodeConfigSourceSystemclock is a TimecodeConfigSource enum value + TimecodeConfigSourceSystemclock = "SYSTEMCLOCK" + + // TimecodeConfigSourceZerobased is a TimecodeConfigSource enum value + TimecodeConfigSourceZerobased = "ZEROBASED" +) + +const ( + // TtmlDestinationStyleControlPassthrough is a TtmlDestinationStyleControl enum value + TtmlDestinationStyleControlPassthrough = "PASSTHROUGH" + + // TtmlDestinationStyleControlUseConfigured is a TtmlDestinationStyleControl enum value + TtmlDestinationStyleControlUseConfigured = "USE_CONFIGURED" +) + +const ( + // UdpTimedMetadataId3FrameNone is a UdpTimedMetadataId3Frame enum value + UdpTimedMetadataId3FrameNone = "NONE" + + // UdpTimedMetadataId3FramePriv is a UdpTimedMetadataId3Frame enum value + UdpTimedMetadataId3FramePriv = "PRIV" + + // UdpTimedMetadataId3FrameTdrl is a UdpTimedMetadataId3Frame enum value + UdpTimedMetadataId3FrameTdrl = "TDRL" +) + +const ( + // VideoDescriptionRespondToAfdNone is a VideoDescriptionRespondToAfd enum value + VideoDescriptionRespondToAfdNone = "NONE" + + // VideoDescriptionRespondToAfdPassthrough is a VideoDescriptionRespondToAfd enum value + VideoDescriptionRespondToAfdPassthrough = "PASSTHROUGH" + + // VideoDescriptionRespondToAfdRespond is a VideoDescriptionRespondToAfd enum value + VideoDescriptionRespondToAfdRespond = "RESPOND" +) + +const ( + // VideoDescriptionScalingBehaviorDefault is a VideoDescriptionScalingBehavior enum value + VideoDescriptionScalingBehaviorDefault = "DEFAULT" + + // VideoDescriptionScalingBehaviorStretchToOutput is a VideoDescriptionScalingBehavior enum value + VideoDescriptionScalingBehaviorStretchToOutput = "STRETCH_TO_OUTPUT" +) + +const ( + // VideoSelectorColorSpaceFollow is a VideoSelectorColorSpace enum value + VideoSelectorColorSpaceFollow = "FOLLOW" + + // VideoSelectorColorSpaceRec601 is a VideoSelectorColorSpace enum value + VideoSelectorColorSpaceRec601 = "REC_601" + + // VideoSelectorColorSpaceRec709 is a VideoSelectorColorSpace enum value + VideoSelectorColorSpaceRec709 = "REC_709" +) + +const ( + // VideoSelectorColorSpaceUsageFallback is a VideoSelectorColorSpaceUsage enum value + VideoSelectorColorSpaceUsageFallback = "FALLBACK" + + // VideoSelectorColorSpaceUsageForce is a VideoSelectorColorSpaceUsage enum value + VideoSelectorColorSpaceUsageForce = "FORCE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go new file mode 100644 index 000000000..22c909872 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package medialive provides the client and types for making API +// requests to AWS Elemental MediaLive. +// +// API for AWS Elemental MediaLive +// +// See https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14 for more information on this service. +// +// See medialive package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/medialive/ +// +// Using the Client +// +// To contact AWS Elemental MediaLive with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Elemental MediaLive client MediaLive for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/medialive/#New +package medialive diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go new file mode 100644 index 000000000..247fb52c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/errors.go @@ -0,0 +1,42 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package medialive + +const ( + + // ErrCodeBadGatewayException for service response error code + // "BadGatewayException". + ErrCodeBadGatewayException = "BadGatewayException" + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + ErrCodeConflictException = "ConflictException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeGatewayTimeoutException for service response error code + // "GatewayTimeoutException". + ErrCodeGatewayTimeoutException = "GatewayTimeoutException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeUnprocessableEntityException for service response error code + // "UnprocessableEntityException". + ErrCodeUnprocessableEntityException = "UnprocessableEntityException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go new file mode 100644 index 000000000..582d570f1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/medialive/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package medialive + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// MediaLive provides the API operation methods for making requests to +// AWS Elemental MediaLive. See this package's package overview docs +// for details on the service. +// +// MediaLive methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type MediaLive struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "medialive" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaLive" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the MediaLive client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a MediaLive client from just a session. +// svc := medialive.New(mySession) +// +// // Create a MediaLive client with additional configuration +// svc := medialive.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaLive { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "medialive" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaLive { + svc := &MediaLive{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-10-14", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a MediaLive operation and runs any +// custom request initialization. +func (c *MediaLive) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go new file mode 100644 index 000000000..13ced8ae2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/api.go @@ -0,0 +1,3954 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediapackage + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opCreateChannel = "CreateChannel" + +// CreateChannelRequest generates a "aws/request.Request" representing the +// client's request for the CreateChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateChannel for more information on using the CreateChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateChannelRequest method. +// req, resp := client.CreateChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannel +func (c *MediaPackage) CreateChannelRequest(input *CreateChannelInput) (req *request.Request, output *CreateChannelOutput) { + op := &request.Operation{ + Name: opCreateChannel, + HTTPMethod: "POST", + HTTPPath: "/channels", + } + + if input == nil { + input = &CreateChannelInput{} + } + + output = &CreateChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateChannel API operation for AWS Elemental MediaPackage. +// +// Creates a new Channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation CreateChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannel +func (c *MediaPackage) CreateChannel(input *CreateChannelInput) (*CreateChannelOutput, error) { + req, out := c.CreateChannelRequest(input) + return out, req.Send() +} + +// CreateChannelWithContext is the same as CreateChannel with the addition of +// the ability to pass a context and additional request options. +// +// See CreateChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) CreateChannelWithContext(ctx aws.Context, input *CreateChannelInput, opts ...request.Option) (*CreateChannelOutput, error) { + req, out := c.CreateChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateOriginEndpoint = "CreateOriginEndpoint" + +// CreateOriginEndpointRequest generates a "aws/request.Request" representing the +// client's request for the CreateOriginEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateOriginEndpoint for more information on using the CreateOriginEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateOriginEndpointRequest method. +// req, resp := client.CreateOriginEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpoint +func (c *MediaPackage) CreateOriginEndpointRequest(input *CreateOriginEndpointInput) (req *request.Request, output *CreateOriginEndpointOutput) { + op := &request.Operation{ + Name: opCreateOriginEndpoint, + HTTPMethod: "POST", + HTTPPath: "/origin_endpoints", + } + + if input == nil { + input = &CreateOriginEndpointInput{} + } + + output = &CreateOriginEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateOriginEndpoint API operation for AWS Elemental MediaPackage. +// +// Creates a new OriginEndpoint record. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation CreateOriginEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpoint +func (c *MediaPackage) CreateOriginEndpoint(input *CreateOriginEndpointInput) (*CreateOriginEndpointOutput, error) { + req, out := c.CreateOriginEndpointRequest(input) + return out, req.Send() +} + +// CreateOriginEndpointWithContext is the same as CreateOriginEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateOriginEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) CreateOriginEndpointWithContext(ctx aws.Context, input *CreateOriginEndpointInput, opts ...request.Option) (*CreateOriginEndpointOutput, error) { + req, out := c.CreateOriginEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteChannel = "DeleteChannel" + +// DeleteChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteChannel for more information on using the DeleteChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteChannelRequest method. +// req, resp := client.DeleteChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannel +func (c *MediaPackage) DeleteChannelRequest(input *DeleteChannelInput) (req *request.Request, output *DeleteChannelOutput) { + op := &request.Operation{ + Name: opDeleteChannel, + HTTPMethod: "DELETE", + HTTPPath: "/channels/{id}", + } + + if input == nil { + input = &DeleteChannelInput{} + } + + output = &DeleteChannelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteChannel API operation for AWS Elemental MediaPackage. +// +// Deletes an existing Channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation DeleteChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannel +func (c *MediaPackage) DeleteChannel(input *DeleteChannelInput) (*DeleteChannelOutput, error) { + req, out := c.DeleteChannelRequest(input) + return out, req.Send() +} + +// DeleteChannelWithContext is the same as DeleteChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) DeleteChannelWithContext(ctx aws.Context, input *DeleteChannelInput, opts ...request.Option) (*DeleteChannelOutput, error) { + req, out := c.DeleteChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteOriginEndpoint = "DeleteOriginEndpoint" + +// DeleteOriginEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteOriginEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteOriginEndpoint for more information on using the DeleteOriginEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteOriginEndpointRequest method. +// req, resp := client.DeleteOriginEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpoint +func (c *MediaPackage) DeleteOriginEndpointRequest(input *DeleteOriginEndpointInput) (req *request.Request, output *DeleteOriginEndpointOutput) { + op := &request.Operation{ + Name: opDeleteOriginEndpoint, + HTTPMethod: "DELETE", + HTTPPath: "/origin_endpoints/{id}", + } + + if input == nil { + input = &DeleteOriginEndpointInput{} + } + + output = &DeleteOriginEndpointOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteOriginEndpoint API operation for AWS Elemental MediaPackage. +// +// Deletes an existing OriginEndpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation DeleteOriginEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpoint +func (c *MediaPackage) DeleteOriginEndpoint(input *DeleteOriginEndpointInput) (*DeleteOriginEndpointOutput, error) { + req, out := c.DeleteOriginEndpointRequest(input) + return out, req.Send() +} + +// DeleteOriginEndpointWithContext is the same as DeleteOriginEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteOriginEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) DeleteOriginEndpointWithContext(ctx aws.Context, input *DeleteOriginEndpointInput, opts ...request.Option) (*DeleteOriginEndpointOutput, error) { + req, out := c.DeleteOriginEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeChannel = "DescribeChannel" + +// DescribeChannelRequest generates a "aws/request.Request" representing the +// client's request for the DescribeChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeChannel for more information on using the DescribeChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeChannelRequest method. +// req, resp := client.DescribeChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannel +func (c *MediaPackage) DescribeChannelRequest(input *DescribeChannelInput) (req *request.Request, output *DescribeChannelOutput) { + op := &request.Operation{ + Name: opDescribeChannel, + HTTPMethod: "GET", + HTTPPath: "/channels/{id}", + } + + if input == nil { + input = &DescribeChannelInput{} + } + + output = &DescribeChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeChannel API operation for AWS Elemental MediaPackage. +// +// Gets details about a Channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation DescribeChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannel +func (c *MediaPackage) DescribeChannel(input *DescribeChannelInput) (*DescribeChannelOutput, error) { + req, out := c.DescribeChannelRequest(input) + return out, req.Send() +} + +// DescribeChannelWithContext is the same as DescribeChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) DescribeChannelWithContext(ctx aws.Context, input *DescribeChannelInput, opts ...request.Option) (*DescribeChannelOutput, error) { + req, out := c.DescribeChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeOriginEndpoint = "DescribeOriginEndpoint" + +// DescribeOriginEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOriginEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeOriginEndpoint for more information on using the DescribeOriginEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeOriginEndpointRequest method. +// req, resp := client.DescribeOriginEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpoint +func (c *MediaPackage) DescribeOriginEndpointRequest(input *DescribeOriginEndpointInput) (req *request.Request, output *DescribeOriginEndpointOutput) { + op := &request.Operation{ + Name: opDescribeOriginEndpoint, + HTTPMethod: "GET", + HTTPPath: "/origin_endpoints/{id}", + } + + if input == nil { + input = &DescribeOriginEndpointInput{} + } + + output = &DescribeOriginEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOriginEndpoint API operation for AWS Elemental MediaPackage. +// +// Gets details about an existing OriginEndpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation DescribeOriginEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpoint +func (c *MediaPackage) DescribeOriginEndpoint(input *DescribeOriginEndpointInput) (*DescribeOriginEndpointOutput, error) { + req, out := c.DescribeOriginEndpointRequest(input) + return out, req.Send() +} + +// DescribeOriginEndpointWithContext is the same as DescribeOriginEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOriginEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) DescribeOriginEndpointWithContext(ctx aws.Context, input *DescribeOriginEndpointInput, opts ...request.Option) (*DescribeOriginEndpointOutput, error) { + req, out := c.DescribeOriginEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListChannels = "ListChannels" + +// ListChannelsRequest generates a "aws/request.Request" representing the +// client's request for the ListChannels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListChannels for more information on using the ListChannels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListChannelsRequest method. +// req, resp := client.ListChannelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannels +func (c *MediaPackage) ListChannelsRequest(input *ListChannelsInput) (req *request.Request, output *ListChannelsOutput) { + op := &request.Operation{ + Name: opListChannels, + HTTPMethod: "GET", + HTTPPath: "/channels", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListChannelsInput{} + } + + output = &ListChannelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListChannels API operation for AWS Elemental MediaPackage. +// +// Returns a collection of Channels. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation ListChannels for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannels +func (c *MediaPackage) ListChannels(input *ListChannelsInput) (*ListChannelsOutput, error) { + req, out := c.ListChannelsRequest(input) + return out, req.Send() +} + +// ListChannelsWithContext is the same as ListChannels with the addition of +// the ability to pass a context and additional request options. +// +// See ListChannels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) ListChannelsWithContext(ctx aws.Context, input *ListChannelsInput, opts ...request.Option) (*ListChannelsOutput, error) { + req, out := c.ListChannelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListChannelsPages iterates over the pages of a ListChannels operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListChannels method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListChannels operation. +// pageNum := 0 +// err := client.ListChannelsPages(params, +// func(page *ListChannelsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaPackage) ListChannelsPages(input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool) error { + return c.ListChannelsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListChannelsPagesWithContext same as ListChannelsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) ListChannelsPagesWithContext(ctx aws.Context, input *ListChannelsInput, fn func(*ListChannelsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListChannelsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListChannelsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListChannelsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListOriginEndpoints = "ListOriginEndpoints" + +// ListOriginEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the ListOriginEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListOriginEndpoints for more information on using the ListOriginEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListOriginEndpointsRequest method. +// req, resp := client.ListOriginEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints +func (c *MediaPackage) ListOriginEndpointsRequest(input *ListOriginEndpointsInput) (req *request.Request, output *ListOriginEndpointsOutput) { + op := &request.Operation{ + Name: opListOriginEndpoints, + HTTPMethod: "GET", + HTTPPath: "/origin_endpoints", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListOriginEndpointsInput{} + } + + output = &ListOriginEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListOriginEndpoints API operation for AWS Elemental MediaPackage. +// +// Returns a collection of OriginEndpoint records. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation ListOriginEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpoints +func (c *MediaPackage) ListOriginEndpoints(input *ListOriginEndpointsInput) (*ListOriginEndpointsOutput, error) { + req, out := c.ListOriginEndpointsRequest(input) + return out, req.Send() +} + +// ListOriginEndpointsWithContext is the same as ListOriginEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See ListOriginEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) ListOriginEndpointsWithContext(ctx aws.Context, input *ListOriginEndpointsInput, opts ...request.Option) (*ListOriginEndpointsOutput, error) { + req, out := c.ListOriginEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListOriginEndpointsPages iterates over the pages of a ListOriginEndpoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListOriginEndpoints method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListOriginEndpoints operation. +// pageNum := 0 +// err := client.ListOriginEndpointsPages(params, +// func(page *ListOriginEndpointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *MediaPackage) ListOriginEndpointsPages(input *ListOriginEndpointsInput, fn func(*ListOriginEndpointsOutput, bool) bool) error { + return c.ListOriginEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListOriginEndpointsPagesWithContext same as ListOriginEndpointsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) ListOriginEndpointsPagesWithContext(ctx aws.Context, input *ListOriginEndpointsInput, fn func(*ListOriginEndpointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListOriginEndpointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListOriginEndpointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListOriginEndpointsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opRotateChannelCredentials = "RotateChannelCredentials" + +// RotateChannelCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the RotateChannelCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RotateChannelCredentials for more information on using the RotateChannelCredentials +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RotateChannelCredentialsRequest method. +// req, resp := client.RotateChannelCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentials +// +// Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials instead +func (c *MediaPackage) RotateChannelCredentialsRequest(input *RotateChannelCredentialsInput) (req *request.Request, output *RotateChannelCredentialsOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, RotateChannelCredentials, has been deprecated") + } + op := &request.Operation{ + Name: opRotateChannelCredentials, + HTTPMethod: "PUT", + HTTPPath: "/channels/{id}/credentials", + } + + if input == nil { + input = &RotateChannelCredentialsInput{} + } + + output = &RotateChannelCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// RotateChannelCredentials API operation for AWS Elemental MediaPackage. +// +// Changes the Channel's first IngestEndpoint's username and password. WARNING +// - This API is deprecated. Please use RotateIngestEndpointCredentials instead +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation RotateChannelCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentials +// +// Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials instead +func (c *MediaPackage) RotateChannelCredentials(input *RotateChannelCredentialsInput) (*RotateChannelCredentialsOutput, error) { + req, out := c.RotateChannelCredentialsRequest(input) + return out, req.Send() +} + +// RotateChannelCredentialsWithContext is the same as RotateChannelCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See RotateChannelCredentials for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +// +// Deprecated: This API is deprecated. Please use RotateIngestEndpointCredentials instead +func (c *MediaPackage) RotateChannelCredentialsWithContext(ctx aws.Context, input *RotateChannelCredentialsInput, opts ...request.Option) (*RotateChannelCredentialsOutput, error) { + req, out := c.RotateChannelCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRotateIngestEndpointCredentials = "RotateIngestEndpointCredentials" + +// RotateIngestEndpointCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the RotateIngestEndpointCredentials operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RotateIngestEndpointCredentials for more information on using the RotateIngestEndpointCredentials +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RotateIngestEndpointCredentialsRequest method. +// req, resp := client.RotateIngestEndpointCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials +func (c *MediaPackage) RotateIngestEndpointCredentialsRequest(input *RotateIngestEndpointCredentialsInput) (req *request.Request, output *RotateIngestEndpointCredentialsOutput) { + op := &request.Operation{ + Name: opRotateIngestEndpointCredentials, + HTTPMethod: "PUT", + HTTPPath: "/channels/{id}/ingest_endpoints/{ingest_endpoint_id}/credentials", + } + + if input == nil { + input = &RotateIngestEndpointCredentialsInput{} + } + + output = &RotateIngestEndpointCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// RotateIngestEndpointCredentials API operation for AWS Elemental MediaPackage. +// +// Rotate the IngestEndpoint's username and password, as specified by the IngestEndpoint's +// id. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation RotateIngestEndpointCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateIngestEndpointCredentials +func (c *MediaPackage) RotateIngestEndpointCredentials(input *RotateIngestEndpointCredentialsInput) (*RotateIngestEndpointCredentialsOutput, error) { + req, out := c.RotateIngestEndpointCredentialsRequest(input) + return out, req.Send() +} + +// RotateIngestEndpointCredentialsWithContext is the same as RotateIngestEndpointCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See RotateIngestEndpointCredentials for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) RotateIngestEndpointCredentialsWithContext(ctx aws.Context, input *RotateIngestEndpointCredentialsInput, opts ...request.Option) (*RotateIngestEndpointCredentialsOutput, error) { + req, out := c.RotateIngestEndpointCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateChannel = "UpdateChannel" + +// UpdateChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateChannel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateChannel for more information on using the UpdateChannel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateChannelRequest method. +// req, resp := client.UpdateChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannel +func (c *MediaPackage) UpdateChannelRequest(input *UpdateChannelInput) (req *request.Request, output *UpdateChannelOutput) { + op := &request.Operation{ + Name: opUpdateChannel, + HTTPMethod: "PUT", + HTTPPath: "/channels/{id}", + } + + if input == nil { + input = &UpdateChannelInput{} + } + + output = &UpdateChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateChannel API operation for AWS Elemental MediaPackage. +// +// Updates an existing Channel. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation UpdateChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannel +func (c *MediaPackage) UpdateChannel(input *UpdateChannelInput) (*UpdateChannelOutput, error) { + req, out := c.UpdateChannelRequest(input) + return out, req.Send() +} + +// UpdateChannelWithContext is the same as UpdateChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateChannel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) UpdateChannelWithContext(ctx aws.Context, input *UpdateChannelInput, opts ...request.Option) (*UpdateChannelOutput, error) { + req, out := c.UpdateChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateOriginEndpoint = "UpdateOriginEndpoint" + +// UpdateOriginEndpointRequest generates a "aws/request.Request" representing the +// client's request for the UpdateOriginEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateOriginEndpoint for more information on using the UpdateOriginEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateOriginEndpointRequest method. +// req, resp := client.UpdateOriginEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpoint +func (c *MediaPackage) UpdateOriginEndpointRequest(input *UpdateOriginEndpointInput) (req *request.Request, output *UpdateOriginEndpointOutput) { + op := &request.Operation{ + Name: opUpdateOriginEndpoint, + HTTPMethod: "PUT", + HTTPPath: "/origin_endpoints/{id}", + } + + if input == nil { + input = &UpdateOriginEndpointInput{} + } + + output = &UpdateOriginEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateOriginEndpoint API operation for AWS Elemental MediaPackage. +// +// Updates an existing OriginEndpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaPackage's +// API operation UpdateOriginEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnprocessableEntityException "UnprocessableEntityException" +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// +// * ErrCodeForbiddenException "ForbiddenException" +// +// * ErrCodeNotFoundException "NotFoundException" +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpoint +func (c *MediaPackage) UpdateOriginEndpoint(input *UpdateOriginEndpointInput) (*UpdateOriginEndpointOutput, error) { + req, out := c.UpdateOriginEndpointRequest(input) + return out, req.Send() +} + +// UpdateOriginEndpointWithContext is the same as UpdateOriginEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateOriginEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaPackage) UpdateOriginEndpointWithContext(ctx aws.Context, input *UpdateOriginEndpointInput, opts ...request.Option) (*UpdateOriginEndpointOutput, error) { + req, out := c.UpdateOriginEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A Channel resource configuration. +type Channel struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) assigned to the Channel. + Arn *string `locationName:"arn" type:"string"` + + // A short text description of the Channel. + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + // The ID of the Channel. + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s Channel) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Channel) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Channel) SetArn(v string) *Channel { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Channel) SetDescription(v string) *Channel { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *Channel) SetHlsIngest(v *HlsIngest) *Channel { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *Channel) SetId(v string) *Channel { + s.Id = &v + return s +} + +// A Common Media Application Format (CMAF) encryption configuration. +type CmafEncryption struct { + _ struct{} `type:"structure"` + + // Time (in seconds) between each encryption key rotation. + KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` + + // A configuration for accessing an external Secure Packager and Encoder Key + // Exchange (SPEKE) service that will provide encryption keys. + // + // SpekeKeyProvider is a required field + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CmafEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CmafEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CmafEncryption"} + if s.SpekeKeyProvider == nil { + invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) + } + if s.SpekeKeyProvider != nil { + if err := s.SpekeKeyProvider.Validate(); err != nil { + invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. +func (s *CmafEncryption) SetKeyRotationIntervalSeconds(v int64) *CmafEncryption { + s.KeyRotationIntervalSeconds = &v + return s +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *CmafEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *CmafEncryption { + s.SpekeKeyProvider = v + return s +} + +// A Common Media Application Format (CMAF) packaging configuration. +type CmafPackage struct { + _ struct{} `type:"structure"` + + // A Common Media Application Format (CMAF) encryption configuration. + Encryption *CmafEncryption `locationName:"encryption" type:"structure"` + + // A list of HLS manifest configurations + HlsManifests []*HlsManifest `locationName:"hlsManifests" type:"list"` + + // Duration (in seconds) of each segment. Actual segments will berounded to + // the nearest multiple of the source segment duration. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // An optional custom string that is prepended to the name of each segment. + // If not specified, it defaults to the ChannelId. + SegmentPrefix *string `locationName:"segmentPrefix" type:"string"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` +} + +// String returns the string representation +func (s CmafPackage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafPackage) GoString() string { + return s.String() +} + +// SetEncryption sets the Encryption field's value. +func (s *CmafPackage) SetEncryption(v *CmafEncryption) *CmafPackage { + s.Encryption = v + return s +} + +// SetHlsManifests sets the HlsManifests field's value. +func (s *CmafPackage) SetHlsManifests(v []*HlsManifest) *CmafPackage { + s.HlsManifests = v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *CmafPackage) SetSegmentDurationSeconds(v int64) *CmafPackage { + s.SegmentDurationSeconds = &v + return s +} + +// SetSegmentPrefix sets the SegmentPrefix field's value. +func (s *CmafPackage) SetSegmentPrefix(v string) *CmafPackage { + s.SegmentPrefix = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *CmafPackage) SetStreamSelection(v *StreamSelection) *CmafPackage { + s.StreamSelection = v + return s +} + +// A Common Media Application Format (CMAF) packaging configuration. +type CmafPackageCreateOrUpdateParameters struct { + _ struct{} `type:"structure"` + + // A Common Media Application Format (CMAF) encryption configuration. + Encryption *CmafEncryption `locationName:"encryption" type:"structure"` + + // A list of HLS manifest configurations + HlsManifests []*HlsManifestCreateOrUpdateParameters `locationName:"hlsManifests" type:"list"` + + // Duration (in seconds) of each segment. Actual segments will berounded to + // the nearest multiple of the source segment duration. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // An optional custom string that is prepended to the name of each segment. + // If not specified, it defaults to the ChannelId. + SegmentPrefix *string `locationName:"segmentPrefix" type:"string"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` +} + +// String returns the string representation +func (s CmafPackageCreateOrUpdateParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CmafPackageCreateOrUpdateParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CmafPackageCreateOrUpdateParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CmafPackageCreateOrUpdateParameters"} + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + if s.HlsManifests != nil { + for i, v := range s.HlsManifests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HlsManifests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryption sets the Encryption field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetEncryption(v *CmafEncryption) *CmafPackageCreateOrUpdateParameters { + s.Encryption = v + return s +} + +// SetHlsManifests sets the HlsManifests field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetHlsManifests(v []*HlsManifestCreateOrUpdateParameters) *CmafPackageCreateOrUpdateParameters { + s.HlsManifests = v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetSegmentDurationSeconds(v int64) *CmafPackageCreateOrUpdateParameters { + s.SegmentDurationSeconds = &v + return s +} + +// SetSegmentPrefix sets the SegmentPrefix field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetSegmentPrefix(v string) *CmafPackageCreateOrUpdateParameters { + s.SegmentPrefix = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *CmafPackageCreateOrUpdateParameters) SetStreamSelection(v *StreamSelection) *CmafPackageCreateOrUpdateParameters { + s.StreamSelection = v + return s +} + +type CreateChannelInput struct { + _ struct{} `type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateChannelInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateChannelInput) SetDescription(v string) *CreateChannelInput { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *CreateChannelInput) SetId(v string) *CreateChannelInput { + s.Id = &v + return s +} + +type CreateChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s CreateChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateChannelOutput) SetArn(v string) *CreateChannelOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateChannelOutput) SetDescription(v string) *CreateChannelOutput { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *CreateChannelOutput) SetHlsIngest(v *HlsIngest) *CreateChannelOutput { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *CreateChannelOutput) SetId(v string) *CreateChannelOutput { + s.Id = &v + return s +} + +type CreateOriginEndpointInput struct { + _ struct{} `type:"structure"` + + // ChannelId is a required field + ChannelId *string `locationName:"channelId" type:"string" required:"true"` + + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackageCreateOrUpdateParameters `locationName:"cmafPackage" type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. + DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) packaging configuration. + HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` + + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` + + ManifestName *string `locationName:"manifestName" type:"string"` + + // A Microsoft Smooth Streaming (MSS) packaging configuration. + MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` + + StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` + + TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` + + Whitelist []*string `locationName:"whitelist" type:"list"` +} + +// String returns the string representation +func (s CreateOriginEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOriginEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateOriginEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateOriginEndpointInput"} + if s.ChannelId == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelId")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.CmafPackage != nil { + if err := s.CmafPackage.Validate(); err != nil { + invalidParams.AddNested("CmafPackage", err.(request.ErrInvalidParams)) + } + } + if s.DashPackage != nil { + if err := s.DashPackage.Validate(); err != nil { + invalidParams.AddNested("DashPackage", err.(request.ErrInvalidParams)) + } + } + if s.HlsPackage != nil { + if err := s.HlsPackage.Validate(); err != nil { + invalidParams.AddNested("HlsPackage", err.(request.ErrInvalidParams)) + } + } + if s.MssPackage != nil { + if err := s.MssPackage.Validate(); err != nil { + invalidParams.AddNested("MssPackage", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *CreateOriginEndpointInput) SetChannelId(v string) *CreateOriginEndpointInput { + s.ChannelId = &v + return s +} + +// SetCmafPackage sets the CmafPackage field's value. +func (s *CreateOriginEndpointInput) SetCmafPackage(v *CmafPackageCreateOrUpdateParameters) *CreateOriginEndpointInput { + s.CmafPackage = v + return s +} + +// SetDashPackage sets the DashPackage field's value. +func (s *CreateOriginEndpointInput) SetDashPackage(v *DashPackage) *CreateOriginEndpointInput { + s.DashPackage = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateOriginEndpointInput) SetDescription(v string) *CreateOriginEndpointInput { + s.Description = &v + return s +} + +// SetHlsPackage sets the HlsPackage field's value. +func (s *CreateOriginEndpointInput) SetHlsPackage(v *HlsPackage) *CreateOriginEndpointInput { + s.HlsPackage = v + return s +} + +// SetId sets the Id field's value. +func (s *CreateOriginEndpointInput) SetId(v string) *CreateOriginEndpointInput { + s.Id = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *CreateOriginEndpointInput) SetManifestName(v string) *CreateOriginEndpointInput { + s.ManifestName = &v + return s +} + +// SetMssPackage sets the MssPackage field's value. +func (s *CreateOriginEndpointInput) SetMssPackage(v *MssPackage) *CreateOriginEndpointInput { + s.MssPackage = v + return s +} + +// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. +func (s *CreateOriginEndpointInput) SetStartoverWindowSeconds(v int64) *CreateOriginEndpointInput { + s.StartoverWindowSeconds = &v + return s +} + +// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. +func (s *CreateOriginEndpointInput) SetTimeDelaySeconds(v int64) *CreateOriginEndpointInput { + s.TimeDelaySeconds = &v + return s +} + +// SetWhitelist sets the Whitelist field's value. +func (s *CreateOriginEndpointInput) SetWhitelist(v []*string) *CreateOriginEndpointInput { + s.Whitelist = v + return s +} + +type CreateOriginEndpointOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + ChannelId *string `locationName:"channelId" type:"string"` + + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. + DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) packaging configuration. + HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + ManifestName *string `locationName:"manifestName" type:"string"` + + // A Microsoft Smooth Streaming (MSS) packaging configuration. + MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` + + StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` + + TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` + + Url *string `locationName:"url" type:"string"` + + Whitelist []*string `locationName:"whitelist" type:"list"` +} + +// String returns the string representation +func (s CreateOriginEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOriginEndpointOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CreateOriginEndpointOutput) SetArn(v string) *CreateOriginEndpointOutput { + s.Arn = &v + return s +} + +// SetChannelId sets the ChannelId field's value. +func (s *CreateOriginEndpointOutput) SetChannelId(v string) *CreateOriginEndpointOutput { + s.ChannelId = &v + return s +} + +// SetCmafPackage sets the CmafPackage field's value. +func (s *CreateOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *CreateOriginEndpointOutput { + s.CmafPackage = v + return s +} + +// SetDashPackage sets the DashPackage field's value. +func (s *CreateOriginEndpointOutput) SetDashPackage(v *DashPackage) *CreateOriginEndpointOutput { + s.DashPackage = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateOriginEndpointOutput) SetDescription(v string) *CreateOriginEndpointOutput { + s.Description = &v + return s +} + +// SetHlsPackage sets the HlsPackage field's value. +func (s *CreateOriginEndpointOutput) SetHlsPackage(v *HlsPackage) *CreateOriginEndpointOutput { + s.HlsPackage = v + return s +} + +// SetId sets the Id field's value. +func (s *CreateOriginEndpointOutput) SetId(v string) *CreateOriginEndpointOutput { + s.Id = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *CreateOriginEndpointOutput) SetManifestName(v string) *CreateOriginEndpointOutput { + s.ManifestName = &v + return s +} + +// SetMssPackage sets the MssPackage field's value. +func (s *CreateOriginEndpointOutput) SetMssPackage(v *MssPackage) *CreateOriginEndpointOutput { + s.MssPackage = v + return s +} + +// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. +func (s *CreateOriginEndpointOutput) SetStartoverWindowSeconds(v int64) *CreateOriginEndpointOutput { + s.StartoverWindowSeconds = &v + return s +} + +// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. +func (s *CreateOriginEndpointOutput) SetTimeDelaySeconds(v int64) *CreateOriginEndpointOutput { + s.TimeDelaySeconds = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *CreateOriginEndpointOutput) SetUrl(v string) *CreateOriginEndpointOutput { + s.Url = &v + return s +} + +// SetWhitelist sets the Whitelist field's value. +func (s *CreateOriginEndpointOutput) SetWhitelist(v []*string) *CreateOriginEndpointOutput { + s.Whitelist = v + return s +} + +// A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. +type DashEncryption struct { + _ struct{} `type:"structure"` + + // Time (in seconds) between each encryption key rotation. + KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` + + // A configuration for accessing an external Secure Packager and Encoder Key + // Exchange (SPEKE) service that will provide encryption keys. + // + // SpekeKeyProvider is a required field + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` +} + +// String returns the string representation +func (s DashEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DashEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DashEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DashEncryption"} + if s.SpekeKeyProvider == nil { + invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) + } + if s.SpekeKeyProvider != nil { + if err := s.SpekeKeyProvider.Validate(); err != nil { + invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. +func (s *DashEncryption) SetKeyRotationIntervalSeconds(v int64) *DashEncryption { + s.KeyRotationIntervalSeconds = &v + return s +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *DashEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *DashEncryption { + s.SpekeKeyProvider = v + return s +} + +// A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. +type DashPackage struct { + _ struct{} `type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. + Encryption *DashEncryption `locationName:"encryption" type:"structure"` + + // Time window (in seconds) contained in each manifest. + ManifestWindowSeconds *int64 `locationName:"manifestWindowSeconds" type:"integer"` + + // Minimum duration (in seconds) that a player will buffer media before starting + // the presentation. + MinBufferTimeSeconds *int64 `locationName:"minBufferTimeSeconds" type:"integer"` + + // Minimum duration (in seconds) between potential changes to the Dynamic Adaptive + // Streaming over HTTP (DASH) Media Presentation Description (MPD). + MinUpdatePeriodSeconds *int64 `locationName:"minUpdatePeriodSeconds" type:"integer"` + + // A list of triggers that controls when the outgoing Dynamic Adaptive Streaming + // over HTTP (DASH)Media Presentation Description (MPD) will be partitioned + // into multiple periods. If empty, the content will notbe partitioned into + // more than one period. If the list contains "ADS", new periods will be created + // wherethe Channel source contains SCTE-35 ad markers. + PeriodTriggers []*string `locationName:"periodTriggers" type:"list"` + + // The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to + // "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. + Profile *string `locationName:"profile" type:"string" enum:"Profile"` + + // Duration (in seconds) of each segment. Actual segments will berounded to + // the nearest multiple of the source segment duration. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` + + // Duration (in seconds) to delay live content before presentation. + SuggestedPresentationDelaySeconds *int64 `locationName:"suggestedPresentationDelaySeconds" type:"integer"` +} + +// String returns the string representation +func (s DashPackage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DashPackage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DashPackage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DashPackage"} + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryption sets the Encryption field's value. +func (s *DashPackage) SetEncryption(v *DashEncryption) *DashPackage { + s.Encryption = v + return s +} + +// SetManifestWindowSeconds sets the ManifestWindowSeconds field's value. +func (s *DashPackage) SetManifestWindowSeconds(v int64) *DashPackage { + s.ManifestWindowSeconds = &v + return s +} + +// SetMinBufferTimeSeconds sets the MinBufferTimeSeconds field's value. +func (s *DashPackage) SetMinBufferTimeSeconds(v int64) *DashPackage { + s.MinBufferTimeSeconds = &v + return s +} + +// SetMinUpdatePeriodSeconds sets the MinUpdatePeriodSeconds field's value. +func (s *DashPackage) SetMinUpdatePeriodSeconds(v int64) *DashPackage { + s.MinUpdatePeriodSeconds = &v + return s +} + +// SetPeriodTriggers sets the PeriodTriggers field's value. +func (s *DashPackage) SetPeriodTriggers(v []*string) *DashPackage { + s.PeriodTriggers = v + return s +} + +// SetProfile sets the Profile field's value. +func (s *DashPackage) SetProfile(v string) *DashPackage { + s.Profile = &v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *DashPackage) SetSegmentDurationSeconds(v int64) *DashPackage { + s.SegmentDurationSeconds = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *DashPackage) SetStreamSelection(v *StreamSelection) *DashPackage { + s.StreamSelection = v + return s +} + +// SetSuggestedPresentationDelaySeconds sets the SuggestedPresentationDelaySeconds field's value. +func (s *DashPackage) SetSuggestedPresentationDelaySeconds(v int64) *DashPackage { + s.SuggestedPresentationDelaySeconds = &v + return s +} + +type DeleteChannelInput struct { + _ struct{} `type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteChannelInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteChannelInput) SetId(v string) *DeleteChannelInput { + s.Id = &v + return s +} + +type DeleteChannelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteChannelOutput) GoString() string { + return s.String() +} + +type DeleteOriginEndpointInput struct { + _ struct{} `type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteOriginEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteOriginEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteOriginEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteOriginEndpointInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DeleteOriginEndpointInput) SetId(v string) *DeleteOriginEndpointInput { + s.Id = &v + return s +} + +type DeleteOriginEndpointOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteOriginEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteOriginEndpointOutput) GoString() string { + return s.String() +} + +type DescribeChannelInput struct { + _ struct{} `type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeChannelInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DescribeChannelInput) SetId(v string) *DescribeChannelInput { + s.Id = &v + return s +} + +type DescribeChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s DescribeChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeChannelOutput) SetArn(v string) *DescribeChannelOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeChannelOutput) SetDescription(v string) *DescribeChannelOutput { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *DescribeChannelOutput) SetHlsIngest(v *HlsIngest) *DescribeChannelOutput { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeChannelOutput) SetId(v string) *DescribeChannelOutput { + s.Id = &v + return s +} + +type DescribeOriginEndpointInput struct { + _ struct{} `type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeOriginEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOriginEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeOriginEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeOriginEndpointInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DescribeOriginEndpointInput) SetId(v string) *DescribeOriginEndpointInput { + s.Id = &v + return s +} + +type DescribeOriginEndpointOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + ChannelId *string `locationName:"channelId" type:"string"` + + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. + DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) packaging configuration. + HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + ManifestName *string `locationName:"manifestName" type:"string"` + + // A Microsoft Smooth Streaming (MSS) packaging configuration. + MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` + + StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` + + TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` + + Url *string `locationName:"url" type:"string"` + + Whitelist []*string `locationName:"whitelist" type:"list"` +} + +// String returns the string representation +func (s DescribeOriginEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeOriginEndpointOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DescribeOriginEndpointOutput) SetArn(v string) *DescribeOriginEndpointOutput { + s.Arn = &v + return s +} + +// SetChannelId sets the ChannelId field's value. +func (s *DescribeOriginEndpointOutput) SetChannelId(v string) *DescribeOriginEndpointOutput { + s.ChannelId = &v + return s +} + +// SetCmafPackage sets the CmafPackage field's value. +func (s *DescribeOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *DescribeOriginEndpointOutput { + s.CmafPackage = v + return s +} + +// SetDashPackage sets the DashPackage field's value. +func (s *DescribeOriginEndpointOutput) SetDashPackage(v *DashPackage) *DescribeOriginEndpointOutput { + s.DashPackage = v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeOriginEndpointOutput) SetDescription(v string) *DescribeOriginEndpointOutput { + s.Description = &v + return s +} + +// SetHlsPackage sets the HlsPackage field's value. +func (s *DescribeOriginEndpointOutput) SetHlsPackage(v *HlsPackage) *DescribeOriginEndpointOutput { + s.HlsPackage = v + return s +} + +// SetId sets the Id field's value. +func (s *DescribeOriginEndpointOutput) SetId(v string) *DescribeOriginEndpointOutput { + s.Id = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *DescribeOriginEndpointOutput) SetManifestName(v string) *DescribeOriginEndpointOutput { + s.ManifestName = &v + return s +} + +// SetMssPackage sets the MssPackage field's value. +func (s *DescribeOriginEndpointOutput) SetMssPackage(v *MssPackage) *DescribeOriginEndpointOutput { + s.MssPackage = v + return s +} + +// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. +func (s *DescribeOriginEndpointOutput) SetStartoverWindowSeconds(v int64) *DescribeOriginEndpointOutput { + s.StartoverWindowSeconds = &v + return s +} + +// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. +func (s *DescribeOriginEndpointOutput) SetTimeDelaySeconds(v int64) *DescribeOriginEndpointOutput { + s.TimeDelaySeconds = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *DescribeOriginEndpointOutput) SetUrl(v string) *DescribeOriginEndpointOutput { + s.Url = &v + return s +} + +// SetWhitelist sets the Whitelist field's value. +func (s *DescribeOriginEndpointOutput) SetWhitelist(v []*string) *DescribeOriginEndpointOutput { + s.Whitelist = v + return s +} + +// An HTTP Live Streaming (HLS) encryption configuration. +type HlsEncryption struct { + _ struct{} `type:"structure"` + + // A constant initialization vector for encryption (optional).When not specified + // the initialization vector will be periodically rotated. + ConstantInitializationVector *string `locationName:"constantInitializationVector" type:"string"` + + // The encryption method to use. + EncryptionMethod *string `locationName:"encryptionMethod" type:"string" enum:"EncryptionMethod"` + + // Interval (in seconds) between each encryption key rotation. + KeyRotationIntervalSeconds *int64 `locationName:"keyRotationIntervalSeconds" type:"integer"` + + // When enabled, the EXT-X-KEY tag will be repeated in output manifests. + RepeatExtXKey *bool `locationName:"repeatExtXKey" type:"boolean"` + + // A configuration for accessing an external Secure Packager and Encoder Key + // Exchange (SPEKE) service that will provide encryption keys. + // + // SpekeKeyProvider is a required field + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` +} + +// String returns the string representation +func (s HlsEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsEncryption"} + if s.SpekeKeyProvider == nil { + invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) + } + if s.SpekeKeyProvider != nil { + if err := s.SpekeKeyProvider.Validate(); err != nil { + invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConstantInitializationVector sets the ConstantInitializationVector field's value. +func (s *HlsEncryption) SetConstantInitializationVector(v string) *HlsEncryption { + s.ConstantInitializationVector = &v + return s +} + +// SetEncryptionMethod sets the EncryptionMethod field's value. +func (s *HlsEncryption) SetEncryptionMethod(v string) *HlsEncryption { + s.EncryptionMethod = &v + return s +} + +// SetKeyRotationIntervalSeconds sets the KeyRotationIntervalSeconds field's value. +func (s *HlsEncryption) SetKeyRotationIntervalSeconds(v int64) *HlsEncryption { + s.KeyRotationIntervalSeconds = &v + return s +} + +// SetRepeatExtXKey sets the RepeatExtXKey field's value. +func (s *HlsEncryption) SetRepeatExtXKey(v bool) *HlsEncryption { + s.RepeatExtXKey = &v + return s +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *HlsEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *HlsEncryption { + s.SpekeKeyProvider = v + return s +} + +// An HTTP Live Streaming (HLS) ingest resource configuration. +type HlsIngest struct { + _ struct{} `type:"structure"` + + // A list of endpoints to which the source stream should be sent. + IngestEndpoints []*IngestEndpoint `locationName:"ingestEndpoints" type:"list"` +} + +// String returns the string representation +func (s HlsIngest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsIngest) GoString() string { + return s.String() +} + +// SetIngestEndpoints sets the IngestEndpoints field's value. +func (s *HlsIngest) SetIngestEndpoints(v []*IngestEndpoint) *HlsIngest { + s.IngestEndpoints = v + return s +} + +// A HTTP Live Streaming (HLS) manifest configuration. +type HlsManifest struct { + _ struct{} `type:"structure"` + + // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" + // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the + // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly + // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates + // ad markers and blackout tags based on SCTE-35messages in the input source. + AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` + + // The ID of the manifest. The ID must be unique within the OriginEndpoint and + // it cannot be changed after it is created. + // + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` + + // When enabled, an I-Frame only stream will be included in the output. + IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` + + // An optional short string appended to the end of the OriginEndpoint URL. If + // not specified, defaults to the manifestName for the OriginEndpoint. + ManifestName *string `locationName:"manifestName" type:"string"` + + // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" + // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in + // the media playlist. + PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` + + // Time window (in seconds) contained in each parent manifest. + PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` + + // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted + // into manifests. Additionally, when an interval is specifiedID3Timed Metadata + // messages will be generated every 5 seconds using theingest time of the content.If + // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME + // tags will be inserted into manifests and noID3Timed Metadata messages will + // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata + // is found in HTTP Live Streaming (HLS) input,it will be passed through to + // HLS output. + ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` + + // The URL of the packaged OriginEndpoint for consumption. + Url *string `locationName:"url" type:"string"` +} + +// String returns the string representation +func (s HlsManifest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsManifest) GoString() string { + return s.String() +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsManifest) SetAdMarkers(v string) *HlsManifest { + s.AdMarkers = &v + return s +} + +// SetId sets the Id field's value. +func (s *HlsManifest) SetId(v string) *HlsManifest { + s.Id = &v + return s +} + +// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. +func (s *HlsManifest) SetIncludeIframeOnlyStream(v bool) *HlsManifest { + s.IncludeIframeOnlyStream = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *HlsManifest) SetManifestName(v string) *HlsManifest { + s.ManifestName = &v + return s +} + +// SetPlaylistType sets the PlaylistType field's value. +func (s *HlsManifest) SetPlaylistType(v string) *HlsManifest { + s.PlaylistType = &v + return s +} + +// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. +func (s *HlsManifest) SetPlaylistWindowSeconds(v int64) *HlsManifest { + s.PlaylistWindowSeconds = &v + return s +} + +// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. +func (s *HlsManifest) SetProgramDateTimeIntervalSeconds(v int64) *HlsManifest { + s.ProgramDateTimeIntervalSeconds = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *HlsManifest) SetUrl(v string) *HlsManifest { + s.Url = &v + return s +} + +// A HTTP Live Streaming (HLS) manifest configuration. +type HlsManifestCreateOrUpdateParameters struct { + _ struct{} `type:"structure"` + + // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" + // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the + // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly + // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates + // ad markers and blackout tags based on SCTE-35messages in the input source. + AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` + + // The ID of the manifest. The ID must be unique within the OriginEndpoint and + // it cannot be changed after it is created. + // + // Id is a required field + Id *string `locationName:"id" type:"string" required:"true"` + + // When enabled, an I-Frame only stream will be included in the output. + IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` + + // An optional short string appended to the end of the OriginEndpoint URL. If + // not specified, defaults to the manifestName for the OriginEndpoint. + ManifestName *string `locationName:"manifestName" type:"string"` + + // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" + // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in + // the media playlist. + PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` + + // Time window (in seconds) contained in each parent manifest. + PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` + + // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted + // into manifests. Additionally, when an interval is specifiedID3Timed Metadata + // messages will be generated every 5 seconds using theingest time of the content.If + // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME + // tags will be inserted into manifests and noID3Timed Metadata messages will + // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata + // is found in HTTP Live Streaming (HLS) input,it will be passed through to + // HLS output. + ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` +} + +// String returns the string representation +func (s HlsManifestCreateOrUpdateParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsManifestCreateOrUpdateParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsManifestCreateOrUpdateParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsManifestCreateOrUpdateParameters"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetAdMarkers(v string) *HlsManifestCreateOrUpdateParameters { + s.AdMarkers = &v + return s +} + +// SetId sets the Id field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetId(v string) *HlsManifestCreateOrUpdateParameters { + s.Id = &v + return s +} + +// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetIncludeIframeOnlyStream(v bool) *HlsManifestCreateOrUpdateParameters { + s.IncludeIframeOnlyStream = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetManifestName(v string) *HlsManifestCreateOrUpdateParameters { + s.ManifestName = &v + return s +} + +// SetPlaylistType sets the PlaylistType field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetPlaylistType(v string) *HlsManifestCreateOrUpdateParameters { + s.PlaylistType = &v + return s +} + +// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetPlaylistWindowSeconds(v int64) *HlsManifestCreateOrUpdateParameters { + s.PlaylistWindowSeconds = &v + return s +} + +// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. +func (s *HlsManifestCreateOrUpdateParameters) SetProgramDateTimeIntervalSeconds(v int64) *HlsManifestCreateOrUpdateParameters { + s.ProgramDateTimeIntervalSeconds = &v + return s +} + +// An HTTP Live Streaming (HLS) packaging configuration. +type HlsPackage struct { + _ struct{} `type:"structure"` + + // This setting controls how ad markers are included in the packaged OriginEndpoint."NONE" + // will omit all SCTE-35 ad markers from the output."PASSTHROUGH" causes the + // manifest to contain a copy of the SCTE-35 admarkers (comments) taken directly + // from the input HTTP Live Streaming (HLS) manifest."SCTE35_ENHANCED" generates + // ad markers and blackout tags based on SCTE-35messages in the input source. + AdMarkers *string `locationName:"adMarkers" type:"string" enum:"AdMarkers"` + + // An HTTP Live Streaming (HLS) encryption configuration. + Encryption *HlsEncryption `locationName:"encryption" type:"structure"` + + // When enabled, an I-Frame only stream will be included in the output. + IncludeIframeOnlyStream *bool `locationName:"includeIframeOnlyStream" type:"boolean"` + + // The HTTP Live Streaming (HLS) playlist type.When either "EVENT" or "VOD" + // is specified, a corresponding EXT-X-PLAYLIST-TYPEentry will be included in + // the media playlist. + PlaylistType *string `locationName:"playlistType" type:"string" enum:"PlaylistType"` + + // Time window (in seconds) contained in each parent manifest. + PlaylistWindowSeconds *int64 `locationName:"playlistWindowSeconds" type:"integer"` + + // The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME taginserted + // into manifests. Additionally, when an interval is specifiedID3Timed Metadata + // messages will be generated every 5 seconds using theingest time of the content.If + // the interval is not specified, or set to 0, thenno EXT-X-PROGRAM-DATE-TIME + // tags will be inserted into manifests and noID3Timed Metadata messages will + // be generated. Note that irrespectiveof this parameter, if any ID3 Timed Metadata + // is found in HTTP Live Streaming (HLS) input,it will be passed through to + // HLS output. + ProgramDateTimeIntervalSeconds *int64 `locationName:"programDateTimeIntervalSeconds" type:"integer"` + + // Duration (in seconds) of each fragment. Actual fragments will berounded to + // the nearest multiple of the source fragment duration. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` + + // When enabled, audio streams will be placed in rendition groups in the output. + UseAudioRenditionGroup *bool `locationName:"useAudioRenditionGroup" type:"boolean"` +} + +// String returns the string representation +func (s HlsPackage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HlsPackage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HlsPackage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HlsPackage"} + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdMarkers sets the AdMarkers field's value. +func (s *HlsPackage) SetAdMarkers(v string) *HlsPackage { + s.AdMarkers = &v + return s +} + +// SetEncryption sets the Encryption field's value. +func (s *HlsPackage) SetEncryption(v *HlsEncryption) *HlsPackage { + s.Encryption = v + return s +} + +// SetIncludeIframeOnlyStream sets the IncludeIframeOnlyStream field's value. +func (s *HlsPackage) SetIncludeIframeOnlyStream(v bool) *HlsPackage { + s.IncludeIframeOnlyStream = &v + return s +} + +// SetPlaylistType sets the PlaylistType field's value. +func (s *HlsPackage) SetPlaylistType(v string) *HlsPackage { + s.PlaylistType = &v + return s +} + +// SetPlaylistWindowSeconds sets the PlaylistWindowSeconds field's value. +func (s *HlsPackage) SetPlaylistWindowSeconds(v int64) *HlsPackage { + s.PlaylistWindowSeconds = &v + return s +} + +// SetProgramDateTimeIntervalSeconds sets the ProgramDateTimeIntervalSeconds field's value. +func (s *HlsPackage) SetProgramDateTimeIntervalSeconds(v int64) *HlsPackage { + s.ProgramDateTimeIntervalSeconds = &v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *HlsPackage) SetSegmentDurationSeconds(v int64) *HlsPackage { + s.SegmentDurationSeconds = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *HlsPackage) SetStreamSelection(v *StreamSelection) *HlsPackage { + s.StreamSelection = v + return s +} + +// SetUseAudioRenditionGroup sets the UseAudioRenditionGroup field's value. +func (s *HlsPackage) SetUseAudioRenditionGroup(v bool) *HlsPackage { + s.UseAudioRenditionGroup = &v + return s +} + +// An endpoint for ingesting source content for a Channel. +type IngestEndpoint struct { + _ struct{} `type:"structure"` + + // The system generated unique identifier for the IngestEndpoint + Id *string `locationName:"id" type:"string"` + + // The system generated password for ingest authentication. + Password *string `locationName:"password" type:"string"` + + // The ingest URL to which the source stream should be sent. + Url *string `locationName:"url" type:"string"` + + // The system generated username for ingest authentication. + Username *string `locationName:"username" type:"string"` +} + +// String returns the string representation +func (s IngestEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IngestEndpoint) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *IngestEndpoint) SetId(v string) *IngestEndpoint { + s.Id = &v + return s +} + +// SetPassword sets the Password field's value. +func (s *IngestEndpoint) SetPassword(v string) *IngestEndpoint { + s.Password = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *IngestEndpoint) SetUrl(v string) *IngestEndpoint { + s.Url = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *IngestEndpoint) SetUsername(v string) *IngestEndpoint { + s.Username = &v + return s +} + +type ListChannelsInput struct { + _ struct{} `type:"structure"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListChannelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListChannelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListChannelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListChannelsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListChannelsInput) SetMaxResults(v int64) *ListChannelsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { + s.NextToken = &v + return s +} + +type ListChannelsOutput struct { + _ struct{} `type:"structure"` + + Channels []*Channel `locationName:"channels" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListChannelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListChannelsOutput) GoString() string { + return s.String() +} + +// SetChannels sets the Channels field's value. +func (s *ListChannelsOutput) SetChannels(v []*Channel) *ListChannelsOutput { + s.Channels = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { + s.NextToken = &v + return s +} + +type ListOriginEndpointsInput struct { + _ struct{} `type:"structure"` + + ChannelId *string `location:"querystring" locationName:"channelId" type:"string"` + + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListOriginEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOriginEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListOriginEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOriginEndpointsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelId sets the ChannelId field's value. +func (s *ListOriginEndpointsInput) SetChannelId(v string) *ListOriginEndpointsInput { + s.ChannelId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListOriginEndpointsInput) SetMaxResults(v int64) *ListOriginEndpointsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOriginEndpointsInput) SetNextToken(v string) *ListOriginEndpointsInput { + s.NextToken = &v + return s +} + +type ListOriginEndpointsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + OriginEndpoints []*OriginEndpoint `locationName:"originEndpoints" type:"list"` +} + +// String returns the string representation +func (s ListOriginEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOriginEndpointsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListOriginEndpointsOutput) SetNextToken(v string) *ListOriginEndpointsOutput { + s.NextToken = &v + return s +} + +// SetOriginEndpoints sets the OriginEndpoints field's value. +func (s *ListOriginEndpointsOutput) SetOriginEndpoints(v []*OriginEndpoint) *ListOriginEndpointsOutput { + s.OriginEndpoints = v + return s +} + +// A Microsoft Smooth Streaming (MSS) encryption configuration. +type MssEncryption struct { + _ struct{} `type:"structure"` + + // A configuration for accessing an external Secure Packager and Encoder Key + // Exchange (SPEKE) service that will provide encryption keys. + // + // SpekeKeyProvider is a required field + SpekeKeyProvider *SpekeKeyProvider `locationName:"spekeKeyProvider" type:"structure" required:"true"` +} + +// String returns the string representation +func (s MssEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MssEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MssEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MssEncryption"} + if s.SpekeKeyProvider == nil { + invalidParams.Add(request.NewErrParamRequired("SpekeKeyProvider")) + } + if s.SpekeKeyProvider != nil { + if err := s.SpekeKeyProvider.Validate(); err != nil { + invalidParams.AddNested("SpekeKeyProvider", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSpekeKeyProvider sets the SpekeKeyProvider field's value. +func (s *MssEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *MssEncryption { + s.SpekeKeyProvider = v + return s +} + +// A Microsoft Smooth Streaming (MSS) packaging configuration. +type MssPackage struct { + _ struct{} `type:"structure"` + + // A Microsoft Smooth Streaming (MSS) encryption configuration. + Encryption *MssEncryption `locationName:"encryption" type:"structure"` + + // The time window (in seconds) contained in each manifest. + ManifestWindowSeconds *int64 `locationName:"manifestWindowSeconds" type:"integer"` + + // The duration (in seconds) of each segment. + SegmentDurationSeconds *int64 `locationName:"segmentDurationSeconds" type:"integer"` + + // A StreamSelection configuration. + StreamSelection *StreamSelection `locationName:"streamSelection" type:"structure"` +} + +// String returns the string representation +func (s MssPackage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MssPackage) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MssPackage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MssPackage"} + if s.Encryption != nil { + if err := s.Encryption.Validate(); err != nil { + invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryption sets the Encryption field's value. +func (s *MssPackage) SetEncryption(v *MssEncryption) *MssPackage { + s.Encryption = v + return s +} + +// SetManifestWindowSeconds sets the ManifestWindowSeconds field's value. +func (s *MssPackage) SetManifestWindowSeconds(v int64) *MssPackage { + s.ManifestWindowSeconds = &v + return s +} + +// SetSegmentDurationSeconds sets the SegmentDurationSeconds field's value. +func (s *MssPackage) SetSegmentDurationSeconds(v int64) *MssPackage { + s.SegmentDurationSeconds = &v + return s +} + +// SetStreamSelection sets the StreamSelection field's value. +func (s *MssPackage) SetStreamSelection(v *StreamSelection) *MssPackage { + s.StreamSelection = v + return s +} + +// An OriginEndpoint resource configuration. +type OriginEndpoint struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) assigned to the OriginEndpoint. + Arn *string `locationName:"arn" type:"string"` + + // The ID of the Channel the OriginEndpoint is associated with. + ChannelId *string `locationName:"channelId" type:"string"` + + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. + DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` + + // A short text description of the OriginEndpoint. + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) packaging configuration. + HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` + + // The ID of the OriginEndpoint. + Id *string `locationName:"id" type:"string"` + + // A short string appended to the end of the OriginEndpoint URL. + ManifestName *string `locationName:"manifestName" type:"string"` + + // A Microsoft Smooth Streaming (MSS) packaging configuration. + MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` + + // Maximum duration (seconds) of content to retain for startover playback.If + // not specified, startover playback will be disabled for the OriginEndpoint. + StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` + + // Amount of delay (seconds) to enforce on the playback of live content.If not + // specified, there will be no time delay in effect for the OriginEndpoint. + TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` + + // The URL of the packaged OriginEndpoint for consumption. + Url *string `locationName:"url" type:"string"` + + // A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint. + Whitelist []*string `locationName:"whitelist" type:"list"` +} + +// String returns the string representation +func (s OriginEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OriginEndpoint) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *OriginEndpoint) SetArn(v string) *OriginEndpoint { + s.Arn = &v + return s +} + +// SetChannelId sets the ChannelId field's value. +func (s *OriginEndpoint) SetChannelId(v string) *OriginEndpoint { + s.ChannelId = &v + return s +} + +// SetCmafPackage sets the CmafPackage field's value. +func (s *OriginEndpoint) SetCmafPackage(v *CmafPackage) *OriginEndpoint { + s.CmafPackage = v + return s +} + +// SetDashPackage sets the DashPackage field's value. +func (s *OriginEndpoint) SetDashPackage(v *DashPackage) *OriginEndpoint { + s.DashPackage = v + return s +} + +// SetDescription sets the Description field's value. +func (s *OriginEndpoint) SetDescription(v string) *OriginEndpoint { + s.Description = &v + return s +} + +// SetHlsPackage sets the HlsPackage field's value. +func (s *OriginEndpoint) SetHlsPackage(v *HlsPackage) *OriginEndpoint { + s.HlsPackage = v + return s +} + +// SetId sets the Id field's value. +func (s *OriginEndpoint) SetId(v string) *OriginEndpoint { + s.Id = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *OriginEndpoint) SetManifestName(v string) *OriginEndpoint { + s.ManifestName = &v + return s +} + +// SetMssPackage sets the MssPackage field's value. +func (s *OriginEndpoint) SetMssPackage(v *MssPackage) *OriginEndpoint { + s.MssPackage = v + return s +} + +// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. +func (s *OriginEndpoint) SetStartoverWindowSeconds(v int64) *OriginEndpoint { + s.StartoverWindowSeconds = &v + return s +} + +// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. +func (s *OriginEndpoint) SetTimeDelaySeconds(v int64) *OriginEndpoint { + s.TimeDelaySeconds = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *OriginEndpoint) SetUrl(v string) *OriginEndpoint { + s.Url = &v + return s +} + +// SetWhitelist sets the Whitelist field's value. +func (s *OriginEndpoint) SetWhitelist(v []*string) *OriginEndpoint { + s.Whitelist = v + return s +} + +// Deprecated: RotateChannelCredentialsInput has been deprecated +type RotateChannelCredentialsInput struct { + _ struct{} `deprecated:"true" type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s RotateChannelCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateChannelCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotateChannelCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotateChannelCredentialsInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *RotateChannelCredentialsInput) SetId(v string) *RotateChannelCredentialsInput { + s.Id = &v + return s +} + +// Deprecated: RotateChannelCredentialsOutput has been deprecated +type RotateChannelCredentialsOutput struct { + _ struct{} `deprecated:"true" type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s RotateChannelCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateChannelCredentialsOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *RotateChannelCredentialsOutput) SetArn(v string) *RotateChannelCredentialsOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RotateChannelCredentialsOutput) SetDescription(v string) *RotateChannelCredentialsOutput { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *RotateChannelCredentialsOutput) SetHlsIngest(v *HlsIngest) *RotateChannelCredentialsOutput { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *RotateChannelCredentialsOutput) SetId(v string) *RotateChannelCredentialsOutput { + s.Id = &v + return s +} + +type RotateIngestEndpointCredentialsInput struct { + _ struct{} `type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` + + // IngestEndpointId is a required field + IngestEndpointId *string `location:"uri" locationName:"ingest_endpoint_id" type:"string" required:"true"` +} + +// String returns the string representation +func (s RotateIngestEndpointCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateIngestEndpointCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RotateIngestEndpointCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RotateIngestEndpointCredentialsInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.IngestEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("IngestEndpointId")) + } + if s.IngestEndpointId != nil && len(*s.IngestEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IngestEndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *RotateIngestEndpointCredentialsInput) SetId(v string) *RotateIngestEndpointCredentialsInput { + s.Id = &v + return s +} + +// SetIngestEndpointId sets the IngestEndpointId field's value. +func (s *RotateIngestEndpointCredentialsInput) SetIngestEndpointId(v string) *RotateIngestEndpointCredentialsInput { + s.IngestEndpointId = &v + return s +} + +type RotateIngestEndpointCredentialsOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s RotateIngestEndpointCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RotateIngestEndpointCredentialsOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetArn(v string) *RotateIngestEndpointCredentialsOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetDescription(v string) *RotateIngestEndpointCredentialsOutput { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetHlsIngest(v *HlsIngest) *RotateIngestEndpointCredentialsOutput { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *RotateIngestEndpointCredentialsOutput) SetId(v string) *RotateIngestEndpointCredentialsOutput { + s.Id = &v + return s +} + +// A configuration for accessing an external Secure Packager and Encoder Key +// Exchange (SPEKE) service that will provide encryption keys. +type SpekeKeyProvider struct { + _ struct{} `type:"structure"` + + // An Amazon Resource Name (ARN) of a Certificate Manager certificatethat MediaPackage + // will use for enforcing secure end-to-end datatransfer with the key provider + // service. + CertificateArn *string `locationName:"certificateArn" type:"string"` + + // The resource ID to include in key requests. + // + // ResourceId is a required field + ResourceId *string `locationName:"resourceId" type:"string" required:"true"` + + // An Amazon Resource Name (ARN) of an IAM role that AWS ElementalMediaPackage + // will assume when accessing the key provider service. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The system IDs to include in key requests. + // + // SystemIds is a required field + SystemIds []*string `locationName:"systemIds" type:"list" required:"true"` + + // The URL of the external key provider service. + // + // Url is a required field + Url *string `locationName:"url" type:"string" required:"true"` +} + +// String returns the string representation +func (s SpekeKeyProvider) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpekeKeyProvider) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SpekeKeyProvider) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SpekeKeyProvider"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.SystemIds == nil { + invalidParams.Add(request.NewErrParamRequired("SystemIds")) + } + if s.Url == nil { + invalidParams.Add(request.NewErrParamRequired("Url")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateArn sets the CertificateArn field's value. +func (s *SpekeKeyProvider) SetCertificateArn(v string) *SpekeKeyProvider { + s.CertificateArn = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *SpekeKeyProvider) SetResourceId(v string) *SpekeKeyProvider { + s.ResourceId = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *SpekeKeyProvider) SetRoleArn(v string) *SpekeKeyProvider { + s.RoleArn = &v + return s +} + +// SetSystemIds sets the SystemIds field's value. +func (s *SpekeKeyProvider) SetSystemIds(v []*string) *SpekeKeyProvider { + s.SystemIds = v + return s +} + +// SetUrl sets the Url field's value. +func (s *SpekeKeyProvider) SetUrl(v string) *SpekeKeyProvider { + s.Url = &v + return s +} + +// A StreamSelection configuration. +type StreamSelection struct { + _ struct{} `type:"structure"` + + // The maximum video bitrate (bps) to include in output. + MaxVideoBitsPerSecond *int64 `locationName:"maxVideoBitsPerSecond" type:"integer"` + + // The minimum video bitrate (bps) to include in output. + MinVideoBitsPerSecond *int64 `locationName:"minVideoBitsPerSecond" type:"integer"` + + // A directive that determines the order of streams in the output. + StreamOrder *string `locationName:"streamOrder" type:"string" enum:"StreamOrder"` +} + +// String returns the string representation +func (s StreamSelection) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StreamSelection) GoString() string { + return s.String() +} + +// SetMaxVideoBitsPerSecond sets the MaxVideoBitsPerSecond field's value. +func (s *StreamSelection) SetMaxVideoBitsPerSecond(v int64) *StreamSelection { + s.MaxVideoBitsPerSecond = &v + return s +} + +// SetMinVideoBitsPerSecond sets the MinVideoBitsPerSecond field's value. +func (s *StreamSelection) SetMinVideoBitsPerSecond(v int64) *StreamSelection { + s.MinVideoBitsPerSecond = &v + return s +} + +// SetStreamOrder sets the StreamOrder field's value. +func (s *StreamSelection) SetStreamOrder(v string) *StreamSelection { + s.StreamOrder = &v + return s +} + +type UpdateChannelInput struct { + _ struct{} `type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateChannelInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateChannelInput) SetDescription(v string) *UpdateChannelInput { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateChannelInput) SetId(v string) *UpdateChannelInput { + s.Id = &v + return s +} + +type UpdateChannelOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) ingest resource configuration. + HlsIngest *HlsIngest `locationName:"hlsIngest" type:"structure"` + + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s UpdateChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateChannelOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *UpdateChannelOutput) SetArn(v string) *UpdateChannelOutput { + s.Arn = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateChannelOutput) SetDescription(v string) *UpdateChannelOutput { + s.Description = &v + return s +} + +// SetHlsIngest sets the HlsIngest field's value. +func (s *UpdateChannelOutput) SetHlsIngest(v *HlsIngest) *UpdateChannelOutput { + s.HlsIngest = v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateChannelOutput) SetId(v string) *UpdateChannelOutput { + s.Id = &v + return s +} + +type UpdateOriginEndpointInput struct { + _ struct{} `type:"structure"` + + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackageCreateOrUpdateParameters `locationName:"cmafPackage" type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. + DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) packaging configuration. + HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` + + // Id is a required field + Id *string `location:"uri" locationName:"id" type:"string" required:"true"` + + ManifestName *string `locationName:"manifestName" type:"string"` + + // A Microsoft Smooth Streaming (MSS) packaging configuration. + MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` + + StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` + + TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` + + Whitelist []*string `locationName:"whitelist" type:"list"` +} + +// String returns the string representation +func (s UpdateOriginEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateOriginEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateOriginEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateOriginEndpointInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.CmafPackage != nil { + if err := s.CmafPackage.Validate(); err != nil { + invalidParams.AddNested("CmafPackage", err.(request.ErrInvalidParams)) + } + } + if s.DashPackage != nil { + if err := s.DashPackage.Validate(); err != nil { + invalidParams.AddNested("DashPackage", err.(request.ErrInvalidParams)) + } + } + if s.HlsPackage != nil { + if err := s.HlsPackage.Validate(); err != nil { + invalidParams.AddNested("HlsPackage", err.(request.ErrInvalidParams)) + } + } + if s.MssPackage != nil { + if err := s.MssPackage.Validate(); err != nil { + invalidParams.AddNested("MssPackage", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCmafPackage sets the CmafPackage field's value. +func (s *UpdateOriginEndpointInput) SetCmafPackage(v *CmafPackageCreateOrUpdateParameters) *UpdateOriginEndpointInput { + s.CmafPackage = v + return s +} + +// SetDashPackage sets the DashPackage field's value. +func (s *UpdateOriginEndpointInput) SetDashPackage(v *DashPackage) *UpdateOriginEndpointInput { + s.DashPackage = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateOriginEndpointInput) SetDescription(v string) *UpdateOriginEndpointInput { + s.Description = &v + return s +} + +// SetHlsPackage sets the HlsPackage field's value. +func (s *UpdateOriginEndpointInput) SetHlsPackage(v *HlsPackage) *UpdateOriginEndpointInput { + s.HlsPackage = v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateOriginEndpointInput) SetId(v string) *UpdateOriginEndpointInput { + s.Id = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *UpdateOriginEndpointInput) SetManifestName(v string) *UpdateOriginEndpointInput { + s.ManifestName = &v + return s +} + +// SetMssPackage sets the MssPackage field's value. +func (s *UpdateOriginEndpointInput) SetMssPackage(v *MssPackage) *UpdateOriginEndpointInput { + s.MssPackage = v + return s +} + +// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. +func (s *UpdateOriginEndpointInput) SetStartoverWindowSeconds(v int64) *UpdateOriginEndpointInput { + s.StartoverWindowSeconds = &v + return s +} + +// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. +func (s *UpdateOriginEndpointInput) SetTimeDelaySeconds(v int64) *UpdateOriginEndpointInput { + s.TimeDelaySeconds = &v + return s +} + +// SetWhitelist sets the Whitelist field's value. +func (s *UpdateOriginEndpointInput) SetWhitelist(v []*string) *UpdateOriginEndpointInput { + s.Whitelist = v + return s +} + +type UpdateOriginEndpointOutput struct { + _ struct{} `type:"structure"` + + Arn *string `locationName:"arn" type:"string"` + + ChannelId *string `locationName:"channelId" type:"string"` + + // A Common Media Application Format (CMAF) packaging configuration. + CmafPackage *CmafPackage `locationName:"cmafPackage" type:"structure"` + + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. + DashPackage *DashPackage `locationName:"dashPackage" type:"structure"` + + Description *string `locationName:"description" type:"string"` + + // An HTTP Live Streaming (HLS) packaging configuration. + HlsPackage *HlsPackage `locationName:"hlsPackage" type:"structure"` + + Id *string `locationName:"id" type:"string"` + + ManifestName *string `locationName:"manifestName" type:"string"` + + // A Microsoft Smooth Streaming (MSS) packaging configuration. + MssPackage *MssPackage `locationName:"mssPackage" type:"structure"` + + StartoverWindowSeconds *int64 `locationName:"startoverWindowSeconds" type:"integer"` + + TimeDelaySeconds *int64 `locationName:"timeDelaySeconds" type:"integer"` + + Url *string `locationName:"url" type:"string"` + + Whitelist []*string `locationName:"whitelist" type:"list"` +} + +// String returns the string representation +func (s UpdateOriginEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateOriginEndpointOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *UpdateOriginEndpointOutput) SetArn(v string) *UpdateOriginEndpointOutput { + s.Arn = &v + return s +} + +// SetChannelId sets the ChannelId field's value. +func (s *UpdateOriginEndpointOutput) SetChannelId(v string) *UpdateOriginEndpointOutput { + s.ChannelId = &v + return s +} + +// SetCmafPackage sets the CmafPackage field's value. +func (s *UpdateOriginEndpointOutput) SetCmafPackage(v *CmafPackage) *UpdateOriginEndpointOutput { + s.CmafPackage = v + return s +} + +// SetDashPackage sets the DashPackage field's value. +func (s *UpdateOriginEndpointOutput) SetDashPackage(v *DashPackage) *UpdateOriginEndpointOutput { + s.DashPackage = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateOriginEndpointOutput) SetDescription(v string) *UpdateOriginEndpointOutput { + s.Description = &v + return s +} + +// SetHlsPackage sets the HlsPackage field's value. +func (s *UpdateOriginEndpointOutput) SetHlsPackage(v *HlsPackage) *UpdateOriginEndpointOutput { + s.HlsPackage = v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateOriginEndpointOutput) SetId(v string) *UpdateOriginEndpointOutput { + s.Id = &v + return s +} + +// SetManifestName sets the ManifestName field's value. +func (s *UpdateOriginEndpointOutput) SetManifestName(v string) *UpdateOriginEndpointOutput { + s.ManifestName = &v + return s +} + +// SetMssPackage sets the MssPackage field's value. +func (s *UpdateOriginEndpointOutput) SetMssPackage(v *MssPackage) *UpdateOriginEndpointOutput { + s.MssPackage = v + return s +} + +// SetStartoverWindowSeconds sets the StartoverWindowSeconds field's value. +func (s *UpdateOriginEndpointOutput) SetStartoverWindowSeconds(v int64) *UpdateOriginEndpointOutput { + s.StartoverWindowSeconds = &v + return s +} + +// SetTimeDelaySeconds sets the TimeDelaySeconds field's value. +func (s *UpdateOriginEndpointOutput) SetTimeDelaySeconds(v int64) *UpdateOriginEndpointOutput { + s.TimeDelaySeconds = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *UpdateOriginEndpointOutput) SetUrl(v string) *UpdateOriginEndpointOutput { + s.Url = &v + return s +} + +// SetWhitelist sets the Whitelist field's value. +func (s *UpdateOriginEndpointOutput) SetWhitelist(v []*string) *UpdateOriginEndpointOutput { + s.Whitelist = v + return s +} + +const ( + // AdMarkersNone is a AdMarkers enum value + AdMarkersNone = "NONE" + + // AdMarkersScte35Enhanced is a AdMarkers enum value + AdMarkersScte35Enhanced = "SCTE35_ENHANCED" + + // AdMarkersPassthrough is a AdMarkers enum value + AdMarkersPassthrough = "PASSTHROUGH" +) + +const ( + // EncryptionMethodAes128 is a EncryptionMethod enum value + EncryptionMethodAes128 = "AES_128" + + // EncryptionMethodSampleAes is a EncryptionMethod enum value + EncryptionMethodSampleAes = "SAMPLE_AES" +) + +const ( + // PlaylistTypeNone is a PlaylistType enum value + PlaylistTypeNone = "NONE" + + // PlaylistTypeEvent is a PlaylistType enum value + PlaylistTypeEvent = "EVENT" + + // PlaylistTypeVod is a PlaylistType enum value + PlaylistTypeVod = "VOD" +) + +const ( + // ProfileNone is a Profile enum value + ProfileNone = "NONE" + + // ProfileHbbtv15 is a Profile enum value + ProfileHbbtv15 = "HBBTV_1_5" +) + +const ( + // StreamOrderOriginal is a StreamOrder enum value + StreamOrderOriginal = "ORIGINAL" + + // StreamOrderVideoBitrateAscending is a StreamOrder enum value + StreamOrderVideoBitrateAscending = "VIDEO_BITRATE_ASCENDING" + + // StreamOrderVideoBitrateDescending is a StreamOrder enum value + StreamOrderVideoBitrateDescending = "VIDEO_BITRATE_DESCENDING" +) + +const ( + // __PeriodTriggersElementAds is a __PeriodTriggersElement enum value + __PeriodTriggersElementAds = "ADS" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go new file mode 100644 index 000000000..03c868349 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package mediapackage provides the client and types for making API +// requests to AWS Elemental MediaPackage. +// +// AWS Elemental MediaPackage +// +// See https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12 for more information on this service. +// +// See mediapackage package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediapackage/ +// +// Using the Client +// +// To contact AWS Elemental MediaPackage with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Elemental MediaPackage client MediaPackage for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediapackage/#New +package mediapackage diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go new file mode 100644 index 000000000..c6ba3649e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/errors.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediapackage + +const ( + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeUnprocessableEntityException for service response error code + // "UnprocessableEntityException". + ErrCodeUnprocessableEntityException = "UnprocessableEntityException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go new file mode 100644 index 000000000..96dd74dcf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediapackage/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediapackage + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// MediaPackage provides the API operation methods for making requests to +// AWS Elemental MediaPackage. See this package's package overview docs +// for details on the service. +// +// MediaPackage methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type MediaPackage struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "mediapackage" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaPackage" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the MediaPackage client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a MediaPackage client from just a session. +// svc := mediapackage.New(mySession) +// +// // Create a MediaPackage client with additional configuration +// svc := mediapackage.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaPackage { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediapackage" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaPackage { + svc := &MediaPackage{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-10-12", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a MediaPackage operation and runs any +// custom request initialization. +func (c *MediaPackage) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go new file mode 100644 index 000000000..a8e1df9fc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/api.go @@ -0,0 +1,1112 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediastoredata + +import ( + "io" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opDeleteObject = "DeleteObject" + +// DeleteObjectRequest generates a "aws/request.Request" representing the +// client's request for the DeleteObject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteObject for more information on using the DeleteObject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteObjectRequest method. +// req, resp := client.DeleteObjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject +func (c *MediaStoreData) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) { + op := &request.Operation{ + Name: opDeleteObject, + HTTPMethod: "DELETE", + HTTPPath: "/{Path+}", + } + + if input == nil { + input = &DeleteObjectInput{} + } + + output = &DeleteObjectOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteObject API operation for AWS Elemental MediaStore Data Plane. +// +// Deletes an object at the specified path. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's +// API operation DeleteObject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The specified container was not found for the specified account. +// +// * ErrCodeObjectNotFoundException "ObjectNotFoundException" +// Could not perform an operation on an object that does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject +func (c *MediaStoreData) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) { + req, out := c.DeleteObjectRequest(input) + return out, req.Send() +} + +// DeleteObjectWithContext is the same as DeleteObject with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteObject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStoreData) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) { + req, out := c.DeleteObjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeObject = "DescribeObject" + +// DescribeObjectRequest generates a "aws/request.Request" representing the +// client's request for the DescribeObject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeObject for more information on using the DescribeObject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeObjectRequest method. +// req, resp := client.DescribeObjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject +func (c *MediaStoreData) DescribeObjectRequest(input *DescribeObjectInput) (req *request.Request, output *DescribeObjectOutput) { + op := &request.Operation{ + Name: opDescribeObject, + HTTPMethod: "HEAD", + HTTPPath: "/{Path+}", + } + + if input == nil { + input = &DescribeObjectInput{} + } + + output = &DescribeObjectOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeObject API operation for AWS Elemental MediaStore Data Plane. +// +// Gets the headers for an object at the specified path. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's +// API operation DescribeObject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The specified container was not found for the specified account. +// +// * ErrCodeObjectNotFoundException "ObjectNotFoundException" +// Could not perform an operation on an object that does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject +func (c *MediaStoreData) DescribeObject(input *DescribeObjectInput) (*DescribeObjectOutput, error) { + req, out := c.DescribeObjectRequest(input) + return out, req.Send() +} + +// DescribeObjectWithContext is the same as DescribeObject with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeObject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStoreData) DescribeObjectWithContext(ctx aws.Context, input *DescribeObjectInput, opts ...request.Option) (*DescribeObjectOutput, error) { + req, out := c.DescribeObjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetObject = "GetObject" + +// GetObjectRequest generates a "aws/request.Request" representing the +// client's request for the GetObject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetObject for more information on using the GetObject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetObjectRequest method. +// req, resp := client.GetObjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject +func (c *MediaStoreData) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) { + op := &request.Operation{ + Name: opGetObject, + HTTPMethod: "GET", + HTTPPath: "/{Path+}", + } + + if input == nil { + input = &GetObjectInput{} + } + + output = &GetObjectOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetObject API operation for AWS Elemental MediaStore Data Plane. +// +// Downloads the object at the specified path. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's +// API operation GetObject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The specified container was not found for the specified account. +// +// * ErrCodeObjectNotFoundException "ObjectNotFoundException" +// Could not perform an operation on an object that does not exist. +// +// * ErrCodeRequestedRangeNotSatisfiableException "RequestedRangeNotSatisfiableException" +// The requested content range is not valid. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject +func (c *MediaStoreData) GetObject(input *GetObjectInput) (*GetObjectOutput, error) { + req, out := c.GetObjectRequest(input) + return out, req.Send() +} + +// GetObjectWithContext is the same as GetObject with the addition of +// the ability to pass a context and additional request options. +// +// See GetObject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStoreData) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) { + req, out := c.GetObjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListItems = "ListItems" + +// ListItemsRequest generates a "aws/request.Request" representing the +// client's request for the ListItems operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListItems for more information on using the ListItems +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListItemsRequest method. +// req, resp := client.ListItemsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems +func (c *MediaStoreData) ListItemsRequest(input *ListItemsInput) (req *request.Request, output *ListItemsOutput) { + op := &request.Operation{ + Name: opListItems, + HTTPMethod: "GET", + HTTPPath: "/", + } + + if input == nil { + input = &ListItemsInput{} + } + + output = &ListItemsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListItems API operation for AWS Elemental MediaStore Data Plane. +// +// Provides a list of metadata entries about folders and objects in the specified +// folder. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's +// API operation ListItems for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The specified container was not found for the specified account. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems +func (c *MediaStoreData) ListItems(input *ListItemsInput) (*ListItemsOutput, error) { + req, out := c.ListItemsRequest(input) + return out, req.Send() +} + +// ListItemsWithContext is the same as ListItems with the addition of +// the ability to pass a context and additional request options. +// +// See ListItems for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStoreData) ListItemsWithContext(ctx aws.Context, input *ListItemsInput, opts ...request.Option) (*ListItemsOutput, error) { + req, out := c.ListItemsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutObject = "PutObject" + +// PutObjectRequest generates a "aws/request.Request" representing the +// client's request for the PutObject operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutObject for more information on using the PutObject +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutObjectRequest method. +// req, resp := client.PutObjectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject +func (c *MediaStoreData) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) { + op := &request.Operation{ + Name: opPutObject, + HTTPMethod: "PUT", + HTTPPath: "/{Path+}", + } + + if input == nil { + input = &PutObjectInput{} + } + + output = &PutObjectOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Sign.Remove(v4.SignRequestHandler) + handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload) + req.Handlers.Sign.PushFrontNamed(handler) + return +} + +// PutObject API operation for AWS Elemental MediaStore Data Plane. +// +// Uploads an object to the specified path. Object sizes are limited to 25 MB. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaStore Data Plane's +// API operation PutObject for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The specified container was not found for the specified account. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject +func (c *MediaStoreData) PutObject(input *PutObjectInput) (*PutObjectOutput, error) { + req, out := c.PutObjectRequest(input) + return out, req.Send() +} + +// PutObjectWithContext is the same as PutObject with the addition of +// the ability to pass a context and additional request options. +// +// See PutObject for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *MediaStoreData) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) { + req, out := c.PutObjectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type DeleteObjectInput struct { + _ struct{} `type:"structure"` + + // The path (including the file name) where the object is stored in the container. + // Format: // + // + // Path is a required field + Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteObjectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteObjectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} + if s.Path == nil { + invalidParams.Add(request.NewErrParamRequired("Path")) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPath sets the Path field's value. +func (s *DeleteObjectInput) SetPath(v string) *DeleteObjectInput { + s.Path = &v + return s +} + +type DeleteObjectOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteObjectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteObjectOutput) GoString() string { + return s.String() +} + +type DescribeObjectInput struct { + _ struct{} `type:"structure"` + + // The path (including the file name) where the object is stored in the container. + // Format: // + // + // Path is a required field + Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeObjectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeObjectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeObjectInput"} + if s.Path == nil { + invalidParams.Add(request.NewErrParamRequired("Path")) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPath sets the Path field's value. +func (s *DescribeObjectInput) SetPath(v string) *DescribeObjectInput { + s.Path = &v + return s +} + +type DescribeObjectOutput struct { + _ struct{} `type:"structure"` + + // An optional CacheControl header that allows the caller to control the object's + // cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 + // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). + // + // Headers with a custom user-defined value are also accepted. + CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` + + // The length of the object in bytes. + ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` + + // The content type of the object. + ContentType *string `location:"header" locationName:"Content-Type" type:"string"` + + // The ETag that represents a unique instance of the object. + ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` + + // The date and time that the object was last modified. + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` +} + +// String returns the string representation +func (s DescribeObjectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeObjectOutput) GoString() string { + return s.String() +} + +// SetCacheControl sets the CacheControl field's value. +func (s *DescribeObjectOutput) SetCacheControl(v string) *DescribeObjectOutput { + s.CacheControl = &v + return s +} + +// SetContentLength sets the ContentLength field's value. +func (s *DescribeObjectOutput) SetContentLength(v int64) *DescribeObjectOutput { + s.ContentLength = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *DescribeObjectOutput) SetContentType(v string) *DescribeObjectOutput { + s.ContentType = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *DescribeObjectOutput) SetETag(v string) *DescribeObjectOutput { + s.ETag = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *DescribeObjectOutput) SetLastModified(v time.Time) *DescribeObjectOutput { + s.LastModified = &v + return s +} + +type GetObjectInput struct { + _ struct{} `type:"structure"` + + // The path (including the file name) where the object is stored in the container. + // Format: // + // + // For example, to upload the file mlaw.avi to the folder path premium\canada + // in the container movies, enter the path premium/canada/mlaw.avi. + // + // Do not include the container name in this path. + // + // If the path includes any folders that don't exist yet, the service creates + // them. For example, suppose you have an existing premium/usa subfolder. If + // you specify premium/canada, the service creates a canada subfolder in the + // premium folder. You then have two subfolders, usa and canada, in the premium + // folder. + // + // There is no correlation between the path to the source and the path (folders) + // in the container in AWS Elemental MediaStore. + // + // For more information about folders and how they exist in a container, see + // the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/). + // + // The file name is the name that is assigned to the file that you upload. The + // file can have the same name inside and outside of AWS Elemental MediaStore, + // or it can have the same name. The file name can include or omit an extension. + // + // Path is a required field + Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` + + // The range bytes of an object to retrieve. For more information about the + // Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 + // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35). + Range *string `location:"header" locationName:"Range" type:"string"` +} + +// String returns the string representation +func (s GetObjectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} + if s.Path == nil { + invalidParams.Add(request.NewErrParamRequired("Path")) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPath sets the Path field's value. +func (s *GetObjectInput) SetPath(v string) *GetObjectInput { + s.Path = &v + return s +} + +// SetRange sets the Range field's value. +func (s *GetObjectInput) SetRange(v string) *GetObjectInput { + s.Range = &v + return s +} + +type GetObjectOutput struct { + _ struct{} `type:"structure" payload:"Body"` + + // The bytes of the object. + Body io.ReadCloser `type:"blob"` + + // An optional CacheControl header that allows the caller to control the object's + // cache behavior. Headers can be passed in as specified in the HTTP spec at + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). + // + // Headers with a custom user-defined value are also accepted. + CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` + + // The length of the object in bytes. + ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` + + // The range of bytes to retrieve. + ContentRange *string `location:"header" locationName:"Content-Range" type:"string"` + + // The content type of the object. + ContentType *string `location:"header" locationName:"Content-Type" type:"string"` + + // The ETag that represents a unique instance of the object. + ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` + + // The date and time that the object was last modified. + LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` + + // The HTML status code of the request. Status codes ranging from 200 to 299 + // indicate success. All other status codes indicate the type of error that + // occurred. + // + // StatusCode is a required field + StatusCode *int64 `location:"statusCode" type:"integer" required:"true"` +} + +// String returns the string representation +func (s GetObjectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectOutput) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput { + s.Body = v + return s +} + +// SetCacheControl sets the CacheControl field's value. +func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput { + s.CacheControl = &v + return s +} + +// SetContentLength sets the ContentLength field's value. +func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput { + s.ContentLength = &v + return s +} + +// SetContentRange sets the ContentRange field's value. +func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput { + s.ContentRange = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput { + s.ContentType = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput { + s.ETag = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput { + s.LastModified = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput { + s.StatusCode = &v + return s +} + +// A metadata entry for a folder or object. +type Item struct { + _ struct{} `type:"structure"` + + // The length of the item in bytes. + ContentLength *int64 `type:"long"` + + // The content type of the item. + ContentType *string `type:"string"` + + // The ETag that represents a unique instance of the item. + ETag *string `min:"1" type:"string"` + + // The date and time that the item was last modified. + LastModified *time.Time `type:"timestamp"` + + // The name of the item. + Name *string `type:"string"` + + // The item type (folder or object). + Type *string `type:"string" enum:"ItemType"` +} + +// String returns the string representation +func (s Item) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Item) GoString() string { + return s.String() +} + +// SetContentLength sets the ContentLength field's value. +func (s *Item) SetContentLength(v int64) *Item { + s.ContentLength = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *Item) SetContentType(v string) *Item { + s.ContentType = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *Item) SetETag(v string) *Item { + s.ETag = &v + return s +} + +// SetLastModified sets the LastModified field's value. +func (s *Item) SetLastModified(v time.Time) *Item { + s.LastModified = &v + return s +} + +// SetName sets the Name field's value. +func (s *Item) SetName(v string) *Item { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *Item) SetType(v string) *Item { + s.Type = &v + return s +} + +type ListItemsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return per API request. For example, you + // submit a ListItems request with MaxResults set at 500. Although 2,000 items + // match your request, the service returns no more than the first 500 items. + // (The service also returns a NextToken value that you can use to fetch the + // next batch of results.) The service might return fewer results than the MaxResults + // value. + // + // If MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 1,000 results per page. + MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListItems request with MaxResults set at 500. The service + // returns the first batch of results (up to 500) and a NextToken value. To + // see the next batch of results, you can submit the ListItems request a second + // time and specify the NextToken value. + // + // Tokens expire after 15 minutes. + NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` + + // The path in the container from which to retrieve items. Format: // + Path *string `location:"querystring" locationName:"Path" type:"string"` +} + +// String returns the string representation +func (s ListItemsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListItemsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListItemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListItemsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListItemsInput) SetMaxResults(v int64) *ListItemsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListItemsInput) SetNextToken(v string) *ListItemsInput { + s.NextToken = &v + return s +} + +// SetPath sets the Path field's value. +func (s *ListItemsInput) SetPath(v string) *ListItemsInput { + s.Path = &v + return s +} + +type ListItemsOutput struct { + _ struct{} `type:"structure"` + + // The metadata entries for the folders and objects at the requested path. + Items []*Item `type:"list"` + + // The token that can be used in a request to view the next set of results. + // For example, you submit a ListItems request that matches 2,000 items with + // MaxResults set at 500. The service returns the first batch of results (up + // to 500) and a NextToken value that can be used to fetch the next batch of + // results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListItemsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListItemsOutput) GoString() string { + return s.String() +} + +// SetItems sets the Items field's value. +func (s *ListItemsOutput) SetItems(v []*Item) *ListItemsOutput { + s.Items = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListItemsOutput) SetNextToken(v string) *ListItemsOutput { + s.NextToken = &v + return s +} + +type PutObjectInput struct { + _ struct{} `type:"structure" payload:"Body"` + + // The bytes to be stored. + // + // Body is a required field + Body io.ReadSeeker `type:"blob" required:"true"` + + // An optional CacheControl header that allows the caller to control the object's + // cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 + // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). + // + // Headers with a custom user-defined value are also accepted. + CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` + + // The content type of the object. + ContentType *string `location:"header" locationName:"Content-Type" type:"string"` + + // The path (including the file name) where the object is stored in the container. + // Format: // + // + // For example, to upload the file mlaw.avi to the folder path premium\canada + // in the container movies, enter the path premium/canada/mlaw.avi. + // + // Do not include the container name in this path. + // + // If the path includes any folders that don't exist yet, the service creates + // them. For example, suppose you have an existing premium/usa subfolder. If + // you specify premium/canada, the service creates a canada subfolder in the + // premium folder. You then have two subfolders, usa and canada, in the premium + // folder. + // + // There is no correlation between the path to the source and the path (folders) + // in the container in AWS Elemental MediaStore. + // + // For more information about folders and how they exist in a container, see + // the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/). + // + // The file name is the name that is assigned to the file that you upload. The + // file can have the same name inside and outside of AWS Elemental MediaStore, + // or it can have the same name. The file name can include or omit an extension. + // + // Path is a required field + Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` + + // Indicates the storage class of a Put request. Defaults to high-performance + // temporal storage class, and objects are persisted into durable storage shortly + // after being received. + StorageClass *string `location:"header" locationName:"x-amz-storage-class" min:"1" type:"string" enum:"StorageClass"` +} + +// String returns the string representation +func (s PutObjectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} + if s.Body == nil { + invalidParams.Add(request.NewErrParamRequired("Body")) + } + if s.Path == nil { + invalidParams.Add(request.NewErrParamRequired("Path")) + } + if s.Path != nil && len(*s.Path) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Path", 1)) + } + if s.StorageClass != nil && len(*s.StorageClass) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StorageClass", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBody sets the Body field's value. +func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { + s.Body = v + return s +} + +// SetCacheControl sets the CacheControl field's value. +func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { + s.CacheControl = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { + s.ContentType = &v + return s +} + +// SetPath sets the Path field's value. +func (s *PutObjectInput) SetPath(v string) *PutObjectInput { + s.Path = &v + return s +} + +// SetStorageClass sets the StorageClass field's value. +func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { + s.StorageClass = &v + return s +} + +type PutObjectOutput struct { + _ struct{} `type:"structure"` + + // The SHA256 digest of the object that is persisted. + ContentSHA256 *string `min:"64" type:"string"` + + // Unique identifier of the object in the container. + ETag *string `min:"1" type:"string"` + + // The storage class where the object was persisted. The class should be “Temporal”. + StorageClass *string `min:"1" type:"string" enum:"StorageClass"` +} + +// String returns the string representation +func (s PutObjectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectOutput) GoString() string { + return s.String() +} + +// SetContentSHA256 sets the ContentSHA256 field's value. +func (s *PutObjectOutput) SetContentSHA256(v string) *PutObjectOutput { + s.ContentSHA256 = &v + return s +} + +// SetETag sets the ETag field's value. +func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput { + s.ETag = &v + return s +} + +// SetStorageClass sets the StorageClass field's value. +func (s *PutObjectOutput) SetStorageClass(v string) *PutObjectOutput { + s.StorageClass = &v + return s +} + +const ( + // ItemTypeObject is a ItemType enum value + ItemTypeObject = "OBJECT" + + // ItemTypeFolder is a ItemType enum value + ItemTypeFolder = "FOLDER" +) + +const ( + // StorageClassTemporal is a StorageClass enum value + StorageClassTemporal = "TEMPORAL" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go new file mode 100644 index 000000000..2d0c4fbea --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/doc.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package mediastoredata provides the client and types for making API +// requests to AWS Elemental MediaStore Data Plane. +// +// An AWS Elemental MediaStore asset is an object, similar to an object in the +// Amazon S3 service. Objects are the fundamental entities that are stored in +// AWS Elemental MediaStore. +// +// See https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01 for more information on this service. +// +// See mediastoredata package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastoredata/ +// +// Using the Client +// +// To contact AWS Elemental MediaStore Data Plane with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Elemental MediaStore Data Plane client MediaStoreData for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/mediastoredata/#New +package mediastoredata diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go new file mode 100644 index 000000000..95f0acdbd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/errors.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediastoredata + +const ( + + // ErrCodeContainerNotFoundException for service response error code + // "ContainerNotFoundException". + // + // The specified container was not found for the specified account. + ErrCodeContainerNotFoundException = "ContainerNotFoundException" + + // ErrCodeInternalServerError for service response error code + // "InternalServerError". + // + // The service is temporarily unavailable. + ErrCodeInternalServerError = "InternalServerError" + + // ErrCodeObjectNotFoundException for service response error code + // "ObjectNotFoundException". + // + // Could not perform an operation on an object that does not exist. + ErrCodeObjectNotFoundException = "ObjectNotFoundException" + + // ErrCodeRequestedRangeNotSatisfiableException for service response error code + // "RequestedRangeNotSatisfiableException". + // + // The requested content range is not valid. + ErrCodeRequestedRangeNotSatisfiableException = "RequestedRangeNotSatisfiableException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go new file mode 100644 index 000000000..420314014 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastoredata/service.go @@ -0,0 +1,98 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package mediastoredata + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// MediaStoreData provides the API operation methods for making requests to +// AWS Elemental MediaStore Data Plane. See this package's package overview docs +// for details on the service. +// +// MediaStoreData methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type MediaStoreData struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "data.mediastore" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "MediaStore Data" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the MediaStoreData client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a MediaStoreData client from just a session. +// svc := mediastoredata.New(mySession) +// +// // Create a MediaStoreData client with additional configuration +// svc := mediastoredata.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *MediaStoreData { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mediastore" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *MediaStoreData { + svc := &MediaStoreData{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-09-01", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a MediaStoreData operation and runs any +// custom request initialization. +func (c *MediaStoreData) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 0c0555d69..f37a867f0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -826,6 +826,12 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // your organization is still initializing, wait one hour and then try again. // If the error persists, contact AWS Support (https://console.aws.amazon.com/support/home#/). // +// Using CreateAccount to create multiple temporary accounts is not recommended. +// You can only close an account from the Billing and Cost Management Console, +// and you must be signed in as the root user. For information on the requirements +// and process for closing an account, see Closing an AWS Account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) +// in the AWS Organizations User Guide. +// // When you create a member account with this operation, you can choose whether // to create the account with the IAM User and Role Access to Billing Information // switch enabled. If you enable it, IAM users and roles that have appropriate @@ -10035,7 +10041,7 @@ type CreateOrganizationInput struct { // // * CONSOLIDATED_BILLING: All member accounts have their bills consolidated // to and paid by the master account. For more information, see Consolidated - // Billing (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) + // billing (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) // in the AWS Organizations User Guide. // // * ALL: In addition to all the features supported by the consolidated billing diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go index 76152a5e3..a93bdb91c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -12586,6 +12586,15 @@ func (s *EndpointsResponse) SetItem(v []*EndpointResponse) *EndpointsResponse { type Event struct { _ struct{} `type:"structure"` + // The package name associated with the app that's recording the event. + AppPackageName *string `type:"string"` + + // The title of the app that's recording the event. + AppTitle *string `type:"string"` + + // The version number of the app that's recording the event. + AppVersionCode *string `type:"string"` + // Custom attributes that are associated with the event you're adding or updating. Attributes map[string]*string `type:"map"` @@ -12598,6 +12607,9 @@ type Event struct { // Custom metrics related to the event. Metrics map[string]*float64 `type:"map"` + // The name of the SDK that's being used to record the event. + SdkName *string `type:"string"` + // Information about the session in which the event occurred. Session *Session `type:"structure"` @@ -12615,6 +12627,24 @@ func (s Event) GoString() string { return s.String() } +// SetAppPackageName sets the AppPackageName field's value. +func (s *Event) SetAppPackageName(v string) *Event { + s.AppPackageName = &v + return s +} + +// SetAppTitle sets the AppTitle field's value. +func (s *Event) SetAppTitle(v string) *Event { + s.AppTitle = &v + return s +} + +// SetAppVersionCode sets the AppVersionCode field's value. +func (s *Event) SetAppVersionCode(v string) *Event { + s.AppVersionCode = &v + return s +} + // SetAttributes sets the Attributes field's value. func (s *Event) SetAttributes(v map[string]*string) *Event { s.Attributes = v @@ -12639,6 +12669,12 @@ func (s *Event) SetMetrics(v map[string]*float64) *Event { return s } +// SetSdkName sets the SdkName field's value. +func (s *Event) SetSdkName(v string) *Event { + s.SdkName = &v + return s +} + // SetSession sets the Session field's value. func (s *Event) SetSession(v *Session) *Event { s.Session = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/api.go b/vendor/github.com/aws/aws-sdk-go/service/ram/api.go new file mode 100644 index 000000000..0359d03b2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ram/api.go @@ -0,0 +1,4029 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ram + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opAcceptResourceShareInvitation = "AcceptResourceShareInvitation" + +// AcceptResourceShareInvitationRequest generates a "aws/request.Request" representing the +// client's request for the AcceptResourceShareInvitation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AcceptResourceShareInvitation for more information on using the AcceptResourceShareInvitation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AcceptResourceShareInvitationRequest method. +// req, resp := client.AcceptResourceShareInvitationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AcceptResourceShareInvitation +func (c *RAM) AcceptResourceShareInvitationRequest(input *AcceptResourceShareInvitationInput) (req *request.Request, output *AcceptResourceShareInvitationOutput) { + op := &request.Operation{ + Name: opAcceptResourceShareInvitation, + HTTPMethod: "POST", + HTTPPath: "/acceptresourceshareinvitation", + } + + if input == nil { + input = &AcceptResourceShareInvitationInput{} + } + + output = &AcceptResourceShareInvitationOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptResourceShareInvitation API operation for AWS Resource Access Manager. +// +// Accepts an invitation to a resource share from another AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation AcceptResourceShareInvitation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException" +// The Amazon Resource Name (ARN) for an invitation was not found. +// +// * ErrCodeResourceShareInvitationAlreadyAcceptedException "ResourceShareInvitationAlreadyAcceptedException" +// The invitation was already accepted. +// +// * ErrCodeResourceShareInvitationAlreadyRejectedException "ResourceShareInvitationAlreadyRejectedException" +// The invitation was already rejected. +// +// * ErrCodeResourceShareInvitationExpiredException "ResourceShareInvitationExpiredException" +// The invitation is expired. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AcceptResourceShareInvitation +func (c *RAM) AcceptResourceShareInvitation(input *AcceptResourceShareInvitationInput) (*AcceptResourceShareInvitationOutput, error) { + req, out := c.AcceptResourceShareInvitationRequest(input) + return out, req.Send() +} + +// AcceptResourceShareInvitationWithContext is the same as AcceptResourceShareInvitation with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptResourceShareInvitation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) AcceptResourceShareInvitationWithContext(ctx aws.Context, input *AcceptResourceShareInvitationInput, opts ...request.Option) (*AcceptResourceShareInvitationOutput, error) { + req, out := c.AcceptResourceShareInvitationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateResourceShare = "AssociateResourceShare" + +// AssociateResourceShareRequest generates a "aws/request.Request" representing the +// client's request for the AssociateResourceShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateResourceShare for more information on using the AssociateResourceShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateResourceShareRequest method. +// req, resp := client.AssociateResourceShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AssociateResourceShare +func (c *RAM) AssociateResourceShareRequest(input *AssociateResourceShareInput) (req *request.Request, output *AssociateResourceShareOutput) { + op := &request.Operation{ + Name: opAssociateResourceShare, + HTTPMethod: "POST", + HTTPPath: "/associateresourceshare", + } + + if input == nil { + input = &AssociateResourceShareInput{} + } + + output = &AssociateResourceShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateResourceShare API operation for AWS Resource Access Manager. +// +// Associates the specified resource share with the specified principals and +// resources. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation AssociateResourceShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" +// A client token input parameter was reused with an operation, but at least +// one of the other input parameters is different from the previous call to +// the operation. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// The requested state transition is not valid. +// +// * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException" +// The requested resource share exceeds the limit for your account. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// The requested state transition is not valid. +// +// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" +// A client token is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/AssociateResourceShare +func (c *RAM) AssociateResourceShare(input *AssociateResourceShareInput) (*AssociateResourceShareOutput, error) { + req, out := c.AssociateResourceShareRequest(input) + return out, req.Send() +} + +// AssociateResourceShareWithContext is the same as AssociateResourceShare with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateResourceShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) AssociateResourceShareWithContext(ctx aws.Context, input *AssociateResourceShareInput, opts ...request.Option) (*AssociateResourceShareOutput, error) { + req, out := c.AssociateResourceShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResourceShare = "CreateResourceShare" + +// CreateResourceShareRequest generates a "aws/request.Request" representing the +// client's request for the CreateResourceShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResourceShare for more information on using the CreateResourceShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResourceShareRequest method. +// req, resp := client.CreateResourceShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/CreateResourceShare +func (c *RAM) CreateResourceShareRequest(input *CreateResourceShareInput) (req *request.Request, output *CreateResourceShareOutput) { + op := &request.Operation{ + Name: opCreateResourceShare, + HTTPMethod: "POST", + HTTPPath: "/createresourceshare", + } + + if input == nil { + input = &CreateResourceShareInput{} + } + + output = &CreateResourceShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResourceShare API operation for AWS Resource Access Manager. +// +// Creates a resource share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation CreateResourceShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" +// A client token input parameter was reused with an operation, but at least +// one of the other input parameters is different from the previous call to +// the operation. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// The requested state transition is not valid. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" +// A client token is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException" +// The requested resource share exceeds the limit for your account. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/CreateResourceShare +func (c *RAM) CreateResourceShare(input *CreateResourceShareInput) (*CreateResourceShareOutput, error) { + req, out := c.CreateResourceShareRequest(input) + return out, req.Send() +} + +// CreateResourceShareWithContext is the same as CreateResourceShare with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResourceShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) CreateResourceShareWithContext(ctx aws.Context, input *CreateResourceShareInput, opts ...request.Option) (*CreateResourceShareOutput, error) { + req, out := c.CreateResourceShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResourceShare = "DeleteResourceShare" + +// DeleteResourceShareRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourceShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResourceShare for more information on using the DeleteResourceShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResourceShareRequest method. +// req, resp := client.DeleteResourceShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DeleteResourceShare +func (c *RAM) DeleteResourceShareRequest(input *DeleteResourceShareInput) (req *request.Request, output *DeleteResourceShareOutput) { + op := &request.Operation{ + Name: opDeleteResourceShare, + HTTPMethod: "DELETE", + HTTPPath: "/deleteresourceshare", + } + + if input == nil { + input = &DeleteResourceShareInput{} + } + + output = &DeleteResourceShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResourceShare API operation for AWS Resource Access Manager. +// +// Deletes the specified resource share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation DeleteResourceShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" +// A client token input parameter was reused with an operation, but at least +// one of the other input parameters is different from the previous call to +// the operation. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// The requested state transition is not valid. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" +// A client token is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DeleteResourceShare +func (c *RAM) DeleteResourceShare(input *DeleteResourceShareInput) (*DeleteResourceShareOutput, error) { + req, out := c.DeleteResourceShareRequest(input) + return out, req.Send() +} + +// DeleteResourceShareWithContext is the same as DeleteResourceShare with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourceShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) DeleteResourceShareWithContext(ctx aws.Context, input *DeleteResourceShareInput, opts ...request.Option) (*DeleteResourceShareOutput, error) { + req, out := c.DeleteResourceShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateResourceShare = "DisassociateResourceShare" + +// DisassociateResourceShareRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateResourceShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateResourceShare for more information on using the DisassociateResourceShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateResourceShareRequest method. +// req, resp := client.DisassociateResourceShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DisassociateResourceShare +func (c *RAM) DisassociateResourceShareRequest(input *DisassociateResourceShareInput) (req *request.Request, output *DisassociateResourceShareOutput) { + op := &request.Operation{ + Name: opDisassociateResourceShare, + HTTPMethod: "POST", + HTTPPath: "/disassociateresourceshare", + } + + if input == nil { + input = &DisassociateResourceShareInput{} + } + + output = &DisassociateResourceShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateResourceShare API operation for AWS Resource Access Manager. +// +// Disassociates the specified principals or resources from the specified resource +// share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation DisassociateResourceShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" +// A client token input parameter was reused with an operation, but at least +// one of the other input parameters is different from the previous call to +// the operation. +// +// * ErrCodeResourceShareLimitExceededException "ResourceShareLimitExceededException" +// The requested resource share exceeds the limit for your account. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidStateTransitionException "InvalidStateTransitionException" +// The requested state transition is not valid. +// +// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" +// A client token is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/DisassociateResourceShare +func (c *RAM) DisassociateResourceShare(input *DisassociateResourceShareInput) (*DisassociateResourceShareOutput, error) { + req, out := c.DisassociateResourceShareRequest(input) + return out, req.Send() +} + +// DisassociateResourceShareWithContext is the same as DisassociateResourceShare with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateResourceShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) DisassociateResourceShareWithContext(ctx aws.Context, input *DisassociateResourceShareInput, opts ...request.Option) (*DisassociateResourceShareOutput, error) { + req, out := c.DisassociateResourceShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableSharingWithAwsOrganization = "EnableSharingWithAwsOrganization" + +// EnableSharingWithAwsOrganizationRequest generates a "aws/request.Request" representing the +// client's request for the EnableSharingWithAwsOrganization operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See EnableSharingWithAwsOrganization for more information on using the EnableSharingWithAwsOrganization +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the EnableSharingWithAwsOrganizationRequest method. +// req, resp := client.EnableSharingWithAwsOrganizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/EnableSharingWithAwsOrganization +func (c *RAM) EnableSharingWithAwsOrganizationRequest(input *EnableSharingWithAwsOrganizationInput) (req *request.Request, output *EnableSharingWithAwsOrganizationOutput) { + op := &request.Operation{ + Name: opEnableSharingWithAwsOrganization, + HTTPMethod: "POST", + HTTPPath: "/enablesharingwithawsorganization", + } + + if input == nil { + input = &EnableSharingWithAwsOrganizationInput{} + } + + output = &EnableSharingWithAwsOrganizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// EnableSharingWithAwsOrganization API operation for AWS Resource Access Manager. +// +// Enables resource sharing within your organization. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation EnableSharingWithAwsOrganization for usage and error information. +// +// Returned Error Codes: +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/EnableSharingWithAwsOrganization +func (c *RAM) EnableSharingWithAwsOrganization(input *EnableSharingWithAwsOrganizationInput) (*EnableSharingWithAwsOrganizationOutput, error) { + req, out := c.EnableSharingWithAwsOrganizationRequest(input) + return out, req.Send() +} + +// EnableSharingWithAwsOrganizationWithContext is the same as EnableSharingWithAwsOrganization with the addition of +// the ability to pass a context and additional request options. +// +// See EnableSharingWithAwsOrganization for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) EnableSharingWithAwsOrganizationWithContext(ctx aws.Context, input *EnableSharingWithAwsOrganizationInput, opts ...request.Option) (*EnableSharingWithAwsOrganizationOutput, error) { + req, out := c.EnableSharingWithAwsOrganizationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResourcePolicies = "GetResourcePolicies" + +// GetResourcePoliciesRequest generates a "aws/request.Request" representing the +// client's request for the GetResourcePolicies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourcePolicies for more information on using the GetResourcePolicies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourcePoliciesRequest method. +// req, resp := client.GetResourcePoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourcePolicies +func (c *RAM) GetResourcePoliciesRequest(input *GetResourcePoliciesInput) (req *request.Request, output *GetResourcePoliciesOutput) { + op := &request.Operation{ + Name: opGetResourcePolicies, + HTTPMethod: "POST", + HTTPPath: "/getresourcepolicies", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetResourcePoliciesInput{} + } + + output = &GetResourcePoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourcePolicies API operation for AWS Resource Access Manager. +// +// Gets the policies for the specifies resources. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation GetResourcePolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified value for NextToken is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourcePolicies +func (c *RAM) GetResourcePolicies(input *GetResourcePoliciesInput) (*GetResourcePoliciesOutput, error) { + req, out := c.GetResourcePoliciesRequest(input) + return out, req.Send() +} + +// GetResourcePoliciesWithContext is the same as GetResourcePolicies with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourcePolicies for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourcePoliciesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, opts ...request.Option) (*GetResourcePoliciesOutput, error) { + req, out := c.GetResourcePoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetResourcePoliciesPages iterates over the pages of a GetResourcePolicies operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetResourcePolicies method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetResourcePolicies operation. +// pageNum := 0 +// err := client.GetResourcePoliciesPages(params, +// func(page *GetResourcePoliciesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RAM) GetResourcePoliciesPages(input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool) error { + return c.GetResourcePoliciesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetResourcePoliciesPagesWithContext same as GetResourcePoliciesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourcePoliciesPagesWithContext(ctx aws.Context, input *GetResourcePoliciesInput, fn func(*GetResourcePoliciesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetResourcePoliciesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetResourcePoliciesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetResourcePoliciesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetResourceShareAssociations = "GetResourceShareAssociations" + +// GetResourceShareAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the GetResourceShareAssociations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourceShareAssociations for more information on using the GetResourceShareAssociations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourceShareAssociationsRequest method. +// req, resp := client.GetResourceShareAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareAssociations +func (c *RAM) GetResourceShareAssociationsRequest(input *GetResourceShareAssociationsInput) (req *request.Request, output *GetResourceShareAssociationsOutput) { + op := &request.Operation{ + Name: opGetResourceShareAssociations, + HTTPMethod: "POST", + HTTPPath: "/getresourceshareassociations", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetResourceShareAssociationsInput{} + } + + output = &GetResourceShareAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourceShareAssociations API operation for AWS Resource Access Manager. +// +// Gets the associations for the specified resource share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation GetResourceShareAssociations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified value for NextToken is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareAssociations +func (c *RAM) GetResourceShareAssociations(input *GetResourceShareAssociationsInput) (*GetResourceShareAssociationsOutput, error) { + req, out := c.GetResourceShareAssociationsRequest(input) + return out, req.Send() +} + +// GetResourceShareAssociationsWithContext is the same as GetResourceShareAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourceShareAssociations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourceShareAssociationsWithContext(ctx aws.Context, input *GetResourceShareAssociationsInput, opts ...request.Option) (*GetResourceShareAssociationsOutput, error) { + req, out := c.GetResourceShareAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetResourceShareAssociationsPages iterates over the pages of a GetResourceShareAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetResourceShareAssociations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetResourceShareAssociations operation. +// pageNum := 0 +// err := client.GetResourceShareAssociationsPages(params, +// func(page *GetResourceShareAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RAM) GetResourceShareAssociationsPages(input *GetResourceShareAssociationsInput, fn func(*GetResourceShareAssociationsOutput, bool) bool) error { + return c.GetResourceShareAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetResourceShareAssociationsPagesWithContext same as GetResourceShareAssociationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourceShareAssociationsPagesWithContext(ctx aws.Context, input *GetResourceShareAssociationsInput, fn func(*GetResourceShareAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetResourceShareAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetResourceShareAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetResourceShareAssociationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetResourceShareInvitations = "GetResourceShareInvitations" + +// GetResourceShareInvitationsRequest generates a "aws/request.Request" representing the +// client's request for the GetResourceShareInvitations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourceShareInvitations for more information on using the GetResourceShareInvitations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourceShareInvitationsRequest method. +// req, resp := client.GetResourceShareInvitationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations +func (c *RAM) GetResourceShareInvitationsRequest(input *GetResourceShareInvitationsInput) (req *request.Request, output *GetResourceShareInvitationsOutput) { + op := &request.Operation{ + Name: opGetResourceShareInvitations, + HTTPMethod: "POST", + HTTPPath: "/getresourceshareinvitations", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetResourceShareInvitationsInput{} + } + + output = &GetResourceShareInvitationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourceShareInvitations API operation for AWS Resource Access Manager. +// +// Gets the specified invitations for resource sharing. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation GetResourceShareInvitations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException" +// The Amazon Resource Name (ARN) for an invitation was not found. +// +// * ErrCodeInvalidMaxResultsException "InvalidMaxResultsException" +// The specified value for MaxResults is not valid. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified value for NextToken is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShareInvitations +func (c *RAM) GetResourceShareInvitations(input *GetResourceShareInvitationsInput) (*GetResourceShareInvitationsOutput, error) { + req, out := c.GetResourceShareInvitationsRequest(input) + return out, req.Send() +} + +// GetResourceShareInvitationsWithContext is the same as GetResourceShareInvitations with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourceShareInvitations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourceShareInvitationsWithContext(ctx aws.Context, input *GetResourceShareInvitationsInput, opts ...request.Option) (*GetResourceShareInvitationsOutput, error) { + req, out := c.GetResourceShareInvitationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetResourceShareInvitationsPages iterates over the pages of a GetResourceShareInvitations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetResourceShareInvitations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetResourceShareInvitations operation. +// pageNum := 0 +// err := client.GetResourceShareInvitationsPages(params, +// func(page *GetResourceShareInvitationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RAM) GetResourceShareInvitationsPages(input *GetResourceShareInvitationsInput, fn func(*GetResourceShareInvitationsOutput, bool) bool) error { + return c.GetResourceShareInvitationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetResourceShareInvitationsPagesWithContext same as GetResourceShareInvitationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourceShareInvitationsPagesWithContext(ctx aws.Context, input *GetResourceShareInvitationsInput, fn func(*GetResourceShareInvitationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetResourceShareInvitationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetResourceShareInvitationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetResourceShareInvitationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opGetResourceShares = "GetResourceShares" + +// GetResourceSharesRequest generates a "aws/request.Request" representing the +// client's request for the GetResourceShares operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResourceShares for more information on using the GetResourceShares +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResourceSharesRequest method. +// req, resp := client.GetResourceSharesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShares +func (c *RAM) GetResourceSharesRequest(input *GetResourceSharesInput) (req *request.Request, output *GetResourceSharesOutput) { + op := &request.Operation{ + Name: opGetResourceShares, + HTTPMethod: "POST", + HTTPPath: "/getresourceshares", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &GetResourceSharesInput{} + } + + output = &GetResourceSharesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourceShares API operation for AWS Resource Access Manager. +// +// Gets the specified resource shares or all of your resource shares. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation GetResourceShares for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified value for NextToken is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/GetResourceShares +func (c *RAM) GetResourceShares(input *GetResourceSharesInput) (*GetResourceSharesOutput, error) { + req, out := c.GetResourceSharesRequest(input) + return out, req.Send() +} + +// GetResourceSharesWithContext is the same as GetResourceShares with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourceShares for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourceSharesWithContext(ctx aws.Context, input *GetResourceSharesInput, opts ...request.Option) (*GetResourceSharesOutput, error) { + req, out := c.GetResourceSharesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// GetResourceSharesPages iterates over the pages of a GetResourceShares operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetResourceShares method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetResourceShares operation. +// pageNum := 0 +// err := client.GetResourceSharesPages(params, +// func(page *GetResourceSharesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RAM) GetResourceSharesPages(input *GetResourceSharesInput, fn func(*GetResourceSharesOutput, bool) bool) error { + return c.GetResourceSharesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetResourceSharesPagesWithContext same as GetResourceSharesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) GetResourceSharesPagesWithContext(ctx aws.Context, input *GetResourceSharesInput, fn func(*GetResourceSharesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetResourceSharesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetResourceSharesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetResourceSharesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPrincipals = "ListPrincipals" + +// ListPrincipalsRequest generates a "aws/request.Request" representing the +// client's request for the ListPrincipals operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListPrincipals for more information on using the ListPrincipals +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListPrincipalsRequest method. +// req, resp := client.ListPrincipalsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListPrincipals +func (c *RAM) ListPrincipalsRequest(input *ListPrincipalsInput) (req *request.Request, output *ListPrincipalsOutput) { + op := &request.Operation{ + Name: opListPrincipals, + HTTPMethod: "POST", + HTTPPath: "/listprincipals", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListPrincipalsInput{} + } + + output = &ListPrincipalsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPrincipals API operation for AWS Resource Access Manager. +// +// Lists the principals with access to the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation ListPrincipals for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified value for NextToken is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListPrincipals +func (c *RAM) ListPrincipals(input *ListPrincipalsInput) (*ListPrincipalsOutput, error) { + req, out := c.ListPrincipalsRequest(input) + return out, req.Send() +} + +// ListPrincipalsWithContext is the same as ListPrincipals with the addition of +// the ability to pass a context and additional request options. +// +// See ListPrincipals for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) ListPrincipalsWithContext(ctx aws.Context, input *ListPrincipalsInput, opts ...request.Option) (*ListPrincipalsOutput, error) { + req, out := c.ListPrincipalsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListPrincipalsPages iterates over the pages of a ListPrincipals operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListPrincipals method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListPrincipals operation. +// pageNum := 0 +// err := client.ListPrincipalsPages(params, +// func(page *ListPrincipalsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RAM) ListPrincipalsPages(input *ListPrincipalsInput, fn func(*ListPrincipalsOutput, bool) bool) error { + return c.ListPrincipalsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListPrincipalsPagesWithContext same as ListPrincipalsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) ListPrincipalsPagesWithContext(ctx aws.Context, input *ListPrincipalsInput, fn func(*ListPrincipalsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListPrincipalsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListPrincipalsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListPrincipalsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListResources = "ListResources" + +// ListResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListResources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResources for more information on using the ListResources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResourcesRequest method. +// req, resp := client.ListResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResources +func (c *RAM) ListResourcesRequest(input *ListResourcesInput) (req *request.Request, output *ListResourcesOutput) { + op := &request.Operation{ + Name: opListResources, + HTTPMethod: "POST", + HTTPPath: "/listresources", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListResourcesInput{} + } + + output = &ListResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResources API operation for AWS Resource Access Manager. +// +// Lists the resources that the specified principal can access. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation ListResources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidResourceTypeException "InvalidResourceTypeException" +// The specified resource type is not valid. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified value for NextToken is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/ListResources +func (c *RAM) ListResources(input *ListResourcesInput) (*ListResourcesOutput, error) { + req, out := c.ListResourcesRequest(input) + return out, req.Send() +} + +// ListResourcesWithContext is the same as ListResources with the addition of +// the ability to pass a context and additional request options. +// +// See ListResources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) ListResourcesWithContext(ctx aws.Context, input *ListResourcesInput, opts ...request.Option) (*ListResourcesOutput, error) { + req, out := c.ListResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListResourcesPages iterates over the pages of a ListResources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListResources method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListResources operation. +// pageNum := 0 +// err := client.ListResourcesPages(params, +// func(page *ListResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RAM) ListResourcesPages(input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool) error { + return c.ListResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListResourcesPagesWithContext same as ListResourcesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) ListResourcesPagesWithContext(ctx aws.Context, input *ListResourcesInput, fn func(*ListResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListResourcesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opRejectResourceShareInvitation = "RejectResourceShareInvitation" + +// RejectResourceShareInvitationRequest generates a "aws/request.Request" representing the +// client's request for the RejectResourceShareInvitation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RejectResourceShareInvitation for more information on using the RejectResourceShareInvitation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RejectResourceShareInvitationRequest method. +// req, resp := client.RejectResourceShareInvitationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/RejectResourceShareInvitation +func (c *RAM) RejectResourceShareInvitationRequest(input *RejectResourceShareInvitationInput) (req *request.Request, output *RejectResourceShareInvitationOutput) { + op := &request.Operation{ + Name: opRejectResourceShareInvitation, + HTTPMethod: "POST", + HTTPPath: "/rejectresourceshareinvitation", + } + + if input == nil { + input = &RejectResourceShareInvitationInput{} + } + + output = &RejectResourceShareInvitationOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectResourceShareInvitation API operation for AWS Resource Access Manager. +// +// Rejects an invitation to a resource share from another AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation RejectResourceShareInvitation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeResourceShareInvitationArnNotFoundException "ResourceShareInvitationArnNotFoundException" +// The Amazon Resource Name (ARN) for an invitation was not found. +// +// * ErrCodeResourceShareInvitationAlreadyAcceptedException "ResourceShareInvitationAlreadyAcceptedException" +// The invitation was already accepted. +// +// * ErrCodeResourceShareInvitationAlreadyRejectedException "ResourceShareInvitationAlreadyRejectedException" +// The invitation was already rejected. +// +// * ErrCodeResourceShareInvitationExpiredException "ResourceShareInvitationExpiredException" +// The invitation is expired. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/RejectResourceShareInvitation +func (c *RAM) RejectResourceShareInvitation(input *RejectResourceShareInvitationInput) (*RejectResourceShareInvitationOutput, error) { + req, out := c.RejectResourceShareInvitationRequest(input) + return out, req.Send() +} + +// RejectResourceShareInvitationWithContext is the same as RejectResourceShareInvitation with the addition of +// the ability to pass a context and additional request options. +// +// See RejectResourceShareInvitation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) RejectResourceShareInvitationWithContext(ctx aws.Context, input *RejectResourceShareInvitationInput, opts ...request.Option) (*RejectResourceShareInvitationOutput, error) { + req, out := c.RejectResourceShareInvitationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/TagResource +func (c *RAM) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tagresource", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Resource Access Manager. +// +// Adds the specified tags to the specified resource share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeTagLimitExceededException "TagLimitExceededException" +// The requested tags exceed the limit for your account. +// +// * ErrCodeResourceArnNotFoundException "ResourceArnNotFoundException" +// An Amazon Resource Name (ARN) was not found. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/TagResource +func (c *RAM) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UntagResource +func (c *RAM) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/untagresource", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Resource Access Manager. +// +// Removes the specified tags from the specified resource share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UntagResource +func (c *RAM) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateResourceShare = "UpdateResourceShare" + +// UpdateResourceShareRequest generates a "aws/request.Request" representing the +// client's request for the UpdateResourceShare operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateResourceShare for more information on using the UpdateResourceShare +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateResourceShareRequest method. +// req, resp := client.UpdateResourceShareRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UpdateResourceShare +func (c *RAM) UpdateResourceShareRequest(input *UpdateResourceShareInput) (req *request.Request, output *UpdateResourceShareOutput) { + op := &request.Operation{ + Name: opUpdateResourceShare, + HTTPMethod: "POST", + HTTPPath: "/updateresourceshare", + } + + if input == nil { + input = &UpdateResourceShareInput{} + } + + output = &UpdateResourceShareOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateResourceShare API operation for AWS Resource Access Manager. +// +// Updates the specified resource share. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Access Manager's +// API operation UpdateResourceShare for usage and error information. +// +// Returned Error Codes: +// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" +// A client token input parameter was reused with an operation, but at least +// one of the other input parameters is different from the previous call to +// the operation. +// +// * ErrCodeMissingRequiredParameterException "MissingRequiredParameterException" +// A required input parameter is missing. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// A specified resource was not found. +// +// * ErrCodeMalformedArnException "MalformedArnException" +// The format of an Amazon Resource Name (ARN) is not valid. +// +// * ErrCodeInvalidClientTokenException "InvalidClientTokenException" +// A client token is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is not valid. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// The requested operation is not permitted. +// +// * ErrCodeServerInternalException "ServerInternalException" +// The service could not respond to the request due to an internal problem. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04/UpdateResourceShare +func (c *RAM) UpdateResourceShare(input *UpdateResourceShareInput) (*UpdateResourceShareOutput, error) { + req, out := c.UpdateResourceShareRequest(input) + return out, req.Send() +} + +// UpdateResourceShareWithContext is the same as UpdateResourceShare with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateResourceShare for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RAM) UpdateResourceShareWithContext(ctx aws.Context, input *UpdateResourceShareInput, opts ...request.Option) (*UpdateResourceShareOutput, error) { + req, out := c.UpdateResourceShareRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AcceptResourceShareInvitationInput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The Amazon Resource Name (ARN) of the invitation. + // + // ResourceShareInvitationArn is a required field + ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptResourceShareInvitationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptResourceShareInvitationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptResourceShareInvitationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptResourceShareInvitationInput"} + if s.ResourceShareInvitationArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareInvitationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *AcceptResourceShareInvitationInput) SetClientToken(v string) *AcceptResourceShareInvitationInput { + s.ClientToken = &v + return s +} + +// SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value. +func (s *AcceptResourceShareInvitationInput) SetResourceShareInvitationArn(v string) *AcceptResourceShareInvitationInput { + s.ResourceShareInvitationArn = &v + return s +} + +type AcceptResourceShareInvitationOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the invitation. + ResourceShareInvitation *ResourceShareInvitation `locationName:"resourceShareInvitation" type:"structure"` +} + +// String returns the string representation +func (s AcceptResourceShareInvitationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptResourceShareInvitationOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *AcceptResourceShareInvitationOutput) SetClientToken(v string) *AcceptResourceShareInvitationOutput { + s.ClientToken = &v + return s +} + +// SetResourceShareInvitation sets the ResourceShareInvitation field's value. +func (s *AcceptResourceShareInvitationOutput) SetResourceShareInvitation(v *ResourceShareInvitation) *AcceptResourceShareInvitationOutput { + s.ResourceShareInvitation = v + return s +} + +type AssociateResourceShareInput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The principals. + Principals []*string `locationName:"principals" type:"list"` + + // The Amazon Resource Names (ARN) of the resources. + ResourceArns []*string `locationName:"resourceArns" type:"list"` + + // The Amazon Resource Name (ARN) of the resource share. + // + // ResourceShareArn is a required field + ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateResourceShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateResourceShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateResourceShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateResourceShareInput"} + if s.ResourceShareArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *AssociateResourceShareInput) SetClientToken(v string) *AssociateResourceShareInput { + s.ClientToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *AssociateResourceShareInput) SetPrincipals(v []*string) *AssociateResourceShareInput { + s.Principals = v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *AssociateResourceShareInput) SetResourceArns(v []*string) *AssociateResourceShareInput { + s.ResourceArns = v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *AssociateResourceShareInput) SetResourceShareArn(v string) *AssociateResourceShareInput { + s.ResourceShareArn = &v + return s +} + +type AssociateResourceShareOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the associations. + ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` +} + +// String returns the string representation +func (s AssociateResourceShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateResourceShareOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *AssociateResourceShareOutput) SetClientToken(v string) *AssociateResourceShareOutput { + s.ClientToken = &v + return s +} + +// SetResourceShareAssociations sets the ResourceShareAssociations field's value. +func (s *AssociateResourceShareOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *AssociateResourceShareOutput { + s.ResourceShareAssociations = v + return s +} + +type CreateResourceShareInput struct { + _ struct{} `type:"structure"` + + // Indicates whether principals outside your organization can be associated + // with a resource share. + AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The name of the resource share. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The principals to associate with the resource share. The possible values + // are IDs of AWS accounts, the ARN of an OU or organization from AWS Organizations. + Principals []*string `locationName:"principals" type:"list"` + + // The Amazon Resource Names (ARN) of the resources to associate with the resource + // share. + ResourceArns []*string `locationName:"resourceArns" type:"list"` + + // One or more tags. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateResourceShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourceShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResourceShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResourceShareInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value. +func (s *CreateResourceShareInput) SetAllowExternalPrincipals(v bool) *CreateResourceShareInput { + s.AllowExternalPrincipals = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateResourceShareInput) SetClientToken(v string) *CreateResourceShareInput { + s.ClientToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateResourceShareInput) SetName(v string) *CreateResourceShareInput { + s.Name = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *CreateResourceShareInput) SetPrincipals(v []*string) *CreateResourceShareInput { + s.Principals = v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *CreateResourceShareInput) SetResourceArns(v []*string) *CreateResourceShareInput { + s.ResourceArns = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateResourceShareInput) SetTags(v []*Tag) *CreateResourceShareInput { + s.Tags = v + return s +} + +type CreateResourceShareOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the resource share. + ResourceShare *ResourceShare `locationName:"resourceShare" type:"structure"` +} + +// String returns the string representation +func (s CreateResourceShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResourceShareOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateResourceShareOutput) SetClientToken(v string) *CreateResourceShareOutput { + s.ClientToken = &v + return s +} + +// SetResourceShare sets the ResourceShare field's value. +func (s *CreateResourceShareOutput) SetResourceShare(v *ResourceShare) *CreateResourceShareOutput { + s.ResourceShare = v + return s +} + +type DeleteResourceShareInput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `location:"querystring" locationName:"clientToken" type:"string"` + + // The Amazon Resource Name (ARN) of the resource share. + // + // ResourceShareArn is a required field + ResourceShareArn *string `location:"querystring" locationName:"resourceShareArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResourceShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourceShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourceShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourceShareInput"} + if s.ResourceShareArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *DeleteResourceShareInput) SetClientToken(v string) *DeleteResourceShareInput { + s.ClientToken = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *DeleteResourceShareInput) SetResourceShareArn(v string) *DeleteResourceShareInput { + s.ResourceShareArn = &v + return s +} + +type DeleteResourceShareOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Indicates whether the request succeeded. + ReturnValue *bool `locationName:"returnValue" type:"boolean"` +} + +// String returns the string representation +func (s DeleteResourceShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourceShareOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *DeleteResourceShareOutput) SetClientToken(v string) *DeleteResourceShareOutput { + s.ClientToken = &v + return s +} + +// SetReturnValue sets the ReturnValue field's value. +func (s *DeleteResourceShareOutput) SetReturnValue(v bool) *DeleteResourceShareOutput { + s.ReturnValue = &v + return s +} + +type DisassociateResourceShareInput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The principals. + Principals []*string `locationName:"principals" type:"list"` + + // The Amazon Resource Names (ARN) of the resources. + ResourceArns []*string `locationName:"resourceArns" type:"list"` + + // The Amazon Resource Name (ARN) of the resource share. + // + // ResourceShareArn is a required field + ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateResourceShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateResourceShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateResourceShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateResourceShareInput"} + if s.ResourceShareArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *DisassociateResourceShareInput) SetClientToken(v string) *DisassociateResourceShareInput { + s.ClientToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *DisassociateResourceShareInput) SetPrincipals(v []*string) *DisassociateResourceShareInput { + s.Principals = v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *DisassociateResourceShareInput) SetResourceArns(v []*string) *DisassociateResourceShareInput { + s.ResourceArns = v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *DisassociateResourceShareInput) SetResourceShareArn(v string) *DisassociateResourceShareInput { + s.ResourceShareArn = &v + return s +} + +type DisassociateResourceShareOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the associations. + ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` +} + +// String returns the string representation +func (s DisassociateResourceShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateResourceShareOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *DisassociateResourceShareOutput) SetClientToken(v string) *DisassociateResourceShareOutput { + s.ClientToken = &v + return s +} + +// SetResourceShareAssociations sets the ResourceShareAssociations field's value. +func (s *DisassociateResourceShareOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *DisassociateResourceShareOutput { + s.ResourceShareAssociations = v + return s +} + +type EnableSharingWithAwsOrganizationInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableSharingWithAwsOrganizationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableSharingWithAwsOrganizationInput) GoString() string { + return s.String() +} + +type EnableSharingWithAwsOrganizationOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether the request succeeded. + ReturnValue *bool `locationName:"returnValue" type:"boolean"` +} + +// String returns the string representation +func (s EnableSharingWithAwsOrganizationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableSharingWithAwsOrganizationOutput) GoString() string { + return s.String() +} + +// SetReturnValue sets the ReturnValue field's value. +func (s *EnableSharingWithAwsOrganizationOutput) SetReturnValue(v bool) *EnableSharingWithAwsOrganizationOutput { + s.ReturnValue = &v + return s +} + +type GetResourcePoliciesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The principal. + Principal *string `locationName:"principal" type:"string"` + + // The Amazon Resource Names (ARN) of the resources. + // + // ResourceArns is a required field + ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"` +} + +// String returns the string representation +func (s GetResourcePoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourcePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourcePoliciesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceArns == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArns")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetResourcePoliciesInput) SetMaxResults(v int64) *GetResourcePoliciesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourcePoliciesInput) SetNextToken(v string) *GetResourcePoliciesInput { + s.NextToken = &v + return s +} + +// SetPrincipal sets the Principal field's value. +func (s *GetResourcePoliciesInput) SetPrincipal(v string) *GetResourcePoliciesInput { + s.Principal = &v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *GetResourcePoliciesInput) SetResourceArns(v []*string) *GetResourcePoliciesInput { + s.ResourceArns = v + return s +} + +type GetResourcePoliciesOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // A key policy document, in JSON format. + Policies []*string `locationName:"policies" type:"list"` +} + +// String returns the string representation +func (s GetResourcePoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePoliciesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourcePoliciesOutput) SetNextToken(v string) *GetResourcePoliciesOutput { + s.NextToken = &v + return s +} + +// SetPolicies sets the Policies field's value. +func (s *GetResourcePoliciesOutput) SetPolicies(v []*string) *GetResourcePoliciesOutput { + s.Policies = v + return s +} + +type GetResourceShareAssociationsInput struct { + _ struct{} `type:"structure"` + + // The status of the association. + AssociationStatus *string `locationName:"associationStatus" type:"string" enum:"ResourceShareAssociationStatus"` + + // The association type. + // + // AssociationType is a required field + AssociationType *string `locationName:"associationType" type:"string" required:"true" enum:"ResourceShareAssociationType"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The principal. + Principal *string `locationName:"principal" type:"string"` + + // The Amazon Resource Name (ARN) of the resource. + ResourceArn *string `locationName:"resourceArn" type:"string"` + + // The Amazon Resource Names (ARN) of the resource shares. + ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` +} + +// String returns the string representation +func (s GetResourceShareAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceShareAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourceShareAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourceShareAssociationsInput"} + if s.AssociationType == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationType")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationStatus sets the AssociationStatus field's value. +func (s *GetResourceShareAssociationsInput) SetAssociationStatus(v string) *GetResourceShareAssociationsInput { + s.AssociationStatus = &v + return s +} + +// SetAssociationType sets the AssociationType field's value. +func (s *GetResourceShareAssociationsInput) SetAssociationType(v string) *GetResourceShareAssociationsInput { + s.AssociationType = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetResourceShareAssociationsInput) SetMaxResults(v int64) *GetResourceShareAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourceShareAssociationsInput) SetNextToken(v string) *GetResourceShareAssociationsInput { + s.NextToken = &v + return s +} + +// SetPrincipal sets the Principal field's value. +func (s *GetResourceShareAssociationsInput) SetPrincipal(v string) *GetResourceShareAssociationsInput { + s.Principal = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *GetResourceShareAssociationsInput) SetResourceArn(v string) *GetResourceShareAssociationsInput { + s.ResourceArn = &v + return s +} + +// SetResourceShareArns sets the ResourceShareArns field's value. +func (s *GetResourceShareAssociationsInput) SetResourceShareArns(v []*string) *GetResourceShareAssociationsInput { + s.ResourceShareArns = v + return s +} + +type GetResourceShareAssociationsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the association. + ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` +} + +// String returns the string representation +func (s GetResourceShareAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceShareAssociationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourceShareAssociationsOutput) SetNextToken(v string) *GetResourceShareAssociationsOutput { + s.NextToken = &v + return s +} + +// SetResourceShareAssociations sets the ResourceShareAssociations field's value. +func (s *GetResourceShareAssociationsOutput) SetResourceShareAssociations(v []*ResourceShareAssociation) *GetResourceShareAssociationsOutput { + s.ResourceShareAssociations = v + return s +} + +type GetResourceShareInvitationsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The Amazon Resource Names (ARN) of the resource shares. + ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` + + // The Amazon Resource Names (ARN) of the invitations. + ResourceShareInvitationArns []*string `locationName:"resourceShareInvitationArns" type:"list"` +} + +// String returns the string representation +func (s GetResourceShareInvitationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceShareInvitationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourceShareInvitationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourceShareInvitationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetResourceShareInvitationsInput) SetMaxResults(v int64) *GetResourceShareInvitationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourceShareInvitationsInput) SetNextToken(v string) *GetResourceShareInvitationsInput { + s.NextToken = &v + return s +} + +// SetResourceShareArns sets the ResourceShareArns field's value. +func (s *GetResourceShareInvitationsInput) SetResourceShareArns(v []*string) *GetResourceShareInvitationsInput { + s.ResourceShareArns = v + return s +} + +// SetResourceShareInvitationArns sets the ResourceShareInvitationArns field's value. +func (s *GetResourceShareInvitationsInput) SetResourceShareInvitationArns(v []*string) *GetResourceShareInvitationsInput { + s.ResourceShareInvitationArns = v + return s +} + +type GetResourceShareInvitationsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the invitations. + ResourceShareInvitations []*ResourceShareInvitation `locationName:"resourceShareInvitations" type:"list"` +} + +// String returns the string representation +func (s GetResourceShareInvitationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceShareInvitationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourceShareInvitationsOutput) SetNextToken(v string) *GetResourceShareInvitationsOutput { + s.NextToken = &v + return s +} + +// SetResourceShareInvitations sets the ResourceShareInvitations field's value. +func (s *GetResourceShareInvitationsOutput) SetResourceShareInvitations(v []*ResourceShareInvitation) *GetResourceShareInvitationsOutput { + s.ResourceShareInvitations = v + return s +} + +type GetResourceSharesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The name of the resource share. + Name *string `locationName:"name" type:"string"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The type of owner. + // + // ResourceOwner is a required field + ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"` + + // The Amazon Resource Names (ARN) of the resource shares. + ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` + + // The status of the resource share. + ResourceShareStatus *string `locationName:"resourceShareStatus" type:"string" enum:"ResourceShareStatus"` + + // One or more tag filters. + TagFilters []*TagFilter `locationName:"tagFilters" type:"list"` +} + +// String returns the string representation +func (s GetResourceSharesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceSharesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResourceSharesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResourceSharesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceOwner == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceOwner")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetResourceSharesInput) SetMaxResults(v int64) *GetResourceSharesInput { + s.MaxResults = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetResourceSharesInput) SetName(v string) *GetResourceSharesInput { + s.Name = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourceSharesInput) SetNextToken(v string) *GetResourceSharesInput { + s.NextToken = &v + return s +} + +// SetResourceOwner sets the ResourceOwner field's value. +func (s *GetResourceSharesInput) SetResourceOwner(v string) *GetResourceSharesInput { + s.ResourceOwner = &v + return s +} + +// SetResourceShareArns sets the ResourceShareArns field's value. +func (s *GetResourceSharesInput) SetResourceShareArns(v []*string) *GetResourceSharesInput { + s.ResourceShareArns = v + return s +} + +// SetResourceShareStatus sets the ResourceShareStatus field's value. +func (s *GetResourceSharesInput) SetResourceShareStatus(v string) *GetResourceSharesInput { + s.ResourceShareStatus = &v + return s +} + +// SetTagFilters sets the TagFilters field's value. +func (s *GetResourceSharesInput) SetTagFilters(v []*TagFilter) *GetResourceSharesInput { + s.TagFilters = v + return s +} + +type GetResourceSharesOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the resource shares. + ResourceShares []*ResourceShare `locationName:"resourceShares" type:"list"` +} + +// String returns the string representation +func (s GetResourceSharesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourceSharesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *GetResourceSharesOutput) SetNextToken(v string) *GetResourceSharesOutput { + s.NextToken = &v + return s +} + +// SetResourceShares sets the ResourceShares field's value. +func (s *GetResourceSharesOutput) SetResourceShares(v []*ResourceShare) *GetResourceSharesOutput { + s.ResourceShares = v + return s +} + +type ListPrincipalsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The principals. + Principals []*string `locationName:"principals" type:"list"` + + // The Amazon Resource Name (ARN) of the resource. + ResourceArn *string `locationName:"resourceArn" type:"string"` + + // The type of owner. + // + // ResourceOwner is a required field + ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"` + + // The Amazon Resource Names (ARN) of the resource shares. + ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` + + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string"` +} + +// String returns the string representation +func (s ListPrincipalsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPrincipalsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPrincipalsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPrincipalsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceOwner == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceOwner")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListPrincipalsInput) SetMaxResults(v int64) *ListPrincipalsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPrincipalsInput) SetNextToken(v string) *ListPrincipalsInput { + s.NextToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *ListPrincipalsInput) SetPrincipals(v []*string) *ListPrincipalsInput { + s.Principals = v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListPrincipalsInput) SetResourceArn(v string) *ListPrincipalsInput { + s.ResourceArn = &v + return s +} + +// SetResourceOwner sets the ResourceOwner field's value. +func (s *ListPrincipalsInput) SetResourceOwner(v string) *ListPrincipalsInput { + s.ResourceOwner = &v + return s +} + +// SetResourceShareArns sets the ResourceShareArns field's value. +func (s *ListPrincipalsInput) SetResourceShareArns(v []*string) *ListPrincipalsInput { + s.ResourceShareArns = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListPrincipalsInput) SetResourceType(v string) *ListPrincipalsInput { + s.ResourceType = &v + return s +} + +type ListPrincipalsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The principals. + Principals []*Principal `locationName:"principals" type:"list"` +} + +// String returns the string representation +func (s ListPrincipalsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPrincipalsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListPrincipalsOutput) SetNextToken(v string) *ListPrincipalsOutput { + s.NextToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *ListPrincipalsOutput) SetPrincipals(v []*Principal) *ListPrincipalsOutput { + s.Principals = v + return s +} + +type ListResourcesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The principal. + Principal *string `locationName:"principal" type:"string"` + + // The Amazon Resource Names (ARN) of the resources. + ResourceArns []*string `locationName:"resourceArns" type:"list"` + + // The type of owner. + // + // ResourceOwner is a required field + ResourceOwner *string `locationName:"resourceOwner" type:"string" required:"true" enum:"ResourceOwner"` + + // The Amazon Resource Names (ARN) of the resource shares. + ResourceShareArns []*string `locationName:"resourceShareArns" type:"list"` + + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string"` +} + +// String returns the string representation +func (s ListResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourcesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceOwner == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceOwner")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResourcesInput) SetMaxResults(v int64) *ListResourcesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourcesInput) SetNextToken(v string) *ListResourcesInput { + s.NextToken = &v + return s +} + +// SetPrincipal sets the Principal field's value. +func (s *ListResourcesInput) SetPrincipal(v string) *ListResourcesInput { + s.Principal = &v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *ListResourcesInput) SetResourceArns(v []*string) *ListResourcesInput { + s.ResourceArns = v + return s +} + +// SetResourceOwner sets the ResourceOwner field's value. +func (s *ListResourcesInput) SetResourceOwner(v string) *ListResourcesInput { + s.ResourceOwner = &v + return s +} + +// SetResourceShareArns sets the ResourceShareArns field's value. +func (s *ListResourcesInput) SetResourceShareArns(v []*string) *ListResourcesInput { + s.ResourceShareArns = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListResourcesInput) SetResourceType(v string) *ListResourcesInput { + s.ResourceType = &v + return s +} + +type ListResourcesOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the resources. + Resources []*Resource `locationName:"resources" type:"list"` +} + +// String returns the string representation +func (s ListResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResourcesOutput) SetNextToken(v string) *ListResourcesOutput { + s.NextToken = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *ListResourcesOutput) SetResources(v []*Resource) *ListResourcesOutput { + s.Resources = v + return s +} + +// Describes a principal for use with AWS Resource Access Manager. +type Principal struct { + _ struct{} `type:"structure"` + + // The time when the principal was associated with the resource share. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // Indicates whether the principal belongs to the same organization as the AWS + // account that owns the resource share. + External *bool `locationName:"external" type:"boolean"` + + // The ID of the principal. + Id *string `locationName:"id" type:"string"` + + // The time when the association was last updated. + LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` + + // The Amazon Resource Name (ARN) of the resource share. + ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` +} + +// String returns the string representation +func (s Principal) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Principal) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *Principal) SetCreationTime(v time.Time) *Principal { + s.CreationTime = &v + return s +} + +// SetExternal sets the External field's value. +func (s *Principal) SetExternal(v bool) *Principal { + s.External = &v + return s +} + +// SetId sets the Id field's value. +func (s *Principal) SetId(v string) *Principal { + s.Id = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *Principal) SetLastUpdatedTime(v time.Time) *Principal { + s.LastUpdatedTime = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *Principal) SetResourceShareArn(v string) *Principal { + s.ResourceShareArn = &v + return s +} + +type RejectResourceShareInvitationInput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The Amazon Resource Name (ARN) of the invitation. + // + // ResourceShareInvitationArn is a required field + ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s RejectResourceShareInvitationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectResourceShareInvitationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectResourceShareInvitationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectResourceShareInvitationInput"} + if s.ResourceShareInvitationArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareInvitationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *RejectResourceShareInvitationInput) SetClientToken(v string) *RejectResourceShareInvitationInput { + s.ClientToken = &v + return s +} + +// SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value. +func (s *RejectResourceShareInvitationInput) SetResourceShareInvitationArn(v string) *RejectResourceShareInvitationInput { + s.ResourceShareInvitationArn = &v + return s +} + +type RejectResourceShareInvitationOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the invitation. + ResourceShareInvitation *ResourceShareInvitation `locationName:"resourceShareInvitation" type:"structure"` +} + +// String returns the string representation +func (s RejectResourceShareInvitationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectResourceShareInvitationOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *RejectResourceShareInvitationOutput) SetClientToken(v string) *RejectResourceShareInvitationOutput { + s.ClientToken = &v + return s +} + +// SetResourceShareInvitation sets the ResourceShareInvitation field's value. +func (s *RejectResourceShareInvitationOutput) SetResourceShareInvitation(v *ResourceShareInvitation) *RejectResourceShareInvitationOutput { + s.ResourceShareInvitation = v + return s +} + +// Describes a resource associated with a resource share. +type Resource struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. + Arn *string `locationName:"arn" type:"string"` + + // The time when the resource was associated with the resource share. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The time when the association was last updated. + LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` + + // The Amazon Resource Name (ARN) of the resource share. + ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` + + // The status of the resource. + Status *string `locationName:"status" type:"string" enum:"ResourceStatus"` + + // A message about the status of the resource. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // The resource type. + Type *string `locationName:"type" type:"string"` +} + +// String returns the string representation +func (s Resource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Resource) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Resource) SetArn(v string) *Resource { + s.Arn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *Resource) SetCreationTime(v time.Time) *Resource { + s.CreationTime = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *Resource) SetLastUpdatedTime(v time.Time) *Resource { + s.LastUpdatedTime = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *Resource) SetResourceShareArn(v string) *Resource { + s.ResourceShareArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *Resource) SetStatus(v string) *Resource { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *Resource) SetStatusMessage(v string) *Resource { + s.StatusMessage = &v + return s +} + +// SetType sets the Type field's value. +func (s *Resource) SetType(v string) *Resource { + s.Type = &v + return s +} + +// Describes a resource share. +type ResourceShare struct { + _ struct{} `type:"structure"` + + // Indicates whether principals outside your organization can be associated + // with a resource share. + AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"` + + // The time when the resource share was created. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The time when the resource share was last updated. + LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` + + // The name of the resource share. + Name *string `locationName:"name" type:"string"` + + // The ID of the AWS account that owns the resource share. + OwningAccountId *string `locationName:"owningAccountId" type:"string"` + + // The Amazon Resource Name (ARN) of the resource share. + ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` + + // The status of the resource share. + Status *string `locationName:"status" type:"string" enum:"ResourceShareStatus"` + + // A message about the status of the resource share. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // The tags for the resource share. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ResourceShare) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceShare) GoString() string { + return s.String() +} + +// SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value. +func (s *ResourceShare) SetAllowExternalPrincipals(v bool) *ResourceShare { + s.AllowExternalPrincipals = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ResourceShare) SetCreationTime(v time.Time) *ResourceShare { + s.CreationTime = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *ResourceShare) SetLastUpdatedTime(v time.Time) *ResourceShare { + s.LastUpdatedTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *ResourceShare) SetName(v string) *ResourceShare { + s.Name = &v + return s +} + +// SetOwningAccountId sets the OwningAccountId field's value. +func (s *ResourceShare) SetOwningAccountId(v string) *ResourceShare { + s.OwningAccountId = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *ResourceShare) SetResourceShareArn(v string) *ResourceShare { + s.ResourceShareArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ResourceShare) SetStatus(v string) *ResourceShare { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ResourceShare) SetStatusMessage(v string) *ResourceShare { + s.StatusMessage = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ResourceShare) SetTags(v []*Tag) *ResourceShare { + s.Tags = v + return s +} + +// Describes an association with a resource share. +type ResourceShareAssociation struct { + _ struct{} `type:"structure"` + + // The associated entity. For resource associations, this is the ARN of the + // resource. For principal associations, this is the ID of an AWS account or + // the ARN of an OU or organization from AWS Organizations. + AssociatedEntity *string `locationName:"associatedEntity" type:"string"` + + // The association type. + AssociationType *string `locationName:"associationType" type:"string" enum:"ResourceShareAssociationType"` + + // The time when the association was created. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // Indicates whether the principal belongs to the same organization as the AWS + // account that owns the resource share. + External *bool `locationName:"external" type:"boolean"` + + // The time when the association was last updated. + LastUpdatedTime *time.Time `locationName:"lastUpdatedTime" type:"timestamp"` + + // The Amazon Resource Name (ARN) of the resource share. + ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` + + // The status of the association. + Status *string `locationName:"status" type:"string" enum:"ResourceShareAssociationStatus"` + + // A message about the status of the association. + StatusMessage *string `locationName:"statusMessage" type:"string"` +} + +// String returns the string representation +func (s ResourceShareAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceShareAssociation) GoString() string { + return s.String() +} + +// SetAssociatedEntity sets the AssociatedEntity field's value. +func (s *ResourceShareAssociation) SetAssociatedEntity(v string) *ResourceShareAssociation { + s.AssociatedEntity = &v + return s +} + +// SetAssociationType sets the AssociationType field's value. +func (s *ResourceShareAssociation) SetAssociationType(v string) *ResourceShareAssociation { + s.AssociationType = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ResourceShareAssociation) SetCreationTime(v time.Time) *ResourceShareAssociation { + s.CreationTime = &v + return s +} + +// SetExternal sets the External field's value. +func (s *ResourceShareAssociation) SetExternal(v bool) *ResourceShareAssociation { + s.External = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *ResourceShareAssociation) SetLastUpdatedTime(v time.Time) *ResourceShareAssociation { + s.LastUpdatedTime = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *ResourceShareAssociation) SetResourceShareArn(v string) *ResourceShareAssociation { + s.ResourceShareArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ResourceShareAssociation) SetStatus(v string) *ResourceShareAssociation { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ResourceShareAssociation) SetStatusMessage(v string) *ResourceShareAssociation { + s.StatusMessage = &v + return s +} + +// Describes an invitation to join a resource share. +type ResourceShareInvitation struct { + _ struct{} `type:"structure"` + + // The date and time when the invitation was sent. + InvitationTimestamp *time.Time `locationName:"invitationTimestamp" type:"timestamp"` + + // The ID of the AWS account that received the invitation. + ReceiverAccountId *string `locationName:"receiverAccountId" type:"string"` + + // The Amazon Resource Name (ARN) of the resource share. + ResourceShareArn *string `locationName:"resourceShareArn" type:"string"` + + // The resources associated with the resource share. + ResourceShareAssociations []*ResourceShareAssociation `locationName:"resourceShareAssociations" type:"list"` + + // The Amazon Resource Name (ARN) of the invitation. + ResourceShareInvitationArn *string `locationName:"resourceShareInvitationArn" type:"string"` + + // The name of the resource share. + ResourceShareName *string `locationName:"resourceShareName" type:"string"` + + // The ID of the AWS account that sent the invitation. + SenderAccountId *string `locationName:"senderAccountId" type:"string"` + + // The status of the invitation. + Status *string `locationName:"status" type:"string" enum:"ResourceShareInvitationStatus"` +} + +// String returns the string representation +func (s ResourceShareInvitation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceShareInvitation) GoString() string { + return s.String() +} + +// SetInvitationTimestamp sets the InvitationTimestamp field's value. +func (s *ResourceShareInvitation) SetInvitationTimestamp(v time.Time) *ResourceShareInvitation { + s.InvitationTimestamp = &v + return s +} + +// SetReceiverAccountId sets the ReceiverAccountId field's value. +func (s *ResourceShareInvitation) SetReceiverAccountId(v string) *ResourceShareInvitation { + s.ReceiverAccountId = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *ResourceShareInvitation) SetResourceShareArn(v string) *ResourceShareInvitation { + s.ResourceShareArn = &v + return s +} + +// SetResourceShareAssociations sets the ResourceShareAssociations field's value. +func (s *ResourceShareInvitation) SetResourceShareAssociations(v []*ResourceShareAssociation) *ResourceShareInvitation { + s.ResourceShareAssociations = v + return s +} + +// SetResourceShareInvitationArn sets the ResourceShareInvitationArn field's value. +func (s *ResourceShareInvitation) SetResourceShareInvitationArn(v string) *ResourceShareInvitation { + s.ResourceShareInvitationArn = &v + return s +} + +// SetResourceShareName sets the ResourceShareName field's value. +func (s *ResourceShareInvitation) SetResourceShareName(v string) *ResourceShareInvitation { + s.ResourceShareName = &v + return s +} + +// SetSenderAccountId sets the SenderAccountId field's value. +func (s *ResourceShareInvitation) SetSenderAccountId(v string) *ResourceShareInvitation { + s.SenderAccountId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ResourceShareInvitation) SetStatus(v string) *ResourceShareInvitation { + s.Status = &v + return s +} + +// Information about a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + Key *string `locationName:"key" type:"string"` + + // The value of the tag. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// Used to filter information based on tags. +type TagFilter struct { + _ struct{} `type:"structure"` + + // The tag key. + TagKey *string `locationName:"tagKey" type:"string"` + + // The tag values. + TagValues []*string `locationName:"tagValues" type:"list"` +} + +// String returns the string representation +func (s TagFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagFilter) GoString() string { + return s.String() +} + +// SetTagKey sets the TagKey field's value. +func (s *TagFilter) SetTagKey(v string) *TagFilter { + s.TagKey = &v + return s +} + +// SetTagValues sets the TagValues field's value. +func (s *TagFilter) SetTagValues(v []*string) *TagFilter { + s.TagValues = v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource share. + // + // ResourceShareArn is a required field + ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` + + // One or more tags. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceShareArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *TagResourceInput) SetResourceShareArn(v string) *TagResourceInput { + s.ResourceShareArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource share. + // + // ResourceShareArn is a required field + ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` + + // The tag keys of the tags to remove. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceShareArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *UntagResourceInput) SetResourceShareArn(v string) *UntagResourceInput { + s.ResourceShareArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +type UpdateResourceShareInput struct { + _ struct{} `type:"structure"` + + // Indicates whether principals outside your organization can be associated + // with a resource share. + AllowExternalPrincipals *bool `locationName:"allowExternalPrincipals" type:"boolean"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The name of the resource share. + Name *string `locationName:"name" type:"string"` + + // The Amazon Resource Name (ARN) of the resource share. + // + // ResourceShareArn is a required field + ResourceShareArn *string `locationName:"resourceShareArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateResourceShareInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResourceShareInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResourceShareInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResourceShareInput"} + if s.ResourceShareArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceShareArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllowExternalPrincipals sets the AllowExternalPrincipals field's value. +func (s *UpdateResourceShareInput) SetAllowExternalPrincipals(v bool) *UpdateResourceShareInput { + s.AllowExternalPrincipals = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *UpdateResourceShareInput) SetClientToken(v string) *UpdateResourceShareInput { + s.ClientToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateResourceShareInput) SetName(v string) *UpdateResourceShareInput { + s.Name = &v + return s +} + +// SetResourceShareArn sets the ResourceShareArn field's value. +func (s *UpdateResourceShareInput) SetResourceShareArn(v string) *UpdateResourceShareInput { + s.ResourceShareArn = &v + return s +} + +type UpdateResourceShareOutput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the resource share. + ResourceShare *ResourceShare `locationName:"resourceShare" type:"structure"` +} + +// String returns the string representation +func (s UpdateResourceShareOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResourceShareOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *UpdateResourceShareOutput) SetClientToken(v string) *UpdateResourceShareOutput { + s.ClientToken = &v + return s +} + +// SetResourceShare sets the ResourceShare field's value. +func (s *UpdateResourceShareOutput) SetResourceShare(v *ResourceShare) *UpdateResourceShareOutput { + s.ResourceShare = v + return s +} + +const ( + // ResourceOwnerSelf is a ResourceOwner enum value + ResourceOwnerSelf = "SELF" + + // ResourceOwnerOtherAccounts is a ResourceOwner enum value + ResourceOwnerOtherAccounts = "OTHER-ACCOUNTS" +) + +const ( + // ResourceShareAssociationStatusAssociating is a ResourceShareAssociationStatus enum value + ResourceShareAssociationStatusAssociating = "ASSOCIATING" + + // ResourceShareAssociationStatusAssociated is a ResourceShareAssociationStatus enum value + ResourceShareAssociationStatusAssociated = "ASSOCIATED" + + // ResourceShareAssociationStatusFailed is a ResourceShareAssociationStatus enum value + ResourceShareAssociationStatusFailed = "FAILED" + + // ResourceShareAssociationStatusDisassociating is a ResourceShareAssociationStatus enum value + ResourceShareAssociationStatusDisassociating = "DISASSOCIATING" + + // ResourceShareAssociationStatusDisassociated is a ResourceShareAssociationStatus enum value + ResourceShareAssociationStatusDisassociated = "DISASSOCIATED" +) + +const ( + // ResourceShareAssociationTypePrincipal is a ResourceShareAssociationType enum value + ResourceShareAssociationTypePrincipal = "PRINCIPAL" + + // ResourceShareAssociationTypeResource is a ResourceShareAssociationType enum value + ResourceShareAssociationTypeResource = "RESOURCE" +) + +const ( + // ResourceShareInvitationStatusPending is a ResourceShareInvitationStatus enum value + ResourceShareInvitationStatusPending = "PENDING" + + // ResourceShareInvitationStatusAccepted is a ResourceShareInvitationStatus enum value + ResourceShareInvitationStatusAccepted = "ACCEPTED" + + // ResourceShareInvitationStatusRejected is a ResourceShareInvitationStatus enum value + ResourceShareInvitationStatusRejected = "REJECTED" + + // ResourceShareInvitationStatusExpired is a ResourceShareInvitationStatus enum value + ResourceShareInvitationStatusExpired = "EXPIRED" +) + +const ( + // ResourceShareStatusPending is a ResourceShareStatus enum value + ResourceShareStatusPending = "PENDING" + + // ResourceShareStatusActive is a ResourceShareStatus enum value + ResourceShareStatusActive = "ACTIVE" + + // ResourceShareStatusFailed is a ResourceShareStatus enum value + ResourceShareStatusFailed = "FAILED" + + // ResourceShareStatusDeleting is a ResourceShareStatus enum value + ResourceShareStatusDeleting = "DELETING" + + // ResourceShareStatusDeleted is a ResourceShareStatus enum value + ResourceShareStatusDeleted = "DELETED" +) + +const ( + // ResourceStatusAvailable is a ResourceStatus enum value + ResourceStatusAvailable = "AVAILABLE" + + // ResourceStatusZonalResourceInaccessible is a ResourceStatus enum value + ResourceStatusZonalResourceInaccessible = "ZONAL_RESOURCE_INACCESSIBLE" + + // ResourceStatusLimitExceeded is a ResourceStatus enum value + ResourceStatusLimitExceeded = "LIMIT_EXCEEDED" + + // ResourceStatusUnavailable is a ResourceStatus enum value + ResourceStatusUnavailable = "UNAVAILABLE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ram/doc.go new file mode 100644 index 000000000..234b180b8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ram/doc.go @@ -0,0 +1,44 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package ram provides the client and types for making API +// requests to AWS Resource Access Manager. +// +// Use AWS Resource Access Manager to share AWS resources between AWS accounts. +// To share a resource, you create a resource share, associate the resource +// with the resource share, and specify the principals that can access the resource. +// The following principals are supported: +// +// * The ID of an AWS account +// +// * The Amazon Resource Name (ARN) of an OU from AWS Organizations +// +// * The Amazon Resource Name (ARN) of an organization from AWS Organizations +// +// If you specify an AWS account that doesn't exist in the same organization +// as the account that owns the resource share, the owner of the specified account +// receives an invitation to accept the resource share. After the owner accepts +// the invitation, they can access the resources in the resource share. An administrator +// of the specified account can use IAM policies to restrict access resources +// in the resource share. +// +// See https://docs.aws.amazon.com/goto/WebAPI/ram-2018-01-04 for more information on this service. +// +// See ram package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/ram/ +// +// Using the Client +// +// To contact AWS Resource Access Manager with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Resource Access Manager client RAM for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/ram/#New +package ram diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ram/errors.go new file mode 100644 index 000000000..e0f0af48c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ram/errors.go @@ -0,0 +1,128 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ram + +const ( + + // ErrCodeIdempotentParameterMismatchException for service response error code + // "IdempotentParameterMismatchException". + // + // A client token input parameter was reused with an operation, but at least + // one of the other input parameters is different from the previous call to + // the operation. + ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException" + + // ErrCodeInvalidClientTokenException for service response error code + // "InvalidClientTokenException". + // + // A client token is not valid. + ErrCodeInvalidClientTokenException = "InvalidClientTokenException" + + // ErrCodeInvalidMaxResultsException for service response error code + // "InvalidMaxResultsException". + // + // The specified value for MaxResults is not valid. + ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The specified value for NextToken is not valid. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // A parameter is not valid. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeInvalidResourceTypeException for service response error code + // "InvalidResourceTypeException". + // + // The specified resource type is not valid. + ErrCodeInvalidResourceTypeException = "InvalidResourceTypeException" + + // ErrCodeInvalidStateTransitionException for service response error code + // "InvalidStateTransitionException". + // + // The requested state transition is not valid. + ErrCodeInvalidStateTransitionException = "InvalidStateTransitionException" + + // ErrCodeMalformedArnException for service response error code + // "MalformedArnException". + // + // The format of an Amazon Resource Name (ARN) is not valid. + ErrCodeMalformedArnException = "MalformedArnException" + + // ErrCodeMissingRequiredParameterException for service response error code + // "MissingRequiredParameterException". + // + // A required input parameter is missing. + ErrCodeMissingRequiredParameterException = "MissingRequiredParameterException" + + // ErrCodeOperationNotPermittedException for service response error code + // "OperationNotPermittedException". + // + // The requested operation is not permitted. + ErrCodeOperationNotPermittedException = "OperationNotPermittedException" + + // ErrCodeResourceArnNotFoundException for service response error code + // "ResourceArnNotFoundException". + // + // An Amazon Resource Name (ARN) was not found. + ErrCodeResourceArnNotFoundException = "ResourceArnNotFoundException" + + // ErrCodeResourceShareInvitationAlreadyAcceptedException for service response error code + // "ResourceShareInvitationAlreadyAcceptedException". + // + // The invitation was already accepted. + ErrCodeResourceShareInvitationAlreadyAcceptedException = "ResourceShareInvitationAlreadyAcceptedException" + + // ErrCodeResourceShareInvitationAlreadyRejectedException for service response error code + // "ResourceShareInvitationAlreadyRejectedException". + // + // The invitation was already rejected. + ErrCodeResourceShareInvitationAlreadyRejectedException = "ResourceShareInvitationAlreadyRejectedException" + + // ErrCodeResourceShareInvitationArnNotFoundException for service response error code + // "ResourceShareInvitationArnNotFoundException". + // + // The Amazon Resource Name (ARN) for an invitation was not found. + ErrCodeResourceShareInvitationArnNotFoundException = "ResourceShareInvitationArnNotFoundException" + + // ErrCodeResourceShareInvitationExpiredException for service response error code + // "ResourceShareInvitationExpiredException". + // + // The invitation is expired. + ErrCodeResourceShareInvitationExpiredException = "ResourceShareInvitationExpiredException" + + // ErrCodeResourceShareLimitExceededException for service response error code + // "ResourceShareLimitExceededException". + // + // The requested resource share exceeds the limit for your account. + ErrCodeResourceShareLimitExceededException = "ResourceShareLimitExceededException" + + // ErrCodeServerInternalException for service response error code + // "ServerInternalException". + // + // The service could not respond to the request due to an internal problem. + ErrCodeServerInternalException = "ServerInternalException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // The service is not available. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeTagLimitExceededException for service response error code + // "TagLimitExceededException". + // + // The requested tags exceed the limit for your account. + ErrCodeTagLimitExceededException = "TagLimitExceededException" + + // ErrCodeUnknownResourceException for service response error code + // "UnknownResourceException". + // + // A specified resource was not found. + ErrCodeUnknownResourceException = "UnknownResourceException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ram/service.go b/vendor/github.com/aws/aws-sdk-go/service/ram/service.go new file mode 100644 index 000000000..8781113a9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/ram/service.go @@ -0,0 +1,96 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package ram + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// RAM provides the API operation methods for making requests to +// AWS Resource Access Manager. See this package's package overview docs +// for details on the service. +// +// RAM methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type RAM struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "RAM" // Name of service. + EndpointsID = "ram" // ID to lookup a service endpoint with. + ServiceID = "RAM" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the RAM client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a RAM client from just a session. +// svc := ram.New(mySession) +// +// // Create a RAM client with additional configuration +// svc := ram.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *RAM { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *RAM { + svc := &RAM{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-01-04", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a RAM operation and runs any +// custom request initialization. +func (c *RAM) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 89bf316df..03adeefd7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -58,9 +58,9 @@ func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *re // AddRoleToDBCluster API operation for Amazon Relational Database Service. // -// Associates an Identity and Access Management (IAM) role from an Aurora DB -// cluster. For more information, see Authorizing Amazon Aurora MySQL to Access -// Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) +// Associates an Identity and Access Management (IAM) role from an Amazon Aurora +// DB cluster. For more information, see Authorizing Amazon Aurora MySQL to +// Access Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) // in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -107,6 +107,97 @@ func (c *RDS) AddRoleToDBClusterWithContext(ctx aws.Context, input *AddRoleToDBC return out, req.Send() } +const opAddRoleToDBInstance = "AddRoleToDBInstance" + +// AddRoleToDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the AddRoleToDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddRoleToDBInstance for more information on using the AddRoleToDBInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddRoleToDBInstanceRequest method. +// req, resp := client.AddRoleToDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBInstance +func (c *RDS) AddRoleToDBInstanceRequest(input *AddRoleToDBInstanceInput) (req *request.Request, output *AddRoleToDBInstanceOutput) { + op := &request.Operation{ + Name: opAddRoleToDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddRoleToDBInstanceInput{} + } + + output = &AddRoleToDBInstanceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddRoleToDBInstance API operation for Amazon Relational Database Service. +// +// Associates an AWS Identity and Access Management (IAM) role with a DB instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation AddRoleToDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBInstanceRoleAlreadyExistsFault "DBInstanceRoleAlreadyExists" +// The specified RoleArn or FeatureName value is already associated with the +// DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// * ErrCodeDBInstanceRoleQuotaExceededFault "DBInstanceRoleQuotaExceeded" +// You can't associate any more AWS Identity and Access Management (IAM) roles +// with the DB instance because the quota has been reached. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/AddRoleToDBInstance +func (c *RDS) AddRoleToDBInstance(input *AddRoleToDBInstanceInput) (*AddRoleToDBInstanceOutput, error) { + req, out := c.AddRoleToDBInstanceRequest(input) + return out, req.Send() +} + +// AddRoleToDBInstanceWithContext is the same as AddRoleToDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See AddRoleToDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) AddRoleToDBInstanceWithContext(ctx aws.Context, input *AddRoleToDBInstanceInput, opts ...request.Option) (*AddRoleToDBInstanceOutput, error) { + req, out := c.AddRoleToDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" // AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the @@ -1621,6 +1712,7 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // Domain doesn't refer to an existing Active Directory domain. // // * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// The backup policy was not found. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBInstance func (c *RDS) CreateDBInstance(input *CreateDBInstanceInput) (*CreateDBInstanceOutput, error) { @@ -8291,6 +8383,7 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // Domain doesn't refer to an existing Active Directory domain. // // * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// The backup policy was not found. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBInstance func (c *RDS) ModifyDBInstance(input *ModifyDBInstanceInput) (*ModifyDBInstanceOutput, error) { @@ -9444,9 +9537,9 @@ func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput // RemoveRoleFromDBCluster API operation for Amazon Relational Database Service. // -// Disassociates an Identity and Access Management (IAM) role from an Aurora -// DB cluster. For more information, see Authorizing Amazon Aurora MySQL to -// Access Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) +// Disassociates an AWS Identity and Access Management (IAM) role from an Amazon +// Aurora DB cluster. For more information, see Authorizing Amazon Aurora MySQL +// to Access Other AWS Services on Your Behalf (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Authorizing.html) // in the Amazon Aurora User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -9489,6 +9582,94 @@ func (c *RDS) RemoveRoleFromDBClusterWithContext(ctx aws.Context, input *RemoveR return out, req.Send() } +const opRemoveRoleFromDBInstance = "RemoveRoleFromDBInstance" + +// RemoveRoleFromDBInstanceRequest generates a "aws/request.Request" representing the +// client's request for the RemoveRoleFromDBInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveRoleFromDBInstance for more information on using the RemoveRoleFromDBInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveRoleFromDBInstanceRequest method. +// req, resp := client.RemoveRoleFromDBInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBInstance +func (c *RDS) RemoveRoleFromDBInstanceRequest(input *RemoveRoleFromDBInstanceInput) (req *request.Request, output *RemoveRoleFromDBInstanceOutput) { + op := &request.Operation{ + Name: opRemoveRoleFromDBInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveRoleFromDBInstanceInput{} + } + + output = &RemoveRoleFromDBInstanceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveRoleFromDBInstance API operation for Amazon Relational Database Service. +// +// Disassociates an AWS Identity and Access Management (IAM) role from a DB +// instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation RemoveRoleFromDBInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeDBInstanceRoleNotFoundFault "DBInstanceRoleNotFound" +// The specified RoleArn value doesn't match the specifed feature for the DB +// instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBInstance +func (c *RDS) RemoveRoleFromDBInstance(input *RemoveRoleFromDBInstanceInput) (*RemoveRoleFromDBInstanceOutput, error) { + req, out := c.RemoveRoleFromDBInstanceRequest(input) + return out, req.Send() +} + +// RemoveRoleFromDBInstanceWithContext is the same as RemoveRoleFromDBInstance with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveRoleFromDBInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *RDS) RemoveRoleFromDBInstanceWithContext(ctx aws.Context, input *RemoveRoleFromDBInstanceInput, opts ...request.Option) (*RemoveRoleFromDBInstanceOutput, error) { + req, out := c.RemoveRoleFromDBInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubscription" // RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the @@ -10414,6 +10595,7 @@ func (c *RDS) RestoreDBInstanceFromDBSnapshotRequest(input *RestoreDBInstanceFro // DBParameterGroupName doesn't refer to an existing DB parameter group. // // * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// The backup policy was not found. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromDBSnapshot func (c *RDS) RestoreDBInstanceFromDBSnapshot(input *RestoreDBInstanceFromDBSnapshotInput) (*RestoreDBInstanceFromDBSnapshotOutput, error) { @@ -10557,6 +10739,7 @@ func (c *RDS) RestoreDBInstanceFromS3Request(input *RestoreDBInstanceFromS3Input // An error occurred accessing an AWS KMS key. // // * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// The backup policy was not found. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceFromS3 func (c *RDS) RestoreDBInstanceFromS3(input *RestoreDBInstanceFromS3Input) (*RestoreDBInstanceFromS3Output, error) { @@ -10716,6 +10899,7 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // Domain doesn't refer to an existing Active Directory domain. // // * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// The backup policy was not found. // // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" // DBParameterGroupName doesn't refer to an existing DB parameter group. @@ -11353,6 +11537,88 @@ func (s AddRoleToDBClusterOutput) GoString() string { return s.String() } +type AddRoleToDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the DB instance to associate the IAM role with. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The name of the feature for the DB instance that the IAM role is to be associated + // with. For the list of supported feature names, see DBEngineVersion. + // + // FeatureName is a required field + FeatureName *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role to associate with the DB instance, + // for example arn:aws:iam::123456789012:role/AccessRole. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AddRoleToDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddRoleToDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddRoleToDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddRoleToDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.FeatureName == nil { + invalidParams.Add(request.NewErrParamRequired("FeatureName")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *AddRoleToDBInstanceInput) SetDBInstanceIdentifier(v string) *AddRoleToDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetFeatureName sets the FeatureName field's value. +func (s *AddRoleToDBInstanceInput) SetFeatureName(v string) *AddRoleToDBInstanceInput { + s.FeatureName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *AddRoleToDBInstanceInput) SetRoleArn(v string) *AddRoleToDBInstanceInput { + s.RoleArn = &v + return s +} + +type AddRoleToDBInstanceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddRoleToDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddRoleToDBInstanceOutput) GoString() string { + return s.String() +} + type AddSourceIdentifierToSubscriptionInput struct { _ struct{} `type:"structure"` @@ -17399,6 +17665,12 @@ type DBEngineVersion struct { // A list of the supported DB engine modes. SupportedEngineModes []*string `type:"list"` + // A list of features supported by the DB engine. Supported feature names include + // the following. + // + // * s3Import + SupportedFeatureNames []*string `type:"list"` + // A list of the time zones supported by this engine for the Timezone parameter // of the CreateDBInstance action. SupportedTimezones []*Timezone `locationNameList:"Timezone" type:"list"` @@ -17479,6 +17751,12 @@ func (s *DBEngineVersion) SetSupportedEngineModes(v []*string) *DBEngineVersion return s } +// SetSupportedFeatureNames sets the SupportedFeatureNames field's value. +func (s *DBEngineVersion) SetSupportedFeatureNames(v []*string) *DBEngineVersion { + s.SupportedFeatureNames = v + return s +} + // SetSupportedTimezones sets the SupportedTimezones field's value. func (s *DBEngineVersion) SetSupportedTimezones(v []*Timezone) *DBEngineVersion { s.SupportedTimezones = v @@ -17512,6 +17790,10 @@ type DBInstance struct { // Specifies the allocated storage size specified in gibibytes. AllocatedStorage *int64 `type:"integer"` + // The AWS Identity and Access Management (IAM) roles associated with the DB + // instance. + AssociatedRoles []*DBInstanceRole `locationNameList:"DBInstanceRole" type:"list"` + // Indicates that minor version patches are applied automatically. AutoMinorVersionUpgrade *bool `type:"boolean"` @@ -17769,6 +18051,12 @@ func (s *DBInstance) SetAllocatedStorage(v int64) *DBInstance { return s } +// SetAssociatedRoles sets the AssociatedRoles field's value. +func (s *DBInstance) SetAssociatedRoles(v []*DBInstanceRole) *DBInstance { + s.AssociatedRoles = v + return s +} + // SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. func (s *DBInstance) SetAutoMinorVersionUpgrade(v bool) *DBInstance { s.AutoMinorVersionUpgrade = &v @@ -18345,6 +18633,61 @@ func (s *DBInstanceAutomatedBackup) SetVpcId(v string) *DBInstanceAutomatedBacku return s } +// Describes an AWS Identity and Access Management (IAM) role that is associated +// with a DB instance. +type DBInstanceRole struct { + _ struct{} `type:"structure"` + + // The name of the feature associated with the AWS Identity and Access Management + // (IAM) role. For the list of supported feature names, see DBEngineVersion. + FeatureName *string `type:"string"` + + // The Amazon Resource Name (ARN) of the IAM role that is associated with the + // DB instance. + RoleArn *string `type:"string"` + + // Describes the state of association between the IAM role and the DB instance. + // The Status property returns one of the following values: + // + // * ACTIVE - the IAM role ARN is associated with the DB instance and can + // be used to access other AWS services on your behalf. + // + // * PENDING - the IAM role ARN is being associated with the DB instance. + // + // * INVALID - the IAM role ARN is associated with the DB instance, but the + // DB instance is unable to assume the IAM role in order to access other + // AWS services on your behalf. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DBInstanceRole) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstanceRole) GoString() string { + return s.String() +} + +// SetFeatureName sets the FeatureName field's value. +func (s *DBInstanceRole) SetFeatureName(v string) *DBInstanceRole { + s.FeatureName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DBInstanceRole) SetRoleArn(v string) *DBInstanceRole { + s.RoleArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBInstanceRole) SetStatus(v string) *DBInstanceRole { + s.Status = &v + return s +} + // Provides a list of status information for a DB instance. type DBInstanceStatusInfo struct { _ struct{} `type:"structure"` @@ -26354,6 +26697,10 @@ type ModifyDBInstanceInput struct { // The configuration setting for the log types to be enabled for export to CloudWatch // Logs for a specific DB instance. + // + // A change to the CloudwatchLogsExportConfiguration parameter is always applied + // to the DB instance immediately. Therefore, the ApplyImmediately parameter + // has no effect. CloudwatchLogsExportConfiguration *CloudwatchLogsExportConfiguration `type:"structure"` // True to copy all tags from the DB instance to snapshots of the DB instance, @@ -29669,6 +30016,88 @@ func (s RemoveRoleFromDBClusterOutput) GoString() string { return s.String() } +type RemoveRoleFromDBInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the DB instance to disassociate the IAM role from. + // + // DBInstanceIdentifier is a required field + DBInstanceIdentifier *string `type:"string" required:"true"` + + // The name of the feature for the DB instance that the IAM role is to be disassociated + // from. For the list of supported feature names, see DBEngineVersion. + // + // FeatureName is a required field + FeatureName *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB + // instance, for example arn:aws:iam::123456789012:role/AccessRole. + // + // RoleArn is a required field + RoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveRoleFromDBInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveRoleFromDBInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveRoleFromDBInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveRoleFromDBInstanceInput"} + if s.DBInstanceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBInstanceIdentifier")) + } + if s.FeatureName == nil { + invalidParams.Add(request.NewErrParamRequired("FeatureName")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *RemoveRoleFromDBInstanceInput) SetDBInstanceIdentifier(v string) *RemoveRoleFromDBInstanceInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetFeatureName sets the FeatureName field's value. +func (s *RemoveRoleFromDBInstanceInput) SetFeatureName(v string) *RemoveRoleFromDBInstanceInput { + s.FeatureName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *RemoveRoleFromDBInstanceInput) SetRoleArn(v string) *RemoveRoleFromDBInstanceInput { + s.RoleArn = &v + return s +} + +type RemoveRoleFromDBInstanceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveRoleFromDBInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveRoleFromDBInstanceOutput) GoString() string { + return s.String() +} + type RemoveSourceIdentifierFromSubscriptionInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go index 2bfd71293..f4561e797 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go @@ -29,6 +29,8 @@ const ( // ErrCodeBackupPolicyNotFoundFault for service response error code // "BackupPolicyNotFoundFault". + // + // The backup policy was not found. ErrCodeBackupPolicyNotFoundFault = "BackupPolicyNotFoundFault" // ErrCodeCertificateNotFoundFault for service response error code @@ -146,6 +148,27 @@ const ( // DBInstanceIdentifier doesn't refer to an existing DB instance. ErrCodeDBInstanceNotFoundFault = "DBInstanceNotFound" + // ErrCodeDBInstanceRoleAlreadyExistsFault for service response error code + // "DBInstanceRoleAlreadyExists". + // + // The specified RoleArn or FeatureName value is already associated with the + // DB instance. + ErrCodeDBInstanceRoleAlreadyExistsFault = "DBInstanceRoleAlreadyExists" + + // ErrCodeDBInstanceRoleNotFoundFault for service response error code + // "DBInstanceRoleNotFound". + // + // The specified RoleArn value doesn't match the specifed feature for the DB + // instance. + ErrCodeDBInstanceRoleNotFoundFault = "DBInstanceRoleNotFound" + + // ErrCodeDBInstanceRoleQuotaExceededFault for service response error code + // "DBInstanceRoleQuotaExceeded". + // + // You can't associate any more AWS Identity and Access Management (IAM) roles + // with the DB instance because the quota has been reached. + ErrCodeDBInstanceRoleQuotaExceededFault = "DBInstanceRoleQuotaExceeded" + // ErrCodeDBLogFileNotFoundFault for service response error code // "DBLogFileNotFoundFault". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index f24973901..8e4ad1925 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -9806,6 +9806,36 @@ func (s *Cluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *Cluster return s } +type ClusterAssociatedToSchedule struct { + _ struct{} `type:"structure"` + + ClusterIdentifier *string `type:"string"` + + ScheduleAssociationState *string `type:"string" enum:"ScheduleState"` +} + +// String returns the string representation +func (s ClusterAssociatedToSchedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClusterAssociatedToSchedule) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ClusterAssociatedToSchedule) SetClusterIdentifier(v string) *ClusterAssociatedToSchedule { + s.ClusterIdentifier = &v + return s +} + +// SetScheduleAssociationState sets the ScheduleAssociationState field's value. +func (s *ClusterAssociatedToSchedule) SetScheduleAssociationState(v string) *ClusterAssociatedToSchedule { + s.ScheduleAssociationState = &v + return s +} + // Describes a ClusterDbRevision. type ClusterDbRevision struct { _ struct{} `type:"structure"` @@ -12036,6 +12066,10 @@ func (s *CreateSnapshotScheduleInput) SetTags(v []*Tag) *CreateSnapshotScheduleI type CreateSnapshotScheduleOutput struct { _ struct{} `type:"structure"` + AssociatedClusterCount *int64 `type:"integer"` + + AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` + NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` // A list of ScheduleDefinitions @@ -12061,6 +12095,18 @@ func (s CreateSnapshotScheduleOutput) GoString() string { return s.String() } +// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. +func (s *CreateSnapshotScheduleOutput) SetAssociatedClusterCount(v int64) *CreateSnapshotScheduleOutput { + s.AssociatedClusterCount = &v + return s +} + +// SetAssociatedClusters sets the AssociatedClusters field's value. +func (s *CreateSnapshotScheduleOutput) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *CreateSnapshotScheduleOutput { + s.AssociatedClusters = v + return s +} + // SetNextInvocations sets the NextInvocations field's value. func (s *CreateSnapshotScheduleOutput) SetNextInvocations(v []*time.Time) *CreateSnapshotScheduleOutput { s.NextInvocations = v @@ -18563,6 +18609,10 @@ func (s *ModifySnapshotScheduleInput) SetScheduleIdentifier(v string) *ModifySna type ModifySnapshotScheduleOutput struct { _ struct{} `type:"structure"` + AssociatedClusterCount *int64 `type:"integer"` + + AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` + NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` // A list of ScheduleDefinitions @@ -18588,6 +18638,18 @@ func (s ModifySnapshotScheduleOutput) GoString() string { return s.String() } +// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. +func (s *ModifySnapshotScheduleOutput) SetAssociatedClusterCount(v int64) *ModifySnapshotScheduleOutput { + s.AssociatedClusterCount = &v + return s +} + +// SetAssociatedClusters sets the AssociatedClusters field's value. +func (s *ModifySnapshotScheduleOutput) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *ModifySnapshotScheduleOutput { + s.AssociatedClusters = v + return s +} + // SetNextInvocations sets the NextInvocations field's value. func (s *ModifySnapshotScheduleOutput) SetNextInvocations(v []*time.Time) *ModifySnapshotScheduleOutput { s.NextInvocations = v @@ -20863,6 +20925,10 @@ func (s *SnapshotErrorMessage) SetSnapshotIdentifier(v string) *SnapshotErrorMes type SnapshotSchedule struct { _ struct{} `type:"structure"` + AssociatedClusterCount *int64 `type:"integer"` + + AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` + NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` // A list of ScheduleDefinitions @@ -20888,6 +20954,18 @@ func (s SnapshotSchedule) GoString() string { return s.String() } +// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. +func (s *SnapshotSchedule) SetAssociatedClusterCount(v int64) *SnapshotSchedule { + s.AssociatedClusterCount = &v + return s +} + +// SetAssociatedClusters sets the AssociatedClusters field's value. +func (s *SnapshotSchedule) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *SnapshotSchedule { + s.AssociatedClusters = v + return s +} + // SetNextInvocations sets the NextInvocations field's value. func (s *SnapshotSchedule) SetNextInvocations(v []*time.Time) *SnapshotSchedule { s.NextInvocations = v diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go new file mode 100644 index 000000000..3343d13d4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/api.go @@ -0,0 +1,2839 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package resourcegroups + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateGroup = "CreateGroup" + +// CreateGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateGroup for more information on using the CreateGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateGroupRequest method. +// req, resp := client.CreateGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup +func (c *ResourceGroups) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, output *CreateGroupOutput) { + op := &request.Operation{ + Name: opCreateGroup, + HTTPMethod: "POST", + HTTPPath: "/groups", + } + + if input == nil { + input = &CreateGroupInput{} + } + + output = &CreateGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGroup API operation for AWS Resource Groups. +// +// Creates a group with a specified name, description, and resource query. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation CreateGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/CreateGroup +func (c *ResourceGroups) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) { + req, out := c.CreateGroupRequest(input) + return out, req.Send() +} + +// CreateGroupWithContext is the same as CreateGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) CreateGroupWithContext(ctx aws.Context, input *CreateGroupInput, opts ...request.Option) (*CreateGroupOutput, error) { + req, out := c.CreateGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGroup = "DeleteGroup" + +// DeleteGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteGroup for more information on using the DeleteGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteGroupRequest method. +// req, resp := client.DeleteGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup +func (c *ResourceGroups) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output *DeleteGroupOutput) { + op := &request.Operation{ + Name: opDeleteGroup, + HTTPMethod: "DELETE", + HTTPPath: "/groups/{GroupName}", + } + + if input == nil { + input = &DeleteGroupInput{} + } + + output = &DeleteGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGroup API operation for AWS Resource Groups. +// +// Deletes a specified resource group. Deleting a resource group does not delete +// resources that are members of the group; it only deletes the group structure. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation DeleteGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/DeleteGroup +func (c *ResourceGroups) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) { + req, out := c.DeleteGroupRequest(input) + return out, req.Send() +} + +// DeleteGroupWithContext is the same as DeleteGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) DeleteGroupWithContext(ctx aws.Context, input *DeleteGroupInput, opts ...request.Option) (*DeleteGroupOutput, error) { + req, out := c.DeleteGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGroup = "GetGroup" + +// GetGroupRequest generates a "aws/request.Request" representing the +// client's request for the GetGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGroup for more information on using the GetGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGroupRequest method. +// req, resp := client.GetGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup +func (c *ResourceGroups) GetGroupRequest(input *GetGroupInput) (req *request.Request, output *GetGroupOutput) { + op := &request.Operation{ + Name: opGetGroup, + HTTPMethod: "GET", + HTTPPath: "/groups/{GroupName}", + } + + if input == nil { + input = &GetGroupInput{} + } + + output = &GetGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGroup API operation for AWS Resource Groups. +// +// Returns information about a specified resource group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation GetGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroup +func (c *ResourceGroups) GetGroup(input *GetGroupInput) (*GetGroupOutput, error) { + req, out := c.GetGroupRequest(input) + return out, req.Send() +} + +// GetGroupWithContext is the same as GetGroup with the addition of +// the ability to pass a context and additional request options. +// +// See GetGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) GetGroupWithContext(ctx aws.Context, input *GetGroupInput, opts ...request.Option) (*GetGroupOutput, error) { + req, out := c.GetGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGroupQuery = "GetGroupQuery" + +// GetGroupQueryRequest generates a "aws/request.Request" representing the +// client's request for the GetGroupQuery operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetGroupQuery for more information on using the GetGroupQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetGroupQueryRequest method. +// req, resp := client.GetGroupQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery +func (c *ResourceGroups) GetGroupQueryRequest(input *GetGroupQueryInput) (req *request.Request, output *GetGroupQueryOutput) { + op := &request.Operation{ + Name: opGetGroupQuery, + HTTPMethod: "GET", + HTTPPath: "/groups/{GroupName}/query", + } + + if input == nil { + input = &GetGroupQueryInput{} + } + + output = &GetGroupQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGroupQuery API operation for AWS Resource Groups. +// +// Returns the resource query associated with the specified resource group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation GetGroupQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetGroupQuery +func (c *ResourceGroups) GetGroupQuery(input *GetGroupQueryInput) (*GetGroupQueryOutput, error) { + req, out := c.GetGroupQueryRequest(input) + return out, req.Send() +} + +// GetGroupQueryWithContext is the same as GetGroupQuery with the addition of +// the ability to pass a context and additional request options. +// +// See GetGroupQuery for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) GetGroupQueryWithContext(ctx aws.Context, input *GetGroupQueryInput, opts ...request.Option) (*GetGroupQueryOutput, error) { + req, out := c.GetGroupQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetTags = "GetTags" + +// GetTagsRequest generates a "aws/request.Request" representing the +// client's request for the GetTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetTags for more information on using the GetTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetTagsRequest method. +// req, resp := client.GetTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags +func (c *ResourceGroups) GetTagsRequest(input *GetTagsInput) (req *request.Request, output *GetTagsOutput) { + op := &request.Operation{ + Name: opGetTags, + HTTPMethod: "GET", + HTTPPath: "/resources/{Arn}/tags", + } + + if input == nil { + input = &GetTagsInput{} + } + + output = &GetTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetTags API operation for AWS Resource Groups. +// +// Returns a list of tags that are associated with a resource, specified by +// an ARN. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation GetTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/GetTags +func (c *ResourceGroups) GetTags(input *GetTagsInput) (*GetTagsOutput, error) { + req, out := c.GetTagsRequest(input) + return out, req.Send() +} + +// GetTagsWithContext is the same as GetTags with the addition of +// the ability to pass a context and additional request options. +// +// See GetTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) GetTagsWithContext(ctx aws.Context, input *GetTagsInput, opts ...request.Option) (*GetTagsOutput, error) { + req, out := c.GetTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListGroupResources = "ListGroupResources" + +// ListGroupResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListGroupResources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGroupResources for more information on using the ListGroupResources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGroupResourcesRequest method. +// req, resp := client.ListGroupResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources +func (c *ResourceGroups) ListGroupResourcesRequest(input *ListGroupResourcesInput) (req *request.Request, output *ListGroupResourcesOutput) { + op := &request.Operation{ + Name: opListGroupResources, + HTTPMethod: "POST", + HTTPPath: "/groups/{GroupName}/resource-identifiers-list", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListGroupResourcesInput{} + } + + output = &ListGroupResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGroupResources API operation for AWS Resource Groups. +// +// Returns a list of ARNs of resources that are members of a specified resource +// group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation ListGroupResources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The request has not been applied because it lacks valid authentication credentials +// for the target resource. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroupResources +func (c *ResourceGroups) ListGroupResources(input *ListGroupResourcesInput) (*ListGroupResourcesOutput, error) { + req, out := c.ListGroupResourcesRequest(input) + return out, req.Send() +} + +// ListGroupResourcesWithContext is the same as ListGroupResources with the addition of +// the ability to pass a context and additional request options. +// +// See ListGroupResources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) ListGroupResourcesWithContext(ctx aws.Context, input *ListGroupResourcesInput, opts ...request.Option) (*ListGroupResourcesOutput, error) { + req, out := c.ListGroupResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListGroupResourcesPages iterates over the pages of a ListGroupResources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListGroupResources method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListGroupResources operation. +// pageNum := 0 +// err := client.ListGroupResourcesPages(params, +// func(page *ListGroupResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ResourceGroups) ListGroupResourcesPages(input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool) error { + return c.ListGroupResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListGroupResourcesPagesWithContext same as ListGroupResourcesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) ListGroupResourcesPagesWithContext(ctx aws.Context, input *ListGroupResourcesInput, fn func(*ListGroupResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListGroupResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListGroupResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListGroupResourcesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListGroups = "ListGroups" + +// ListGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListGroups operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListGroups for more information on using the ListGroups +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListGroupsRequest method. +// req, resp := client.ListGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups +func (c *ResourceGroups) ListGroupsRequest(input *ListGroupsInput) (req *request.Request, output *ListGroupsOutput) { + op := &request.Operation{ + Name: opListGroups, + HTTPMethod: "POST", + HTTPPath: "/groups-list", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListGroupsInput{} + } + + output = &ListGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListGroups API operation for AWS Resource Groups. +// +// Returns a list of existing resource groups in your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation ListGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/ListGroups +func (c *ResourceGroups) ListGroups(input *ListGroupsInput) (*ListGroupsOutput, error) { + req, out := c.ListGroupsRequest(input) + return out, req.Send() +} + +// ListGroupsWithContext is the same as ListGroups with the addition of +// the ability to pass a context and additional request options. +// +// See ListGroups for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) ListGroupsWithContext(ctx aws.Context, input *ListGroupsInput, opts ...request.Option) (*ListGroupsOutput, error) { + req, out := c.ListGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListGroupsPages iterates over the pages of a ListGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListGroups method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListGroups operation. +// pageNum := 0 +// err := client.ListGroupsPages(params, +// func(page *ListGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ResourceGroups) ListGroupsPages(input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool) error { + return c.ListGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListGroupsPagesWithContext same as ListGroupsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) ListGroupsPagesWithContext(ctx aws.Context, input *ListGroupsInput, fn func(*ListGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListGroupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opSearchResources = "SearchResources" + +// SearchResourcesRequest generates a "aws/request.Request" representing the +// client's request for the SearchResources operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SearchResources for more information on using the SearchResources +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SearchResourcesRequest method. +// req, resp := client.SearchResourcesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources +func (c *ResourceGroups) SearchResourcesRequest(input *SearchResourcesInput) (req *request.Request, output *SearchResourcesOutput) { + op := &request.Operation{ + Name: opSearchResources, + HTTPMethod: "POST", + HTTPPath: "/resources/search", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &SearchResourcesInput{} + } + + output = &SearchResourcesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SearchResources API operation for AWS Resource Groups. +// +// Returns a list of AWS resource identifiers that matches a specified query. +// The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery +// operation. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation SearchResources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// The request has not been applied because it lacks valid authentication credentials +// for the target resource. +// +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/SearchResources +func (c *ResourceGroups) SearchResources(input *SearchResourcesInput) (*SearchResourcesOutput, error) { + req, out := c.SearchResourcesRequest(input) + return out, req.Send() +} + +// SearchResourcesWithContext is the same as SearchResources with the addition of +// the ability to pass a context and additional request options. +// +// See SearchResources for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) SearchResourcesWithContext(ctx aws.Context, input *SearchResourcesInput, opts ...request.Option) (*SearchResourcesOutput, error) { + req, out := c.SearchResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// SearchResourcesPages iterates over the pages of a SearchResources operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See SearchResources method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a SearchResources operation. +// pageNum := 0 +// err := client.SearchResourcesPages(params, +// func(page *SearchResourcesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ResourceGroups) SearchResourcesPages(input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool) error { + return c.SearchResourcesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchResourcesPagesWithContext same as SearchResourcesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) SearchResourcesPagesWithContext(ctx aws.Context, input *SearchResourcesInput, fn func(*SearchResourcesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchResourcesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchResourcesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*SearchResourcesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opTag = "Tag" + +// TagRequest generates a "aws/request.Request" representing the +// client's request for the Tag operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See Tag for more information on using the Tag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagRequest method. +// req, resp := client.TagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag +func (c *ResourceGroups) TagRequest(input *TagInput) (req *request.Request, output *TagOutput) { + op := &request.Operation{ + Name: opTag, + HTTPMethod: "PUT", + HTTPPath: "/resources/{Arn}/tags", + } + + if input == nil { + input = &TagInput{} + } + + output = &TagOutput{} + req = c.newRequest(op, input, output) + return +} + +// Tag API operation for AWS Resource Groups. +// +// Adds specified tags to a resource with the specified ARN. Existing tags on +// a resource are not changed if they are not specified in the request parameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation Tag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Tag +func (c *ResourceGroups) Tag(input *TagInput) (*TagOutput, error) { + req, out := c.TagRequest(input) + return out, req.Send() +} + +// TagWithContext is the same as Tag with the addition of +// the ability to pass a context and additional request options. +// +// See Tag for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) TagWithContext(ctx aws.Context, input *TagInput, opts ...request.Option) (*TagOutput, error) { + req, out := c.TagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntag = "Untag" + +// UntagRequest generates a "aws/request.Request" representing the +// client's request for the Untag operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See Untag for more information on using the Untag +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagRequest method. +// req, resp := client.UntagRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag +func (c *ResourceGroups) UntagRequest(input *UntagInput) (req *request.Request, output *UntagOutput) { + op := &request.Operation{ + Name: opUntag, + HTTPMethod: "PATCH", + HTTPPath: "/resources/{Arn}/tags", + } + + if input == nil { + input = &UntagInput{} + } + + output = &UntagOutput{} + req = c.newRequest(op, input, output) + return +} + +// Untag API operation for AWS Resource Groups. +// +// Deletes specified tags from a specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation Untag for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/Untag +func (c *ResourceGroups) Untag(input *UntagInput) (*UntagOutput, error) { + req, out := c.UntagRequest(input) + return out, req.Send() +} + +// UntagWithContext is the same as Untag with the addition of +// the ability to pass a context and additional request options. +// +// See Untag for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) UntagWithContext(ctx aws.Context, input *UntagInput, opts ...request.Option) (*UntagOutput, error) { + req, out := c.UntagRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGroup = "UpdateGroup" + +// UpdateGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGroup operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGroup for more information on using the UpdateGroup +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGroupRequest method. +// req, resp := client.UpdateGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup +func (c *ResourceGroups) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output *UpdateGroupOutput) { + op := &request.Operation{ + Name: opUpdateGroup, + HTTPMethod: "PUT", + HTTPPath: "/groups/{GroupName}", + } + + if input == nil { + input = &UpdateGroupInput{} + } + + output = &UpdateGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGroup API operation for AWS Resource Groups. +// +// Updates an existing group with a new or changed description. You cannot update +// the name of a resource group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation UpdateGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroup +func (c *ResourceGroups) UpdateGroup(input *UpdateGroupInput) (*UpdateGroupOutput, error) { + req, out := c.UpdateGroupRequest(input) + return out, req.Send() +} + +// UpdateGroupWithContext is the same as UpdateGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGroup for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) UpdateGroupWithContext(ctx aws.Context, input *UpdateGroupInput, opts ...request.Option) (*UpdateGroupOutput, error) { + req, out := c.UpdateGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGroupQuery = "UpdateGroupQuery" + +// UpdateGroupQueryRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGroupQuery operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateGroupQuery for more information on using the UpdateGroupQuery +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateGroupQueryRequest method. +// req, resp := client.UpdateGroupQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery +func (c *ResourceGroups) UpdateGroupQueryRequest(input *UpdateGroupQueryInput) (req *request.Request, output *UpdateGroupQueryOutput) { + op := &request.Operation{ + Name: opUpdateGroupQuery, + HTTPMethod: "PUT", + HTTPPath: "/groups/{GroupName}/query", + } + + if input == nil { + input = &UpdateGroupQueryInput{} + } + + output = &UpdateGroupQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGroupQuery API operation for AWS Resource Groups. +// +// Updates the resource query of a group. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Resource Groups's +// API operation UpdateGroupQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request does not comply with validation rules that are defined for the +// request parameters. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The caller is not authorized to make the request. +// +// * ErrCodeNotFoundException "NotFoundException" +// One or more resources specified in the request do not exist. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// The request uses an HTTP method which is not allowed for the specified resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The caller has exceeded throttling limits. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// An internal error occurred while processing the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27/UpdateGroupQuery +func (c *ResourceGroups) UpdateGroupQuery(input *UpdateGroupQueryInput) (*UpdateGroupQueryOutput, error) { + req, out := c.UpdateGroupQueryRequest(input) + return out, req.Send() +} + +// UpdateGroupQueryWithContext is the same as UpdateGroupQuery with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGroupQuery for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ResourceGroups) UpdateGroupQueryWithContext(ctx aws.Context, input *UpdateGroupQueryInput, opts ...request.Option) (*UpdateGroupQueryOutput, error) { + req, out := c.UpdateGroupQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CreateGroupInput struct { + _ struct{} `type:"structure"` + + // The description of the resource group. Descriptions can have a maximum of + // 511 characters, including letters, numbers, hyphens, underscores, punctuation, + // and spaces. + Description *string `type:"string"` + + // The name of the group, which is the identifier of the group in other operations. + // A resource group name cannot be updated after it is created. A resource group + // name can have a maximum of 128 characters, including letters, numbers, hyphens, + // dots, and underscores. The name cannot start with AWS or aws; these are reserved. + // A resource group name must be unique within your account. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The resource query that determines which AWS resources are members of this + // group. + // + // ResourceQuery is a required field + ResourceQuery *ResourceQuery `type:"structure" required:"true"` + + // The tags to add to the group. A tag is a string-to-string map of key-value + // pairs. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags map[string]*string `type:"map"` +} + +// String returns the string representation +func (s CreateGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGroupInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.ResourceQuery == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) + } + if s.ResourceQuery != nil { + if err := s.ResourceQuery.Validate(); err != nil { + invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateGroupInput) SetDescription(v string) *CreateGroupInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { + s.Name = &v + return s +} + +// SetResourceQuery sets the ResourceQuery field's value. +func (s *CreateGroupInput) SetResourceQuery(v *ResourceQuery) *CreateGroupInput { + s.ResourceQuery = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateGroupInput) SetTags(v map[string]*string) *CreateGroupInput { + s.Tags = v + return s +} + +type CreateGroupOutput struct { + _ struct{} `type:"structure"` + + // A full description of the resource group after it is created. + Group *Group `type:"structure"` + + // The resource query associated with the group. + ResourceQuery *ResourceQuery `type:"structure"` + + // The tags associated with the group. + Tags map[string]*string `type:"map"` +} + +// String returns the string representation +func (s CreateGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGroupOutput) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *CreateGroupOutput) SetGroup(v *Group) *CreateGroupOutput { + s.Group = v + return s +} + +// SetResourceQuery sets the ResourceQuery field's value. +func (s *CreateGroupOutput) SetResourceQuery(v *ResourceQuery) *CreateGroupOutput { + s.ResourceQuery = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateGroupOutput) SetTags(v map[string]*string) *CreateGroupOutput { + s.Tags = v + return s +} + +type DeleteGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the resource group to delete. + // + // GroupName is a required field + GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupName sets the GroupName field's value. +func (s *DeleteGroupInput) SetGroupName(v string) *DeleteGroupInput { + s.GroupName = &v + return s +} + +type DeleteGroupOutput struct { + _ struct{} `type:"structure"` + + // A full description of the deleted resource group. + Group *Group `type:"structure"` +} + +// String returns the string representation +func (s DeleteGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGroupOutput) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *DeleteGroupOutput) SetGroup(v *Group) *DeleteGroupOutput { + s.Group = v + return s +} + +type GetGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the resource group. + // + // GroupName is a required field + GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupName sets the GroupName field's value. +func (s *GetGroupInput) SetGroupName(v string) *GetGroupInput { + s.GroupName = &v + return s +} + +type GetGroupOutput struct { + _ struct{} `type:"structure"` + + // A full description of the resource group. + Group *Group `type:"structure"` +} + +// String returns the string representation +func (s GetGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupOutput) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *GetGroupOutput) SetGroup(v *Group) *GetGroupOutput { + s.Group = v + return s +} + +type GetGroupQueryInput struct { + _ struct{} `type:"structure"` + + // The name of the resource group. + // + // GroupName is a required field + GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGroupQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGroupQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGroupQueryInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupName sets the GroupName field's value. +func (s *GetGroupQueryInput) SetGroupName(v string) *GetGroupQueryInput { + s.GroupName = &v + return s +} + +type GetGroupQueryOutput struct { + _ struct{} `type:"structure"` + + // The resource query associated with the specified group. + GroupQuery *GroupQuery `type:"structure"` +} + +// String returns the string representation +func (s GetGroupQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGroupQueryOutput) GoString() string { + return s.String() +} + +// SetGroupQuery sets the GroupQuery field's value. +func (s *GetGroupQueryOutput) SetGroupQuery(v *GroupQuery) *GetGroupQueryOutput { + s.GroupQuery = v + return s +} + +type GetTagsInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource for which you want a list of tags. The resource must + // exist within the account you are using. + // + // Arn is a required field + Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTagsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetTagsInput) SetArn(v string) *GetTagsInput { + s.Arn = &v + return s +} + +type GetTagsOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the tagged resource. + Arn *string `type:"string"` + + // The tags associated with the specified resource. + Tags map[string]*string `type:"map"` +} + +// String returns the string representation +func (s GetTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetTagsOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *GetTagsOutput) SetArn(v string) *GetTagsOutput { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *GetTagsOutput) SetTags(v map[string]*string) *GetTagsOutput { + s.Tags = v + return s +} + +// A resource group. +type Group struct { + _ struct{} `type:"structure"` + + // The description of the resource group. + Description *string `type:"string"` + + // The ARN of a resource group. + // + // GroupArn is a required field + GroupArn *string `type:"string" required:"true"` + + // The name of a resource group. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Group) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Group) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *Group) SetDescription(v string) *Group { + s.Description = &v + return s +} + +// SetGroupArn sets the GroupArn field's value. +func (s *Group) SetGroupArn(v string) *Group { + s.GroupArn = &v + return s +} + +// SetName sets the Name field's value. +func (s *Group) SetName(v string) *Group { + s.Name = &v + return s +} + +// A filter name and value pair that is used to obtain more specific results +// from a list of groups. +type GroupFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. Filter names are case-sensitive. + // + // Name is a required field + Name *string `type:"string" required:"true" enum:"GroupFilterName"` + + // One or more filter values. Allowed filter values vary by group filter name, + // and are case-sensitive. + // + // Values is a required field + Values []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s GroupFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GroupFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GroupFilter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *GroupFilter) SetName(v string) *GroupFilter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *GroupFilter) SetValues(v []*string) *GroupFilter { + s.Values = v + return s +} + +// The ARN and group name of a group. +type GroupIdentifier struct { + _ struct{} `type:"structure"` + + // The ARN of a resource group. + GroupArn *string `type:"string"` + + // The name of a resource group. + GroupName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GroupIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupIdentifier) GoString() string { + return s.String() +} + +// SetGroupArn sets the GroupArn field's value. +func (s *GroupIdentifier) SetGroupArn(v string) *GroupIdentifier { + s.GroupArn = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { + s.GroupName = &v + return s +} + +// The underlying resource query of a resource group. Resources that match query +// results are part of the group. +type GroupQuery struct { + _ struct{} `type:"structure"` + + // The name of a resource group that is associated with a specific resource + // query. + // + // GroupName is a required field + GroupName *string `min:"1" type:"string" required:"true"` + + // The resource query which determines which AWS resources are members of the + // associated resource group. + // + // ResourceQuery is a required field + ResourceQuery *ResourceQuery `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GroupQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupQuery) GoString() string { + return s.String() +} + +// SetGroupName sets the GroupName field's value. +func (s *GroupQuery) SetGroupName(v string) *GroupQuery { + s.GroupName = &v + return s +} + +// SetResourceQuery sets the ResourceQuery field's value. +func (s *GroupQuery) SetResourceQuery(v *ResourceQuery) *GroupQuery { + s.ResourceQuery = v + return s +} + +type ListGroupResourcesInput struct { + _ struct{} `type:"structure"` + + // Filters, formatted as ResourceFilter objects, that you want to apply to a + // ListGroupResources operation. + // + // * resource-type - Filter resources by their type. Specify up to five resource + // types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, + // or AWS::S3::Bucket. + Filters []*ResourceFilter `type:"list"` + + // The name of the resource group. + // + // GroupName is a required field + GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` + + // The maximum number of group member ARNs that are returned in a single call + // by ListGroupResources, in paginated output. By default, this number is 50. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The NextToken value that is returned in a paginated ListGroupResources request. + // To get the next page of results, run the call again, add the NextToken parameter, + // and specify the NextToken value. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListGroupResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupResourcesInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListGroupResourcesInput) SetFilters(v []*ResourceFilter) *ListGroupResourcesInput { + s.Filters = v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *ListGroupResourcesInput) SetGroupName(v string) *ListGroupResourcesInput { + s.GroupName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListGroupResourcesInput) SetMaxResults(v int64) *ListGroupResourcesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupResourcesInput) SetNextToken(v string) *ListGroupResourcesInput { + s.NextToken = &v + return s +} + +type ListGroupResourcesOutput struct { + _ struct{} `type:"structure"` + + // The NextToken value to include in a subsequent ListGroupResources request, + // to get more results. + NextToken *string `type:"string"` + + // A list of QueryError objects. Each error is an object that contains ErrorCode + // and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE + // and CLOUDFORMATION_STACK_NOT_EXISTING. + QueryErrors []*QueryError `type:"list"` + + // The ARNs and resource types of resources that are members of the group that + // you specified. + ResourceIdentifiers []*ResourceIdentifier `type:"list"` +} + +// String returns the string representation +func (s ListGroupResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupResourcesOutput) SetNextToken(v string) *ListGroupResourcesOutput { + s.NextToken = &v + return s +} + +// SetQueryErrors sets the QueryErrors field's value. +func (s *ListGroupResourcesOutput) SetQueryErrors(v []*QueryError) *ListGroupResourcesOutput { + s.QueryErrors = v + return s +} + +// SetResourceIdentifiers sets the ResourceIdentifiers field's value. +func (s *ListGroupResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *ListGroupResourcesOutput { + s.ResourceIdentifiers = v + return s +} + +type ListGroupsInput struct { + _ struct{} `type:"structure"` + + // Filters, formatted as GroupFilter objects, that you want to apply to a ListGroups + // operation. + // + // * resource-type - Filter groups by resource type. Specify up to five resource + // types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, + // or AWS::S3::Bucket. + Filters []*GroupFilter `type:"list"` + + // The maximum number of resource group results that are returned by ListGroups + // in paginated output. By default, this number is 50. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The NextToken value that is returned in a paginated ListGroups request. To + // get the next page of results, run the call again, add the NextToken parameter, + // and specify the NextToken value. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListGroupsInput) SetFilters(v []*GroupFilter) *ListGroupsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListGroupsInput) SetMaxResults(v int64) *ListGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { + s.NextToken = &v + return s +} + +type ListGroupsOutput struct { + _ struct{} `type:"structure"` + + // A list of GroupIdentifier objects. Each identifier is an object that contains + // both the GroupName and the GroupArn. + GroupIdentifiers []*GroupIdentifier `type:"list"` + + // A list of resource groups. + // + // Deprecated: This field is deprecated, use GroupIdentifiers instead. + Groups []*Group `deprecated:"true" type:"list"` + + // The NextToken value to include in a subsequent ListGroups request, to get + // more results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGroupsOutput) GoString() string { + return s.String() +} + +// SetGroupIdentifiers sets the GroupIdentifiers field's value. +func (s *ListGroupsOutput) SetGroupIdentifiers(v []*GroupIdentifier) *ListGroupsOutput { + s.GroupIdentifiers = v + return s +} + +// SetGroups sets the Groups field's value. +func (s *ListGroupsOutput) SetGroups(v []*Group) *ListGroupsOutput { + s.Groups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { + s.NextToken = &v + return s +} + +// A two-part error structure that can occur in ListGroupResources or SearchResources +// operations on CloudFormation stack-based queries. The error occurs if the +// CloudFormation stack on which the query is based either does not exist, or +// has a status that renders the stack inactive. A QueryError occurrence does +// not necessarily mean that AWS Resource Groups could not complete the operation, +// but the resulting group might have no member resources. +type QueryError struct { + _ struct{} `type:"structure"` + + // Possible values are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING. + ErrorCode *string `type:"string" enum:"QueryErrorCode"` + + // A message that explains the ErrorCode value. Messages might state that the + // specified CloudFormation stack does not exist (or no longer exists). For + // CLOUDFORMATION_STACK_INACTIVE, the message typically states that the CloudFormation + // stack has a status that is not (or no longer) active, such as CREATE_FAILED. + Message *string `type:"string"` +} + +// String returns the string representation +func (s QueryError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryError) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *QueryError) SetErrorCode(v string) *QueryError { + s.ErrorCode = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *QueryError) SetMessage(v string) *QueryError { + s.Message = &v + return s +} + +// A filter name and value pair that is used to obtain more specific results +// from a list of resources. +type ResourceFilter struct { + _ struct{} `type:"structure"` + + // The name of the filter. Filter names are case-sensitive. + // + // Name is a required field + Name *string `type:"string" required:"true" enum:"ResourceFilterName"` + + // One or more filter values. Allowed filter values vary by resource filter + // name, and are case-sensitive. + // + // Values is a required field + Values []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ResourceFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceFilter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ResourceFilter) SetName(v string) *ResourceFilter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *ResourceFilter) SetValues(v []*string) *ResourceFilter { + s.Values = v + return s +} + +// The ARN of a resource, and its resource type. +type ResourceIdentifier struct { + _ struct{} `type:"structure"` + + // The ARN of a resource. + ResourceArn *string `type:"string"` + + // The resource type of a resource, such as AWS::EC2::Instance. + ResourceType *string `type:"string"` +} + +// String returns the string representation +func (s ResourceIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceIdentifier) GoString() string { + return s.String() +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ResourceIdentifier) SetResourceArn(v string) *ResourceIdentifier { + s.ResourceArn = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ResourceIdentifier) SetResourceType(v string) *ResourceIdentifier { + s.ResourceType = &v + return s +} + +// The query that is used to define a resource group or a search for resources. +type ResourceQuery struct { + _ struct{} `type:"structure"` + + // The query that defines a group or a search. + // + // Query is a required field + Query *string `type:"string" required:"true"` + + // The type of the query. The valid values in this release are TAG_FILTERS_1_0 + // and CLOUDFORMATION_STACK_1_0. + // + // TAG_FILTERS_1_0: A JSON syntax that lets you specify a collection of simple + // tag filters for resource types and tags, as supported by the AWS Tagging + // API GetResources (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html) + // operation. If you specify more than one tag key, only resources that match + // all tag keys, and at least one value of each specified tag key, are returned + // in your query. If you specify more than one value for a tag key, a resource + // matches the filter if it has a tag key value that matches any of the specified + // values. + // + // For example, consider the following sample query for resources that have + // two tags, Stage and Version, with two values each. ([{"Key":"Stage","Values":["Test","Deploy"]},{"Key":"Version","Values":["1","2"]}]) + // The results of this query might include the following. + // + // * An EC2 instance that has the following two tags: {"Key":"Stage","Values":["Deploy"]}, + // and {"Key":"Version","Values":["2"]} + // + // * An S3 bucket that has the following two tags: {"Key":"Stage","Values":["Test","Deploy"]}, + // and {"Key":"Version","Values":["1"]} + // + // The query would not return the following results, however. The following + // EC2 instance does not have all tag keys specified in the filter, so it is + // rejected. The RDS database has all of the tag keys, but no values that match + // at least one of the specified tag key values in the filter. + // + // * An EC2 instance that has only the following tag: {"Key":"Stage","Values":["Deploy"]}. + // + // * An RDS database that has the following two tags: {"Key":"Stage","Values":["Archived"]}, + // and {"Key":"Version","Values":["4"]} + // + // CLOUDFORMATION_STACK_1_0: A JSON syntax that lets you specify a CloudFormation + // stack ARN. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"QueryType"` +} + +// String returns the string representation +func (s ResourceQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceQuery) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceQuery) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceQuery"} + if s.Query == nil { + invalidParams.Add(request.NewErrParamRequired("Query")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQuery sets the Query field's value. +func (s *ResourceQuery) SetQuery(v string) *ResourceQuery { + s.Query = &v + return s +} + +// SetType sets the Type field's value. +func (s *ResourceQuery) SetType(v string) *ResourceQuery { + s.Type = &v + return s +} + +type SearchResourcesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of group member ARNs returned by SearchResources in paginated + // output. By default, this number is 50. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that is returned in a paginated SearchResources request. + // To get the next page of results, run the call again, add the NextToken parameter, + // and specify the NextToken value. + NextToken *string `type:"string"` + + // The search query, using the same formats that are supported for resource + // group definition. + // + // ResourceQuery is a required field + ResourceQuery *ResourceQuery `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SearchResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SearchResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchResourcesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceQuery == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) + } + if s.ResourceQuery != nil { + if err := s.ResourceQuery.Validate(); err != nil { + invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *SearchResourcesInput) SetMaxResults(v int64) *SearchResourcesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SearchResourcesInput) SetNextToken(v string) *SearchResourcesInput { + s.NextToken = &v + return s +} + +// SetResourceQuery sets the ResourceQuery field's value. +func (s *SearchResourcesInput) SetResourceQuery(v *ResourceQuery) *SearchResourcesInput { + s.ResourceQuery = v + return s +} + +type SearchResourcesOutput struct { + _ struct{} `type:"structure"` + + // The NextToken value to include in a subsequent SearchResources request, to + // get more results. + NextToken *string `type:"string"` + + // A list of QueryError objects. Each error is an object that contains ErrorCode + // and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE + // and CLOUDFORMATION_STACK_NOT_EXISTING. + QueryErrors []*QueryError `type:"list"` + + // The ARNs and resource types of resources that are members of the group that + // you specified. + ResourceIdentifiers []*ResourceIdentifier `type:"list"` +} + +// String returns the string representation +func (s SearchResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *SearchResourcesOutput) SetNextToken(v string) *SearchResourcesOutput { + s.NextToken = &v + return s +} + +// SetQueryErrors sets the QueryErrors field's value. +func (s *SearchResourcesOutput) SetQueryErrors(v []*QueryError) *SearchResourcesOutput { + s.QueryErrors = v + return s +} + +// SetResourceIdentifiers sets the ResourceIdentifiers field's value. +func (s *SearchResourcesOutput) SetResourceIdentifiers(v []*ResourceIdentifier) *SearchResourcesOutput { + s.ResourceIdentifiers = v + return s +} + +type TagInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource to which to add tags. + // + // Arn is a required field + Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"` + + // The tags to add to the specified resource. A tag is a string-to-string map + // of key-value pairs. Tag keys can have a maximum character length of 128 characters, + // and tag values can have a maximum length of 256 characters. + // + // Tags is a required field + Tags map[string]*string `type:"map" required:"true"` +} + +// String returns the string representation +func (s TagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *TagInput) SetArn(v string) *TagInput { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagInput) SetTags(v map[string]*string) *TagInput { + s.Tags = v + return s +} + +type TagOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the tagged resource. + Arn *string `type:"string"` + + // The tags that have been added to the specified resource. + Tags map[string]*string `type:"map"` +} + +// String returns the string representation +func (s TagOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *TagOutput) SetArn(v string) *TagOutput { + s.Arn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagOutput) SetTags(v map[string]*string) *TagOutput { + s.Tags = v + return s +} + +type UntagInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource from which to remove tags. + // + // Arn is a required field + Arn *string `location:"uri" locationName:"Arn" type:"string" required:"true"` + + // The keys of the tags to be removed. + // + // Keys is a required field + Keys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + if s.Keys == nil { + invalidParams.Add(request.NewErrParamRequired("Keys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *UntagInput) SetArn(v string) *UntagInput { + s.Arn = &v + return s +} + +// SetKeys sets the Keys field's value. +func (s *UntagInput) SetKeys(v []*string) *UntagInput { + s.Keys = v + return s +} + +type UntagOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource from which tags have been removed. + Arn *string `type:"string"` + + // The keys of tags that have been removed. + Keys []*string `type:"list"` +} + +// String returns the string representation +func (s UntagOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *UntagOutput) SetArn(v string) *UntagOutput { + s.Arn = &v + return s +} + +// SetKeys sets the Keys field's value. +func (s *UntagOutput) SetKeys(v []*string) *UntagOutput { + s.Keys = v + return s +} + +type UpdateGroupInput struct { + _ struct{} `type:"structure"` + + // The description of the resource group. Descriptions can have a maximum of + // 511 characters, including letters, numbers, hyphens, underscores, punctuation, + // and spaces. + Description *string `type:"string"` + + // The name of the resource group for which you want to update its description. + // + // GroupName is a required field + GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateGroupInput) SetDescription(v string) *UpdateGroupInput { + s.Description = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *UpdateGroupInput) SetGroupName(v string) *UpdateGroupInput { + s.GroupName = &v + return s +} + +type UpdateGroupOutput struct { + _ struct{} `type:"structure"` + + // The full description of the resource group after it has been updated. + Group *Group `type:"structure"` +} + +// String returns the string representation +func (s UpdateGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupOutput) GoString() string { + return s.String() +} + +// SetGroup sets the Group field's value. +func (s *UpdateGroupOutput) SetGroup(v *Group) *UpdateGroupOutput { + s.Group = v + return s +} + +type UpdateGroupQueryInput struct { + _ struct{} `type:"structure"` + + // The name of the resource group for which you want to edit the query. + // + // GroupName is a required field + GroupName *string `location:"uri" locationName:"GroupName" min:"1" type:"string" required:"true"` + + // The resource query that determines which AWS resources are members of the + // resource group. + // + // ResourceQuery is a required field + ResourceQuery *ResourceQuery `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateGroupQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGroupQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGroupQueryInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + if s.GroupName != nil && len(*s.GroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GroupName", 1)) + } + if s.ResourceQuery == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceQuery")) + } + if s.ResourceQuery != nil { + if err := s.ResourceQuery.Validate(); err != nil { + invalidParams.AddNested("ResourceQuery", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupName sets the GroupName field's value. +func (s *UpdateGroupQueryInput) SetGroupName(v string) *UpdateGroupQueryInput { + s.GroupName = &v + return s +} + +// SetResourceQuery sets the ResourceQuery field's value. +func (s *UpdateGroupQueryInput) SetResourceQuery(v *ResourceQuery) *UpdateGroupQueryInput { + s.ResourceQuery = v + return s +} + +type UpdateGroupQueryOutput struct { + _ struct{} `type:"structure"` + + // The resource query associated with the resource group after the update. + GroupQuery *GroupQuery `type:"structure"` +} + +// String returns the string representation +func (s UpdateGroupQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGroupQueryOutput) GoString() string { + return s.String() +} + +// SetGroupQuery sets the GroupQuery field's value. +func (s *UpdateGroupQueryOutput) SetGroupQuery(v *GroupQuery) *UpdateGroupQueryOutput { + s.GroupQuery = v + return s +} + +const ( + // GroupFilterNameResourceType is a GroupFilterName enum value + GroupFilterNameResourceType = "resource-type" +) + +const ( + // QueryErrorCodeCloudformationStackInactive is a QueryErrorCode enum value + QueryErrorCodeCloudformationStackInactive = "CLOUDFORMATION_STACK_INACTIVE" + + // QueryErrorCodeCloudformationStackNotExisting is a QueryErrorCode enum value + QueryErrorCodeCloudformationStackNotExisting = "CLOUDFORMATION_STACK_NOT_EXISTING" +) + +const ( + // QueryTypeTagFilters10 is a QueryType enum value + QueryTypeTagFilters10 = "TAG_FILTERS_1_0" + + // QueryTypeCloudformationStack10 is a QueryType enum value + QueryTypeCloudformationStack10 = "CLOUDFORMATION_STACK_1_0" +) + +const ( + // ResourceFilterNameResourceType is a ResourceFilterName enum value + ResourceFilterNameResourceType = "resource-type" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go new file mode 100644 index 000000000..5d182652d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/doc.go @@ -0,0 +1,60 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package resourcegroups provides the client and types for making API +// requests to AWS Resource Groups. +// +// AWS Resource Groups lets you organize AWS resources such as Amazon EC2 instances, +// Amazon Relational Database Service databases, and Amazon S3 buckets into +// groups using criteria that you define as tags. A resource group is a collection +// of resources that match the resource types specified in a query, and share +// one or more tags or portions of tags. You can create a group of resources +// based on their roles in your cloud infrastructure, lifecycle stages, regions, +// application layers, or virtually any criteria. Resource groups enable you +// to automate management tasks, such as those in AWS Systems Manager Automation +// documents, on tag-related resources in AWS Systems Manager. Groups of tagged +// resources also let you quickly view a custom console in AWS Systems Manager +// that shows AWS Config compliance and other monitoring data about member resources. +// +// To create a resource group, build a resource query, and specify tags that +// identify the criteria that members of the group have in common. Tags are +// key-value pairs. +// +// For more information about Resource Groups, see the AWS Resource Groups User +// Guide (https://docs.aws.amazon.com/ARG/latest/userguide/welcome.html). +// +// AWS Resource Groups uses a REST-compliant API that you can use to perform +// the following types of operations. +// +// * Create, Read, Update, and Delete (CRUD) operations on resource groups +// and resource query entities +// +// * Applying, editing, and removing tags from resource groups +// +// * Resolving resource group member ARNs so they can be returned as search +// results +// +// * Getting data about resources that are members of a group +// +// * Searching AWS resources based on a resource query +// +// See https://docs.aws.amazon.com/goto/WebAPI/resource-groups-2017-11-27 for more information on this service. +// +// See resourcegroups package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroups/ +// +// Using the Client +// +// To contact AWS Resource Groups with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Resource Groups client ResourceGroups for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroups/#New +package resourcegroups diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go new file mode 100644 index 000000000..02234d494 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/errors.go @@ -0,0 +1,50 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package resourcegroups + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // The request does not comply with validation rules that are defined for the + // request parameters. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + // + // The caller is not authorized to make the request. + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // An internal error occurred while processing the request. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeMethodNotAllowedException for service response error code + // "MethodNotAllowedException". + // + // The request uses an HTTP method which is not allowed for the specified resource. + ErrCodeMethodNotAllowedException = "MethodNotAllowedException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // One or more resources specified in the request do not exist. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // The caller has exceeded throttling limits. + ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeUnauthorizedException for service response error code + // "UnauthorizedException". + // + // The request has not been applied because it lacks valid authentication credentials + // for the target resource. + ErrCodeUnauthorizedException = "UnauthorizedException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go new file mode 100644 index 000000000..46a19ff23 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/resourcegroups/service.go @@ -0,0 +1,98 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package resourcegroups + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// ResourceGroups provides the API operation methods for making requests to +// AWS Resource Groups. See this package's package overview docs +// for details on the service. +// +// ResourceGroups methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type ResourceGroups struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "resource-groups" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Resource Groups" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the ResourceGroups client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a ResourceGroups client from just a session. +// svc := resourcegroups.New(mySession) +// +// // Create a ResourceGroups client with additional configuration +// svc := resourcegroups.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *ResourceGroups { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "resource-groups" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ResourceGroups { + svc := &ResourceGroups{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-11-27", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a ResourceGroups operation and runs any +// custom request initialization. +func (c *ResourceGroups) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go new file mode 100644 index 000000000..6bdbd18bf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/api.go @@ -0,0 +1,5202 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package route53resolver + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAssociateResolverEndpointIpAddress = "AssociateResolverEndpointIpAddress" + +// AssociateResolverEndpointIpAddressRequest generates a "aws/request.Request" representing the +// client's request for the AssociateResolverEndpointIpAddress operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateResolverEndpointIpAddress for more information on using the AssociateResolverEndpointIpAddress +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateResolverEndpointIpAddressRequest method. +// req, resp := client.AssociateResolverEndpointIpAddressRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverEndpointIpAddress +func (c *Route53Resolver) AssociateResolverEndpointIpAddressRequest(input *AssociateResolverEndpointIpAddressInput) (req *request.Request, output *AssociateResolverEndpointIpAddressOutput) { + op := &request.Operation{ + Name: opAssociateResolverEndpointIpAddress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateResolverEndpointIpAddressInput{} + } + + output = &AssociateResolverEndpointIpAddressOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateResolverEndpointIpAddress API operation for Amazon Route 53 Resolver. +// +// Adds IP addresses to an inbound or an outbound resolver endpoint. If you +// want to adding more than one IP address, submit one AssociateResolverEndpointIpAddress +// request for each IP address. +// +// To remove an IP address from an endpoint, see DisassociateResolverEndpointIpAddress. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation AssociateResolverEndpointIpAddress for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The resource that you tried to create already exists. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request caused one or more limits to be exceeded. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverEndpointIpAddress +func (c *Route53Resolver) AssociateResolverEndpointIpAddress(input *AssociateResolverEndpointIpAddressInput) (*AssociateResolverEndpointIpAddressOutput, error) { + req, out := c.AssociateResolverEndpointIpAddressRequest(input) + return out, req.Send() +} + +// AssociateResolverEndpointIpAddressWithContext is the same as AssociateResolverEndpointIpAddress with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateResolverEndpointIpAddress for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) AssociateResolverEndpointIpAddressWithContext(ctx aws.Context, input *AssociateResolverEndpointIpAddressInput, opts ...request.Option) (*AssociateResolverEndpointIpAddressOutput, error) { + req, out := c.AssociateResolverEndpointIpAddressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAssociateResolverRule = "AssociateResolverRule" + +// AssociateResolverRuleRequest generates a "aws/request.Request" representing the +// client's request for the AssociateResolverRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateResolverRule for more information on using the AssociateResolverRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateResolverRuleRequest method. +// req, resp := client.AssociateResolverRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverRule +func (c *Route53Resolver) AssociateResolverRuleRequest(input *AssociateResolverRuleInput) (req *request.Request, output *AssociateResolverRuleOutput) { + op := &request.Operation{ + Name: opAssociateResolverRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateResolverRuleInput{} + } + + output = &AssociateResolverRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateResolverRule API operation for Amazon Route 53 Resolver. +// +// Associates a resolver rule with a VPC. When you associate a rule with a VPC, +// Resolver forwards all DNS queries for the domain name that is specified in +// the rule and that originate in the VPC. The queries are forwarded to the +// IP addresses for the DNS resolvers that are specified in the rule. For more +// information about rules, see CreateResolverRule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation AssociateResolverRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeResourceUnavailableException "ResourceUnavailableException" +// The specified resource isn't available. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The resource that you tried to create already exists. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/AssociateResolverRule +func (c *Route53Resolver) AssociateResolverRule(input *AssociateResolverRuleInput) (*AssociateResolverRuleOutput, error) { + req, out := c.AssociateResolverRuleRequest(input) + return out, req.Send() +} + +// AssociateResolverRuleWithContext is the same as AssociateResolverRule with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateResolverRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) AssociateResolverRuleWithContext(ctx aws.Context, input *AssociateResolverRuleInput, opts ...request.Option) (*AssociateResolverRuleOutput, error) { + req, out := c.AssociateResolverRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResolverEndpoint = "CreateResolverEndpoint" + +// CreateResolverEndpointRequest generates a "aws/request.Request" representing the +// client's request for the CreateResolverEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResolverEndpoint for more information on using the CreateResolverEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResolverEndpointRequest method. +// req, resp := client.CreateResolverEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverEndpoint +func (c *Route53Resolver) CreateResolverEndpointRequest(input *CreateResolverEndpointInput) (req *request.Request, output *CreateResolverEndpointOutput) { + op := &request.Operation{ + Name: opCreateResolverEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateResolverEndpointInput{} + } + + output = &CreateResolverEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResolverEndpoint API operation for Amazon Route 53 Resolver. +// +// Creates a resolver endpoint. There are two types of resolver endpoints, inbound +// and outbound: +// +// * An inbound resolver endpoint forwards DNS queries to the DNS service +// for a VPC from your network or another VPC. +// +// * An outbound resolver endpoint forwards DNS queries from the DNS service +// for a VPC to your network or another VPC. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation CreateResolverEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The resource that you tried to create already exists. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request caused one or more limits to be exceeded. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverEndpoint +func (c *Route53Resolver) CreateResolverEndpoint(input *CreateResolverEndpointInput) (*CreateResolverEndpointOutput, error) { + req, out := c.CreateResolverEndpointRequest(input) + return out, req.Send() +} + +// CreateResolverEndpointWithContext is the same as CreateResolverEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResolverEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) CreateResolverEndpointWithContext(ctx aws.Context, input *CreateResolverEndpointInput, opts ...request.Option) (*CreateResolverEndpointOutput, error) { + req, out := c.CreateResolverEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateResolverRule = "CreateResolverRule" + +// CreateResolverRuleRequest generates a "aws/request.Request" representing the +// client's request for the CreateResolverRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateResolverRule for more information on using the CreateResolverRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateResolverRuleRequest method. +// req, resp := client.CreateResolverRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverRule +func (c *Route53Resolver) CreateResolverRuleRequest(input *CreateResolverRuleInput) (req *request.Request, output *CreateResolverRuleOutput) { + op := &request.Operation{ + Name: opCreateResolverRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateResolverRuleInput{} + } + + output = &CreateResolverRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateResolverRule API operation for Amazon Route 53 Resolver. +// +// For DNS queries that originate in your VPCs, specifies which resolver endpoint +// the queries pass through, one domain name that you want to forward to your +// network, and the IP addresses of the DNS resolvers in your network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation CreateResolverRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request caused one or more limits to be exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The resource that you tried to create already exists. +// +// * ErrCodeResourceUnavailableException "ResourceUnavailableException" +// The specified resource isn't available. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/CreateResolverRule +func (c *Route53Resolver) CreateResolverRule(input *CreateResolverRuleInput) (*CreateResolverRuleOutput, error) { + req, out := c.CreateResolverRuleRequest(input) + return out, req.Send() +} + +// CreateResolverRuleWithContext is the same as CreateResolverRule with the addition of +// the ability to pass a context and additional request options. +// +// See CreateResolverRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) CreateResolverRuleWithContext(ctx aws.Context, input *CreateResolverRuleInput, opts ...request.Option) (*CreateResolverRuleOutput, error) { + req, out := c.CreateResolverRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResolverEndpoint = "DeleteResolverEndpoint" + +// DeleteResolverEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResolverEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResolverEndpoint for more information on using the DeleteResolverEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResolverEndpointRequest method. +// req, resp := client.DeleteResolverEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverEndpoint +func (c *Route53Resolver) DeleteResolverEndpointRequest(input *DeleteResolverEndpointInput) (req *request.Request, output *DeleteResolverEndpointOutput) { + op := &request.Operation{ + Name: opDeleteResolverEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResolverEndpointInput{} + } + + output = &DeleteResolverEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResolverEndpoint API operation for Amazon Route 53 Resolver. +// +// Deletes a resolver endpoint. The effect of deleting a resolver endpoint depends +// on whether it's an inbound or an outbound resolver endpoint: +// +// * Inbound: DNS queries from your network or another VPC are no longer +// routed to the DNS service for the specified VPC. +// +// * Outbound: DNS queries from a VPC are no longer routed to your network +// or to another VPC. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation DeleteResolverEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverEndpoint +func (c *Route53Resolver) DeleteResolverEndpoint(input *DeleteResolverEndpointInput) (*DeleteResolverEndpointOutput, error) { + req, out := c.DeleteResolverEndpointRequest(input) + return out, req.Send() +} + +// DeleteResolverEndpointWithContext is the same as DeleteResolverEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResolverEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) DeleteResolverEndpointWithContext(ctx aws.Context, input *DeleteResolverEndpointInput, opts ...request.Option) (*DeleteResolverEndpointOutput, error) { + req, out := c.DeleteResolverEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteResolverRule = "DeleteResolverRule" + +// DeleteResolverRuleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResolverRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteResolverRule for more information on using the DeleteResolverRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteResolverRuleRequest method. +// req, resp := client.DeleteResolverRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverRule +func (c *Route53Resolver) DeleteResolverRuleRequest(input *DeleteResolverRuleInput) (req *request.Request, output *DeleteResolverRuleOutput) { + op := &request.Operation{ + Name: opDeleteResolverRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResolverRuleInput{} + } + + output = &DeleteResolverRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteResolverRule API operation for Amazon Route 53 Resolver. +// +// Deletes a resolver rule. Before you can delete a resolver rule, you must +// disassociate it from all the VPCs that you associated the resolver rule with. +// For more infomation, see DisassociateResolverRule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation DeleteResolverRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource that you tried to update or delete is currently in use. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DeleteResolverRule +func (c *Route53Resolver) DeleteResolverRule(input *DeleteResolverRuleInput) (*DeleteResolverRuleOutput, error) { + req, out := c.DeleteResolverRuleRequest(input) + return out, req.Send() +} + +// DeleteResolverRuleWithContext is the same as DeleteResolverRule with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResolverRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) DeleteResolverRuleWithContext(ctx aws.Context, input *DeleteResolverRuleInput, opts ...request.Option) (*DeleteResolverRuleOutput, error) { + req, out := c.DeleteResolverRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateResolverEndpointIpAddress = "DisassociateResolverEndpointIpAddress" + +// DisassociateResolverEndpointIpAddressRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateResolverEndpointIpAddress operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateResolverEndpointIpAddress for more information on using the DisassociateResolverEndpointIpAddress +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateResolverEndpointIpAddressRequest method. +// req, resp := client.DisassociateResolverEndpointIpAddressRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverEndpointIpAddress +func (c *Route53Resolver) DisassociateResolverEndpointIpAddressRequest(input *DisassociateResolverEndpointIpAddressInput) (req *request.Request, output *DisassociateResolverEndpointIpAddressOutput) { + op := &request.Operation{ + Name: opDisassociateResolverEndpointIpAddress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateResolverEndpointIpAddressInput{} + } + + output = &DisassociateResolverEndpointIpAddressOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateResolverEndpointIpAddress API operation for Amazon Route 53 Resolver. +// +// Removes IP addresses from an inbound or an outbound resolver endpoint. If +// you want to remove more than one IP address, submit one DisassociateResolverEndpointIpAddress +// request for each IP address. +// +// To add an IP address to an endpoint, see AssociateResolverEndpointIpAddress. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation DisassociateResolverEndpointIpAddress for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeResourceExistsException "ResourceExistsException" +// The resource that you tried to create already exists. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverEndpointIpAddress +func (c *Route53Resolver) DisassociateResolverEndpointIpAddress(input *DisassociateResolverEndpointIpAddressInput) (*DisassociateResolverEndpointIpAddressOutput, error) { + req, out := c.DisassociateResolverEndpointIpAddressRequest(input) + return out, req.Send() +} + +// DisassociateResolverEndpointIpAddressWithContext is the same as DisassociateResolverEndpointIpAddress with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateResolverEndpointIpAddress for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) DisassociateResolverEndpointIpAddressWithContext(ctx aws.Context, input *DisassociateResolverEndpointIpAddressInput, opts ...request.Option) (*DisassociateResolverEndpointIpAddressOutput, error) { + req, out := c.DisassociateResolverEndpointIpAddressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateResolverRule = "DisassociateResolverRule" + +// DisassociateResolverRuleRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateResolverRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateResolverRule for more information on using the DisassociateResolverRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateResolverRuleRequest method. +// req, resp := client.DisassociateResolverRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverRule +func (c *Route53Resolver) DisassociateResolverRuleRequest(input *DisassociateResolverRuleInput) (req *request.Request, output *DisassociateResolverRuleOutput) { + op := &request.Operation{ + Name: opDisassociateResolverRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateResolverRuleInput{} + } + + output = &DisassociateResolverRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateResolverRule API operation for Amazon Route 53 Resolver. +// +// Removes the association between a specified resolver rule and a specified +// VPC. +// +// If you disassociate a resolver rule from a VPC, Resolver stops forwarding +// DNS queries for the domain name that you specified in the resolver rule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation DisassociateResolverRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/DisassociateResolverRule +func (c *Route53Resolver) DisassociateResolverRule(input *DisassociateResolverRuleInput) (*DisassociateResolverRuleOutput, error) { + req, out := c.DisassociateResolverRuleRequest(input) + return out, req.Send() +} + +// DisassociateResolverRuleWithContext is the same as DisassociateResolverRule with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateResolverRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) DisassociateResolverRuleWithContext(ctx aws.Context, input *DisassociateResolverRuleInput, opts ...request.Option) (*DisassociateResolverRuleOutput, error) { + req, out := c.DisassociateResolverRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResolverEndpoint = "GetResolverEndpoint" + +// GetResolverEndpointRequest generates a "aws/request.Request" representing the +// client's request for the GetResolverEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResolverEndpoint for more information on using the GetResolverEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResolverEndpointRequest method. +// req, resp := client.GetResolverEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverEndpoint +func (c *Route53Resolver) GetResolverEndpointRequest(input *GetResolverEndpointInput) (req *request.Request, output *GetResolverEndpointOutput) { + op := &request.Operation{ + Name: opGetResolverEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResolverEndpointInput{} + } + + output = &GetResolverEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResolverEndpoint API operation for Amazon Route 53 Resolver. +// +// Gets information about a specified resolver endpoint, such as whether it's +// an inbound or an outbound resolver endpoint, and the current status of the +// endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation GetResolverEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverEndpoint +func (c *Route53Resolver) GetResolverEndpoint(input *GetResolverEndpointInput) (*GetResolverEndpointOutput, error) { + req, out := c.GetResolverEndpointRequest(input) + return out, req.Send() +} + +// GetResolverEndpointWithContext is the same as GetResolverEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See GetResolverEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) GetResolverEndpointWithContext(ctx aws.Context, input *GetResolverEndpointInput, opts ...request.Option) (*GetResolverEndpointOutput, error) { + req, out := c.GetResolverEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResolverRule = "GetResolverRule" + +// GetResolverRuleRequest generates a "aws/request.Request" representing the +// client's request for the GetResolverRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResolverRule for more information on using the GetResolverRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResolverRuleRequest method. +// req, resp := client.GetResolverRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRule +func (c *Route53Resolver) GetResolverRuleRequest(input *GetResolverRuleInput) (req *request.Request, output *GetResolverRuleOutput) { + op := &request.Operation{ + Name: opGetResolverRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResolverRuleInput{} + } + + output = &GetResolverRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResolverRule API operation for Amazon Route 53 Resolver. +// +// Gets information about a specified resolver rule, such as the domain name +// that the rule forwards DNS queries for and the ID of the outbound resolver +// endpoint that the rule is associated with. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation GetResolverRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRule +func (c *Route53Resolver) GetResolverRule(input *GetResolverRuleInput) (*GetResolverRuleOutput, error) { + req, out := c.GetResolverRuleRequest(input) + return out, req.Send() +} + +// GetResolverRuleWithContext is the same as GetResolverRule with the addition of +// the ability to pass a context and additional request options. +// +// See GetResolverRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) GetResolverRuleWithContext(ctx aws.Context, input *GetResolverRuleInput, opts ...request.Option) (*GetResolverRuleOutput, error) { + req, out := c.GetResolverRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResolverRuleAssociation = "GetResolverRuleAssociation" + +// GetResolverRuleAssociationRequest generates a "aws/request.Request" representing the +// client's request for the GetResolverRuleAssociation operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResolverRuleAssociation for more information on using the GetResolverRuleAssociation +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResolverRuleAssociationRequest method. +// req, resp := client.GetResolverRuleAssociationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRuleAssociation +func (c *Route53Resolver) GetResolverRuleAssociationRequest(input *GetResolverRuleAssociationInput) (req *request.Request, output *GetResolverRuleAssociationOutput) { + op := &request.Operation{ + Name: opGetResolverRuleAssociation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResolverRuleAssociationInput{} + } + + output = &GetResolverRuleAssociationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResolverRuleAssociation API operation for Amazon Route 53 Resolver. +// +// Gets information about an association between a specified resolver rule and +// a VPC. You associate a resolver rule and a VPC using AssociateResolverRule. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation GetResolverRuleAssociation for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRuleAssociation +func (c *Route53Resolver) GetResolverRuleAssociation(input *GetResolverRuleAssociationInput) (*GetResolverRuleAssociationOutput, error) { + req, out := c.GetResolverRuleAssociationRequest(input) + return out, req.Send() +} + +// GetResolverRuleAssociationWithContext is the same as GetResolverRuleAssociation with the addition of +// the ability to pass a context and additional request options. +// +// See GetResolverRuleAssociation for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) GetResolverRuleAssociationWithContext(ctx aws.Context, input *GetResolverRuleAssociationInput, opts ...request.Option) (*GetResolverRuleAssociationOutput, error) { + req, out := c.GetResolverRuleAssociationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetResolverRulePolicy = "GetResolverRulePolicy" + +// GetResolverRulePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetResolverRulePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetResolverRulePolicy for more information on using the GetResolverRulePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetResolverRulePolicyRequest method. +// req, resp := client.GetResolverRulePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRulePolicy +func (c *Route53Resolver) GetResolverRulePolicyRequest(input *GetResolverRulePolicyInput) (req *request.Request, output *GetResolverRulePolicyOutput) { + op := &request.Operation{ + Name: opGetResolverRulePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResolverRulePolicyInput{} + } + + output = &GetResolverRulePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResolverRulePolicy API operation for Amazon Route 53 Resolver. +// +// Gets information about a resolver rule policy. A resolver rule policy specifies +// the Resolver operations and resources that you want to allow another AWS +// account to be able to use. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation GetResolverRulePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// The specified resource doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/GetResolverRulePolicy +func (c *Route53Resolver) GetResolverRulePolicy(input *GetResolverRulePolicyInput) (*GetResolverRulePolicyOutput, error) { + req, out := c.GetResolverRulePolicyRequest(input) + return out, req.Send() +} + +// GetResolverRulePolicyWithContext is the same as GetResolverRulePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetResolverRulePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) GetResolverRulePolicyWithContext(ctx aws.Context, input *GetResolverRulePolicyInput, opts ...request.Option) (*GetResolverRulePolicyOutput, error) { + req, out := c.GetResolverRulePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListResolverEndpointIpAddresses = "ListResolverEndpointIpAddresses" + +// ListResolverEndpointIpAddressesRequest generates a "aws/request.Request" representing the +// client's request for the ListResolverEndpointIpAddresses operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResolverEndpointIpAddresses for more information on using the ListResolverEndpointIpAddresses +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResolverEndpointIpAddressesRequest method. +// req, resp := client.ListResolverEndpointIpAddressesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpointIpAddresses +func (c *Route53Resolver) ListResolverEndpointIpAddressesRequest(input *ListResolverEndpointIpAddressesInput) (req *request.Request, output *ListResolverEndpointIpAddressesOutput) { + op := &request.Operation{ + Name: opListResolverEndpointIpAddresses, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListResolverEndpointIpAddressesInput{} + } + + output = &ListResolverEndpointIpAddressesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResolverEndpointIpAddresses API operation for Amazon Route 53 Resolver. +// +// Gets the IP addresses for a specified resolver endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation ListResolverEndpointIpAddresses for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The value that you specified for NextToken in a List request isn't valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpointIpAddresses +func (c *Route53Resolver) ListResolverEndpointIpAddresses(input *ListResolverEndpointIpAddressesInput) (*ListResolverEndpointIpAddressesOutput, error) { + req, out := c.ListResolverEndpointIpAddressesRequest(input) + return out, req.Send() +} + +// ListResolverEndpointIpAddressesWithContext is the same as ListResolverEndpointIpAddresses with the addition of +// the ability to pass a context and additional request options. +// +// See ListResolverEndpointIpAddresses for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverEndpointIpAddressesWithContext(ctx aws.Context, input *ListResolverEndpointIpAddressesInput, opts ...request.Option) (*ListResolverEndpointIpAddressesOutput, error) { + req, out := c.ListResolverEndpointIpAddressesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListResolverEndpointIpAddressesPages iterates over the pages of a ListResolverEndpointIpAddresses operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListResolverEndpointIpAddresses method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListResolverEndpointIpAddresses operation. +// pageNum := 0 +// err := client.ListResolverEndpointIpAddressesPages(params, +// func(page *ListResolverEndpointIpAddressesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53Resolver) ListResolverEndpointIpAddressesPages(input *ListResolverEndpointIpAddressesInput, fn func(*ListResolverEndpointIpAddressesOutput, bool) bool) error { + return c.ListResolverEndpointIpAddressesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListResolverEndpointIpAddressesPagesWithContext same as ListResolverEndpointIpAddressesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverEndpointIpAddressesPagesWithContext(ctx aws.Context, input *ListResolverEndpointIpAddressesInput, fn func(*ListResolverEndpointIpAddressesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListResolverEndpointIpAddressesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListResolverEndpointIpAddressesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListResolverEndpointIpAddressesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListResolverEndpoints = "ListResolverEndpoints" + +// ListResolverEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the ListResolverEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResolverEndpoints for more information on using the ListResolverEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResolverEndpointsRequest method. +// req, resp := client.ListResolverEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpoints +func (c *Route53Resolver) ListResolverEndpointsRequest(input *ListResolverEndpointsInput) (req *request.Request, output *ListResolverEndpointsOutput) { + op := &request.Operation{ + Name: opListResolverEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListResolverEndpointsInput{} + } + + output = &ListResolverEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResolverEndpoints API operation for Amazon Route 53 Resolver. +// +// Lists all the resolver endpoints that were created using the current AWS +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation ListResolverEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The value that you specified for NextToken in a List request isn't valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverEndpoints +func (c *Route53Resolver) ListResolverEndpoints(input *ListResolverEndpointsInput) (*ListResolverEndpointsOutput, error) { + req, out := c.ListResolverEndpointsRequest(input) + return out, req.Send() +} + +// ListResolverEndpointsWithContext is the same as ListResolverEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See ListResolverEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverEndpointsWithContext(ctx aws.Context, input *ListResolverEndpointsInput, opts ...request.Option) (*ListResolverEndpointsOutput, error) { + req, out := c.ListResolverEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListResolverEndpointsPages iterates over the pages of a ListResolverEndpoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListResolverEndpoints method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListResolverEndpoints operation. +// pageNum := 0 +// err := client.ListResolverEndpointsPages(params, +// func(page *ListResolverEndpointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53Resolver) ListResolverEndpointsPages(input *ListResolverEndpointsInput, fn func(*ListResolverEndpointsOutput, bool) bool) error { + return c.ListResolverEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListResolverEndpointsPagesWithContext same as ListResolverEndpointsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverEndpointsPagesWithContext(ctx aws.Context, input *ListResolverEndpointsInput, fn func(*ListResolverEndpointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListResolverEndpointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListResolverEndpointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListResolverEndpointsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListResolverRuleAssociations = "ListResolverRuleAssociations" + +// ListResolverRuleAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the ListResolverRuleAssociations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResolverRuleAssociations for more information on using the ListResolverRuleAssociations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResolverRuleAssociationsRequest method. +// req, resp := client.ListResolverRuleAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRuleAssociations +func (c *Route53Resolver) ListResolverRuleAssociationsRequest(input *ListResolverRuleAssociationsInput) (req *request.Request, output *ListResolverRuleAssociationsOutput) { + op := &request.Operation{ + Name: opListResolverRuleAssociations, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListResolverRuleAssociationsInput{} + } + + output = &ListResolverRuleAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResolverRuleAssociations API operation for Amazon Route 53 Resolver. +// +// Lists the associations that were created between resolver rules and VPCs +// using the current AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation ListResolverRuleAssociations for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The value that you specified for NextToken in a List request isn't valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRuleAssociations +func (c *Route53Resolver) ListResolverRuleAssociations(input *ListResolverRuleAssociationsInput) (*ListResolverRuleAssociationsOutput, error) { + req, out := c.ListResolverRuleAssociationsRequest(input) + return out, req.Send() +} + +// ListResolverRuleAssociationsWithContext is the same as ListResolverRuleAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See ListResolverRuleAssociations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverRuleAssociationsWithContext(ctx aws.Context, input *ListResolverRuleAssociationsInput, opts ...request.Option) (*ListResolverRuleAssociationsOutput, error) { + req, out := c.ListResolverRuleAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListResolverRuleAssociationsPages iterates over the pages of a ListResolverRuleAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListResolverRuleAssociations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListResolverRuleAssociations operation. +// pageNum := 0 +// err := client.ListResolverRuleAssociationsPages(params, +// func(page *ListResolverRuleAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53Resolver) ListResolverRuleAssociationsPages(input *ListResolverRuleAssociationsInput, fn func(*ListResolverRuleAssociationsOutput, bool) bool) error { + return c.ListResolverRuleAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListResolverRuleAssociationsPagesWithContext same as ListResolverRuleAssociationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverRuleAssociationsPagesWithContext(ctx aws.Context, input *ListResolverRuleAssociationsInput, fn func(*ListResolverRuleAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListResolverRuleAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListResolverRuleAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListResolverRuleAssociationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListResolverRules = "ListResolverRules" + +// ListResolverRulesRequest generates a "aws/request.Request" representing the +// client's request for the ListResolverRules operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListResolverRules for more information on using the ListResolverRules +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListResolverRulesRequest method. +// req, resp := client.ListResolverRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRules +func (c *Route53Resolver) ListResolverRulesRequest(input *ListResolverRulesInput) (req *request.Request, output *ListResolverRulesOutput) { + op := &request.Operation{ + Name: opListResolverRules, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListResolverRulesInput{} + } + + output = &ListResolverRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResolverRules API operation for Amazon Route 53 Resolver. +// +// Lists the resolver rules that were created using the current AWS account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation ListResolverRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The value that you specified for NextToken in a List request isn't valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListResolverRules +func (c *Route53Resolver) ListResolverRules(input *ListResolverRulesInput) (*ListResolverRulesOutput, error) { + req, out := c.ListResolverRulesRequest(input) + return out, req.Send() +} + +// ListResolverRulesWithContext is the same as ListResolverRules with the addition of +// the ability to pass a context and additional request options. +// +// See ListResolverRules for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverRulesWithContext(ctx aws.Context, input *ListResolverRulesInput, opts ...request.Option) (*ListResolverRulesOutput, error) { + req, out := c.ListResolverRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListResolverRulesPages iterates over the pages of a ListResolverRules operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListResolverRules method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListResolverRules operation. +// pageNum := 0 +// err := client.ListResolverRulesPages(params, +// func(page *ListResolverRulesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Route53Resolver) ListResolverRulesPages(input *ListResolverRulesInput, fn func(*ListResolverRulesOutput, bool) bool) error { + return c.ListResolverRulesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListResolverRulesPagesWithContext same as ListResolverRulesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListResolverRulesPagesWithContext(ctx aws.Context, input *ListResolverRulesInput, fn func(*ListResolverRulesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListResolverRulesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListResolverRulesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListResolverRulesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListTagsForResource +func (c *Route53Resolver) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon Route 53 Resolver. +// +// Lists the tags that you associated with the specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The value that you specified for NextToken in a List request isn't valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/ListTagsForResource +func (c *Route53Resolver) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutResolverRulePolicy = "PutResolverRulePolicy" + +// PutResolverRulePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResolverRulePolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutResolverRulePolicy for more information on using the PutResolverRulePolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutResolverRulePolicyRequest method. +// req, resp := client.PutResolverRulePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/PutResolverRulePolicy +func (c *Route53Resolver) PutResolverRulePolicyRequest(input *PutResolverRulePolicyInput) (req *request.Request, output *PutResolverRulePolicyOutput) { + op := &request.Operation{ + Name: opPutResolverRulePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResolverRulePolicyInput{} + } + + output = &PutResolverRulePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResolverRulePolicy API operation for Amazon Route 53 Resolver. +// +// Specifies the Resolver operations and resources that you want to allow another +// AWS account to be able to use. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation PutResolverRulePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidPolicyDocument "InvalidPolicyDocument" +// The specified resolver rule policy is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeUnknownResourceException "UnknownResourceException" +// The specified resource doesn't exist. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/PutResolverRulePolicy +func (c *Route53Resolver) PutResolverRulePolicy(input *PutResolverRulePolicyInput) (*PutResolverRulePolicyOutput, error) { + req, out := c.PutResolverRulePolicyRequest(input) + return out, req.Send() +} + +// PutResolverRulePolicyWithContext is the same as PutResolverRulePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResolverRulePolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) PutResolverRulePolicyWithContext(ctx aws.Context, input *PutResolverRulePolicyInput, opts ...request.Option) (*PutResolverRulePolicyOutput, error) { + req, out := c.PutResolverRulePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/TagResource +func (c *Route53Resolver) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon Route 53 Resolver. +// +// Adds one or more tags to a specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// The request caused one or more limits to be exceeded. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidTagException "InvalidTagException" +// The specified tag is invalid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/TagResource +func (c *Route53Resolver) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UntagResource +func (c *Route53Resolver) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon Route 53 Resolver. +// +// Removes one or more tags from a specified resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UntagResource +func (c *Route53Resolver) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateResolverEndpoint = "UpdateResolverEndpoint" + +// UpdateResolverEndpointRequest generates a "aws/request.Request" representing the +// client's request for the UpdateResolverEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateResolverEndpoint for more information on using the UpdateResolverEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateResolverEndpointRequest method. +// req, resp := client.UpdateResolverEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverEndpoint +func (c *Route53Resolver) UpdateResolverEndpointRequest(input *UpdateResolverEndpointInput) (req *request.Request, output *UpdateResolverEndpointOutput) { + op := &request.Operation{ + Name: opUpdateResolverEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateResolverEndpointInput{} + } + + output = &UpdateResolverEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateResolverEndpoint API operation for Amazon Route 53 Resolver. +// +// Updates the name of an inbound or an outbound resolver endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation UpdateResolverEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverEndpoint +func (c *Route53Resolver) UpdateResolverEndpoint(input *UpdateResolverEndpointInput) (*UpdateResolverEndpointOutput, error) { + req, out := c.UpdateResolverEndpointRequest(input) + return out, req.Send() +} + +// UpdateResolverEndpointWithContext is the same as UpdateResolverEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateResolverEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) UpdateResolverEndpointWithContext(ctx aws.Context, input *UpdateResolverEndpointInput, opts ...request.Option) (*UpdateResolverEndpointOutput, error) { + req, out := c.UpdateResolverEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateResolverRule = "UpdateResolverRule" + +// UpdateResolverRuleRequest generates a "aws/request.Request" representing the +// client's request for the UpdateResolverRule operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateResolverRule for more information on using the UpdateResolverRule +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateResolverRuleRequest method. +// req, resp := client.UpdateResolverRuleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverRule +func (c *Route53Resolver) UpdateResolverRuleRequest(input *UpdateResolverRuleInput) (req *request.Request, output *UpdateResolverRuleOutput) { + op := &request.Operation{ + Name: opUpdateResolverRule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateResolverRuleInput{} + } + + output = &UpdateResolverRuleOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateResolverRule API operation for Amazon Route 53 Resolver. +// +// Updates settings for a specified resolver rule. ResolverRuleId is required, +// and all other parameters are optional. If you don't specify a parameter, +// it retains its current value. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Route 53 Resolver's +// API operation UpdateResolverRule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters in this request are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource doesn't exist. +// +// * ErrCodeResourceUnavailableException "ResourceUnavailableException" +// The specified resource isn't available. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request caused one or more limits to be exceeded. +// +// * ErrCodeInternalServiceErrorException "InternalServiceErrorException" +// We encountered an unknown error. Try again in a few minutes. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The request was throttled. Try again in a few minutes. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/UpdateResolverRule +func (c *Route53Resolver) UpdateResolverRule(input *UpdateResolverRuleInput) (*UpdateResolverRuleOutput, error) { + req, out := c.UpdateResolverRuleRequest(input) + return out, req.Send() +} + +// UpdateResolverRuleWithContext is the same as UpdateResolverRule with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateResolverRule for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Route53Resolver) UpdateResolverRuleWithContext(ctx aws.Context, input *UpdateResolverRuleInput, opts ...request.Option) (*UpdateResolverRuleOutput, error) { + req, out := c.UpdateResolverRuleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateResolverEndpointIpAddressInput struct { + _ struct{} `type:"structure"` + + // Either the IPv4 address that you want to add to a resolver endpoint or a + // subnet ID. If you specify a subnet ID, Resolver chooses an IP address for + // you from the available IPs in the specified subnet. + // + // IpAddress is a required field + IpAddress *IpAddressUpdate `type:"structure" required:"true"` + + // The ID of the resolver endpoint that you want to associate IP addresses with. + // + // ResolverEndpointId is a required field + ResolverEndpointId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateResolverEndpointIpAddressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateResolverEndpointIpAddressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateResolverEndpointIpAddressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateResolverEndpointIpAddressInput"} + if s.IpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("IpAddress")) + } + if s.ResolverEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + if s.IpAddress != nil { + if err := s.IpAddress.Validate(); err != nil { + invalidParams.AddNested("IpAddress", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIpAddress sets the IpAddress field's value. +func (s *AssociateResolverEndpointIpAddressInput) SetIpAddress(v *IpAddressUpdate) *AssociateResolverEndpointIpAddressInput { + s.IpAddress = v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *AssociateResolverEndpointIpAddressInput) SetResolverEndpointId(v string) *AssociateResolverEndpointIpAddressInput { + s.ResolverEndpointId = &v + return s +} + +type AssociateResolverEndpointIpAddressOutput struct { + _ struct{} `type:"structure"` + + // The response to an AssociateResolverEndpointIpAddress request. + ResolverEndpoint *ResolverEndpoint `type:"structure"` +} + +// String returns the string representation +func (s AssociateResolverEndpointIpAddressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateResolverEndpointIpAddressOutput) GoString() string { + return s.String() +} + +// SetResolverEndpoint sets the ResolverEndpoint field's value. +func (s *AssociateResolverEndpointIpAddressOutput) SetResolverEndpoint(v *ResolverEndpoint) *AssociateResolverEndpointIpAddressOutput { + s.ResolverEndpoint = v + return s +} + +type AssociateResolverRuleInput struct { + _ struct{} `type:"structure"` + + // A name for the association that you're creating between a resolver rule and + // a VPC. + Name *string `type:"string"` + + // The ID of the resolver rule that you want to associate with the VPC. To list + // the existing resolver rules, use ListResolverRules. + // + // ResolverRuleId is a required field + ResolverRuleId *string `min:"1" type:"string" required:"true"` + + // The ID of the VPC that you want to associate the resolver rule with. + // + // VPCId is a required field + VPCId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateResolverRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateResolverRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateResolverRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateResolverRuleInput"} + if s.ResolverRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) + } + if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) + } + if s.VPCId == nil { + invalidParams.Add(request.NewErrParamRequired("VPCId")) + } + if s.VPCId != nil && len(*s.VPCId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VPCId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *AssociateResolverRuleInput) SetName(v string) *AssociateResolverRuleInput { + s.Name = &v + return s +} + +// SetResolverRuleId sets the ResolverRuleId field's value. +func (s *AssociateResolverRuleInput) SetResolverRuleId(v string) *AssociateResolverRuleInput { + s.ResolverRuleId = &v + return s +} + +// SetVPCId sets the VPCId field's value. +func (s *AssociateResolverRuleInput) SetVPCId(v string) *AssociateResolverRuleInput { + s.VPCId = &v + return s +} + +type AssociateResolverRuleOutput struct { + _ struct{} `type:"structure"` + + // Information about the AssociateResolverRule request, including the status + // of the request. + ResolverRuleAssociation *ResolverRuleAssociation `type:"structure"` +} + +// String returns the string representation +func (s AssociateResolverRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateResolverRuleOutput) GoString() string { + return s.String() +} + +// SetResolverRuleAssociation sets the ResolverRuleAssociation field's value. +func (s *AssociateResolverRuleOutput) SetResolverRuleAssociation(v *ResolverRuleAssociation) *AssociateResolverRuleOutput { + s.ResolverRuleAssociation = v + return s +} + +type CreateResolverEndpointInput struct { + _ struct{} `type:"structure"` + + // A unique string that identifies the request and that allows failed requests + // to be retried without the risk of executing the operation twice. CreatorRequestId + // can be any unique string, for example, a date/time stamp. + // + // CreatorRequestId is a required field + CreatorRequestId *string `min:"1" type:"string" required:"true"` + + // Specify the applicable value: + // + // * INBOUND: Resolver forwards DNS queries to the DNS service for a VPC + // from your network or another VPC + // + // * OUTBOUND: Resolver forwards DNS queries from the DNS service for a VPC + // to your network or another VPC + // + // Direction is a required field + Direction *string `type:"string" required:"true" enum:"ResolverEndpointDirection"` + + // The subnets and IP addresses in your VPC that you want DNS queries to pass + // through on the way from your VPCs to your network (for outbound endpoints) + // or on the way from your network to your VPCs (for inbound resolver endpoints). + // + // IpAddresses is a required field + IpAddresses []*IpAddressRequest `min:"1" type:"list" required:"true"` + + // A friendly name that lets you easily find a configuration in the Resolver + // dashboard in the Route 53 console. + Name *string `type:"string"` + + // The ID of one or more security groups that you want to use to control access + // to this VPC. The security group that you specify must include one or more + // inbound rules (for inbound resolver endpoints) or outbound rules (for outbound + // resolver endpoints). + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `type:"list" required:"true"` + + // A list of the tag keys and values that you want to associate with the endpoint. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateResolverEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResolverEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResolverEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResolverEndpointInput"} + if s.CreatorRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("CreatorRequestId")) + } + if s.CreatorRequestId != nil && len(*s.CreatorRequestId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CreatorRequestId", 1)) + } + if s.Direction == nil { + invalidParams.Add(request.NewErrParamRequired("Direction")) + } + if s.IpAddresses == nil { + invalidParams.Add(request.NewErrParamRequired("IpAddresses")) + } + if s.IpAddresses != nil && len(s.IpAddresses) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IpAddresses", 1)) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.IpAddresses != nil { + for i, v := range s.IpAddresses { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "IpAddresses", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *CreateResolverEndpointInput) SetCreatorRequestId(v string) *CreateResolverEndpointInput { + s.CreatorRequestId = &v + return s +} + +// SetDirection sets the Direction field's value. +func (s *CreateResolverEndpointInput) SetDirection(v string) *CreateResolverEndpointInput { + s.Direction = &v + return s +} + +// SetIpAddresses sets the IpAddresses field's value. +func (s *CreateResolverEndpointInput) SetIpAddresses(v []*IpAddressRequest) *CreateResolverEndpointInput { + s.IpAddresses = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateResolverEndpointInput) SetName(v string) *CreateResolverEndpointInput { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateResolverEndpointInput) SetSecurityGroupIds(v []*string) *CreateResolverEndpointInput { + s.SecurityGroupIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateResolverEndpointInput) SetTags(v []*Tag) *CreateResolverEndpointInput { + s.Tags = v + return s +} + +type CreateResolverEndpointOutput struct { + _ struct{} `type:"structure"` + + // Information about the CreateResolverEndpoint request, including the status + // of the request. + ResolverEndpoint *ResolverEndpoint `type:"structure"` +} + +// String returns the string representation +func (s CreateResolverEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResolverEndpointOutput) GoString() string { + return s.String() +} + +// SetResolverEndpoint sets the ResolverEndpoint field's value. +func (s *CreateResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *CreateResolverEndpointOutput { + s.ResolverEndpoint = v + return s +} + +type CreateResolverRuleInput struct { + _ struct{} `type:"structure"` + + // A unique string that identifies the request and that allows failed requests + // to be retried without the risk of executing the operation twice. CreatorRequestId + // can be any unique string, for example, a date/time stamp. + // + // CreatorRequestId is a required field + CreatorRequestId *string `min:"1" type:"string" required:"true"` + + // DNS queries for this domain name are forwarded to the IP addresses that you + // specify in TargetIps. If a query matches multiple resolver rules (example.com + // and www.example.com), outbound DNS queries are routed using the resolver + // rule that contains the most specific domain name (www.example.com). + // + // DomainName is a required field + DomainName *string `min:"1" type:"string" required:"true"` + + // A friendly name that lets you easily find a rule in the Resolver dashboard + // in the Route 53 console. + Name *string `type:"string"` + + // The ID of the outbound resolver endpoint that you want to use to route DNS + // queries to the IP addresses that you specify in TargetIps. + ResolverEndpointId *string `min:"1" type:"string"` + + // Specify FORWARD. Other resolver rule types aren't supported. + // + // RuleType is a required field + RuleType *string `type:"string" required:"true" enum:"RuleTypeOption"` + + // A list of the tag keys and values that you want to associate with the endpoint. + Tags []*Tag `type:"list"` + + // The IPs that you want Resolver to forward DNS queries to. You can specify + // only IPv4 addresses. Separate IP addresses with a comma. + TargetIps []*TargetAddress `min:"1" type:"list"` +} + +// String returns the string representation +func (s CreateResolverRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResolverRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateResolverRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateResolverRuleInput"} + if s.CreatorRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("CreatorRequestId")) + } + if s.CreatorRequestId != nil && len(*s.CreatorRequestId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CreatorRequestId", 1)) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + if s.RuleType == nil { + invalidParams.Add(request.NewErrParamRequired("RuleType")) + } + if s.TargetIps != nil && len(s.TargetIps) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetIps", 1)) + } + if s.TargetIps != nil { + for i, v := range s.TargetIps { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetIps", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *CreateResolverRuleInput) SetCreatorRequestId(v string) *CreateResolverRuleInput { + s.CreatorRequestId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateResolverRuleInput) SetDomainName(v string) *CreateResolverRuleInput { + s.DomainName = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateResolverRuleInput) SetName(v string) *CreateResolverRuleInput { + s.Name = &v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *CreateResolverRuleInput) SetResolverEndpointId(v string) *CreateResolverRuleInput { + s.ResolverEndpointId = &v + return s +} + +// SetRuleType sets the RuleType field's value. +func (s *CreateResolverRuleInput) SetRuleType(v string) *CreateResolverRuleInput { + s.RuleType = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateResolverRuleInput) SetTags(v []*Tag) *CreateResolverRuleInput { + s.Tags = v + return s +} + +// SetTargetIps sets the TargetIps field's value. +func (s *CreateResolverRuleInput) SetTargetIps(v []*TargetAddress) *CreateResolverRuleInput { + s.TargetIps = v + return s +} + +type CreateResolverRuleOutput struct { + _ struct{} `type:"structure"` + + // Information about the CreateResolverRule request, including the status of + // the request. + ResolverRule *ResolverRule `type:"structure"` +} + +// String returns the string representation +func (s CreateResolverRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateResolverRuleOutput) GoString() string { + return s.String() +} + +// SetResolverRule sets the ResolverRule field's value. +func (s *CreateResolverRuleOutput) SetResolverRule(v *ResolverRule) *CreateResolverRuleOutput { + s.ResolverRule = v + return s +} + +type DeleteResolverEndpointInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver endpoint that you want to delete. + // + // ResolverEndpointId is a required field + ResolverEndpointId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResolverEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResolverEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResolverEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResolverEndpointInput"} + if s.ResolverEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *DeleteResolverEndpointInput) SetResolverEndpointId(v string) *DeleteResolverEndpointInput { + s.ResolverEndpointId = &v + return s +} + +type DeleteResolverEndpointOutput struct { + _ struct{} `type:"structure"` + + // Information about the DeleteResolverEndpoint request, including the status + // of the request. + ResolverEndpoint *ResolverEndpoint `type:"structure"` +} + +// String returns the string representation +func (s DeleteResolverEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResolverEndpointOutput) GoString() string { + return s.String() +} + +// SetResolverEndpoint sets the ResolverEndpoint field's value. +func (s *DeleteResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *DeleteResolverEndpointOutput { + s.ResolverEndpoint = v + return s +} + +type DeleteResolverRuleInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver rule that you want to delete. + // + // ResolverRuleId is a required field + ResolverRuleId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteResolverRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResolverRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResolverRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResolverRuleInput"} + if s.ResolverRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) + } + if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResolverRuleId sets the ResolverRuleId field's value. +func (s *DeleteResolverRuleInput) SetResolverRuleId(v string) *DeleteResolverRuleInput { + s.ResolverRuleId = &v + return s +} + +type DeleteResolverRuleOutput struct { + _ struct{} `type:"structure"` + + // Information about the DeleteResolverRule request, including the status of + // the request. + ResolverRule *ResolverRule `type:"structure"` +} + +// String returns the string representation +func (s DeleteResolverRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResolverRuleOutput) GoString() string { + return s.String() +} + +// SetResolverRule sets the ResolverRule field's value. +func (s *DeleteResolverRuleOutput) SetResolverRule(v *ResolverRule) *DeleteResolverRuleOutput { + s.ResolverRule = v + return s +} + +type DisassociateResolverEndpointIpAddressInput struct { + _ struct{} `type:"structure"` + + // The IPv4 address that you want to remove from a resolver endpoint. + // + // IpAddress is a required field + IpAddress *IpAddressUpdate `type:"structure" required:"true"` + + // The ID of the resolver endpoint that you want to disassociate an IP address + // from. + // + // ResolverEndpointId is a required field + ResolverEndpointId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateResolverEndpointIpAddressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateResolverEndpointIpAddressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateResolverEndpointIpAddressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateResolverEndpointIpAddressInput"} + if s.IpAddress == nil { + invalidParams.Add(request.NewErrParamRequired("IpAddress")) + } + if s.ResolverEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + if s.IpAddress != nil { + if err := s.IpAddress.Validate(); err != nil { + invalidParams.AddNested("IpAddress", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIpAddress sets the IpAddress field's value. +func (s *DisassociateResolverEndpointIpAddressInput) SetIpAddress(v *IpAddressUpdate) *DisassociateResolverEndpointIpAddressInput { + s.IpAddress = v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *DisassociateResolverEndpointIpAddressInput) SetResolverEndpointId(v string) *DisassociateResolverEndpointIpAddressInput { + s.ResolverEndpointId = &v + return s +} + +type DisassociateResolverEndpointIpAddressOutput struct { + _ struct{} `type:"structure"` + + // The response to an DisassociateResolverEndpointIpAddress request. + ResolverEndpoint *ResolverEndpoint `type:"structure"` +} + +// String returns the string representation +func (s DisassociateResolverEndpointIpAddressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateResolverEndpointIpAddressOutput) GoString() string { + return s.String() +} + +// SetResolverEndpoint sets the ResolverEndpoint field's value. +func (s *DisassociateResolverEndpointIpAddressOutput) SetResolverEndpoint(v *ResolverEndpoint) *DisassociateResolverEndpointIpAddressOutput { + s.ResolverEndpoint = v + return s +} + +type DisassociateResolverRuleInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver rule that you want to disassociate from the specified + // VPC. + // + // ResolverRuleId is a required field + ResolverRuleId *string `min:"1" type:"string" required:"true"` + + // The ID of the VPC that you want to disassociate the resolver rule from. + // + // VPCId is a required field + VPCId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateResolverRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateResolverRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateResolverRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateResolverRuleInput"} + if s.ResolverRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) + } + if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) + } + if s.VPCId == nil { + invalidParams.Add(request.NewErrParamRequired("VPCId")) + } + if s.VPCId != nil && len(*s.VPCId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VPCId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResolverRuleId sets the ResolverRuleId field's value. +func (s *DisassociateResolverRuleInput) SetResolverRuleId(v string) *DisassociateResolverRuleInput { + s.ResolverRuleId = &v + return s +} + +// SetVPCId sets the VPCId field's value. +func (s *DisassociateResolverRuleInput) SetVPCId(v string) *DisassociateResolverRuleInput { + s.VPCId = &v + return s +} + +type DisassociateResolverRuleOutput struct { + _ struct{} `type:"structure"` + + // Information about the DisassociateResolverRule request, including the status + // of the request. + ResolverRuleAssociation *ResolverRuleAssociation `type:"structure"` +} + +// String returns the string representation +func (s DisassociateResolverRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateResolverRuleOutput) GoString() string { + return s.String() +} + +// SetResolverRuleAssociation sets the ResolverRuleAssociation field's value. +func (s *DisassociateResolverRuleOutput) SetResolverRuleAssociation(v *ResolverRuleAssociation) *DisassociateResolverRuleOutput { + s.ResolverRuleAssociation = v + return s +} + +// For List operations, an optional specification to return a subset of objects, +// such as resolver endpoints or resolver rules. +type Filter struct { + _ struct{} `type:"structure"` + + // When you're using a List operation and you want the operation to return a + // subset of objects, such as resolver endpoints or resolver rules, the name + // of the parameter that you want to use to filter objects. For example, to + // list only inbound resolver endpoints, specify Direction for the value of + // Name. + Name *string `min:"1" type:"string"` + + // When you're using a List operation and you want the operation to return a + // subset of objects, such as resolver endpoints or resolver rules, the value + // of the parameter that you want to use to filter objects. For example, to + // list only inbound resolver endpoints, specify INBOUND for the value of Values. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v + return s +} + +type GetResolverEndpointInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver endpoint that you want to get information about. + // + // ResolverEndpointId is a required field + ResolverEndpointId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResolverEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResolverEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResolverEndpointInput"} + if s.ResolverEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *GetResolverEndpointInput) SetResolverEndpointId(v string) *GetResolverEndpointInput { + s.ResolverEndpointId = &v + return s +} + +type GetResolverEndpointOutput struct { + _ struct{} `type:"structure"` + + // Information about the resolver endpoint that you specified in a GetResolverEndpoint + // request. + ResolverEndpoint *ResolverEndpoint `type:"structure"` +} + +// String returns the string representation +func (s GetResolverEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverEndpointOutput) GoString() string { + return s.String() +} + +// SetResolverEndpoint sets the ResolverEndpoint field's value. +func (s *GetResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *GetResolverEndpointOutput { + s.ResolverEndpoint = v + return s +} + +type GetResolverRuleAssociationInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver rule association that you want to get information + // about. + // + // ResolverRuleAssociationId is a required field + ResolverRuleAssociationId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResolverRuleAssociationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverRuleAssociationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResolverRuleAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResolverRuleAssociationInput"} + if s.ResolverRuleAssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRuleAssociationId")) + } + if s.ResolverRuleAssociationId != nil && len(*s.ResolverRuleAssociationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverRuleAssociationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResolverRuleAssociationId sets the ResolverRuleAssociationId field's value. +func (s *GetResolverRuleAssociationInput) SetResolverRuleAssociationId(v string) *GetResolverRuleAssociationInput { + s.ResolverRuleAssociationId = &v + return s +} + +type GetResolverRuleAssociationOutput struct { + _ struct{} `type:"structure"` + + // Information about the resolver rule association that you specified in a GetResolverRuleAssociation + // request. + ResolverRuleAssociation *ResolverRuleAssociation `type:"structure"` +} + +// String returns the string representation +func (s GetResolverRuleAssociationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverRuleAssociationOutput) GoString() string { + return s.String() +} + +// SetResolverRuleAssociation sets the ResolverRuleAssociation field's value. +func (s *GetResolverRuleAssociationOutput) SetResolverRuleAssociation(v *ResolverRuleAssociation) *GetResolverRuleAssociationOutput { + s.ResolverRuleAssociation = v + return s +} + +type GetResolverRuleInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver rule that you want to get information about. + // + // ResolverRuleId is a required field + ResolverRuleId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResolverRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResolverRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResolverRuleInput"} + if s.ResolverRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) + } + if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResolverRuleId sets the ResolverRuleId field's value. +func (s *GetResolverRuleInput) SetResolverRuleId(v string) *GetResolverRuleInput { + s.ResolverRuleId = &v + return s +} + +type GetResolverRuleOutput struct { + _ struct{} `type:"structure"` + + // Information about the resolver rule that you specified in a GetResolverRule + // request. + ResolverRule *ResolverRule `type:"structure"` +} + +// String returns the string representation +func (s GetResolverRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverRuleOutput) GoString() string { + return s.String() +} + +// SetResolverRule sets the ResolverRule field's value. +func (s *GetResolverRuleOutput) SetResolverRule(v *ResolverRule) *GetResolverRuleOutput { + s.ResolverRule = v + return s +} + +type GetResolverRulePolicyInput struct { + _ struct{} `type:"structure"` + + // The ID of the resolver rule policy that you want to get information about. + // + // Arn is a required field + Arn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetResolverRulePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverRulePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetResolverRulePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetResolverRulePolicyInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GetResolverRulePolicyInput) SetArn(v string) *GetResolverRulePolicyInput { + s.Arn = &v + return s +} + +type GetResolverRulePolicyOutput struct { + _ struct{} `type:"structure"` + + // Information about the resolver rule policy that you specified in a GetResolverRulePolicy + // request. + ResolverRulePolicy *string `type:"string"` +} + +// String returns the string representation +func (s GetResolverRulePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResolverRulePolicyOutput) GoString() string { + return s.String() +} + +// SetResolverRulePolicy sets the ResolverRulePolicy field's value. +func (s *GetResolverRulePolicyOutput) SetResolverRulePolicy(v string) *GetResolverRulePolicyOutput { + s.ResolverRulePolicy = &v + return s +} + +// In an CreateResolverEndpoint request, a subnet and IP address that you want +// to use for DNS queries. +type IpAddressRequest struct { + _ struct{} `type:"structure"` + + // The IP address that you want to use for DNS queries. + Ip *string `min:"7" type:"string"` + + // The subnet that contains the IP address. + // + // SubnetId is a required field + SubnetId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s IpAddressRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpAddressRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IpAddressRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IpAddressRequest"} + if s.Ip != nil && len(*s.Ip) < 7 { + invalidParams.Add(request.NewErrParamMinLen("Ip", 7)) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + if s.SubnetId != nil && len(*s.SubnetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIp sets the Ip field's value. +func (s *IpAddressRequest) SetIp(v string) *IpAddressRequest { + s.Ip = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *IpAddressRequest) SetSubnetId(v string) *IpAddressRequest { + s.SubnetId = &v + return s +} + +// In the response to a GetResolverEndpoint request, information about the IP +// addresses that the resolver endpoint uses for DNS queries. +type IpAddressResponse struct { + _ struct{} `type:"structure"` + + // The date and time that the IP address was created, in Unix time format and + // Coordinated Universal Time (UTC). + CreationTime *string `min:"20" type:"string"` + + // One IP address that the resolver endpoint uses for DNS queries. + Ip *string `min:"7" type:"string"` + + // The ID of one IP address. + IpId *string `min:"1" type:"string"` + + // The date and time that the IP address was last modified, in Unix time format + // and Coordinated Universal Time (UTC). + ModificationTime *string `min:"20" type:"string"` + + // A status code that gives the current status of the request. + Status *string `type:"string" enum:"IpAddressStatus"` + + // A message that provides additional information about the status of the request. + StatusMessage *string `type:"string"` + + // The ID of one subnet. + SubnetId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s IpAddressResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpAddressResponse) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *IpAddressResponse) SetCreationTime(v string) *IpAddressResponse { + s.CreationTime = &v + return s +} + +// SetIp sets the Ip field's value. +func (s *IpAddressResponse) SetIp(v string) *IpAddressResponse { + s.Ip = &v + return s +} + +// SetIpId sets the IpId field's value. +func (s *IpAddressResponse) SetIpId(v string) *IpAddressResponse { + s.IpId = &v + return s +} + +// SetModificationTime sets the ModificationTime field's value. +func (s *IpAddressResponse) SetModificationTime(v string) *IpAddressResponse { + s.ModificationTime = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *IpAddressResponse) SetStatus(v string) *IpAddressResponse { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *IpAddressResponse) SetStatusMessage(v string) *IpAddressResponse { + s.StatusMessage = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *IpAddressResponse) SetSubnetId(v string) *IpAddressResponse { + s.SubnetId = &v + return s +} + +// In an UpdateResolverEndpoint request, information about an IP address to +// update. +type IpAddressUpdate struct { + _ struct{} `type:"structure"` + + // The new IP address. + Ip *string `min:"7" type:"string"` + + // Only when removing an IP address from a resolver endpoint: The ID of the + // IP address that you want to remove. To get this ID, use GetResolverEndpoint. + IpId *string `min:"1" type:"string"` + + // The ID of the subnet that includes the IP address that you want to update. + // To get this ID, use GetResolverEndpoint. + SubnetId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s IpAddressUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpAddressUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IpAddressUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IpAddressUpdate"} + if s.Ip != nil && len(*s.Ip) < 7 { + invalidParams.Add(request.NewErrParamMinLen("Ip", 7)) + } + if s.IpId != nil && len(*s.IpId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IpId", 1)) + } + if s.SubnetId != nil && len(*s.SubnetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubnetId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIp sets the Ip field's value. +func (s *IpAddressUpdate) SetIp(v string) *IpAddressUpdate { + s.Ip = &v + return s +} + +// SetIpId sets the IpId field's value. +func (s *IpAddressUpdate) SetIpId(v string) *IpAddressUpdate { + s.IpId = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *IpAddressUpdate) SetSubnetId(v string) *IpAddressUpdate { + s.SubnetId = &v + return s +} + +type ListResolverEndpointIpAddressesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of IP addresses that you want to return in the response + // to a ListResolverEndpointIpAddresses request. If you don't specify a value + // for MaxResults, Resolver returns up to 100 IP addresses. + MaxResults *int64 `min:"1" type:"integer"` + + // For the first ListResolverEndpointIpAddresses request, omit this value. + // + // If the specified resolver endpoint has more than MaxResults IP addresses, + // you can submit another ListResolverEndpointIpAddresses request to get the + // next group of IP addresses. In the next request, specify the value of NextToken + // from the previous response. + NextToken *string `type:"string"` + + // The ID of the resolver endpoint that you want to get IP addresses for. + // + // ResolverEndpointId is a required field + ResolverEndpointId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListResolverEndpointIpAddressesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverEndpointIpAddressesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResolverEndpointIpAddressesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResolverEndpointIpAddressesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResolverEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverEndpointIpAddressesInput) SetMaxResults(v int64) *ListResolverEndpointIpAddressesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverEndpointIpAddressesInput) SetNextToken(v string) *ListResolverEndpointIpAddressesInput { + s.NextToken = &v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *ListResolverEndpointIpAddressesInput) SetResolverEndpointId(v string) *ListResolverEndpointIpAddressesInput { + s.ResolverEndpointId = &v + return s +} + +type ListResolverEndpointIpAddressesOutput struct { + _ struct{} `type:"structure"` + + // The IP addresses that DNS queries pass through on their way to your network + // (outbound endpoint) or on the way to Resolver (inbound endpoint). + IpAddresses []*IpAddressResponse `type:"list"` + + // The value that you specified for MaxResults in the request. + MaxResults *int64 `min:"1" type:"integer"` + + // If the specified endpoint has more than MaxResults IP addresses, you can + // submit another ListResolverEndpointIpAddresses request to get the next group + // of IP addresses. In the next request, specify the value of NextToken from + // the previous response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListResolverEndpointIpAddressesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverEndpointIpAddressesOutput) GoString() string { + return s.String() +} + +// SetIpAddresses sets the IpAddresses field's value. +func (s *ListResolverEndpointIpAddressesOutput) SetIpAddresses(v []*IpAddressResponse) *ListResolverEndpointIpAddressesOutput { + s.IpAddresses = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverEndpointIpAddressesOutput) SetMaxResults(v int64) *ListResolverEndpointIpAddressesOutput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverEndpointIpAddressesOutput) SetNextToken(v string) *ListResolverEndpointIpAddressesOutput { + s.NextToken = &v + return s +} + +type ListResolverEndpointsInput struct { + _ struct{} `type:"structure"` + + // An optional specification to return a subset of resolver endpoints, such + // as all inbound resolver endpoints. + // + // If you submit a second or subsequent ListResolverEndpoints request and specify + // the NextToken parameter, you must use the same values for Filters, if any, + // as in the previous request. + Filters []*Filter `type:"list"` + + // The maximum number of resolver endpoints that you want to return in the response + // to a ListResolverEndpoints request. If you don't specify a value for MaxResults, + // Resolver returns up to 100 resolver endpoints. + MaxResults *int64 `min:"1" type:"integer"` + + // For the first ListResolverEndpoints request, omit this value. + // + // If you have more than MaxResults resolver endpoints, you can submit another + // ListResolverEndpoints request to get the next group of resolver endpoints. + // In the next request, specify the value of NextToken from the previous response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListResolverEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResolverEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResolverEndpointsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListResolverEndpointsInput) SetFilters(v []*Filter) *ListResolverEndpointsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverEndpointsInput) SetMaxResults(v int64) *ListResolverEndpointsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverEndpointsInput) SetNextToken(v string) *ListResolverEndpointsInput { + s.NextToken = &v + return s +} + +type ListResolverEndpointsOutput struct { + _ struct{} `type:"structure"` + + // The value that you specified for MaxResults in the request. + MaxResults *int64 `min:"1" type:"integer"` + + // If more than MaxResults IP addresses match the specified criteria, you can + // submit another ListResolverEndpoint request to get the next group of results. + // In the next request, specify the value of NextToken from the previous response. + NextToken *string `type:"string"` + + // The resolver endpoints that were created by using the current AWS account, + // and that match the specified filters, if any. + ResolverEndpoints []*ResolverEndpoint `type:"list"` +} + +// String returns the string representation +func (s ListResolverEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverEndpointsOutput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverEndpointsOutput) SetMaxResults(v int64) *ListResolverEndpointsOutput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverEndpointsOutput) SetNextToken(v string) *ListResolverEndpointsOutput { + s.NextToken = &v + return s +} + +// SetResolverEndpoints sets the ResolverEndpoints field's value. +func (s *ListResolverEndpointsOutput) SetResolverEndpoints(v []*ResolverEndpoint) *ListResolverEndpointsOutput { + s.ResolverEndpoints = v + return s +} + +type ListResolverRuleAssociationsInput struct { + _ struct{} `type:"structure"` + + // An optional specification to return a subset of resolver rules, such as resolver + // rules that are associated with the same VPC ID. + // + // If you submit a second or subsequent ListResolverRuleAssociations request + // and specify the NextToken parameter, you must use the same values for Filters, + // if any, as in the previous request. + Filters []*Filter `type:"list"` + + // The maximum number of rule associations that you want to return in the response + // to a ListResolverRuleAssociations request. If you don't specify a value for + // MaxResults, Resolver returns up to 100 rule associations. + MaxResults *int64 `min:"1" type:"integer"` + + // For the first ListResolverRuleAssociation request, omit this value. + // + // If you have more than MaxResults rule associations, you can submit another + // ListResolverRuleAssociation request to get the next group of rule associations. + // In the next request, specify the value of NextToken from the previous response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListResolverRuleAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverRuleAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResolverRuleAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResolverRuleAssociationsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListResolverRuleAssociationsInput) SetFilters(v []*Filter) *ListResolverRuleAssociationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverRuleAssociationsInput) SetMaxResults(v int64) *ListResolverRuleAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverRuleAssociationsInput) SetNextToken(v string) *ListResolverRuleAssociationsInput { + s.NextToken = &v + return s +} + +type ListResolverRuleAssociationsOutput struct { + _ struct{} `type:"structure"` + + // The value that you specified for MaxResults in the request. + MaxResults *int64 `min:"1" type:"integer"` + + // If more than MaxResults rule associations match the specified criteria, you + // can submit another ListResolverRuleAssociation request to get the next group + // of results. In the next request, specify the value of NextToken from the + // previous response. + NextToken *string `type:"string"` + + // The associations that were created between resolver rules and VPCs using + // the current AWS account, and that match the specified filters, if any. + ResolverRuleAssociations []*ResolverRuleAssociation `type:"list"` +} + +// String returns the string representation +func (s ListResolverRuleAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverRuleAssociationsOutput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverRuleAssociationsOutput) SetMaxResults(v int64) *ListResolverRuleAssociationsOutput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverRuleAssociationsOutput) SetNextToken(v string) *ListResolverRuleAssociationsOutput { + s.NextToken = &v + return s +} + +// SetResolverRuleAssociations sets the ResolverRuleAssociations field's value. +func (s *ListResolverRuleAssociationsOutput) SetResolverRuleAssociations(v []*ResolverRuleAssociation) *ListResolverRuleAssociationsOutput { + s.ResolverRuleAssociations = v + return s +} + +type ListResolverRulesInput struct { + _ struct{} `type:"structure"` + + // An optional specification to return a subset of resolver rules, such as all + // resolver rules that are associated with the same resolver endpoint. + // + // If you submit a second or subsequent ListResolverRules request and specify + // the NextToken parameter, you must use the same values for Filters, if any, + // as in the previous request. + Filters []*Filter `type:"list"` + + // The maximum number of resolver rules that you want to return in the response + // to a ListResolverRules request. If you don't specify a value for MaxResults, + // Resolver returns up to 100 resolver rules. + MaxResults *int64 `min:"1" type:"integer"` + + // For the first ListResolverRules request, omit this value. + // + // If you have more than MaxResults resolver rules, you can submit another ListResolverRules + // request to get the next group of resolver rules. In the next request, specify + // the value of NextToken from the previous response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListResolverRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResolverRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResolverRulesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListResolverRulesInput) SetFilters(v []*Filter) *ListResolverRulesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverRulesInput) SetMaxResults(v int64) *ListResolverRulesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverRulesInput) SetNextToken(v string) *ListResolverRulesInput { + s.NextToken = &v + return s +} + +type ListResolverRulesOutput struct { + _ struct{} `type:"structure"` + + // The value that you specified for MaxResults in the request. + MaxResults *int64 `min:"1" type:"integer"` + + // If more than MaxResults resolver rules match the specified criteria, you + // can submit another ListResolverRules request to get the next group of results. + // In the next request, specify the value of NextToken from the previous response. + NextToken *string `type:"string"` + + // The resolver rules that were created using the current AWS account and that + // match the specified filters, if any. + ResolverRules []*ResolverRule `type:"list"` +} + +// String returns the string representation +func (s ListResolverRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolverRulesOutput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolverRulesOutput) SetMaxResults(v int64) *ListResolverRulesOutput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolverRulesOutput) SetNextToken(v string) *ListResolverRulesOutput { + s.NextToken = &v + return s +} + +// SetResolverRules sets the ResolverRules field's value. +func (s *ListResolverRulesOutput) SetResolverRules(v []*ResolverRule) *ListResolverRulesOutput { + s.ResolverRules = v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The maximum number of tags that you want to return in the response to a ListTagsForResource + // request. If you don't specify a value for MaxResults, Resolver returns up + // to 100 tags. + MaxResults *int64 `min:"1" type:"integer"` + + // For the first ListTagsForResource request, omit this value. + // + // If you have more than MaxResults tags, you can submit another ListTagsForResource + // request to get the next group of tags for the resource. In the next request, + // specify the value of NextToken from the previous response. + NextToken *string `type:"string"` + + // The Amazon Resource Name (ARN) for the resource that you want to list tags + // for. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // If more than MaxResults tags match the specified criteria, you can submit + // another ListTagsForResource request to get the next group of results. In + // the next request, specify the value of NextToken from the previous response. + NextToken *string `type:"string"` + + // The tags that are associated with the resource that you specified in the + // ListTagsForResource request. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +type PutResolverRulePolicyInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the account that you want to grant permissions + // to. + // + // Arn is a required field + Arn *string `min:"1" type:"string" required:"true"` + + // An AWS Identity and Access Management policy statement that lists the permissions + // that you want to grant to another AWS account. + // + // ResolverRulePolicy is a required field + ResolverRulePolicy *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PutResolverRulePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResolverRulePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutResolverRulePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutResolverRulePolicyInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + if s.ResolverRulePolicy == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRulePolicy")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *PutResolverRulePolicyInput) SetArn(v string) *PutResolverRulePolicyInput { + s.Arn = &v + return s +} + +// SetResolverRulePolicy sets the ResolverRulePolicy field's value. +func (s *PutResolverRulePolicyInput) SetResolverRulePolicy(v string) *PutResolverRulePolicyInput { + s.ResolverRulePolicy = &v + return s +} + +// The response to a PutResolverRulePolicy request. +type PutResolverRulePolicyOutput struct { + _ struct{} `type:"structure"` + + // Whether the PutResolverRulePolicy request was successful. + ReturnValue *bool `type:"boolean"` +} + +// String returns the string representation +func (s PutResolverRulePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResolverRulePolicyOutput) GoString() string { + return s.String() +} + +// SetReturnValue sets the ReturnValue field's value. +func (s *PutResolverRulePolicyOutput) SetReturnValue(v bool) *PutResolverRulePolicyOutput { + s.ReturnValue = &v + return s +} + +// In the response to a CreateResolverEndpoint, DeleteResolverEndpoint, GetResolverEndpoint, +// ListResolverEndpoints, or UpdateResolverEndpoint request, a complex type +// that contains settings for an existing inbound or outbound resolver endpoint. +type ResolverEndpoint struct { + _ struct{} `type:"structure"` + + // The ARN (Amazon Resource Name) for the resolver endpoint. + Arn *string `min:"1" type:"string"` + + // The date and time that the endpoint was created, in Unix time format and + // Coordinated Universal Time (UTC). + CreationTime *string `min:"20" type:"string"` + + // A unique string that identifies the request that created the resolver endpoint. + // The CreatorRequestId allows failed requests to be retried without the risk + // of executing the operation twice. + CreatorRequestId *string `min:"1" type:"string"` + + // Indicates whether the resolver endpoint allows inbound or outbound DNS queries: + // + // * INBOUND: allows DNS queries to your VPC from your network or another + // VPC + // + // * OUTBOUND: allows DNS queries from your VPC to your network or another + // VPC + Direction *string `type:"string" enum:"ResolverEndpointDirection"` + + // The ID of the VPC that you want to create the resolver endpoint in. + HostVPCId *string `min:"1" type:"string"` + + // The ID of the resolver endpoint. + Id *string `min:"1" type:"string"` + + // The number of IP addresses that the resolver endpoint can use for DNS queries. + IpAddressCount *int64 `type:"integer"` + + // The date and time that the endpoint was last modified, in Unix time format + // and Coordinated Universal Time (UTC). + ModificationTime *string `min:"20" type:"string"` + + // The name that you assigned to the resolver endpoint when you submitted a + // CreateResolverEndpoint request. + Name *string `type:"string"` + + // The ID of one or more security groups that control access to this VPC. The + // security group must include one or more inbound resolver rules. + SecurityGroupIds []*string `type:"list"` + + // A code that specifies the current status of the resolver endpoint. + Status *string `type:"string" enum:"ResolverEndpointStatus"` + + // A detailed description of the status of the resolver endpoint. + StatusMessage *string `type:"string"` +} + +// String returns the string representation +func (s ResolverEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResolverEndpoint) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ResolverEndpoint) SetArn(v string) *ResolverEndpoint { + s.Arn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ResolverEndpoint) SetCreationTime(v string) *ResolverEndpoint { + s.CreationTime = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *ResolverEndpoint) SetCreatorRequestId(v string) *ResolverEndpoint { + s.CreatorRequestId = &v + return s +} + +// SetDirection sets the Direction field's value. +func (s *ResolverEndpoint) SetDirection(v string) *ResolverEndpoint { + s.Direction = &v + return s +} + +// SetHostVPCId sets the HostVPCId field's value. +func (s *ResolverEndpoint) SetHostVPCId(v string) *ResolverEndpoint { + s.HostVPCId = &v + return s +} + +// SetId sets the Id field's value. +func (s *ResolverEndpoint) SetId(v string) *ResolverEndpoint { + s.Id = &v + return s +} + +// SetIpAddressCount sets the IpAddressCount field's value. +func (s *ResolverEndpoint) SetIpAddressCount(v int64) *ResolverEndpoint { + s.IpAddressCount = &v + return s +} + +// SetModificationTime sets the ModificationTime field's value. +func (s *ResolverEndpoint) SetModificationTime(v string) *ResolverEndpoint { + s.ModificationTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *ResolverEndpoint) SetName(v string) *ResolverEndpoint { + s.Name = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ResolverEndpoint) SetSecurityGroupIds(v []*string) *ResolverEndpoint { + s.SecurityGroupIds = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ResolverEndpoint) SetStatus(v string) *ResolverEndpoint { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ResolverEndpoint) SetStatusMessage(v string) *ResolverEndpoint { + s.StatusMessage = &v + return s +} + +// For queries that originate in your VPC, detailed information about a resolver +// rule, which specifies how to route DNS queries out of the VPC. The ResolverRule +// parameter appears in the response to a CreateResolverRule, DeleteResolverRule, +// GetResolverRule, ListResolverRules, or UpdateResolverRule request. +type ResolverRule struct { + _ struct{} `type:"structure"` + + // The ARN (Amazon Resource Name) for the resolver rule specified by Id. + Arn *string `min:"1" type:"string"` + + // A unique string that you specified when you created the resolver rule. CreatorRequestIdidentifies + // the request and allows failed requests to be retried without the risk of + // executing the operation twice. + CreatorRequestId *string `min:"1" type:"string"` + + // DNS queries for this domain name are forwarded to the IP addresses that are + // specified in TargetIps. If a query matches multiple resolver rules (example.com + // and www.example.com), the query is routed using the resolver rule that contains + // the most specific domain name (www.example.com). + DomainName *string `min:"1" type:"string"` + + // The ID that Resolver assigned to the resolver rule when you created it. + Id *string `min:"1" type:"string"` + + // The name for the resolver rule, which you specified when you created the + // resolver rule. + Name *string `type:"string"` + + // When a rule is shared with another AWS account, the account ID of the account + // that the rule is shared with. + OwnerId *string `min:"12" type:"string"` + + // The ID of the endpoint that the rule is associated with. + ResolverEndpointId *string `min:"1" type:"string"` + + // This value is always FORWARD. Other resolver rule types aren't supported. + RuleType *string `type:"string" enum:"RuleTypeOption"` + + // Whether the rules is shared and, if so, whether the current account is sharing + // the rule with another account, or another account is sharing the rule with + // the current account. + ShareStatus *string `type:"string" enum:"ShareStatus"` + + // A code that specifies the current status of the resolver rule. + Status *string `type:"string" enum:"ResolverRuleStatus"` + + // A detailed description of the status of a resolver rule. + StatusMessage *string `type:"string"` + + // An array that contains the IP addresses and ports that you want to forward + TargetIps []*TargetAddress `min:"1" type:"list"` +} + +// String returns the string representation +func (s ResolverRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResolverRule) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ResolverRule) SetArn(v string) *ResolverRule { + s.Arn = &v + return s +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *ResolverRule) SetCreatorRequestId(v string) *ResolverRule { + s.CreatorRequestId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *ResolverRule) SetDomainName(v string) *ResolverRule { + s.DomainName = &v + return s +} + +// SetId sets the Id field's value. +func (s *ResolverRule) SetId(v string) *ResolverRule { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ResolverRule) SetName(v string) *ResolverRule { + s.Name = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *ResolverRule) SetOwnerId(v string) *ResolverRule { + s.OwnerId = &v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *ResolverRule) SetResolverEndpointId(v string) *ResolverRule { + s.ResolverEndpointId = &v + return s +} + +// SetRuleType sets the RuleType field's value. +func (s *ResolverRule) SetRuleType(v string) *ResolverRule { + s.RuleType = &v + return s +} + +// SetShareStatus sets the ShareStatus field's value. +func (s *ResolverRule) SetShareStatus(v string) *ResolverRule { + s.ShareStatus = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ResolverRule) SetStatus(v string) *ResolverRule { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ResolverRule) SetStatusMessage(v string) *ResolverRule { + s.StatusMessage = &v + return s +} + +// SetTargetIps sets the TargetIps field's value. +func (s *ResolverRule) SetTargetIps(v []*TargetAddress) *ResolverRule { + s.TargetIps = v + return s +} + +// In the response to an AssociateResolverRule, DisassociateResolverRule, or +// ListResolverRuleAssociations request, information about an association between +// a resolver rule and a VPC. +type ResolverRuleAssociation struct { + _ struct{} `type:"structure"` + + // The ID of the association between a resolver rule and a VPC. Resolver assigns + // this value when you submit an AssociateResolverRule request. + Id *string `min:"1" type:"string"` + + // The name of an association between a resolver rule and a VPC. + Name *string `type:"string"` + + // The ID of the resolver rule that you associated with the VPC that is specified + // by VPCId. + ResolverRuleId *string `min:"1" type:"string"` + + // A code that specifies the current status of the association between a resolver + // rule and a VPC. + Status *string `type:"string" enum:"ResolverRuleAssociationStatus"` + + // A detailed description of the status of the association between a resolver + // rule and a VPC. + StatusMessage *string `type:"string"` + + // The ID of the VPC that you associated the resolver rule with. + VPCId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ResolverRuleAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResolverRuleAssociation) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *ResolverRuleAssociation) SetId(v string) *ResolverRuleAssociation { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ResolverRuleAssociation) SetName(v string) *ResolverRuleAssociation { + s.Name = &v + return s +} + +// SetResolverRuleId sets the ResolverRuleId field's value. +func (s *ResolverRuleAssociation) SetResolverRuleId(v string) *ResolverRuleAssociation { + s.ResolverRuleId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ResolverRuleAssociation) SetStatus(v string) *ResolverRuleAssociation { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ResolverRuleAssociation) SetStatusMessage(v string) *ResolverRuleAssociation { + s.StatusMessage = &v + return s +} + +// SetVPCId sets the VPCId field's value. +func (s *ResolverRuleAssociation) SetVPCId(v string) *ResolverRuleAssociation { + s.VPCId = &v + return s +} + +// In an UpdateResolverRule request, information about the changes that you +// want to make. +type ResolverRuleConfig struct { + _ struct{} `type:"structure"` + + // The new name for the resolver rule. The name that you specify appears in + // the Resolver dashboard in the Route 53 console. + Name *string `type:"string"` + + // The ID of the new outbound resolver endpoint that you want to use to route + // DNS queries to the IP addresses that you specify in TargetIps. + ResolverEndpointId *string `min:"1" type:"string"` + + // For DNS queries that originate in your VPC, the new IP addresses that you + // want to route outbound DNS queries to. + TargetIps []*TargetAddress `min:"1" type:"list"` +} + +// String returns the string representation +func (s ResolverRuleConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResolverRuleConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResolverRuleConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResolverRuleConfig"} + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + if s.TargetIps != nil && len(s.TargetIps) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetIps", 1)) + } + if s.TargetIps != nil { + for i, v := range s.TargetIps { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetIps", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ResolverRuleConfig) SetName(v string) *ResolverRuleConfig { + s.Name = &v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *ResolverRuleConfig) SetResolverEndpointId(v string) *ResolverRuleConfig { + s.ResolverEndpointId = &v + return s +} + +// SetTargetIps sets the TargetIps field's value. +func (s *ResolverRuleConfig) SetTargetIps(v []*TargetAddress) *ResolverRuleConfig { + s.TargetIps = v + return s +} + +// One tag that you want to add to the specified resource. A tag consists of +// a Key (a name for the tag) and a Value. +type Tag struct { + _ struct{} `type:"structure"` + + // The name for the tag. For example, if you want to associate Resolver resources + // with the account IDs of your customers for billing purposes, the value of + // Key might be account-id. + Key *string `type:"string"` + + // The value for the tag. For example, if Key is account-id, then Value might + // be the ID of the customer account that you're creating the resource for. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the resource that you want to add tags + // to. To get the ARN for a resource, use the applicable Get or List command: + // + // * GetResolverEndpoint + // + // * GetResolverRule + // + // * GetResolverRuleAssociation + // + // * ListResolverEndpoints + // + // * ListResolverRuleAssociations + // + // * ListResolverRules + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` + + // The tags that you want to add to the specified resource. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// In a CreateResolverRule request, an array of the IPs that you want to forward +// DNS queries to. +type TargetAddress struct { + _ struct{} `type:"structure"` + + // One IP address that you want to forward DNS queries to. You can specify only + // IPv4 addresses. + // + // Ip is a required field + Ip *string `min:"7" type:"string" required:"true"` + + // The port at Ip that you want to forward DNS queries to. + Port *int64 `type:"integer"` +} + +// String returns the string representation +func (s TargetAddress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetAddress) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetAddress) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetAddress"} + if s.Ip == nil { + invalidParams.Add(request.NewErrParamRequired("Ip")) + } + if s.Ip != nil && len(*s.Ip) < 7 { + invalidParams.Add(request.NewErrParamMinLen("Ip", 7)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIp sets the Ip field's value. +func (s *TargetAddress) SetIp(v string) *TargetAddress { + s.Ip = &v + return s +} + +// SetPort sets the Port field's value. +func (s *TargetAddress) SetPort(v int64) *TargetAddress { + s.Port = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the resource that you want to remove tags + // from. To get the ARN for a resource, use the applicable Get or List command: + // + // * GetResolverEndpoint + // + // * GetResolverRule + // + // * GetResolverRuleAssociation + // + // * ListResolverEndpoints + // + // * ListResolverRuleAssociations + // + // * ListResolverRules + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` + + // The tags that you want to remove to the specified resource. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +type UpdateResolverEndpointInput struct { + _ struct{} `type:"structure"` + + // The name of the resolver endpoint that you want to update. + Name *string `type:"string"` + + // The ID of the resolver endpoint that you want to update. + // + // ResolverEndpointId is a required field + ResolverEndpointId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateResolverEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResolverEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResolverEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResolverEndpointInput"} + if s.ResolverEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverEndpointId")) + } + if s.ResolverEndpointId != nil && len(*s.ResolverEndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverEndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *UpdateResolverEndpointInput) SetName(v string) *UpdateResolverEndpointInput { + s.Name = &v + return s +} + +// SetResolverEndpointId sets the ResolverEndpointId field's value. +func (s *UpdateResolverEndpointInput) SetResolverEndpointId(v string) *UpdateResolverEndpointInput { + s.ResolverEndpointId = &v + return s +} + +type UpdateResolverEndpointOutput struct { + _ struct{} `type:"structure"` + + // The response to an UpdateResolverEndpoint request. + ResolverEndpoint *ResolverEndpoint `type:"structure"` +} + +// String returns the string representation +func (s UpdateResolverEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResolverEndpointOutput) GoString() string { + return s.String() +} + +// SetResolverEndpoint sets the ResolverEndpoint field's value. +func (s *UpdateResolverEndpointOutput) SetResolverEndpoint(v *ResolverEndpoint) *UpdateResolverEndpointOutput { + s.ResolverEndpoint = v + return s +} + +type UpdateResolverRuleInput struct { + _ struct{} `type:"structure"` + + // The new settings for the resolver rule. + // + // Config is a required field + Config *ResolverRuleConfig `type:"structure" required:"true"` + + // The ID of the resolver rule that you want to update. + // + // ResolverRuleId is a required field + ResolverRuleId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateResolverRuleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResolverRuleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateResolverRuleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateResolverRuleInput"} + if s.Config == nil { + invalidParams.Add(request.NewErrParamRequired("Config")) + } + if s.ResolverRuleId == nil { + invalidParams.Add(request.NewErrParamRequired("ResolverRuleId")) + } + if s.ResolverRuleId != nil && len(*s.ResolverRuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResolverRuleId", 1)) + } + if s.Config != nil { + if err := s.Config.Validate(); err != nil { + invalidParams.AddNested("Config", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfig sets the Config field's value. +func (s *UpdateResolverRuleInput) SetConfig(v *ResolverRuleConfig) *UpdateResolverRuleInput { + s.Config = v + return s +} + +// SetResolverRuleId sets the ResolverRuleId field's value. +func (s *UpdateResolverRuleInput) SetResolverRuleId(v string) *UpdateResolverRuleInput { + s.ResolverRuleId = &v + return s +} + +type UpdateResolverRuleOutput struct { + _ struct{} `type:"structure"` + + // The response to an UpdateResolverRule request. + ResolverRule *ResolverRule `type:"structure"` +} + +// String returns the string representation +func (s UpdateResolverRuleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateResolverRuleOutput) GoString() string { + return s.String() +} + +// SetResolverRule sets the ResolverRule field's value. +func (s *UpdateResolverRuleOutput) SetResolverRule(v *ResolverRule) *UpdateResolverRuleOutput { + s.ResolverRule = v + return s +} + +const ( + // IpAddressStatusCreating is a IpAddressStatus enum value + IpAddressStatusCreating = "CREATING" + + // IpAddressStatusFailedCreation is a IpAddressStatus enum value + IpAddressStatusFailedCreation = "FAILED_CREATION" + + // IpAddressStatusAttaching is a IpAddressStatus enum value + IpAddressStatusAttaching = "ATTACHING" + + // IpAddressStatusAttached is a IpAddressStatus enum value + IpAddressStatusAttached = "ATTACHED" + + // IpAddressStatusRemapDetaching is a IpAddressStatus enum value + IpAddressStatusRemapDetaching = "REMAP_DETACHING" + + // IpAddressStatusRemapAttaching is a IpAddressStatus enum value + IpAddressStatusRemapAttaching = "REMAP_ATTACHING" + + // IpAddressStatusDetaching is a IpAddressStatus enum value + IpAddressStatusDetaching = "DETACHING" + + // IpAddressStatusFailedResourceGone is a IpAddressStatus enum value + IpAddressStatusFailedResourceGone = "FAILED_RESOURCE_GONE" + + // IpAddressStatusDeleting is a IpAddressStatus enum value + IpAddressStatusDeleting = "DELETING" + + // IpAddressStatusDeleteFailedFasExpired is a IpAddressStatus enum value + IpAddressStatusDeleteFailedFasExpired = "DELETE_FAILED_FAS_EXPIRED" +) + +const ( + // ResolverEndpointDirectionInbound is a ResolverEndpointDirection enum value + ResolverEndpointDirectionInbound = "INBOUND" + + // ResolverEndpointDirectionOutbound is a ResolverEndpointDirection enum value + ResolverEndpointDirectionOutbound = "OUTBOUND" +) + +const ( + // ResolverEndpointStatusCreating is a ResolverEndpointStatus enum value + ResolverEndpointStatusCreating = "CREATING" + + // ResolverEndpointStatusOperational is a ResolverEndpointStatus enum value + ResolverEndpointStatusOperational = "OPERATIONAL" + + // ResolverEndpointStatusUpdating is a ResolverEndpointStatus enum value + ResolverEndpointStatusUpdating = "UPDATING" + + // ResolverEndpointStatusAutoRecovering is a ResolverEndpointStatus enum value + ResolverEndpointStatusAutoRecovering = "AUTO_RECOVERING" + + // ResolverEndpointStatusActionNeeded is a ResolverEndpointStatus enum value + ResolverEndpointStatusActionNeeded = "ACTION_NEEDED" + + // ResolverEndpointStatusDeleting is a ResolverEndpointStatus enum value + ResolverEndpointStatusDeleting = "DELETING" +) + +const ( + // ResolverRuleAssociationStatusCreating is a ResolverRuleAssociationStatus enum value + ResolverRuleAssociationStatusCreating = "CREATING" + + // ResolverRuleAssociationStatusComplete is a ResolverRuleAssociationStatus enum value + ResolverRuleAssociationStatusComplete = "COMPLETE" + + // ResolverRuleAssociationStatusDeleting is a ResolverRuleAssociationStatus enum value + ResolverRuleAssociationStatusDeleting = "DELETING" + + // ResolverRuleAssociationStatusFailed is a ResolverRuleAssociationStatus enum value + ResolverRuleAssociationStatusFailed = "FAILED" + + // ResolverRuleAssociationStatusOverridden is a ResolverRuleAssociationStatus enum value + ResolverRuleAssociationStatusOverridden = "OVERRIDDEN" +) + +const ( + // ResolverRuleStatusComplete is a ResolverRuleStatus enum value + ResolverRuleStatusComplete = "COMPLETE" + + // ResolverRuleStatusDeleting is a ResolverRuleStatus enum value + ResolverRuleStatusDeleting = "DELETING" + + // ResolverRuleStatusUpdating is a ResolverRuleStatus enum value + ResolverRuleStatusUpdating = "UPDATING" + + // ResolverRuleStatusFailed is a ResolverRuleStatus enum value + ResolverRuleStatusFailed = "FAILED" +) + +const ( + // RuleTypeOptionForward is a RuleTypeOption enum value + RuleTypeOptionForward = "FORWARD" + + // RuleTypeOptionSystem is a RuleTypeOption enum value + RuleTypeOptionSystem = "SYSTEM" + + // RuleTypeOptionRecursive is a RuleTypeOption enum value + RuleTypeOptionRecursive = "RECURSIVE" +) + +const ( + // ShareStatusNotShared is a ShareStatus enum value + ShareStatusNotShared = "NOT_SHARED" + + // ShareStatusSharedWithMe is a ShareStatus enum value + ShareStatusSharedWithMe = "SHARED_WITH_ME" + + // ShareStatusSharedByMe is a ShareStatus enum value + ShareStatusSharedByMe = "SHARED_BY_ME" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go new file mode 100644 index 000000000..02d332e9d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/doc.go @@ -0,0 +1,62 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package route53resolver provides the client and types for making API +// requests to Amazon Route 53 Resolver. +// +// Here's how you set up to query an Amazon Route 53 private hosted zone from +// your network: +// +// Connect your network to a VPC using AWS Direct Connect or a VPN. +// +// Run the following AWS CLI command to create a Resolver endpoint: +// +// create-resolver-endpoint --name [endpoint_name] --direction INBOUND --creator-request-id +// [unique_string] --security-group-ids [security_group_with_inbound_rules] +// --ip-addresses SubnetId=[subnet_id] SubnetId=[subnet_id_in_different_AZ] +// +// Note the resolver endpoint ID that appears in the response. You'll use it +// in step 3. +// +// Get the IP addresses for the Resolver endpoints: +// +// get-resolver-endpoint --resolver-endpoint-id [resolver_endpoint_id] +// +// In your network configuration, define the IP addresses that you got in step +// 3 as DNS servers. +// +// You can now query instance names in your VPCs and the names of records in +// your private hosted zone. +// +// You can also perform the following operations using the AWS CLI: +// +// * list-resolver-endpoints: List all endpoints. The syntax includes options +// for pagination and filtering. +// +// * update-resolver-endpoints: Add IP addresses to an endpoint or remove +// IP addresses from an endpoint. +// +// To delete an endpoint, use the following AWS CLI command: +// +// delete-resolver-endpoint --resolver-endpoint-id [resolver_endpoint_id] +// +// See https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01 for more information on this service. +// +// See route53resolver package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/route53resolver/ +// +// Using the Client +// +// To contact Amazon Route 53 Resolver with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Route 53 Resolver client Route53Resolver for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/route53resolver/#New +package route53resolver diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go new file mode 100644 index 000000000..0d410863e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/errors.go @@ -0,0 +1,84 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package route53resolver + +const ( + + // ErrCodeInternalServiceErrorException for service response error code + // "InternalServiceErrorException". + // + // We encountered an unknown error. Try again in a few minutes. + ErrCodeInternalServiceErrorException = "InternalServiceErrorException" + + // ErrCodeInvalidNextTokenException for service response error code + // "InvalidNextTokenException". + // + // The value that you specified for NextToken in a List request isn't valid. + ErrCodeInvalidNextTokenException = "InvalidNextTokenException" + + // ErrCodeInvalidParameterException for service response error code + // "InvalidParameterException". + // + // One or more parameters in this request are not valid. + ErrCodeInvalidParameterException = "InvalidParameterException" + + // ErrCodeInvalidPolicyDocument for service response error code + // "InvalidPolicyDocument". + // + // The specified resolver rule policy is invalid. + ErrCodeInvalidPolicyDocument = "InvalidPolicyDocument" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // The request is invalid. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeInvalidTagException for service response error code + // "InvalidTagException". + // + // The specified tag is invalid. + ErrCodeInvalidTagException = "InvalidTagException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request caused one or more limits to be exceeded. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceExistsException for service response error code + // "ResourceExistsException". + // + // The resource that you tried to create already exists. + ErrCodeResourceExistsException = "ResourceExistsException" + + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // The resource that you tried to update or delete is currently in use. + ErrCodeResourceInUseException = "ResourceInUseException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource doesn't exist. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeResourceUnavailableException for service response error code + // "ResourceUnavailableException". + // + // The specified resource isn't available. + ErrCodeResourceUnavailableException = "ResourceUnavailableException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The request was throttled. Try again in a few minutes. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeUnknownResourceException for service response error code + // "UnknownResourceException". + // + // The specified resource doesn't exist. + ErrCodeUnknownResourceException = "UnknownResourceException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go new file mode 100644 index 000000000..367e933eb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/route53resolver/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package route53resolver + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// Route53Resolver provides the API operation methods for making requests to +// Amazon Route 53 Resolver. See this package's package overview docs +// for details on the service. +// +// Route53Resolver methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Route53Resolver struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Route53Resolver" // Name of service. + EndpointsID = "route53resolver" // ID to lookup a service endpoint with. + ServiceID = "Route53Resolver" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Route53Resolver client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a Route53Resolver client from just a session. +// svc := route53resolver.New(mySession) +// +// // Create a Route53Resolver client with additional configuration +// svc := route53resolver.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Route53Resolver { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Route53Resolver { + svc := &Route53Resolver{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-04-01", + JSONVersion: "1.1", + TargetPrefix: "Route53Resolver", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Route53Resolver operation and runs any +// custom request initialization. +func (c *Route53Resolver) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index deb8e8964..3b3c2e380 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -22372,7 +22372,7 @@ type SelectObjectContentEventStreamReader interface { // HTTP this will also close the HTTP connection. Close() error - // Returns any error that has occured while reading from the event stream. + // Returns any error that has occurred while reading from the event stream. Err() error } diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go new file mode 100644 index 000000000..328157b9c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/api.go @@ -0,0 +1,569 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package s3control + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restxml" +) + +const opDeletePublicAccessBlock = "DeletePublicAccessBlock" + +// DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the +// client's request for the DeletePublicAccessBlock operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeletePublicAccessBlockRequest method. +// req, resp := client.DeletePublicAccessBlockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeletePublicAccessBlock +func (c *S3Control) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) { + op := &request.Operation{ + Name: opDeletePublicAccessBlock, + HTTPMethod: "DELETE", + HTTPPath: "/v20180820/configuration/publicAccessBlock", + } + + if input == nil { + input = &DeletePublicAccessBlockInput{} + } + + output = &DeletePublicAccessBlockOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// DeletePublicAccessBlock API operation for AWS S3 Control. +// +// Removes the Public Access Block configuration for an Amazon Web Services +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS S3 Control's +// API operation DeletePublicAccessBlock for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/DeletePublicAccessBlock +func (c *S3Control) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) { + req, out := c.DeletePublicAccessBlockRequest(input) + return out, req.Send() +} + +// DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePublicAccessBlock for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3Control) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) { + req, out := c.DeletePublicAccessBlockRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPublicAccessBlock = "GetPublicAccessBlock" + +// GetPublicAccessBlockRequest generates a "aws/request.Request" representing the +// client's request for the GetPublicAccessBlock operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetPublicAccessBlock for more information on using the GetPublicAccessBlock +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetPublicAccessBlockRequest method. +// req, resp := client.GetPublicAccessBlockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetPublicAccessBlock +func (c *S3Control) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) { + op := &request.Operation{ + Name: opGetPublicAccessBlock, + HTTPMethod: "GET", + HTTPPath: "/v20180820/configuration/publicAccessBlock", + } + + if input == nil { + input = &GetPublicAccessBlockInput{} + } + + output = &GetPublicAccessBlockOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// GetPublicAccessBlock API operation for AWS S3 Control. +// +// Retrieves the Public Access Block configuration for an Amazon Web Services +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS S3 Control's +// API operation GetPublicAccessBlock for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchPublicAccessBlockConfiguration "NoSuchPublicAccessBlockConfiguration" +// This exception is thrown if a GetPublicAccessBlock request is made against +// an account that does not have a PublicAccessBlockConfiguration set. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/GetPublicAccessBlock +func (c *S3Control) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) { + req, out := c.GetPublicAccessBlockRequest(input) + return out, req.Send() +} + +// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of +// the ability to pass a context and additional request options. +// +// See GetPublicAccessBlock for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3Control) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) { + req, out := c.GetPublicAccessBlockRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPublicAccessBlock = "PutPublicAccessBlock" + +// PutPublicAccessBlockRequest generates a "aws/request.Request" representing the +// client's request for the PutPublicAccessBlock operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutPublicAccessBlock for more information on using the PutPublicAccessBlock +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutPublicAccessBlockRequest method. +// req, resp := client.PutPublicAccessBlockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/PutPublicAccessBlock +func (c *S3Control) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) { + op := &request.Operation{ + Name: opPutPublicAccessBlock, + HTTPMethod: "PUT", + HTTPPath: "/v20180820/configuration/publicAccessBlock", + } + + if input == nil { + input = &PutPublicAccessBlockInput{} + } + + output = &PutPublicAccessBlockOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{AccountId}.", input.hostLabels)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// PutPublicAccessBlock API operation for AWS S3 Control. +// +// Creates or modifies the Public Access Block configuration for an Amazon Web +// Services account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS S3 Control's +// API operation PutPublicAccessBlock for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/PutPublicAccessBlock +func (c *S3Control) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) { + req, out := c.PutPublicAccessBlockRequest(input) + return out, req.Send() +} + +// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of +// the ability to pass a context and additional request options. +// +// See PutPublicAccessBlock for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *S3Control) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) { + req, out := c.PutPublicAccessBlockRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type DeletePublicAccessBlockInput struct { + _ struct{} `type:"structure"` + + // The Account ID for the Amazon Web Services account whose Public Access Block + // configuration you want to remove. + // + // AccountId is a required field + AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePublicAccessBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePublicAccessBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePublicAccessBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DeletePublicAccessBlockInput) SetAccountId(v string) *DeletePublicAccessBlockInput { + s.AccountId = &v + return s +} + +func (s *DeletePublicAccessBlockInput) hostLabels() map[string]string { + return map[string]string{ + "AccountId": aws.StringValue(s.AccountId), + } +} + +type DeletePublicAccessBlockOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePublicAccessBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePublicAccessBlockOutput) GoString() string { + return s.String() +} + +type GetPublicAccessBlockInput struct { + _ struct{} `type:"structure"` + + // The Account ID for the Amazon Web Services account whose Public Access Block + // configuration you want to retrieve. + // + // AccountId is a required field + AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPublicAccessBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicAccessBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPublicAccessBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *GetPublicAccessBlockInput) SetAccountId(v string) *GetPublicAccessBlockInput { + s.AccountId = &v + return s +} + +func (s *GetPublicAccessBlockInput) hostLabels() map[string]string { + return map[string]string{ + "AccountId": aws.StringValue(s.AccountId), + } +} + +type GetPublicAccessBlockOutput struct { + _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` + + // The Public Access Block configuration currently in effect for this Amazon + // Web Services account. + PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetPublicAccessBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicAccessBlockOutput) GoString() string { + return s.String() +} + +// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. +func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput { + s.PublicAccessBlockConfiguration = v + return s +} + +// The container element for all Public Access Block configuration options. +// You can enable the configuration options in any combination. +// +// Amazon S3 considers a bucket policy public unless at least one of the following +// conditions is true: +// +// The policy limits access to a set of CIDRs using aws:SourceIp. For more information +// on CIDR, see http://www.rfc-editor.org/rfc/rfc4632.txt (http://www.rfc-editor.org/rfc/rfc4632.txt) +// +// The policy grants permissions, not including any "bad actions," to one of +// the following: +// +// A fixed AWS principal, user, role, or service principal +// +// A fixed aws:SourceArn +// +// A fixed aws:SourceVpc +// +// A fixed aws:SourceVpce +// +// A fixed aws:SourceOwner +// +// A fixed aws:SourceAccount +// +// A fixed value of s3:x-amz-server-side-encryption-aws-kms-key-id +// +// A fixed value of aws:userid outside the pattern "AROLEID:*" +// +// "Bad actions" are those that could expose the data inside a bucket to reads +// or writes by the public. These actions are s3:Get*, s3:List*, s3:AbortMultipartUpload, +// s3:Delete*, s3:Put*, and s3:RestoreObject. +// +// The star notation for bad actions indicates that all matching operations +// are considered bad actions. For example, because s3:Get* is a bad action, +// s3:GetObject, s3:GetObjectVersion, and s3:GetObjectAcl are all bad actions. +type PublicAccessBlockConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies whether Amazon S3 should block public ACLs for buckets in this + // account. Setting this element to TRUE causes the following behavior: + // + // * PUT Bucket acl and PUT Object acl calls will fail if the specified ACL + // allows public access. + // + // * PUT Object calls will fail if the request includes an object ACL. + // + // Note that enabling this setting doesn't affect existing policies or ACLs. + BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"` + + // Specifies whether Amazon S3 should block public bucket policies for buckets + // in this account. Setting this element to TRUE causes Amazon S3 to reject + // calls to PUT Bucket policy if the specified bucket policy allows public access. + // + // Note that enabling this setting doesn't affect existing bucket policies. + BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"` + + // Specifies whether Amazon S3 should ignore public ACLs for buckets in this + // account. Setting this element to TRUE causes Amazon S3 to ignore all public + // ACLs on buckets in this account and any objects that they contain. + // + // Note that enabling this setting doesn't affect the persistence of any existing + // ACLs and doesn't prevent new public ACLs from being set. + IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"` + + // Specifies whether Amazon S3 should restrict public bucket policies for buckets + // in this account. If this element is set to TRUE, then only the bucket owner + // and AWS Services can access buckets with public policies. + // + // Note that enabling this setting doesn't affect previously stored bucket policies, + // except that public and cross-account access within any public bucket policy, + // including non-public delegation to specific accounts, is blocked. + RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"` +} + +// String returns the string representation +func (s PublicAccessBlockConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicAccessBlockConfiguration) GoString() string { + return s.String() +} + +// SetBlockPublicAcls sets the BlockPublicAcls field's value. +func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration { + s.BlockPublicAcls = &v + return s +} + +// SetBlockPublicPolicy sets the BlockPublicPolicy field's value. +func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration { + s.BlockPublicPolicy = &v + return s +} + +// SetIgnorePublicAcls sets the IgnorePublicAcls field's value. +func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration { + s.IgnorePublicAcls = &v + return s +} + +// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value. +func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration { + s.RestrictPublicBuckets = &v + return s +} + +type PutPublicAccessBlockInput struct { + _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` + + // The Account ID for the Amazon Web Services account whose Public Access Block + // configuration you want to set. + // + // AccountId is a required field + AccountId *string `location:"header" locationName:"x-amz-account-id" type:"string" required:"true"` + + // The Public Access Block configuration that you want to apply to this Amazon + // Web Services account. + // + // PublicAccessBlockConfiguration is a required field + PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://awss3control.amazonaws.com/doc/2018-08-20/"` +} + +// String returns the string representation +func (s PutPublicAccessBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPublicAccessBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPublicAccessBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } + if s.PublicAccessBlockConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *PutPublicAccessBlockInput) SetAccountId(v string) *PutPublicAccessBlockInput { + s.AccountId = &v + return s +} + +// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. +func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput { + s.PublicAccessBlockConfiguration = v + return s +} + +func (s *PutPublicAccessBlockInput) hostLabels() map[string]string { + return map[string]string{ + "AccountId": aws.StringValue(s.AccountId), + } +} + +type PutPublicAccessBlockOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutPublicAccessBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPublicAccessBlockOutput) GoString() string { + return s.String() +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go new file mode 100644 index 000000000..6ea102095 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/customizations.go @@ -0,0 +1,14 @@ +package s3control + +import ( + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/internal/s3err" +) + +func init() { + initClient = defaultInitClientFn +} + +func defaultInitClientFn(c *client.Client) { + c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler()) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go new file mode 100644 index 000000000..88e2654ab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package s3control provides the client and types for making API +// requests to AWS S3 Control. +// +// AWS S3 Control provides access to Amazon S3 control plane operations. +// +// See https://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20 for more information on this service. +// +// See s3control package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/s3control/ +// +// Using the Client +// +// To contact AWS S3 Control with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS S3 Control client S3Control for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/s3control/#New +package s3control diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go new file mode 100644 index 000000000..573dadc63 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/errors.go @@ -0,0 +1,13 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package s3control + +const ( + + // ErrCodeNoSuchPublicAccessBlockConfiguration for service response error code + // "NoSuchPublicAccessBlockConfiguration". + // + // This exception is thrown if a GetPublicAccessBlock request is made against + // an account that does not have a PublicAccessBlockConfiguration set. + ErrCodeNoSuchPublicAccessBlockConfiguration = "NoSuchPublicAccessBlockConfiguration" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3control/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3control/service.go new file mode 100644 index 000000000..377c9d55d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/s3control/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package s3control + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restxml" +) + +// S3Control provides the API operation methods for making requests to +// AWS S3 Control. See this package's package overview docs +// for details on the service. +// +// S3Control methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type S3Control struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "S3 Control" // Name of service. + EndpointsID = "s3-control" // ID to lookup a service endpoint with. + ServiceID = "S3 Control" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the S3Control client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a S3Control client from just a session. +// svc := s3control.New(mySession) +// +// // Create a S3Control client with additional configuration +// svc := s3control.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3Control { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "s3" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *S3Control { + svc := &S3Control{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-08-20", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) { + s.DisableURIPathEscaping = true + })) + svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a S3Control operation and runs any +// custom request initialization. +func (c *S3Control) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go new file mode 100644 index 000000000..8e5a503d9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/api.go @@ -0,0 +1,26320 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sagemaker + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAddTags = "AddTags" + +// AddTagsRequest generates a "aws/request.Request" representing the +// client's request for the AddTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AddTags for more information on using the AddTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AddTagsRequest method. +// req, resp := client.AddTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags +func (c *SageMaker) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { + op := &request.Operation{ + Name: opAddTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddTagsInput{} + } + + output = &AddTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddTags API operation for Amazon SageMaker Service. +// +// Adds or overwrites one or more tags for the specified Amazon SageMaker resource. +// You can add tags to notebook instances, training jobs, hyperparameter tuning +// jobs, models, endpoint configurations, and endpoints. +// +// Each tag consists of a key and an optional value. Tag keys must be unique +// per resource. For more information about tags, see For more information, +// see AWS Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). +// +// Tags that you add to a hyperparameter tuning job by calling this API are +// also added to any training jobs that the hyperparameter tuning job launches +// after you call this API, but not to training jobs that the hyperparameter +// tuning job launched before you called this API. To make sure that the tags +// associated with a hyperparameter tuning job are also added to all training +// jobs that the hyperparameter tuning job launches, add the tags when you first +// create the tuning job by specifying them in the Tags parameter of CreateHyperParameterTuningJob +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation AddTags for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/AddTags +func (c *SageMaker) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { + req, out := c.AddTagsRequest(input) + return out, req.Send() +} + +// AddTagsWithContext is the same as AddTags with the addition of +// the ability to pass a context and additional request options. +// +// See AddTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { + req, out := c.AddTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateAlgorithm = "CreateAlgorithm" + +// CreateAlgorithmRequest generates a "aws/request.Request" representing the +// client's request for the CreateAlgorithm operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateAlgorithm for more information on using the CreateAlgorithm +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateAlgorithmRequest method. +// req, resp := client.CreateAlgorithmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAlgorithm +func (c *SageMaker) CreateAlgorithmRequest(input *CreateAlgorithmInput) (req *request.Request, output *CreateAlgorithmOutput) { + op := &request.Operation{ + Name: opCreateAlgorithm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateAlgorithmInput{} + } + + output = &CreateAlgorithmOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateAlgorithm API operation for Amazon SageMaker Service. +// +// Create a machine learning algorithm that you can use in Amazon SageMaker +// and list in the AWS Marketplace. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateAlgorithm for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateAlgorithm +func (c *SageMaker) CreateAlgorithm(input *CreateAlgorithmInput) (*CreateAlgorithmOutput, error) { + req, out := c.CreateAlgorithmRequest(input) + return out, req.Send() +} + +// CreateAlgorithmWithContext is the same as CreateAlgorithm with the addition of +// the ability to pass a context and additional request options. +// +// See CreateAlgorithm for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateAlgorithmWithContext(ctx aws.Context, input *CreateAlgorithmInput, opts ...request.Option) (*CreateAlgorithmOutput, error) { + req, out := c.CreateAlgorithmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCodeRepository = "CreateCodeRepository" + +// CreateCodeRepositoryRequest generates a "aws/request.Request" representing the +// client's request for the CreateCodeRepository operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCodeRepository for more information on using the CreateCodeRepository +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCodeRepositoryRequest method. +// req, resp := client.CreateCodeRepositoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCodeRepository +func (c *SageMaker) CreateCodeRepositoryRequest(input *CreateCodeRepositoryInput) (req *request.Request, output *CreateCodeRepositoryOutput) { + op := &request.Operation{ + Name: opCreateCodeRepository, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCodeRepositoryInput{} + } + + output = &CreateCodeRepositoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCodeRepository API operation for Amazon SageMaker Service. +// +// Creates a Git repository as a resource in your Amazon SageMaker account. +// You can associate the repository with notebook instances so that you can +// use Git source control for the notebooks you create. The Git repository is +// a resource in your Amazon SageMaker account, so it can be associated with +// more than one notebook instance, and it persists independently from the lifecycle +// of any notebook instances it is associated with. +// +// The repository can be hosted either in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) +// or in any other Git repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateCodeRepository for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCodeRepository +func (c *SageMaker) CreateCodeRepository(input *CreateCodeRepositoryInput) (*CreateCodeRepositoryOutput, error) { + req, out := c.CreateCodeRepositoryRequest(input) + return out, req.Send() +} + +// CreateCodeRepositoryWithContext is the same as CreateCodeRepository with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCodeRepository for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateCodeRepositoryWithContext(ctx aws.Context, input *CreateCodeRepositoryInput, opts ...request.Option) (*CreateCodeRepositoryOutput, error) { + req, out := c.CreateCodeRepositoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCompilationJob = "CreateCompilationJob" + +// CreateCompilationJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateCompilationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCompilationJob for more information on using the CreateCompilationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCompilationJobRequest method. +// req, resp := client.CreateCompilationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCompilationJob +func (c *SageMaker) CreateCompilationJobRequest(input *CreateCompilationJobInput) (req *request.Request, output *CreateCompilationJobOutput) { + op := &request.Operation{ + Name: opCreateCompilationJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCompilationJobInput{} + } + + output = &CreateCompilationJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCompilationJob API operation for Amazon SageMaker Service. +// +// Starts a model compilation job. After the model has been compiled, Amazon +// SageMaker saves the resulting model artifacts to an Amazon Simple Storage +// Service (Amazon S3) bucket that you specify. +// +// If you choose to host your model using Amazon SageMaker hosting services, +// you can use the resulting model artifacts as part of the model. You can also +// use the artifacts with AWS IoT Greengrass. In that case, deploy them as an +// ML resource. +// +// In the request body, you provide the following: +// +// * A name for the compilation job +// +// * Information about the input model artifacts +// +// * The output location for the compiled model and the device (target) that +// the model runs on +// +// * The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker +// assumes to perform the model compilation job +// +// You can also provide a Tag to track the model compilation job's resource +// use and costs. The response body contains the CompilationJobArn for the compiled +// job. +// +// To stop a model compilation job, use StopCompilationJob. To get information +// about a particular model compilation job, use DescribeCompilationJob. To +// get information about multiple model compilation jobs, use ListCompilationJobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateCompilationJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUse "ResourceInUse" +// Resource being accessed is in use. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateCompilationJob +func (c *SageMaker) CreateCompilationJob(input *CreateCompilationJobInput) (*CreateCompilationJobOutput, error) { + req, out := c.CreateCompilationJobRequest(input) + return out, req.Send() +} + +// CreateCompilationJobWithContext is the same as CreateCompilationJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCompilationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateCompilationJobWithContext(ctx aws.Context, input *CreateCompilationJobInput, opts ...request.Option) (*CreateCompilationJobOutput, error) { + req, out := c.CreateCompilationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateEndpoint = "CreateEndpoint" + +// CreateEndpointRequest generates a "aws/request.Request" representing the +// client's request for the CreateEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateEndpoint for more information on using the CreateEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateEndpointRequest method. +// req, resp := client.CreateEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint +func (c *SageMaker) CreateEndpointRequest(input *CreateEndpointInput) (req *request.Request, output *CreateEndpointOutput) { + op := &request.Operation{ + Name: opCreateEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateEndpointInput{} + } + + output = &CreateEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateEndpoint API operation for Amazon SageMaker Service. +// +// Creates an endpoint using the endpoint configuration specified in the request. +// Amazon SageMaker uses the endpoint to provision resources and deploy models. +// You create the endpoint configuration with the CreateEndpointConfig (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html) +// API. +// +// Use this API only for hosting models using Amazon SageMaker hosting services. +// +// The endpoint name must be unique within an AWS Region in your AWS account. +// +// When it receives the request, Amazon SageMaker creates the endpoint, launches +// the resources (ML compute instances), and deploys the model(s) on them. +// +// When Amazon SageMaker receives the request, it sets the endpoint status to +// Creating. After it creates the endpoint, it sets the status to InService. +// Amazon SageMaker can then process incoming requests for inferences. To check +// the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) +// API. +// +// For an example, see Exercise 1: Using the K-Means Algorithm Provided by Amazon +// SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ex1.html). +// +// If any of the models hosted at this endpoint get model data from an Amazon +// S3 location, Amazon SageMaker uses AWS Security Token Service to download +// model artifacts from the S3 path you provided. AWS STS is activated in your +// IAM user account by default. If you previously deactivated AWS STS for a +// region, you need to reactivate AWS STS for that region. For more information, +// see Activating and Deactivating AWS STS i an AWS Region (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// in the AWS Identity and Access Management User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpoint +func (c *SageMaker) CreateEndpoint(input *CreateEndpointInput) (*CreateEndpointOutput, error) { + req, out := c.CreateEndpointRequest(input) + return out, req.Send() +} + +// CreateEndpointWithContext is the same as CreateEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateEndpointWithContext(ctx aws.Context, input *CreateEndpointInput, opts ...request.Option) (*CreateEndpointOutput, error) { + req, out := c.CreateEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateEndpointConfig = "CreateEndpointConfig" + +// CreateEndpointConfigRequest generates a "aws/request.Request" representing the +// client's request for the CreateEndpointConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateEndpointConfig for more information on using the CreateEndpointConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateEndpointConfigRequest method. +// req, resp := client.CreateEndpointConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig +func (c *SageMaker) CreateEndpointConfigRequest(input *CreateEndpointConfigInput) (req *request.Request, output *CreateEndpointConfigOutput) { + op := &request.Operation{ + Name: opCreateEndpointConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateEndpointConfigInput{} + } + + output = &CreateEndpointConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateEndpointConfig API operation for Amazon SageMaker Service. +// +// Creates an endpoint configuration that Amazon SageMaker hosting services +// uses to deploy models. In the configuration, you identify one or more models, +// created using the CreateModel API, to deploy and the resources that you want +// Amazon SageMaker to provision. Then you call the CreateEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html) +// API. +// +// Use this API only if you want to use Amazon SageMaker hosting services to +// deploy models into production. +// +// In the request, you define one or more ProductionVariants, each of which +// identifies a model. Each ProductionVariant parameter also describes the resources +// that you want Amazon SageMaker to provision. This includes the number and +// type of ML compute instances to deploy. +// +// If you are hosting multiple models, you also assign a VariantWeight to specify +// how much traffic you want to allocate to each model. For example, suppose +// that you want to host two models, A and B, and you assign traffic weight +// 2 for model A and 1 for model B. Amazon SageMaker distributes two-thirds +// of the traffic to Model A, and one-third to model B. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateEndpointConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateEndpointConfig +func (c *SageMaker) CreateEndpointConfig(input *CreateEndpointConfigInput) (*CreateEndpointConfigOutput, error) { + req, out := c.CreateEndpointConfigRequest(input) + return out, req.Send() +} + +// CreateEndpointConfigWithContext is the same as CreateEndpointConfig with the addition of +// the ability to pass a context and additional request options. +// +// See CreateEndpointConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateEndpointConfigWithContext(ctx aws.Context, input *CreateEndpointConfigInput, opts ...request.Option) (*CreateEndpointConfigOutput, error) { + req, out := c.CreateEndpointConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateHyperParameterTuningJob = "CreateHyperParameterTuningJob" + +// CreateHyperParameterTuningJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateHyperParameterTuningJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateHyperParameterTuningJob for more information on using the CreateHyperParameterTuningJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateHyperParameterTuningJobRequest method. +// req, resp := client.CreateHyperParameterTuningJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHyperParameterTuningJob +func (c *SageMaker) CreateHyperParameterTuningJobRequest(input *CreateHyperParameterTuningJobInput) (req *request.Request, output *CreateHyperParameterTuningJobOutput) { + op := &request.Operation{ + Name: opCreateHyperParameterTuningJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateHyperParameterTuningJobInput{} + } + + output = &CreateHyperParameterTuningJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateHyperParameterTuningJob API operation for Amazon SageMaker Service. +// +// Starts a hyperparameter tuning job. A hyperparameter tuning job finds the +// best version of a model by running many training jobs on your dataset using +// the algorithm you choose and values for hyperparameters within ranges that +// you specify. It then chooses the hyperparameter values that result in a model +// that performs the best, as measured by an objective metric that you choose. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateHyperParameterTuningJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUse "ResourceInUse" +// Resource being accessed is in use. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateHyperParameterTuningJob +func (c *SageMaker) CreateHyperParameterTuningJob(input *CreateHyperParameterTuningJobInput) (*CreateHyperParameterTuningJobOutput, error) { + req, out := c.CreateHyperParameterTuningJobRequest(input) + return out, req.Send() +} + +// CreateHyperParameterTuningJobWithContext is the same as CreateHyperParameterTuningJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateHyperParameterTuningJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateHyperParameterTuningJobWithContext(ctx aws.Context, input *CreateHyperParameterTuningJobInput, opts ...request.Option) (*CreateHyperParameterTuningJobOutput, error) { + req, out := c.CreateHyperParameterTuningJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateLabelingJob = "CreateLabelingJob" + +// CreateLabelingJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateLabelingJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateLabelingJob for more information on using the CreateLabelingJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateLabelingJobRequest method. +// req, resp := client.CreateLabelingJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateLabelingJob +func (c *SageMaker) CreateLabelingJobRequest(input *CreateLabelingJobInput) (req *request.Request, output *CreateLabelingJobOutput) { + op := &request.Operation{ + Name: opCreateLabelingJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLabelingJobInput{} + } + + output = &CreateLabelingJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLabelingJob API operation for Amazon SageMaker Service. +// +// Creates a job that uses workers to label the data objects in your input dataset. +// You can use the labeled data to train machine learning models. +// +// You can select your workforce from one of three providers: +// +// * A private workforce that you create. It can include employees, contractors, +// and outside experts. Use a private workforce when want the data to stay +// within your organization or when a specific set of skills is required. +// +// * One or more vendors that you select from the AWS Marketplace. Vendors +// provide expertise in specific areas. +// +// * The Amazon Mechanical Turk workforce. This is the largest workforce, +// but it should only be used for public data or data that has been stripped +// of any personally identifiable information. +// +// You can also use automated data labeling to reduce the number of data objects +// that need to be labeled by a human. Automated data labeling uses active learning +// to determine if a data object can be labeled by machine or if it needs to +// be sent to a human worker. For more information, see Using Automated Data +// Labeling (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-automated-labeling.html). +// +// The data objects to be labeled are contained in an Amazon S3 bucket. You +// create a manifest file that describes the location of each object. For more +// information, see Using Input and Output Data (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-data.html). +// +// The output can be used as the manifest file for another labeling job or as +// training data for your machine learning models. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateLabelingJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUse "ResourceInUse" +// Resource being accessed is in use. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateLabelingJob +func (c *SageMaker) CreateLabelingJob(input *CreateLabelingJobInput) (*CreateLabelingJobOutput, error) { + req, out := c.CreateLabelingJobRequest(input) + return out, req.Send() +} + +// CreateLabelingJobWithContext is the same as CreateLabelingJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLabelingJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateLabelingJobWithContext(ctx aws.Context, input *CreateLabelingJobInput, opts ...request.Option) (*CreateLabelingJobOutput, error) { + req, out := c.CreateLabelingJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateModel = "CreateModel" + +// CreateModelRequest generates a "aws/request.Request" representing the +// client's request for the CreateModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateModel for more information on using the CreateModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateModelRequest method. +// req, resp := client.CreateModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel +func (c *SageMaker) CreateModelRequest(input *CreateModelInput) (req *request.Request, output *CreateModelOutput) { + op := &request.Operation{ + Name: opCreateModel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateModelInput{} + } + + output = &CreateModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateModel API operation for Amazon SageMaker Service. +// +// Creates a model in Amazon SageMaker. In the request, you name the model and +// describe a primary container. For the primary container, you specify the +// docker image containing inference code, artifacts (from prior training), +// and custom environment map that the inference code uses when you deploy the +// model for predictions. +// +// Use this API to create a model if you want to use Amazon SageMaker hosting +// services or run a batch transform job. +// +// To host your model, you create an endpoint configuration with the CreateEndpointConfig +// API, and then create an endpoint with the CreateEndpoint API. Amazon SageMaker +// then deploys all of the containers that you defined for the model in the +// hosting environment. +// +// To run a batch transform using your model, you start a job with the CreateTransformJob +// API. Amazon SageMaker uses your model and your dataset to get inferences +// which are then saved to a specified S3 location. +// +// In the CreateModel request, you must define a container with the PrimaryContainer +// parameter. +// +// In the request, you also provide an IAM role that Amazon SageMaker can assume +// to access model artifacts and docker image for deployment on ML compute hosting +// instances or for batch transform jobs. In addition, you also use the IAM +// role to manage permissions the inference code needs. For example, if the +// inference code access any other AWS resources, you grant necessary permissions +// via this role. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateModel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModel +func (c *SageMaker) CreateModel(input *CreateModelInput) (*CreateModelOutput, error) { + req, out := c.CreateModelRequest(input) + return out, req.Send() +} + +// CreateModelWithContext is the same as CreateModel with the addition of +// the ability to pass a context and additional request options. +// +// See CreateModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateModelWithContext(ctx aws.Context, input *CreateModelInput, opts ...request.Option) (*CreateModelOutput, error) { + req, out := c.CreateModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateModelPackage = "CreateModelPackage" + +// CreateModelPackageRequest generates a "aws/request.Request" representing the +// client's request for the CreateModelPackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateModelPackage for more information on using the CreateModelPackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateModelPackageRequest method. +// req, resp := client.CreateModelPackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackage +func (c *SageMaker) CreateModelPackageRequest(input *CreateModelPackageInput) (req *request.Request, output *CreateModelPackageOutput) { + op := &request.Operation{ + Name: opCreateModelPackage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateModelPackageInput{} + } + + output = &CreateModelPackageOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateModelPackage API operation for Amazon SageMaker Service. +// +// Creates a model package that you can use to create Amazon SageMaker models +// or list on AWS Marketplace. Buyers can subscribe to model packages listed +// on AWS Marketplace to create models in Amazon SageMaker. +// +// To create a model package by specifying a Docker container that contains +// your inference code and the Amazon S3 location of your model artifacts, provide +// values for InferenceSpecification. To create a model from an algorithm resource +// that you created or subscribed to in AWS Marketplace, provide a value for +// SourceAlgorithmSpecification. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateModelPackage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateModelPackage +func (c *SageMaker) CreateModelPackage(input *CreateModelPackageInput) (*CreateModelPackageOutput, error) { + req, out := c.CreateModelPackageRequest(input) + return out, req.Send() +} + +// CreateModelPackageWithContext is the same as CreateModelPackage with the addition of +// the ability to pass a context and additional request options. +// +// See CreateModelPackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateModelPackageWithContext(ctx aws.Context, input *CreateModelPackageInput, opts ...request.Option) (*CreateModelPackageOutput, error) { + req, out := c.CreateModelPackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateNotebookInstance = "CreateNotebookInstance" + +// CreateNotebookInstanceRequest generates a "aws/request.Request" representing the +// client's request for the CreateNotebookInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateNotebookInstance for more information on using the CreateNotebookInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateNotebookInstanceRequest method. +// req, resp := client.CreateNotebookInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance +func (c *SageMaker) CreateNotebookInstanceRequest(input *CreateNotebookInstanceInput) (req *request.Request, output *CreateNotebookInstanceOutput) { + op := &request.Operation{ + Name: opCreateNotebookInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNotebookInstanceInput{} + } + + output = &CreateNotebookInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNotebookInstance API operation for Amazon SageMaker Service. +// +// Creates an Amazon SageMaker notebook instance. A notebook instance is a machine +// learning (ML) compute instance running on a Jupyter notebook. +// +// In a CreateNotebookInstance request, specify the type of ML compute instance +// that you want to run. Amazon SageMaker launches the instance, installs common +// libraries that you can use to explore datasets for model training, and attaches +// an ML storage volume to the notebook instance. +// +// Amazon SageMaker also provides a set of example notebooks. Each notebook +// demonstrates how to use Amazon SageMaker with a specific algorithm or with +// a machine learning framework. +// +// After receiving the request, Amazon SageMaker does the following: +// +// Creates a network interface in the Amazon SageMaker VPC. +// +// (Option) If you specified SubnetId, Amazon SageMaker creates a network interface +// in your own VPC, which is inferred from the subnet ID that you provide in +// the input. When creating this network interface, Amazon SageMaker attaches +// the security group that you specified in the request to the network interface +// that it creates in your VPC. +// +// Launches an EC2 instance of the type specified in the request in the Amazon +// SageMaker VPC. If you specified SubnetId of your VPC, Amazon SageMaker specifies +// both network interfaces when launching this instance. This enables inbound +// traffic from your own VPC to the notebook instance, assuming that the security +// groups allow it. +// +// After creating the notebook instance, Amazon SageMaker returns its Amazon +// Resource Name (ARN). +// +// After Amazon SageMaker creates the notebook instance, you can connect to +// the Jupyter server and work in Jupyter notebooks. For example, you can write +// code to explore a dataset that you can use for model training, train a model, +// host models by creating Amazon SageMaker endpoints, and validate hosted models. +// +// For more information, see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateNotebookInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstance +func (c *SageMaker) CreateNotebookInstance(input *CreateNotebookInstanceInput) (*CreateNotebookInstanceOutput, error) { + req, out := c.CreateNotebookInstanceRequest(input) + return out, req.Send() +} + +// CreateNotebookInstanceWithContext is the same as CreateNotebookInstance with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNotebookInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateNotebookInstanceWithContext(ctx aws.Context, input *CreateNotebookInstanceInput, opts ...request.Option) (*CreateNotebookInstanceOutput, error) { + req, out := c.CreateNotebookInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateNotebookInstanceLifecycleConfig = "CreateNotebookInstanceLifecycleConfig" + +// CreateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the +// client's request for the CreateNotebookInstanceLifecycleConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateNotebookInstanceLifecycleConfig for more information on using the CreateNotebookInstanceLifecycleConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateNotebookInstanceLifecycleConfigRequest method. +// req, resp := client.CreateNotebookInstanceLifecycleConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstanceLifecycleConfig +func (c *SageMaker) CreateNotebookInstanceLifecycleConfigRequest(input *CreateNotebookInstanceLifecycleConfigInput) (req *request.Request, output *CreateNotebookInstanceLifecycleConfigOutput) { + op := &request.Operation{ + Name: opCreateNotebookInstanceLifecycleConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNotebookInstanceLifecycleConfigInput{} + } + + output = &CreateNotebookInstanceLifecycleConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. +// +// Creates a lifecycle configuration that you can associate with a notebook +// instance. A lifecycle configuration is a collection of shell scripts that +// run when you create or start a notebook instance. +// +// Each lifecycle configuration script has a limit of 16384 characters. +// +// The value of the $PATH environment variable that is available to both scripts +// is /sbin:bin:/usr/sbin:/usr/bin. +// +// View CloudWatch Logs for notebook instance lifecycle configurations in log +// group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. +// +// Lifecycle configuration scripts cannot run for longer than 5 minutes. If +// a script runs for longer than 5 minutes, it fails and the notebook instance +// is not created or started. +// +// For information about notebook instance lifestyle configurations, see Step +// 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateNotebookInstanceLifecycleConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateNotebookInstanceLifecycleConfig +func (c *SageMaker) CreateNotebookInstanceLifecycleConfig(input *CreateNotebookInstanceLifecycleConfigInput) (*CreateNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.CreateNotebookInstanceLifecycleConfigRequest(input) + return out, req.Send() +} + +// CreateNotebookInstanceLifecycleConfigWithContext is the same as CreateNotebookInstanceLifecycleConfig with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNotebookInstanceLifecycleConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *CreateNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*CreateNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.CreateNotebookInstanceLifecycleConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreatePresignedNotebookInstanceUrl = "CreatePresignedNotebookInstanceUrl" + +// CreatePresignedNotebookInstanceUrlRequest generates a "aws/request.Request" representing the +// client's request for the CreatePresignedNotebookInstanceUrl operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreatePresignedNotebookInstanceUrl for more information on using the CreatePresignedNotebookInstanceUrl +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreatePresignedNotebookInstanceUrlRequest method. +// req, resp := client.CreatePresignedNotebookInstanceUrlRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl +func (c *SageMaker) CreatePresignedNotebookInstanceUrlRequest(input *CreatePresignedNotebookInstanceUrlInput) (req *request.Request, output *CreatePresignedNotebookInstanceUrlOutput) { + op := &request.Operation{ + Name: opCreatePresignedNotebookInstanceUrl, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreatePresignedNotebookInstanceUrlInput{} + } + + output = &CreatePresignedNotebookInstanceUrlOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreatePresignedNotebookInstanceUrl API operation for Amazon SageMaker Service. +// +// Returns a URL that you can use to connect to the Jupyter server from a notebook +// instance. In the Amazon SageMaker console, when you choose Open next to a +// notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server +// home page from the notebook instance. The console uses this API to get the +// URL and show the page. +// +// You can restrict access to this API and to the URL that it returns to a list +// of IP addresses that you specify. To restrict access, attach an IAM policy +// that denies access to this API unless the call comes from an IP address in +// the specified list to every AWS Identity and Access Management user, group, +// or role used to access the notebook instance. Use the NotIpAddress condition +// operator and the aws:SourceIP condition context key to specify the list of +// IP addresses that you want to have access to the notebook instance. For more +// information, see Limit Access to a Notebook Instance by IP Address (http://docs.aws.amazon.com/sagemaker/latest/dg/howitworks-access-ws.html#nbi-ip-filter). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreatePresignedNotebookInstanceUrl for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreatePresignedNotebookInstanceUrl +func (c *SageMaker) CreatePresignedNotebookInstanceUrl(input *CreatePresignedNotebookInstanceUrlInput) (*CreatePresignedNotebookInstanceUrlOutput, error) { + req, out := c.CreatePresignedNotebookInstanceUrlRequest(input) + return out, req.Send() +} + +// CreatePresignedNotebookInstanceUrlWithContext is the same as CreatePresignedNotebookInstanceUrl with the addition of +// the ability to pass a context and additional request options. +// +// See CreatePresignedNotebookInstanceUrl for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreatePresignedNotebookInstanceUrlWithContext(ctx aws.Context, input *CreatePresignedNotebookInstanceUrlInput, opts ...request.Option) (*CreatePresignedNotebookInstanceUrlOutput, error) { + req, out := c.CreatePresignedNotebookInstanceUrlRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTrainingJob = "CreateTrainingJob" + +// CreateTrainingJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateTrainingJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTrainingJob for more information on using the CreateTrainingJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTrainingJobRequest method. +// req, resp := client.CreateTrainingJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob +func (c *SageMaker) CreateTrainingJobRequest(input *CreateTrainingJobInput) (req *request.Request, output *CreateTrainingJobOutput) { + op := &request.Operation{ + Name: opCreateTrainingJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTrainingJobInput{} + } + + output = &CreateTrainingJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTrainingJob API operation for Amazon SageMaker Service. +// +// Starts a model training job. After training completes, Amazon SageMaker saves +// the resulting model artifacts to an Amazon S3 location that you specify. +// +// If you choose to host your model using Amazon SageMaker hosting services, +// you can use the resulting model artifacts as part of the model. You can also +// use the artifacts in a deep learning service other than Amazon SageMaker, +// provided that you know how to use them for inferences. +// +// In the request body, you provide the following: +// +// * AlgorithmSpecification - Identifies the training algorithm to use. +// +// * HyperParameters - Specify these algorithm-specific parameters to influence +// the quality of the final model. For a list of hyperparameters for each +// training algorithm provided by Amazon SageMaker, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). +// +// +// * InputDataConfig - Describes the training dataset and the Amazon S3 location +// where it is stored. +// +// * OutputDataConfig - Identifies the Amazon S3 location where you want +// Amazon SageMaker to save the results of model training. +// +// * ResourceConfig - Identifies the resources, ML compute instances, and +// ML storage volumes to deploy for model training. In distributed training, +// you specify more than one instance. +// +// * RoleARN - The Amazon Resource Number (ARN) that Amazon SageMaker assumes +// to perform tasks on your behalf during model training. You must grant +// this role the necessary permissions so that Amazon SageMaker can successfully +// complete model training. +// +// * StoppingCondition - Sets a duration for training. Use this parameter +// to cap model training costs. +// +// For more information about Amazon SageMaker, see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html) +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateTrainingJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUse "ResourceInUse" +// Resource being accessed is in use. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTrainingJob +func (c *SageMaker) CreateTrainingJob(input *CreateTrainingJobInput) (*CreateTrainingJobOutput, error) { + req, out := c.CreateTrainingJobRequest(input) + return out, req.Send() +} + +// CreateTrainingJobWithContext is the same as CreateTrainingJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTrainingJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateTrainingJobWithContext(ctx aws.Context, input *CreateTrainingJobInput, opts ...request.Option) (*CreateTrainingJobOutput, error) { + req, out := c.CreateTrainingJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTransformJob = "CreateTransformJob" + +// CreateTransformJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransformJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateTransformJob for more information on using the CreateTransformJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateTransformJobRequest method. +// req, resp := client.CreateTransformJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTransformJob +func (c *SageMaker) CreateTransformJobRequest(input *CreateTransformJobInput) (req *request.Request, output *CreateTransformJobOutput) { + op := &request.Operation{ + Name: opCreateTransformJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransformJobInput{} + } + + output = &CreateTransformJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransformJob API operation for Amazon SageMaker Service. +// +// Starts a transform job. A transform job uses a trained model to get inferences +// on a dataset and saves these results to an Amazon S3 location that you specify. +// +// To perform batch transformations, you create a transform job and use the +// data that you have readily available. +// +// In the request body, you provide the following: +// +// * TransformJobName - Identifies the transform job. The name must be unique +// within an AWS Region in an AWS account. +// +// * ModelName - Identifies the model to use. ModelName must be the name +// of an existing Amazon SageMaker model in the same AWS Region and AWS account. +// For information on creating a model, see CreateModel. +// +// * TransformInput - Describes the dataset to be transformed and the Amazon +// S3 location where it is stored. +// +// * TransformOutput - Identifies the Amazon S3 location where you want Amazon +// SageMaker to save the results from the transform job. +// +// * TransformResources - Identifies the ML compute instances for the transform +// job. +// +// For more information about how batch transformation works Amazon SageMaker, +// see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateTransformJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUse "ResourceInUse" +// Resource being accessed is in use. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateTransformJob +func (c *SageMaker) CreateTransformJob(input *CreateTransformJobInput) (*CreateTransformJobOutput, error) { + req, out := c.CreateTransformJobRequest(input) + return out, req.Send() +} + +// CreateTransformJobWithContext is the same as CreateTransformJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransformJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateTransformJobWithContext(ctx aws.Context, input *CreateTransformJobInput, opts ...request.Option) (*CreateTransformJobOutput, error) { + req, out := c.CreateTransformJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateWorkteam = "CreateWorkteam" + +// CreateWorkteamRequest generates a "aws/request.Request" representing the +// client's request for the CreateWorkteam operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateWorkteam for more information on using the CreateWorkteam +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateWorkteamRequest method. +// req, resp := client.CreateWorkteamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkteam +func (c *SageMaker) CreateWorkteamRequest(input *CreateWorkteamInput) (req *request.Request, output *CreateWorkteamOutput) { + op := &request.Operation{ + Name: opCreateWorkteam, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateWorkteamInput{} + } + + output = &CreateWorkteamOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateWorkteam API operation for Amazon SageMaker Service. +// +// Creates a new work team for labeling your data. A work team is defined by +// one or more Amazon Cognito user pools. You must first create the user pools +// before you can create a work team. +// +// You cannot create more than 25 work teams in an account and region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation CreateWorkteam for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceInUse "ResourceInUse" +// Resource being accessed is in use. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/CreateWorkteam +func (c *SageMaker) CreateWorkteam(input *CreateWorkteamInput) (*CreateWorkteamOutput, error) { + req, out := c.CreateWorkteamRequest(input) + return out, req.Send() +} + +// CreateWorkteamWithContext is the same as CreateWorkteam with the addition of +// the ability to pass a context and additional request options. +// +// See CreateWorkteam for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) CreateWorkteamWithContext(ctx aws.Context, input *CreateWorkteamInput, opts ...request.Option) (*CreateWorkteamOutput, error) { + req, out := c.CreateWorkteamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAlgorithm = "DeleteAlgorithm" + +// DeleteAlgorithmRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAlgorithm operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteAlgorithm for more information on using the DeleteAlgorithm +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteAlgorithmRequest method. +// req, resp := client.DeleteAlgorithmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAlgorithm +func (c *SageMaker) DeleteAlgorithmRequest(input *DeleteAlgorithmInput) (req *request.Request, output *DeleteAlgorithmOutput) { + op := &request.Operation{ + Name: opDeleteAlgorithm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAlgorithmInput{} + } + + output = &DeleteAlgorithmOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteAlgorithm API operation for Amazon SageMaker Service. +// +// Removes the specified algorithm from your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteAlgorithm for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteAlgorithm +func (c *SageMaker) DeleteAlgorithm(input *DeleteAlgorithmInput) (*DeleteAlgorithmOutput, error) { + req, out := c.DeleteAlgorithmRequest(input) + return out, req.Send() +} + +// DeleteAlgorithmWithContext is the same as DeleteAlgorithm with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAlgorithm for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteAlgorithmWithContext(ctx aws.Context, input *DeleteAlgorithmInput, opts ...request.Option) (*DeleteAlgorithmOutput, error) { + req, out := c.DeleteAlgorithmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCodeRepository = "DeleteCodeRepository" + +// DeleteCodeRepositoryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCodeRepository operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCodeRepository for more information on using the DeleteCodeRepository +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteCodeRepositoryRequest method. +// req, resp := client.DeleteCodeRepositoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteCodeRepository +func (c *SageMaker) DeleteCodeRepositoryRequest(input *DeleteCodeRepositoryInput) (req *request.Request, output *DeleteCodeRepositoryOutput) { + op := &request.Operation{ + Name: opDeleteCodeRepository, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteCodeRepositoryInput{} + } + + output = &DeleteCodeRepositoryOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCodeRepository API operation for Amazon SageMaker Service. +// +// Deletes the specified Git repository from your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteCodeRepository for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteCodeRepository +func (c *SageMaker) DeleteCodeRepository(input *DeleteCodeRepositoryInput) (*DeleteCodeRepositoryOutput, error) { + req, out := c.DeleteCodeRepositoryRequest(input) + return out, req.Send() +} + +// DeleteCodeRepositoryWithContext is the same as DeleteCodeRepository with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCodeRepository for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteCodeRepositoryWithContext(ctx aws.Context, input *DeleteCodeRepositoryInput, opts ...request.Option) (*DeleteCodeRepositoryOutput, error) { + req, out := c.DeleteCodeRepositoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEndpoint = "DeleteEndpoint" + +// DeleteEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEndpoint for more information on using the DeleteEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEndpointRequest method. +// req, resp := client.DeleteEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint +func (c *SageMaker) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { + op := &request.Operation{ + Name: opDeleteEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteEndpointInput{} + } + + output = &DeleteEndpointOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteEndpoint API operation for Amazon SageMaker Service. +// +// Deletes an endpoint. Amazon SageMaker frees up all of the resources that +// were deployed when the endpoint was created. +// +// Amazon SageMaker retires any custom KMS key grants associated with the endpoint, +// meaning you don't need to use the RevokeGrant (http://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html) +// API call. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpoint +func (c *SageMaker) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { + req, out := c.DeleteEndpointRequest(input) + return out, req.Send() +} + +// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { + req, out := c.DeleteEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEndpointConfig = "DeleteEndpointConfig" + +// DeleteEndpointConfigRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEndpointConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteEndpointConfig for more information on using the DeleteEndpointConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteEndpointConfigRequest method. +// req, resp := client.DeleteEndpointConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig +func (c *SageMaker) DeleteEndpointConfigRequest(input *DeleteEndpointConfigInput) (req *request.Request, output *DeleteEndpointConfigOutput) { + op := &request.Operation{ + Name: opDeleteEndpointConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteEndpointConfigInput{} + } + + output = &DeleteEndpointConfigOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteEndpointConfig API operation for Amazon SageMaker Service. +// +// Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only +// the specified configuration. It does not delete endpoints created using the +// configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteEndpointConfig for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteEndpointConfig +func (c *SageMaker) DeleteEndpointConfig(input *DeleteEndpointConfigInput) (*DeleteEndpointConfigOutput, error) { + req, out := c.DeleteEndpointConfigRequest(input) + return out, req.Send() +} + +// DeleteEndpointConfigWithContext is the same as DeleteEndpointConfig with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEndpointConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteEndpointConfigWithContext(ctx aws.Context, input *DeleteEndpointConfigInput, opts ...request.Option) (*DeleteEndpointConfigOutput, error) { + req, out := c.DeleteEndpointConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteModel = "DeleteModel" + +// DeleteModelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteModel for more information on using the DeleteModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteModelRequest method. +// req, resp := client.DeleteModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel +func (c *SageMaker) DeleteModelRequest(input *DeleteModelInput) (req *request.Request, output *DeleteModelOutput) { + op := &request.Operation{ + Name: opDeleteModel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteModelInput{} + } + + output = &DeleteModelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteModel API operation for Amazon SageMaker Service. +// +// Deletes a model. The DeleteModel API deletes only the model entry that was +// created in Amazon SageMaker when you called the CreateModel (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html) +// API. It does not delete model artifacts, inference code, or the IAM role +// that you specified when creating the model. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteModel for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModel +func (c *SageMaker) DeleteModel(input *DeleteModelInput) (*DeleteModelOutput, error) { + req, out := c.DeleteModelRequest(input) + return out, req.Send() +} + +// DeleteModelWithContext is the same as DeleteModel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteModelWithContext(ctx aws.Context, input *DeleteModelInput, opts ...request.Option) (*DeleteModelOutput, error) { + req, out := c.DeleteModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteModelPackage = "DeleteModelPackage" + +// DeleteModelPackageRequest generates a "aws/request.Request" representing the +// client's request for the DeleteModelPackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteModelPackage for more information on using the DeleteModelPackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteModelPackageRequest method. +// req, resp := client.DeleteModelPackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackage +func (c *SageMaker) DeleteModelPackageRequest(input *DeleteModelPackageInput) (req *request.Request, output *DeleteModelPackageOutput) { + op := &request.Operation{ + Name: opDeleteModelPackage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteModelPackageInput{} + } + + output = &DeleteModelPackageOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteModelPackage API operation for Amazon SageMaker Service. +// +// Deletes a model package. +// +// A model package is used to create Amazon SageMaker models or list on AWS +// Marketplace. Buyers can subscribe to model packages listed on AWS Marketplace +// to create models in Amazon SageMaker. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteModelPackage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteModelPackage +func (c *SageMaker) DeleteModelPackage(input *DeleteModelPackageInput) (*DeleteModelPackageOutput, error) { + req, out := c.DeleteModelPackageRequest(input) + return out, req.Send() +} + +// DeleteModelPackageWithContext is the same as DeleteModelPackage with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteModelPackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteModelPackageWithContext(ctx aws.Context, input *DeleteModelPackageInput, opts ...request.Option) (*DeleteModelPackageOutput, error) { + req, out := c.DeleteModelPackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNotebookInstance = "DeleteNotebookInstance" + +// DeleteNotebookInstanceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNotebookInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteNotebookInstance for more information on using the DeleteNotebookInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteNotebookInstanceRequest method. +// req, resp := client.DeleteNotebookInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance +func (c *SageMaker) DeleteNotebookInstanceRequest(input *DeleteNotebookInstanceInput) (req *request.Request, output *DeleteNotebookInstanceOutput) { + op := &request.Operation{ + Name: opDeleteNotebookInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNotebookInstanceInput{} + } + + output = &DeleteNotebookInstanceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteNotebookInstance API operation for Amazon SageMaker Service. +// +// Deletes an Amazon SageMaker notebook instance. Before you can delete a notebook +// instance, you must call the StopNotebookInstance API. +// +// When you delete a notebook instance, you lose all of your data. Amazon SageMaker +// removes the ML compute instance, and deletes the ML storage volume and the +// network interface associated with the notebook instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteNotebookInstance for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstance +func (c *SageMaker) DeleteNotebookInstance(input *DeleteNotebookInstanceInput) (*DeleteNotebookInstanceOutput, error) { + req, out := c.DeleteNotebookInstanceRequest(input) + return out, req.Send() +} + +// DeleteNotebookInstanceWithContext is the same as DeleteNotebookInstance with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNotebookInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteNotebookInstanceWithContext(ctx aws.Context, input *DeleteNotebookInstanceInput, opts ...request.Option) (*DeleteNotebookInstanceOutput, error) { + req, out := c.DeleteNotebookInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNotebookInstanceLifecycleConfig = "DeleteNotebookInstanceLifecycleConfig" + +// DeleteNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNotebookInstanceLifecycleConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteNotebookInstanceLifecycleConfig for more information on using the DeleteNotebookInstanceLifecycleConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteNotebookInstanceLifecycleConfigRequest method. +// req, resp := client.DeleteNotebookInstanceLifecycleConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstanceLifecycleConfig +func (c *SageMaker) DeleteNotebookInstanceLifecycleConfigRequest(input *DeleteNotebookInstanceLifecycleConfigInput) (req *request.Request, output *DeleteNotebookInstanceLifecycleConfigOutput) { + op := &request.Operation{ + Name: opDeleteNotebookInstanceLifecycleConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNotebookInstanceLifecycleConfigInput{} + } + + output = &DeleteNotebookInstanceLifecycleConfigOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. +// +// Deletes a notebook instance lifecycle configuration. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteNotebookInstanceLifecycleConfig for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteNotebookInstanceLifecycleConfig +func (c *SageMaker) DeleteNotebookInstanceLifecycleConfig(input *DeleteNotebookInstanceLifecycleConfigInput) (*DeleteNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.DeleteNotebookInstanceLifecycleConfigRequest(input) + return out, req.Send() +} + +// DeleteNotebookInstanceLifecycleConfigWithContext is the same as DeleteNotebookInstanceLifecycleConfig with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNotebookInstanceLifecycleConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *DeleteNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*DeleteNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.DeleteNotebookInstanceLifecycleConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTags = "DeleteTags" + +// DeleteTagsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteTags for more information on using the DeleteTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteTagsRequest method. +// req, resp := client.DeleteTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags +func (c *SageMaker) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { + op := &request.Operation{ + Name: opDeleteTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTagsInput{} + } + + output = &DeleteTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteTags API operation for Amazon SageMaker Service. +// +// Deletes the specified tags from an Amazon SageMaker resource. +// +// To list a resource's tags, use the ListTags API. +// +// When you call this API to delete tags from a hyperparameter tuning job, the +// deleted tags are not removed from training jobs that the hyperparameter tuning +// job launched before you called this API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteTags for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTags +func (c *SageMaker) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { + req, out := c.DeleteTagsRequest(input) + return out, req.Send() +} + +// DeleteTagsWithContext is the same as DeleteTags with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { + req, out := c.DeleteTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteWorkteam = "DeleteWorkteam" + +// DeleteWorkteamRequest generates a "aws/request.Request" representing the +// client's request for the DeleteWorkteam operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteWorkteam for more information on using the DeleteWorkteam +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteWorkteamRequest method. +// req, resp := client.DeleteWorkteamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkteam +func (c *SageMaker) DeleteWorkteamRequest(input *DeleteWorkteamInput) (req *request.Request, output *DeleteWorkteamOutput) { + op := &request.Operation{ + Name: opDeleteWorkteam, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteWorkteamInput{} + } + + output = &DeleteWorkteamOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteWorkteam API operation for Amazon SageMaker Service. +// +// Deletes an existing work team. This operation can't be undone. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DeleteWorkteam for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkteam +func (c *SageMaker) DeleteWorkteam(input *DeleteWorkteamInput) (*DeleteWorkteamOutput, error) { + req, out := c.DeleteWorkteamRequest(input) + return out, req.Send() +} + +// DeleteWorkteamWithContext is the same as DeleteWorkteam with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteWorkteam for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DeleteWorkteamWithContext(ctx aws.Context, input *DeleteWorkteamInput, opts ...request.Option) (*DeleteWorkteamOutput, error) { + req, out := c.DeleteWorkteamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAlgorithm = "DescribeAlgorithm" + +// DescribeAlgorithmRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAlgorithm operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAlgorithm for more information on using the DescribeAlgorithm +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAlgorithmRequest method. +// req, resp := client.DescribeAlgorithmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAlgorithm +func (c *SageMaker) DescribeAlgorithmRequest(input *DescribeAlgorithmInput) (req *request.Request, output *DescribeAlgorithmOutput) { + op := &request.Operation{ + Name: opDescribeAlgorithm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAlgorithmInput{} + } + + output = &DescribeAlgorithmOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAlgorithm API operation for Amazon SageMaker Service. +// +// Returns a description of the specified algorithm that is in your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeAlgorithm for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeAlgorithm +func (c *SageMaker) DescribeAlgorithm(input *DescribeAlgorithmInput) (*DescribeAlgorithmOutput, error) { + req, out := c.DescribeAlgorithmRequest(input) + return out, req.Send() +} + +// DescribeAlgorithmWithContext is the same as DescribeAlgorithm with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAlgorithm for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeAlgorithmWithContext(ctx aws.Context, input *DescribeAlgorithmInput, opts ...request.Option) (*DescribeAlgorithmOutput, error) { + req, out := c.DescribeAlgorithmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCodeRepository = "DescribeCodeRepository" + +// DescribeCodeRepositoryRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCodeRepository operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCodeRepository for more information on using the DescribeCodeRepository +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCodeRepositoryRequest method. +// req, resp := client.DescribeCodeRepositoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCodeRepository +func (c *SageMaker) DescribeCodeRepositoryRequest(input *DescribeCodeRepositoryInput) (req *request.Request, output *DescribeCodeRepositoryOutput) { + op := &request.Operation{ + Name: opDescribeCodeRepository, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCodeRepositoryInput{} + } + + output = &DescribeCodeRepositoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCodeRepository API operation for Amazon SageMaker Service. +// +// Gets details about the specified Git repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeCodeRepository for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCodeRepository +func (c *SageMaker) DescribeCodeRepository(input *DescribeCodeRepositoryInput) (*DescribeCodeRepositoryOutput, error) { + req, out := c.DescribeCodeRepositoryRequest(input) + return out, req.Send() +} + +// DescribeCodeRepositoryWithContext is the same as DescribeCodeRepository with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCodeRepository for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeCodeRepositoryWithContext(ctx aws.Context, input *DescribeCodeRepositoryInput, opts ...request.Option) (*DescribeCodeRepositoryOutput, error) { + req, out := c.DescribeCodeRepositoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCompilationJob = "DescribeCompilationJob" + +// DescribeCompilationJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCompilationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCompilationJob for more information on using the DescribeCompilationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCompilationJobRequest method. +// req, resp := client.DescribeCompilationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCompilationJob +func (c *SageMaker) DescribeCompilationJobRequest(input *DescribeCompilationJobInput) (req *request.Request, output *DescribeCompilationJobOutput) { + op := &request.Operation{ + Name: opDescribeCompilationJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCompilationJobInput{} + } + + output = &DescribeCompilationJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCompilationJob API operation for Amazon SageMaker Service. +// +// Returns information about a model compilation job. +// +// To create a model compilation job, use CreateCompilationJob. To get information +// about multiple model compilation jobs, use ListCompilationJobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeCompilationJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeCompilationJob +func (c *SageMaker) DescribeCompilationJob(input *DescribeCompilationJobInput) (*DescribeCompilationJobOutput, error) { + req, out := c.DescribeCompilationJobRequest(input) + return out, req.Send() +} + +// DescribeCompilationJobWithContext is the same as DescribeCompilationJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCompilationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeCompilationJobWithContext(ctx aws.Context, input *DescribeCompilationJobInput, opts ...request.Option) (*DescribeCompilationJobOutput, error) { + req, out := c.DescribeCompilationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEndpoint = "DescribeEndpoint" + +// DescribeEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEndpoint for more information on using the DescribeEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEndpointRequest method. +// req, resp := client.DescribeEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint +func (c *SageMaker) DescribeEndpointRequest(input *DescribeEndpointInput) (req *request.Request, output *DescribeEndpointOutput) { + op := &request.Operation{ + Name: opDescribeEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEndpointInput{} + } + + output = &DescribeEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpoint API operation for Amazon SageMaker Service. +// +// Returns the description of an endpoint. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpoint +func (c *SageMaker) DescribeEndpoint(input *DescribeEndpointInput) (*DescribeEndpointOutput, error) { + req, out := c.DescribeEndpointRequest(input) + return out, req.Send() +} + +// DescribeEndpointWithContext is the same as DescribeEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeEndpointWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.Option) (*DescribeEndpointOutput, error) { + req, out := c.DescribeEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeEndpointConfig = "DescribeEndpointConfig" + +// DescribeEndpointConfigRequest generates a "aws/request.Request" representing the +// client's request for the DescribeEndpointConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeEndpointConfig for more information on using the DescribeEndpointConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeEndpointConfigRequest method. +// req, resp := client.DescribeEndpointConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig +func (c *SageMaker) DescribeEndpointConfigRequest(input *DescribeEndpointConfigInput) (req *request.Request, output *DescribeEndpointConfigOutput) { + op := &request.Operation{ + Name: opDescribeEndpointConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeEndpointConfigInput{} + } + + output = &DescribeEndpointConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeEndpointConfig API operation for Amazon SageMaker Service. +// +// Returns the description of an endpoint configuration created using the CreateEndpointConfig +// API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeEndpointConfig for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeEndpointConfig +func (c *SageMaker) DescribeEndpointConfig(input *DescribeEndpointConfigInput) (*DescribeEndpointConfigOutput, error) { + req, out := c.DescribeEndpointConfigRequest(input) + return out, req.Send() +} + +// DescribeEndpointConfigWithContext is the same as DescribeEndpointConfig with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeEndpointConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeEndpointConfigWithContext(ctx aws.Context, input *DescribeEndpointConfigInput, opts ...request.Option) (*DescribeEndpointConfigOutput, error) { + req, out := c.DescribeEndpointConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeHyperParameterTuningJob = "DescribeHyperParameterTuningJob" + +// DescribeHyperParameterTuningJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeHyperParameterTuningJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeHyperParameterTuningJob for more information on using the DescribeHyperParameterTuningJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeHyperParameterTuningJobRequest method. +// req, resp := client.DescribeHyperParameterTuningJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHyperParameterTuningJob +func (c *SageMaker) DescribeHyperParameterTuningJobRequest(input *DescribeHyperParameterTuningJobInput) (req *request.Request, output *DescribeHyperParameterTuningJobOutput) { + op := &request.Operation{ + Name: opDescribeHyperParameterTuningJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeHyperParameterTuningJobInput{} + } + + output = &DescribeHyperParameterTuningJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeHyperParameterTuningJob API operation for Amazon SageMaker Service. +// +// Gets a description of a hyperparameter tuning job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeHyperParameterTuningJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeHyperParameterTuningJob +func (c *SageMaker) DescribeHyperParameterTuningJob(input *DescribeHyperParameterTuningJobInput) (*DescribeHyperParameterTuningJobOutput, error) { + req, out := c.DescribeHyperParameterTuningJobRequest(input) + return out, req.Send() +} + +// DescribeHyperParameterTuningJobWithContext is the same as DescribeHyperParameterTuningJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeHyperParameterTuningJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeHyperParameterTuningJobWithContext(ctx aws.Context, input *DescribeHyperParameterTuningJobInput, opts ...request.Option) (*DescribeHyperParameterTuningJobOutput, error) { + req, out := c.DescribeHyperParameterTuningJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeLabelingJob = "DescribeLabelingJob" + +// DescribeLabelingJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeLabelingJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeLabelingJob for more information on using the DescribeLabelingJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeLabelingJobRequest method. +// req, resp := client.DescribeLabelingJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeLabelingJob +func (c *SageMaker) DescribeLabelingJobRequest(input *DescribeLabelingJobInput) (req *request.Request, output *DescribeLabelingJobOutput) { + op := &request.Operation{ + Name: opDescribeLabelingJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeLabelingJobInput{} + } + + output = &DescribeLabelingJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeLabelingJob API operation for Amazon SageMaker Service. +// +// Gets information about a labeling job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeLabelingJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeLabelingJob +func (c *SageMaker) DescribeLabelingJob(input *DescribeLabelingJobInput) (*DescribeLabelingJobOutput, error) { + req, out := c.DescribeLabelingJobRequest(input) + return out, req.Send() +} + +// DescribeLabelingJobWithContext is the same as DescribeLabelingJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeLabelingJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeLabelingJobWithContext(ctx aws.Context, input *DescribeLabelingJobInput, opts ...request.Option) (*DescribeLabelingJobOutput, error) { + req, out := c.DescribeLabelingJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeModel = "DescribeModel" + +// DescribeModelRequest generates a "aws/request.Request" representing the +// client's request for the DescribeModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeModel for more information on using the DescribeModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeModelRequest method. +// req, resp := client.DescribeModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel +func (c *SageMaker) DescribeModelRequest(input *DescribeModelInput) (req *request.Request, output *DescribeModelOutput) { + op := &request.Operation{ + Name: opDescribeModel, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeModelInput{} + } + + output = &DescribeModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeModel API operation for Amazon SageMaker Service. +// +// Describes a model that you created using the CreateModel API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeModel for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModel +func (c *SageMaker) DescribeModel(input *DescribeModelInput) (*DescribeModelOutput, error) { + req, out := c.DescribeModelRequest(input) + return out, req.Send() +} + +// DescribeModelWithContext is the same as DescribeModel with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeModelWithContext(ctx aws.Context, input *DescribeModelInput, opts ...request.Option) (*DescribeModelOutput, error) { + req, out := c.DescribeModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeModelPackage = "DescribeModelPackage" + +// DescribeModelPackageRequest generates a "aws/request.Request" representing the +// client's request for the DescribeModelPackage operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeModelPackage for more information on using the DescribeModelPackage +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeModelPackageRequest method. +// req, resp := client.DescribeModelPackageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackage +func (c *SageMaker) DescribeModelPackageRequest(input *DescribeModelPackageInput) (req *request.Request, output *DescribeModelPackageOutput) { + op := &request.Operation{ + Name: opDescribeModelPackage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeModelPackageInput{} + } + + output = &DescribeModelPackageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeModelPackage API operation for Amazon SageMaker Service. +// +// Returns a description of the specified model package, which is used to create +// Amazon SageMaker models or list them on AWS Marketplace. +// +// To create models in Amazon SageMaker, buyers can subscribe to model packages +// listed on AWS Marketplace. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeModelPackage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeModelPackage +func (c *SageMaker) DescribeModelPackage(input *DescribeModelPackageInput) (*DescribeModelPackageOutput, error) { + req, out := c.DescribeModelPackageRequest(input) + return out, req.Send() +} + +// DescribeModelPackageWithContext is the same as DescribeModelPackage with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeModelPackage for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeModelPackageWithContext(ctx aws.Context, input *DescribeModelPackageInput, opts ...request.Option) (*DescribeModelPackageOutput, error) { + req, out := c.DescribeModelPackageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeNotebookInstance = "DescribeNotebookInstance" + +// DescribeNotebookInstanceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNotebookInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeNotebookInstance for more information on using the DescribeNotebookInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeNotebookInstanceRequest method. +// req, resp := client.DescribeNotebookInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance +func (c *SageMaker) DescribeNotebookInstanceRequest(input *DescribeNotebookInstanceInput) (req *request.Request, output *DescribeNotebookInstanceOutput) { + op := &request.Operation{ + Name: opDescribeNotebookInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeNotebookInstanceInput{} + } + + output = &DescribeNotebookInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNotebookInstance API operation for Amazon SageMaker Service. +// +// Returns information about a notebook instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeNotebookInstance for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstance +func (c *SageMaker) DescribeNotebookInstance(input *DescribeNotebookInstanceInput) (*DescribeNotebookInstanceOutput, error) { + req, out := c.DescribeNotebookInstanceRequest(input) + return out, req.Send() +} + +// DescribeNotebookInstanceWithContext is the same as DescribeNotebookInstance with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNotebookInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeNotebookInstanceWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.Option) (*DescribeNotebookInstanceOutput, error) { + req, out := c.DescribeNotebookInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeNotebookInstanceLifecycleConfig = "DescribeNotebookInstanceLifecycleConfig" + +// DescribeNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNotebookInstanceLifecycleConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeNotebookInstanceLifecycleConfig for more information on using the DescribeNotebookInstanceLifecycleConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeNotebookInstanceLifecycleConfigRequest method. +// req, resp := client.DescribeNotebookInstanceLifecycleConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstanceLifecycleConfig +func (c *SageMaker) DescribeNotebookInstanceLifecycleConfigRequest(input *DescribeNotebookInstanceLifecycleConfigInput) (req *request.Request, output *DescribeNotebookInstanceLifecycleConfigOutput) { + op := &request.Operation{ + Name: opDescribeNotebookInstanceLifecycleConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeNotebookInstanceLifecycleConfigInput{} + } + + output = &DescribeNotebookInstanceLifecycleConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. +// +// Returns a description of a notebook instance lifecycle configuration. +// +// For information about notebook instance lifestyle configurations, see Step +// 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeNotebookInstanceLifecycleConfig for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeNotebookInstanceLifecycleConfig +func (c *SageMaker) DescribeNotebookInstanceLifecycleConfig(input *DescribeNotebookInstanceLifecycleConfigInput) (*DescribeNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.DescribeNotebookInstanceLifecycleConfigRequest(input) + return out, req.Send() +} + +// DescribeNotebookInstanceLifecycleConfigWithContext is the same as DescribeNotebookInstanceLifecycleConfig with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNotebookInstanceLifecycleConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *DescribeNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*DescribeNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.DescribeNotebookInstanceLifecycleConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeSubscribedWorkteam = "DescribeSubscribedWorkteam" + +// DescribeSubscribedWorkteamRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSubscribedWorkteam operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeSubscribedWorkteam for more information on using the DescribeSubscribedWorkteam +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeSubscribedWorkteamRequest method. +// req, resp := client.DescribeSubscribedWorkteamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeSubscribedWorkteam +func (c *SageMaker) DescribeSubscribedWorkteamRequest(input *DescribeSubscribedWorkteamInput) (req *request.Request, output *DescribeSubscribedWorkteamOutput) { + op := &request.Operation{ + Name: opDescribeSubscribedWorkteam, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSubscribedWorkteamInput{} + } + + output = &DescribeSubscribedWorkteamOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSubscribedWorkteam API operation for Amazon SageMaker Service. +// +// Gets information about a work team provided by a vendor. It returns details +// about the subscription with a vendor in the AWS Marketplace. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeSubscribedWorkteam for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeSubscribedWorkteam +func (c *SageMaker) DescribeSubscribedWorkteam(input *DescribeSubscribedWorkteamInput) (*DescribeSubscribedWorkteamOutput, error) { + req, out := c.DescribeSubscribedWorkteamRequest(input) + return out, req.Send() +} + +// DescribeSubscribedWorkteamWithContext is the same as DescribeSubscribedWorkteam with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSubscribedWorkteam for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeSubscribedWorkteamWithContext(ctx aws.Context, input *DescribeSubscribedWorkteamInput, opts ...request.Option) (*DescribeSubscribedWorkteamOutput, error) { + req, out := c.DescribeSubscribedWorkteamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTrainingJob = "DescribeTrainingJob" + +// DescribeTrainingJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTrainingJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTrainingJob for more information on using the DescribeTrainingJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTrainingJobRequest method. +// req, resp := client.DescribeTrainingJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob +func (c *SageMaker) DescribeTrainingJobRequest(input *DescribeTrainingJobInput) (req *request.Request, output *DescribeTrainingJobOutput) { + op := &request.Operation{ + Name: opDescribeTrainingJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTrainingJobInput{} + } + + output = &DescribeTrainingJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTrainingJob API operation for Amazon SageMaker Service. +// +// Returns information about a training job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeTrainingJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTrainingJob +func (c *SageMaker) DescribeTrainingJob(input *DescribeTrainingJobInput) (*DescribeTrainingJobOutput, error) { + req, out := c.DescribeTrainingJobRequest(input) + return out, req.Send() +} + +// DescribeTrainingJobWithContext is the same as DescribeTrainingJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTrainingJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeTrainingJobWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.Option) (*DescribeTrainingJobOutput, error) { + req, out := c.DescribeTrainingJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTransformJob = "DescribeTransformJob" + +// DescribeTransformJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransformJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTransformJob for more information on using the DescribeTransformJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTransformJobRequest method. +// req, resp := client.DescribeTransformJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTransformJob +func (c *SageMaker) DescribeTransformJobRequest(input *DescribeTransformJobInput) (req *request.Request, output *DescribeTransformJobOutput) { + op := &request.Operation{ + Name: opDescribeTransformJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTransformJobInput{} + } + + output = &DescribeTransformJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransformJob API operation for Amazon SageMaker Service. +// +// Returns information about a transform job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeTransformJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeTransformJob +func (c *SageMaker) DescribeTransformJob(input *DescribeTransformJobInput) (*DescribeTransformJobOutput, error) { + req, out := c.DescribeTransformJobRequest(input) + return out, req.Send() +} + +// DescribeTransformJobWithContext is the same as DescribeTransformJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransformJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeTransformJobWithContext(ctx aws.Context, input *DescribeTransformJobInput, opts ...request.Option) (*DescribeTransformJobOutput, error) { + req, out := c.DescribeTransformJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeWorkteam = "DescribeWorkteam" + +// DescribeWorkteamRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkteam operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeWorkteam for more information on using the DescribeWorkteam +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeWorkteamRequest method. +// req, resp := client.DescribeWorkteamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkteam +func (c *SageMaker) DescribeWorkteamRequest(input *DescribeWorkteamInput) (req *request.Request, output *DescribeWorkteamOutput) { + op := &request.Operation{ + Name: opDescribeWorkteam, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkteamInput{} + } + + output = &DescribeWorkteamOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkteam API operation for Amazon SageMaker Service. +// +// Gets information about a specific work team. You can see information such +// as the create date, the last updated date, membership information, and the +// work team's Amazon Resource Name (ARN). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation DescribeWorkteam for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DescribeWorkteam +func (c *SageMaker) DescribeWorkteam(input *DescribeWorkteamInput) (*DescribeWorkteamOutput, error) { + req, out := c.DescribeWorkteamRequest(input) + return out, req.Send() +} + +// DescribeWorkteamWithContext is the same as DescribeWorkteam with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkteam for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) DescribeWorkteamWithContext(ctx aws.Context, input *DescribeWorkteamInput, opts ...request.Option) (*DescribeWorkteamOutput, error) { + req, out := c.DescribeWorkteamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSearchSuggestions = "GetSearchSuggestions" + +// GetSearchSuggestionsRequest generates a "aws/request.Request" representing the +// client's request for the GetSearchSuggestions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetSearchSuggestions for more information on using the GetSearchSuggestions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetSearchSuggestionsRequest method. +// req, resp := client.GetSearchSuggestionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSearchSuggestions +func (c *SageMaker) GetSearchSuggestionsRequest(input *GetSearchSuggestionsInput) (req *request.Request, output *GetSearchSuggestionsOutput) { + op := &request.Operation{ + Name: opGetSearchSuggestions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSearchSuggestionsInput{} + } + + output = &GetSearchSuggestionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSearchSuggestions API operation for Amazon SageMaker Service. +// +// An auto-complete API for the search functionality in the Amazon SageMaker +// console. It returns suggestions of possible matches for the property name +// to use in Search queries. Provides suggestions for HyperParameters, Tags, +// and Metrics. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation GetSearchSuggestions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/GetSearchSuggestions +func (c *SageMaker) GetSearchSuggestions(input *GetSearchSuggestionsInput) (*GetSearchSuggestionsOutput, error) { + req, out := c.GetSearchSuggestionsRequest(input) + return out, req.Send() +} + +// GetSearchSuggestionsWithContext is the same as GetSearchSuggestions with the addition of +// the ability to pass a context and additional request options. +// +// See GetSearchSuggestions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) GetSearchSuggestionsWithContext(ctx aws.Context, input *GetSearchSuggestionsInput, opts ...request.Option) (*GetSearchSuggestionsOutput, error) { + req, out := c.GetSearchSuggestionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAlgorithms = "ListAlgorithms" + +// ListAlgorithmsRequest generates a "aws/request.Request" representing the +// client's request for the ListAlgorithms operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListAlgorithms for more information on using the ListAlgorithms +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListAlgorithmsRequest method. +// req, resp := client.ListAlgorithmsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAlgorithms +func (c *SageMaker) ListAlgorithmsRequest(input *ListAlgorithmsInput) (req *request.Request, output *ListAlgorithmsOutput) { + op := &request.Operation{ + Name: opListAlgorithms, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAlgorithmsInput{} + } + + output = &ListAlgorithmsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAlgorithms API operation for Amazon SageMaker Service. +// +// Lists the machine learning algorithms that have been created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListAlgorithms for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListAlgorithms +func (c *SageMaker) ListAlgorithms(input *ListAlgorithmsInput) (*ListAlgorithmsOutput, error) { + req, out := c.ListAlgorithmsRequest(input) + return out, req.Send() +} + +// ListAlgorithmsWithContext is the same as ListAlgorithms with the addition of +// the ability to pass a context and additional request options. +// +// See ListAlgorithms for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListAlgorithmsWithContext(ctx aws.Context, input *ListAlgorithmsInput, opts ...request.Option) (*ListAlgorithmsOutput, error) { + req, out := c.ListAlgorithmsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCodeRepositories = "ListCodeRepositories" + +// ListCodeRepositoriesRequest generates a "aws/request.Request" representing the +// client's request for the ListCodeRepositories operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListCodeRepositories for more information on using the ListCodeRepositories +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListCodeRepositoriesRequest method. +// req, resp := client.ListCodeRepositoriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCodeRepositories +func (c *SageMaker) ListCodeRepositoriesRequest(input *ListCodeRepositoriesInput) (req *request.Request, output *ListCodeRepositoriesOutput) { + op := &request.Operation{ + Name: opListCodeRepositories, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListCodeRepositoriesInput{} + } + + output = &ListCodeRepositoriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCodeRepositories API operation for Amazon SageMaker Service. +// +// Gets a list of the Git repositories in your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListCodeRepositories for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCodeRepositories +func (c *SageMaker) ListCodeRepositories(input *ListCodeRepositoriesInput) (*ListCodeRepositoriesOutput, error) { + req, out := c.ListCodeRepositoriesRequest(input) + return out, req.Send() +} + +// ListCodeRepositoriesWithContext is the same as ListCodeRepositories with the addition of +// the ability to pass a context and additional request options. +// +// See ListCodeRepositories for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListCodeRepositoriesWithContext(ctx aws.Context, input *ListCodeRepositoriesInput, opts ...request.Option) (*ListCodeRepositoriesOutput, error) { + req, out := c.ListCodeRepositoriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCompilationJobs = "ListCompilationJobs" + +// ListCompilationJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListCompilationJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListCompilationJobs for more information on using the ListCompilationJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListCompilationJobsRequest method. +// req, resp := client.ListCompilationJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCompilationJobs +func (c *SageMaker) ListCompilationJobsRequest(input *ListCompilationJobsInput) (req *request.Request, output *ListCompilationJobsOutput) { + op := &request.Operation{ + Name: opListCompilationJobs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListCompilationJobsInput{} + } + + output = &ListCompilationJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCompilationJobs API operation for Amazon SageMaker Service. +// +// Lists model compilation jobs that satisfy various filters. +// +// To create a model compilation job, use CreateCompilationJob. To get information +// about a particular model compilation job you have created, use DescribeCompilationJob. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListCompilationJobs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListCompilationJobs +func (c *SageMaker) ListCompilationJobs(input *ListCompilationJobsInput) (*ListCompilationJobsOutput, error) { + req, out := c.ListCompilationJobsRequest(input) + return out, req.Send() +} + +// ListCompilationJobsWithContext is the same as ListCompilationJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListCompilationJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListCompilationJobsWithContext(ctx aws.Context, input *ListCompilationJobsInput, opts ...request.Option) (*ListCompilationJobsOutput, error) { + req, out := c.ListCompilationJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListCompilationJobsPages iterates over the pages of a ListCompilationJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListCompilationJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListCompilationJobs operation. +// pageNum := 0 +// err := client.ListCompilationJobsPages(params, +// func(page *ListCompilationJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListCompilationJobsPages(input *ListCompilationJobsInput, fn func(*ListCompilationJobsOutput, bool) bool) error { + return c.ListCompilationJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListCompilationJobsPagesWithContext same as ListCompilationJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListCompilationJobsPagesWithContext(ctx aws.Context, input *ListCompilationJobsInput, fn func(*ListCompilationJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListCompilationJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListCompilationJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListCompilationJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListEndpointConfigs = "ListEndpointConfigs" + +// ListEndpointConfigsRequest generates a "aws/request.Request" representing the +// client's request for the ListEndpointConfigs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEndpointConfigs for more information on using the ListEndpointConfigs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEndpointConfigsRequest method. +// req, resp := client.ListEndpointConfigsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs +func (c *SageMaker) ListEndpointConfigsRequest(input *ListEndpointConfigsInput) (req *request.Request, output *ListEndpointConfigsOutput) { + op := &request.Operation{ + Name: opListEndpointConfigs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListEndpointConfigsInput{} + } + + output = &ListEndpointConfigsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEndpointConfigs API operation for Amazon SageMaker Service. +// +// Lists endpoint configurations. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListEndpointConfigs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpointConfigs +func (c *SageMaker) ListEndpointConfigs(input *ListEndpointConfigsInput) (*ListEndpointConfigsOutput, error) { + req, out := c.ListEndpointConfigsRequest(input) + return out, req.Send() +} + +// ListEndpointConfigsWithContext is the same as ListEndpointConfigs with the addition of +// the ability to pass a context and additional request options. +// +// See ListEndpointConfigs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListEndpointConfigsWithContext(ctx aws.Context, input *ListEndpointConfigsInput, opts ...request.Option) (*ListEndpointConfigsOutput, error) { + req, out := c.ListEndpointConfigsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListEndpointConfigsPages iterates over the pages of a ListEndpointConfigs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListEndpointConfigs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListEndpointConfigs operation. +// pageNum := 0 +// err := client.ListEndpointConfigsPages(params, +// func(page *ListEndpointConfigsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListEndpointConfigsPages(input *ListEndpointConfigsInput, fn func(*ListEndpointConfigsOutput, bool) bool) error { + return c.ListEndpointConfigsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListEndpointConfigsPagesWithContext same as ListEndpointConfigsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListEndpointConfigsPagesWithContext(ctx aws.Context, input *ListEndpointConfigsInput, fn func(*ListEndpointConfigsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListEndpointConfigsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListEndpointConfigsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListEndpointConfigsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListEndpoints = "ListEndpoints" + +// ListEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the ListEndpoints operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListEndpoints for more information on using the ListEndpoints +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListEndpointsRequest method. +// req, resp := client.ListEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints +func (c *SageMaker) ListEndpointsRequest(input *ListEndpointsInput) (req *request.Request, output *ListEndpointsOutput) { + op := &request.Operation{ + Name: opListEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListEndpointsInput{} + } + + output = &ListEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListEndpoints API operation for Amazon SageMaker Service. +// +// Lists endpoints. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListEndpoints for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListEndpoints +func (c *SageMaker) ListEndpoints(input *ListEndpointsInput) (*ListEndpointsOutput, error) { + req, out := c.ListEndpointsRequest(input) + return out, req.Send() +} + +// ListEndpointsWithContext is the same as ListEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See ListEndpoints for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListEndpointsWithContext(ctx aws.Context, input *ListEndpointsInput, opts ...request.Option) (*ListEndpointsOutput, error) { + req, out := c.ListEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListEndpointsPages iterates over the pages of a ListEndpoints operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListEndpoints method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListEndpoints operation. +// pageNum := 0 +// err := client.ListEndpointsPages(params, +// func(page *ListEndpointsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListEndpointsPages(input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool) error { + return c.ListEndpointsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListEndpointsPagesWithContext same as ListEndpointsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListEndpointsPagesWithContext(ctx aws.Context, input *ListEndpointsInput, fn func(*ListEndpointsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListEndpointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListEndpointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListEndpointsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListHyperParameterTuningJobs = "ListHyperParameterTuningJobs" + +// ListHyperParameterTuningJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListHyperParameterTuningJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListHyperParameterTuningJobs for more information on using the ListHyperParameterTuningJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListHyperParameterTuningJobsRequest method. +// req, resp := client.ListHyperParameterTuningJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHyperParameterTuningJobs +func (c *SageMaker) ListHyperParameterTuningJobsRequest(input *ListHyperParameterTuningJobsInput) (req *request.Request, output *ListHyperParameterTuningJobsOutput) { + op := &request.Operation{ + Name: opListHyperParameterTuningJobs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListHyperParameterTuningJobsInput{} + } + + output = &ListHyperParameterTuningJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListHyperParameterTuningJobs API operation for Amazon SageMaker Service. +// +// Gets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter +// tuning jobs launched in your account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListHyperParameterTuningJobs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListHyperParameterTuningJobs +func (c *SageMaker) ListHyperParameterTuningJobs(input *ListHyperParameterTuningJobsInput) (*ListHyperParameterTuningJobsOutput, error) { + req, out := c.ListHyperParameterTuningJobsRequest(input) + return out, req.Send() +} + +// ListHyperParameterTuningJobsWithContext is the same as ListHyperParameterTuningJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListHyperParameterTuningJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListHyperParameterTuningJobsWithContext(ctx aws.Context, input *ListHyperParameterTuningJobsInput, opts ...request.Option) (*ListHyperParameterTuningJobsOutput, error) { + req, out := c.ListHyperParameterTuningJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListHyperParameterTuningJobsPages iterates over the pages of a ListHyperParameterTuningJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListHyperParameterTuningJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListHyperParameterTuningJobs operation. +// pageNum := 0 +// err := client.ListHyperParameterTuningJobsPages(params, +// func(page *ListHyperParameterTuningJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListHyperParameterTuningJobsPages(input *ListHyperParameterTuningJobsInput, fn func(*ListHyperParameterTuningJobsOutput, bool) bool) error { + return c.ListHyperParameterTuningJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListHyperParameterTuningJobsPagesWithContext same as ListHyperParameterTuningJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListHyperParameterTuningJobsPagesWithContext(ctx aws.Context, input *ListHyperParameterTuningJobsInput, fn func(*ListHyperParameterTuningJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListHyperParameterTuningJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListHyperParameterTuningJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListHyperParameterTuningJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListLabelingJobs = "ListLabelingJobs" + +// ListLabelingJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListLabelingJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLabelingJobs for more information on using the ListLabelingJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLabelingJobsRequest method. +// req, resp := client.ListLabelingJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobs +func (c *SageMaker) ListLabelingJobsRequest(input *ListLabelingJobsInput) (req *request.Request, output *ListLabelingJobsOutput) { + op := &request.Operation{ + Name: opListLabelingJobs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListLabelingJobsInput{} + } + + output = &ListLabelingJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLabelingJobs API operation for Amazon SageMaker Service. +// +// Gets a list of labeling jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListLabelingJobs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobs +func (c *SageMaker) ListLabelingJobs(input *ListLabelingJobsInput) (*ListLabelingJobsOutput, error) { + req, out := c.ListLabelingJobsRequest(input) + return out, req.Send() +} + +// ListLabelingJobsWithContext is the same as ListLabelingJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListLabelingJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListLabelingJobsWithContext(ctx aws.Context, input *ListLabelingJobsInput, opts ...request.Option) (*ListLabelingJobsOutput, error) { + req, out := c.ListLabelingJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListLabelingJobsPages iterates over the pages of a ListLabelingJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListLabelingJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListLabelingJobs operation. +// pageNum := 0 +// err := client.ListLabelingJobsPages(params, +// func(page *ListLabelingJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListLabelingJobsPages(input *ListLabelingJobsInput, fn func(*ListLabelingJobsOutput, bool) bool) error { + return c.ListLabelingJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListLabelingJobsPagesWithContext same as ListLabelingJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListLabelingJobsPagesWithContext(ctx aws.Context, input *ListLabelingJobsInput, fn func(*ListLabelingJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListLabelingJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListLabelingJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListLabelingJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListLabelingJobsForWorkteam = "ListLabelingJobsForWorkteam" + +// ListLabelingJobsForWorkteamRequest generates a "aws/request.Request" representing the +// client's request for the ListLabelingJobsForWorkteam operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListLabelingJobsForWorkteam for more information on using the ListLabelingJobsForWorkteam +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListLabelingJobsForWorkteamRequest method. +// req, resp := client.ListLabelingJobsForWorkteamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobsForWorkteam +func (c *SageMaker) ListLabelingJobsForWorkteamRequest(input *ListLabelingJobsForWorkteamInput) (req *request.Request, output *ListLabelingJobsForWorkteamOutput) { + op := &request.Operation{ + Name: opListLabelingJobsForWorkteam, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListLabelingJobsForWorkteamInput{} + } + + output = &ListLabelingJobsForWorkteamOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLabelingJobsForWorkteam API operation for Amazon SageMaker Service. +// +// Gets a list of labeling jobs assigned to a specified work team. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListLabelingJobsForWorkteam for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListLabelingJobsForWorkteam +func (c *SageMaker) ListLabelingJobsForWorkteam(input *ListLabelingJobsForWorkteamInput) (*ListLabelingJobsForWorkteamOutput, error) { + req, out := c.ListLabelingJobsForWorkteamRequest(input) + return out, req.Send() +} + +// ListLabelingJobsForWorkteamWithContext is the same as ListLabelingJobsForWorkteam with the addition of +// the ability to pass a context and additional request options. +// +// See ListLabelingJobsForWorkteam for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListLabelingJobsForWorkteamWithContext(ctx aws.Context, input *ListLabelingJobsForWorkteamInput, opts ...request.Option) (*ListLabelingJobsForWorkteamOutput, error) { + req, out := c.ListLabelingJobsForWorkteamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListLabelingJobsForWorkteamPages iterates over the pages of a ListLabelingJobsForWorkteam operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListLabelingJobsForWorkteam method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListLabelingJobsForWorkteam operation. +// pageNum := 0 +// err := client.ListLabelingJobsForWorkteamPages(params, +// func(page *ListLabelingJobsForWorkteamOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListLabelingJobsForWorkteamPages(input *ListLabelingJobsForWorkteamInput, fn func(*ListLabelingJobsForWorkteamOutput, bool) bool) error { + return c.ListLabelingJobsForWorkteamPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListLabelingJobsForWorkteamPagesWithContext same as ListLabelingJobsForWorkteamPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListLabelingJobsForWorkteamPagesWithContext(ctx aws.Context, input *ListLabelingJobsForWorkteamInput, fn func(*ListLabelingJobsForWorkteamOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListLabelingJobsForWorkteamInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListLabelingJobsForWorkteamRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListLabelingJobsForWorkteamOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListModelPackages = "ListModelPackages" + +// ListModelPackagesRequest generates a "aws/request.Request" representing the +// client's request for the ListModelPackages operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListModelPackages for more information on using the ListModelPackages +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListModelPackagesRequest method. +// req, resp := client.ListModelPackagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages +func (c *SageMaker) ListModelPackagesRequest(input *ListModelPackagesInput) (req *request.Request, output *ListModelPackagesOutput) { + op := &request.Operation{ + Name: opListModelPackages, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListModelPackagesInput{} + } + + output = &ListModelPackagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListModelPackages API operation for Amazon SageMaker Service. +// +// Lists the model packages that have been created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListModelPackages for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModelPackages +func (c *SageMaker) ListModelPackages(input *ListModelPackagesInput) (*ListModelPackagesOutput, error) { + req, out := c.ListModelPackagesRequest(input) + return out, req.Send() +} + +// ListModelPackagesWithContext is the same as ListModelPackages with the addition of +// the ability to pass a context and additional request options. +// +// See ListModelPackages for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListModelPackagesWithContext(ctx aws.Context, input *ListModelPackagesInput, opts ...request.Option) (*ListModelPackagesOutput, error) { + req, out := c.ListModelPackagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListModels = "ListModels" + +// ListModelsRequest generates a "aws/request.Request" representing the +// client's request for the ListModels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListModels for more information on using the ListModels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListModelsRequest method. +// req, resp := client.ListModelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels +func (c *SageMaker) ListModelsRequest(input *ListModelsInput) (req *request.Request, output *ListModelsOutput) { + op := &request.Operation{ + Name: opListModels, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListModelsInput{} + } + + output = &ListModelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListModels API operation for Amazon SageMaker Service. +// +// Lists models created with the CreateModel (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateModel.html) +// API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListModels for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListModels +func (c *SageMaker) ListModels(input *ListModelsInput) (*ListModelsOutput, error) { + req, out := c.ListModelsRequest(input) + return out, req.Send() +} + +// ListModelsWithContext is the same as ListModels with the addition of +// the ability to pass a context and additional request options. +// +// See ListModels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListModelsWithContext(ctx aws.Context, input *ListModelsInput, opts ...request.Option) (*ListModelsOutput, error) { + req, out := c.ListModelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListModelsPages iterates over the pages of a ListModels operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListModels method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListModels operation. +// pageNum := 0 +// err := client.ListModelsPages(params, +// func(page *ListModelsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListModelsPages(input *ListModelsInput, fn func(*ListModelsOutput, bool) bool) error { + return c.ListModelsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListModelsPagesWithContext same as ListModelsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListModelsPagesWithContext(ctx aws.Context, input *ListModelsInput, fn func(*ListModelsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListModelsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListModelsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListModelsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListNotebookInstanceLifecycleConfigs = "ListNotebookInstanceLifecycleConfigs" + +// ListNotebookInstanceLifecycleConfigsRequest generates a "aws/request.Request" representing the +// client's request for the ListNotebookInstanceLifecycleConfigs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListNotebookInstanceLifecycleConfigs for more information on using the ListNotebookInstanceLifecycleConfigs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListNotebookInstanceLifecycleConfigsRequest method. +// req, resp := client.ListNotebookInstanceLifecycleConfigsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstanceLifecycleConfigs +func (c *SageMaker) ListNotebookInstanceLifecycleConfigsRequest(input *ListNotebookInstanceLifecycleConfigsInput) (req *request.Request, output *ListNotebookInstanceLifecycleConfigsOutput) { + op := &request.Operation{ + Name: opListNotebookInstanceLifecycleConfigs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListNotebookInstanceLifecycleConfigsInput{} + } + + output = &ListNotebookInstanceLifecycleConfigsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListNotebookInstanceLifecycleConfigs API operation for Amazon SageMaker Service. +// +// Lists notebook instance lifestyle configurations created with the CreateNotebookInstanceLifecycleConfig +// API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListNotebookInstanceLifecycleConfigs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstanceLifecycleConfigs +func (c *SageMaker) ListNotebookInstanceLifecycleConfigs(input *ListNotebookInstanceLifecycleConfigsInput) (*ListNotebookInstanceLifecycleConfigsOutput, error) { + req, out := c.ListNotebookInstanceLifecycleConfigsRequest(input) + return out, req.Send() +} + +// ListNotebookInstanceLifecycleConfigsWithContext is the same as ListNotebookInstanceLifecycleConfigs with the addition of +// the ability to pass a context and additional request options. +// +// See ListNotebookInstanceLifecycleConfigs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListNotebookInstanceLifecycleConfigsWithContext(ctx aws.Context, input *ListNotebookInstanceLifecycleConfigsInput, opts ...request.Option) (*ListNotebookInstanceLifecycleConfigsOutput, error) { + req, out := c.ListNotebookInstanceLifecycleConfigsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListNotebookInstanceLifecycleConfigsPages iterates over the pages of a ListNotebookInstanceLifecycleConfigs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListNotebookInstanceLifecycleConfigs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListNotebookInstanceLifecycleConfigs operation. +// pageNum := 0 +// err := client.ListNotebookInstanceLifecycleConfigsPages(params, +// func(page *ListNotebookInstanceLifecycleConfigsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListNotebookInstanceLifecycleConfigsPages(input *ListNotebookInstanceLifecycleConfigsInput, fn func(*ListNotebookInstanceLifecycleConfigsOutput, bool) bool) error { + return c.ListNotebookInstanceLifecycleConfigsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListNotebookInstanceLifecycleConfigsPagesWithContext same as ListNotebookInstanceLifecycleConfigsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListNotebookInstanceLifecycleConfigsPagesWithContext(ctx aws.Context, input *ListNotebookInstanceLifecycleConfigsInput, fn func(*ListNotebookInstanceLifecycleConfigsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListNotebookInstanceLifecycleConfigsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListNotebookInstanceLifecycleConfigsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListNotebookInstanceLifecycleConfigsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListNotebookInstances = "ListNotebookInstances" + +// ListNotebookInstancesRequest generates a "aws/request.Request" representing the +// client's request for the ListNotebookInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListNotebookInstances for more information on using the ListNotebookInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListNotebookInstancesRequest method. +// req, resp := client.ListNotebookInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances +func (c *SageMaker) ListNotebookInstancesRequest(input *ListNotebookInstancesInput) (req *request.Request, output *ListNotebookInstancesOutput) { + op := &request.Operation{ + Name: opListNotebookInstances, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListNotebookInstancesInput{} + } + + output = &ListNotebookInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListNotebookInstances API operation for Amazon SageMaker Service. +// +// Returns a list of the Amazon SageMaker notebook instances in the requester's +// account in an AWS Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListNotebookInstances for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListNotebookInstances +func (c *SageMaker) ListNotebookInstances(input *ListNotebookInstancesInput) (*ListNotebookInstancesOutput, error) { + req, out := c.ListNotebookInstancesRequest(input) + return out, req.Send() +} + +// ListNotebookInstancesWithContext is the same as ListNotebookInstances with the addition of +// the ability to pass a context and additional request options. +// +// See ListNotebookInstances for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListNotebookInstancesWithContext(ctx aws.Context, input *ListNotebookInstancesInput, opts ...request.Option) (*ListNotebookInstancesOutput, error) { + req, out := c.ListNotebookInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListNotebookInstancesPages iterates over the pages of a ListNotebookInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListNotebookInstances method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListNotebookInstances operation. +// pageNum := 0 +// err := client.ListNotebookInstancesPages(params, +// func(page *ListNotebookInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListNotebookInstancesPages(input *ListNotebookInstancesInput, fn func(*ListNotebookInstancesOutput, bool) bool) error { + return c.ListNotebookInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListNotebookInstancesPagesWithContext same as ListNotebookInstancesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListNotebookInstancesPagesWithContext(ctx aws.Context, input *ListNotebookInstancesInput, fn func(*ListNotebookInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListNotebookInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListNotebookInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListNotebookInstancesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListSubscribedWorkteams = "ListSubscribedWorkteams" + +// ListSubscribedWorkteamsRequest generates a "aws/request.Request" representing the +// client's request for the ListSubscribedWorkteams operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListSubscribedWorkteams for more information on using the ListSubscribedWorkteams +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListSubscribedWorkteamsRequest method. +// req, resp := client.ListSubscribedWorkteamsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListSubscribedWorkteams +func (c *SageMaker) ListSubscribedWorkteamsRequest(input *ListSubscribedWorkteamsInput) (req *request.Request, output *ListSubscribedWorkteamsOutput) { + op := &request.Operation{ + Name: opListSubscribedWorkteams, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListSubscribedWorkteamsInput{} + } + + output = &ListSubscribedWorkteamsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSubscribedWorkteams API operation for Amazon SageMaker Service. +// +// Gets a list of the work teams that you are subscribed to in the AWS Marketplace. +// The list may be empty if no work team satisfies the filter specified in the +// NameContains parameter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListSubscribedWorkteams for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListSubscribedWorkteams +func (c *SageMaker) ListSubscribedWorkteams(input *ListSubscribedWorkteamsInput) (*ListSubscribedWorkteamsOutput, error) { + req, out := c.ListSubscribedWorkteamsRequest(input) + return out, req.Send() +} + +// ListSubscribedWorkteamsWithContext is the same as ListSubscribedWorkteams with the addition of +// the ability to pass a context and additional request options. +// +// See ListSubscribedWorkteams for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListSubscribedWorkteamsWithContext(ctx aws.Context, input *ListSubscribedWorkteamsInput, opts ...request.Option) (*ListSubscribedWorkteamsOutput, error) { + req, out := c.ListSubscribedWorkteamsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListSubscribedWorkteamsPages iterates over the pages of a ListSubscribedWorkteams operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListSubscribedWorkteams method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListSubscribedWorkteams operation. +// pageNum := 0 +// err := client.ListSubscribedWorkteamsPages(params, +// func(page *ListSubscribedWorkteamsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListSubscribedWorkteamsPages(input *ListSubscribedWorkteamsInput, fn func(*ListSubscribedWorkteamsOutput, bool) bool) error { + return c.ListSubscribedWorkteamsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListSubscribedWorkteamsPagesWithContext same as ListSubscribedWorkteamsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListSubscribedWorkteamsPagesWithContext(ctx aws.Context, input *ListSubscribedWorkteamsInput, fn func(*ListSubscribedWorkteamsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListSubscribedWorkteamsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListSubscribedWorkteamsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListSubscribedWorkteamsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTags for more information on using the ListTags +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags +func (c *SageMaker) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for Amazon SageMaker Service. +// +// Returns the tags for the specified Amazon SageMaker resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListTags for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTags +func (c *SageMaker) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagsPages iterates over the pages of a ListTags operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTags method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTags operation. +// pageNum := 0 +// err := client.ListTagsPages(params, +// func(page *ListTagsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { + return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagsPagesWithContext same as ListTagsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTrainingJobs = "ListTrainingJobs" + +// ListTrainingJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListTrainingJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTrainingJobs for more information on using the ListTrainingJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTrainingJobsRequest method. +// req, resp := client.ListTrainingJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs +func (c *SageMaker) ListTrainingJobsRequest(input *ListTrainingJobsInput) (req *request.Request, output *ListTrainingJobsOutput) { + op := &request.Operation{ + Name: opListTrainingJobs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTrainingJobsInput{} + } + + output = &ListTrainingJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTrainingJobs API operation for Amazon SageMaker Service. +// +// Lists training jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListTrainingJobs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs +func (c *SageMaker) ListTrainingJobs(input *ListTrainingJobsInput) (*ListTrainingJobsOutput, error) { + req, out := c.ListTrainingJobsRequest(input) + return out, req.Send() +} + +// ListTrainingJobsWithContext is the same as ListTrainingJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListTrainingJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTrainingJobsWithContext(ctx aws.Context, input *ListTrainingJobsInput, opts ...request.Option) (*ListTrainingJobsOutput, error) { + req, out := c.ListTrainingJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTrainingJobsPages iterates over the pages of a ListTrainingJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTrainingJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTrainingJobs operation. +// pageNum := 0 +// err := client.ListTrainingJobsPages(params, +// func(page *ListTrainingJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListTrainingJobsPages(input *ListTrainingJobsInput, fn func(*ListTrainingJobsOutput, bool) bool) error { + return c.ListTrainingJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTrainingJobsPagesWithContext same as ListTrainingJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTrainingJobsPagesWithContext(ctx aws.Context, input *ListTrainingJobsInput, fn func(*ListTrainingJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTrainingJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTrainingJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTrainingJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTrainingJobsForHyperParameterTuningJob = "ListTrainingJobsForHyperParameterTuningJob" + +// ListTrainingJobsForHyperParameterTuningJobRequest generates a "aws/request.Request" representing the +// client's request for the ListTrainingJobsForHyperParameterTuningJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTrainingJobsForHyperParameterTuningJob for more information on using the ListTrainingJobsForHyperParameterTuningJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTrainingJobsForHyperParameterTuningJobRequest method. +// req, resp := client.ListTrainingJobsForHyperParameterTuningJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobsForHyperParameterTuningJob +func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobRequest(input *ListTrainingJobsForHyperParameterTuningJobInput) (req *request.Request, output *ListTrainingJobsForHyperParameterTuningJobOutput) { + op := &request.Operation{ + Name: opListTrainingJobsForHyperParameterTuningJob, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTrainingJobsForHyperParameterTuningJobInput{} + } + + output = &ListTrainingJobsForHyperParameterTuningJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTrainingJobsForHyperParameterTuningJob API operation for Amazon SageMaker Service. +// +// Gets a list of TrainingJobSummary objects that describe the training jobs +// that a hyperparameter tuning job launched. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListTrainingJobsForHyperParameterTuningJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobsForHyperParameterTuningJob +func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJob(input *ListTrainingJobsForHyperParameterTuningJobInput) (*ListTrainingJobsForHyperParameterTuningJobOutput, error) { + req, out := c.ListTrainingJobsForHyperParameterTuningJobRequest(input) + return out, req.Send() +} + +// ListTrainingJobsForHyperParameterTuningJobWithContext is the same as ListTrainingJobsForHyperParameterTuningJob with the addition of +// the ability to pass a context and additional request options. +// +// See ListTrainingJobsForHyperParameterTuningJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobWithContext(ctx aws.Context, input *ListTrainingJobsForHyperParameterTuningJobInput, opts ...request.Option) (*ListTrainingJobsForHyperParameterTuningJobOutput, error) { + req, out := c.ListTrainingJobsForHyperParameterTuningJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTrainingJobsForHyperParameterTuningJobPages iterates over the pages of a ListTrainingJobsForHyperParameterTuningJob operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTrainingJobsForHyperParameterTuningJob method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTrainingJobsForHyperParameterTuningJob operation. +// pageNum := 0 +// err := client.ListTrainingJobsForHyperParameterTuningJobPages(params, +// func(page *ListTrainingJobsForHyperParameterTuningJobOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobPages(input *ListTrainingJobsForHyperParameterTuningJobInput, fn func(*ListTrainingJobsForHyperParameterTuningJobOutput, bool) bool) error { + return c.ListTrainingJobsForHyperParameterTuningJobPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTrainingJobsForHyperParameterTuningJobPagesWithContext same as ListTrainingJobsForHyperParameterTuningJobPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTrainingJobsForHyperParameterTuningJobPagesWithContext(ctx aws.Context, input *ListTrainingJobsForHyperParameterTuningJobInput, fn func(*ListTrainingJobsForHyperParameterTuningJobOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTrainingJobsForHyperParameterTuningJobInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTrainingJobsForHyperParameterTuningJobRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTrainingJobsForHyperParameterTuningJobOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTransformJobs = "ListTransformJobs" + +// ListTransformJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListTransformJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTransformJobs for more information on using the ListTransformJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTransformJobsRequest method. +// req, resp := client.ListTransformJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTransformJobs +func (c *SageMaker) ListTransformJobsRequest(input *ListTransformJobsInput) (req *request.Request, output *ListTransformJobsOutput) { + op := &request.Operation{ + Name: opListTransformJobs, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTransformJobsInput{} + } + + output = &ListTransformJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTransformJobs API operation for Amazon SageMaker Service. +// +// Lists transform jobs. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListTransformJobs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTransformJobs +func (c *SageMaker) ListTransformJobs(input *ListTransformJobsInput) (*ListTransformJobsOutput, error) { + req, out := c.ListTransformJobsRequest(input) + return out, req.Send() +} + +// ListTransformJobsWithContext is the same as ListTransformJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListTransformJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTransformJobsWithContext(ctx aws.Context, input *ListTransformJobsInput, opts ...request.Option) (*ListTransformJobsOutput, error) { + req, out := c.ListTransformJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTransformJobsPages iterates over the pages of a ListTransformJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTransformJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTransformJobs operation. +// pageNum := 0 +// err := client.ListTransformJobsPages(params, +// func(page *ListTransformJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListTransformJobsPages(input *ListTransformJobsInput, fn func(*ListTransformJobsOutput, bool) bool) error { + return c.ListTransformJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTransformJobsPagesWithContext same as ListTransformJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListTransformJobsPagesWithContext(ctx aws.Context, input *ListTransformJobsInput, fn func(*ListTransformJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTransformJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTransformJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTransformJobsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListWorkteams = "ListWorkteams" + +// ListWorkteamsRequest generates a "aws/request.Request" representing the +// client's request for the ListWorkteams operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListWorkteams for more information on using the ListWorkteams +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListWorkteamsRequest method. +// req, resp := client.ListWorkteamsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkteams +func (c *SageMaker) ListWorkteamsRequest(input *ListWorkteamsInput) (req *request.Request, output *ListWorkteamsOutput) { + op := &request.Operation{ + Name: opListWorkteams, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListWorkteamsInput{} + } + + output = &ListWorkteamsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListWorkteams API operation for Amazon SageMaker Service. +// +// Gets a list of work teams that you have defined in a region. The list may +// be empty if no work team satisfies the filter specified in the NameContains +// parameter. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation ListWorkteams for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListWorkteams +func (c *SageMaker) ListWorkteams(input *ListWorkteamsInput) (*ListWorkteamsOutput, error) { + req, out := c.ListWorkteamsRequest(input) + return out, req.Send() +} + +// ListWorkteamsWithContext is the same as ListWorkteams with the addition of +// the ability to pass a context and additional request options. +// +// See ListWorkteams for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListWorkteamsWithContext(ctx aws.Context, input *ListWorkteamsInput, opts ...request.Option) (*ListWorkteamsOutput, error) { + req, out := c.ListWorkteamsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListWorkteamsPages iterates over the pages of a ListWorkteams operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListWorkteams method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListWorkteams operation. +// pageNum := 0 +// err := client.ListWorkteamsPages(params, +// func(page *ListWorkteamsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) ListWorkteamsPages(input *ListWorkteamsInput, fn func(*ListWorkteamsOutput, bool) bool) error { + return c.ListWorkteamsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListWorkteamsPagesWithContext same as ListWorkteamsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) ListWorkteamsPagesWithContext(ctx aws.Context, input *ListWorkteamsInput, fn func(*ListWorkteamsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListWorkteamsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListWorkteamsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListWorkteamsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opRenderUiTemplate = "RenderUiTemplate" + +// RenderUiTemplateRequest generates a "aws/request.Request" representing the +// client's request for the RenderUiTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RenderUiTemplate for more information on using the RenderUiTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RenderUiTemplateRequest method. +// req, resp := client.RenderUiTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate +func (c *SageMaker) RenderUiTemplateRequest(input *RenderUiTemplateInput) (req *request.Request, output *RenderUiTemplateOutput) { + op := &request.Operation{ + Name: opRenderUiTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RenderUiTemplateInput{} + } + + output = &RenderUiTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// RenderUiTemplate API operation for Amazon SageMaker Service. +// +// Renders the UI template so that you can preview the worker's experience. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation RenderUiTemplate for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/RenderUiTemplate +func (c *SageMaker) RenderUiTemplate(input *RenderUiTemplateInput) (*RenderUiTemplateOutput, error) { + req, out := c.RenderUiTemplateRequest(input) + return out, req.Send() +} + +// RenderUiTemplateWithContext is the same as RenderUiTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See RenderUiTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) RenderUiTemplateWithContext(ctx aws.Context, input *RenderUiTemplateInput, opts ...request.Option) (*RenderUiTemplateOutput, error) { + req, out := c.RenderUiTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSearch = "Search" + +// SearchRequest generates a "aws/request.Request" representing the +// client's request for the Search operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See Search for more information on using the Search +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SearchRequest method. +// req, resp := client.SearchRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/Search +func (c *SageMaker) SearchRequest(input *SearchInput) (req *request.Request, output *SearchOutput) { + op := &request.Operation{ + Name: opSearch, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &SearchInput{} + } + + output = &SearchOutput{} + req = c.newRequest(op, input, output) + return +} + +// Search API operation for Amazon SageMaker Service. +// +// Finds Amazon SageMaker resources that match a search query. Matching resource +// objects are returned as a list of SearchResult objects in the response. You +// can sort the search results by any resource property in a ascending or descending +// order. +// +// You can query against the following value types: numerical, text, Booleans, +// and timestamps. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation Search for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/Search +func (c *SageMaker) Search(input *SearchInput) (*SearchOutput, error) { + req, out := c.SearchRequest(input) + return out, req.Send() +} + +// SearchWithContext is the same as Search with the addition of +// the ability to pass a context and additional request options. +// +// See Search for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) SearchWithContext(ctx aws.Context, input *SearchInput, opts ...request.Option) (*SearchOutput, error) { + req, out := c.SearchRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// SearchPages iterates over the pages of a Search operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See Search method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a Search operation. +// pageNum := 0 +// err := client.SearchPages(params, +// func(page *SearchOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SageMaker) SearchPages(input *SearchInput, fn func(*SearchOutput, bool) bool) error { + return c.SearchPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// SearchPagesWithContext same as SearchPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) SearchPagesWithContext(ctx aws.Context, input *SearchInput, fn func(*SearchOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *SearchInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.SearchRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*SearchOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opStartNotebookInstance = "StartNotebookInstance" + +// StartNotebookInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StartNotebookInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartNotebookInstance for more information on using the StartNotebookInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartNotebookInstanceRequest method. +// req, resp := client.StartNotebookInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance +func (c *SageMaker) StartNotebookInstanceRequest(input *StartNotebookInstanceInput) (req *request.Request, output *StartNotebookInstanceOutput) { + op := &request.Operation{ + Name: opStartNotebookInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartNotebookInstanceInput{} + } + + output = &StartNotebookInstanceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StartNotebookInstance API operation for Amazon SageMaker Service. +// +// Launches an ML compute instance with the latest version of the libraries +// and attaches your ML storage volume. After configuring the notebook instance, +// Amazon SageMaker sets the notebook instance status to InService. A notebook +// instance's status must be InService before you can connect to your Jupyter +// notebook. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StartNotebookInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StartNotebookInstance +func (c *SageMaker) StartNotebookInstance(input *StartNotebookInstanceInput) (*StartNotebookInstanceOutput, error) { + req, out := c.StartNotebookInstanceRequest(input) + return out, req.Send() +} + +// StartNotebookInstanceWithContext is the same as StartNotebookInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StartNotebookInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StartNotebookInstanceWithContext(ctx aws.Context, input *StartNotebookInstanceInput, opts ...request.Option) (*StartNotebookInstanceOutput, error) { + req, out := c.StartNotebookInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopCompilationJob = "StopCompilationJob" + +// StopCompilationJobRequest generates a "aws/request.Request" representing the +// client's request for the StopCompilationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopCompilationJob for more information on using the StopCompilationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopCompilationJobRequest method. +// req, resp := client.StopCompilationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopCompilationJob +func (c *SageMaker) StopCompilationJobRequest(input *StopCompilationJobInput) (req *request.Request, output *StopCompilationJobOutput) { + op := &request.Operation{ + Name: opStopCompilationJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopCompilationJobInput{} + } + + output = &StopCompilationJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopCompilationJob API operation for Amazon SageMaker Service. +// +// Stops a model compilation job. +// +// To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This +// gracefully shuts the job down. If the job hasn't stopped, it sends the SIGKILL +// signal. +// +// When it receives a StopCompilationJob request, Amazon SageMaker changes the +// CompilationJobSummary$CompilationJobStatus of the job to Stopping. After +// Amazon SageMaker stops the job, it sets the CompilationJobSummary$CompilationJobStatus +// to Stopped. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StopCompilationJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopCompilationJob +func (c *SageMaker) StopCompilationJob(input *StopCompilationJobInput) (*StopCompilationJobOutput, error) { + req, out := c.StopCompilationJobRequest(input) + return out, req.Send() +} + +// StopCompilationJobWithContext is the same as StopCompilationJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopCompilationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StopCompilationJobWithContext(ctx aws.Context, input *StopCompilationJobInput, opts ...request.Option) (*StopCompilationJobOutput, error) { + req, out := c.StopCompilationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopHyperParameterTuningJob = "StopHyperParameterTuningJob" + +// StopHyperParameterTuningJobRequest generates a "aws/request.Request" representing the +// client's request for the StopHyperParameterTuningJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopHyperParameterTuningJob for more information on using the StopHyperParameterTuningJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopHyperParameterTuningJobRequest method. +// req, resp := client.StopHyperParameterTuningJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopHyperParameterTuningJob +func (c *SageMaker) StopHyperParameterTuningJobRequest(input *StopHyperParameterTuningJobInput) (req *request.Request, output *StopHyperParameterTuningJobOutput) { + op := &request.Operation{ + Name: opStopHyperParameterTuningJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopHyperParameterTuningJobInput{} + } + + output = &StopHyperParameterTuningJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopHyperParameterTuningJob API operation for Amazon SageMaker Service. +// +// Stops a running hyperparameter tuning job and all running training jobs that +// the tuning job launched. +// +// All model artifacts output from the training jobs are stored in Amazon Simple +// Storage Service (Amazon S3). All data that the training jobs write to Amazon +// CloudWatch Logs are still available in CloudWatch. After the tuning job moves +// to the Stopped state, it releases all reserved resources for the tuning job. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StopHyperParameterTuningJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopHyperParameterTuningJob +func (c *SageMaker) StopHyperParameterTuningJob(input *StopHyperParameterTuningJobInput) (*StopHyperParameterTuningJobOutput, error) { + req, out := c.StopHyperParameterTuningJobRequest(input) + return out, req.Send() +} + +// StopHyperParameterTuningJobWithContext is the same as StopHyperParameterTuningJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopHyperParameterTuningJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StopHyperParameterTuningJobWithContext(ctx aws.Context, input *StopHyperParameterTuningJobInput, opts ...request.Option) (*StopHyperParameterTuningJobOutput, error) { + req, out := c.StopHyperParameterTuningJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopLabelingJob = "StopLabelingJob" + +// StopLabelingJobRequest generates a "aws/request.Request" representing the +// client's request for the StopLabelingJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopLabelingJob for more information on using the StopLabelingJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopLabelingJobRequest method. +// req, resp := client.StopLabelingJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopLabelingJob +func (c *SageMaker) StopLabelingJobRequest(input *StopLabelingJobInput) (req *request.Request, output *StopLabelingJobOutput) { + op := &request.Operation{ + Name: opStopLabelingJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopLabelingJobInput{} + } + + output = &StopLabelingJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopLabelingJob API operation for Amazon SageMaker Service. +// +// Stops a running labeling job. A job that is stopped cannot be restarted. +// Any results obtained before the job is stopped are placed in the Amazon S3 +// output bucket. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StopLabelingJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopLabelingJob +func (c *SageMaker) StopLabelingJob(input *StopLabelingJobInput) (*StopLabelingJobOutput, error) { + req, out := c.StopLabelingJobRequest(input) + return out, req.Send() +} + +// StopLabelingJobWithContext is the same as StopLabelingJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopLabelingJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StopLabelingJobWithContext(ctx aws.Context, input *StopLabelingJobInput, opts ...request.Option) (*StopLabelingJobOutput, error) { + req, out := c.StopLabelingJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopNotebookInstance = "StopNotebookInstance" + +// StopNotebookInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StopNotebookInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopNotebookInstance for more information on using the StopNotebookInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopNotebookInstanceRequest method. +// req, resp := client.StopNotebookInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance +func (c *SageMaker) StopNotebookInstanceRequest(input *StopNotebookInstanceInput) (req *request.Request, output *StopNotebookInstanceOutput) { + op := &request.Operation{ + Name: opStopNotebookInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopNotebookInstanceInput{} + } + + output = &StopNotebookInstanceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopNotebookInstance API operation for Amazon SageMaker Service. +// +// Terminates the ML compute instance. Before terminating the instance, Amazon +// SageMaker disconnects the ML storage volume from it. Amazon SageMaker preserves +// the ML storage volume. +// +// To access data on the ML storage volume for a notebook instance that has +// been terminated, call the StartNotebookInstance API. StartNotebookInstance +// launches another ML compute instance, configures it, and attaches the preserved +// ML storage volume so you can continue your work. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StopNotebookInstance for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopNotebookInstance +func (c *SageMaker) StopNotebookInstance(input *StopNotebookInstanceInput) (*StopNotebookInstanceOutput, error) { + req, out := c.StopNotebookInstanceRequest(input) + return out, req.Send() +} + +// StopNotebookInstanceWithContext is the same as StopNotebookInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StopNotebookInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StopNotebookInstanceWithContext(ctx aws.Context, input *StopNotebookInstanceInput, opts ...request.Option) (*StopNotebookInstanceOutput, error) { + req, out := c.StopNotebookInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopTrainingJob = "StopTrainingJob" + +// StopTrainingJobRequest generates a "aws/request.Request" representing the +// client's request for the StopTrainingJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopTrainingJob for more information on using the StopTrainingJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopTrainingJobRequest method. +// req, resp := client.StopTrainingJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob +func (c *SageMaker) StopTrainingJobRequest(input *StopTrainingJobInput) (req *request.Request, output *StopTrainingJobOutput) { + op := &request.Operation{ + Name: opStopTrainingJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopTrainingJobInput{} + } + + output = &StopTrainingJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopTrainingJob API operation for Amazon SageMaker Service. +// +// Stops a training job. To stop a job, Amazon SageMaker sends the algorithm +// the SIGTERM signal, which delays job termination for 120 seconds. Algorithms +// might use this 120-second window to save the model artifacts, so the results +// of the training is not lost. +// +// Training algorithms provided by Amazon SageMaker save the intermediate results +// of a model training job. This intermediate data is a valid model artifact. +// You can use the model artifacts that are saved when Amazon SageMaker stops +// a training job to create a model. +// +// When it receives a StopTrainingJob request, Amazon SageMaker changes the +// status of the job to Stopping. After Amazon SageMaker stops the job, it sets +// the status to Stopped. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StopTrainingJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTrainingJob +func (c *SageMaker) StopTrainingJob(input *StopTrainingJobInput) (*StopTrainingJobOutput, error) { + req, out := c.StopTrainingJobRequest(input) + return out, req.Send() +} + +// StopTrainingJobWithContext is the same as StopTrainingJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopTrainingJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StopTrainingJobWithContext(ctx aws.Context, input *StopTrainingJobInput, opts ...request.Option) (*StopTrainingJobOutput, error) { + req, out := c.StopTrainingJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopTransformJob = "StopTransformJob" + +// StopTransformJobRequest generates a "aws/request.Request" representing the +// client's request for the StopTransformJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopTransformJob for more information on using the StopTransformJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopTransformJobRequest method. +// req, resp := client.StopTransformJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTransformJob +func (c *SageMaker) StopTransformJobRequest(input *StopTransformJobInput) (req *request.Request, output *StopTransformJobOutput) { + op := &request.Operation{ + Name: opStopTransformJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopTransformJobInput{} + } + + output = &StopTransformJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopTransformJob API operation for Amazon SageMaker Service. +// +// Stops a transform job. +// +// When Amazon SageMaker receives a StopTransformJob request, the status of +// the job changes to Stopping. After Amazon SageMaker stops the job, the status +// is set to Stopped. When you stop a transform job before it is completed, +// Amazon SageMaker doesn't store the job's output in Amazon S3. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation StopTransformJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFound "ResourceNotFound" +// Resource being access is not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/StopTransformJob +func (c *SageMaker) StopTransformJob(input *StopTransformJobInput) (*StopTransformJobOutput, error) { + req, out := c.StopTransformJobRequest(input) + return out, req.Send() +} + +// StopTransformJobWithContext is the same as StopTransformJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopTransformJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) StopTransformJobWithContext(ctx aws.Context, input *StopTransformJobInput, opts ...request.Option) (*StopTransformJobOutput, error) { + req, out := c.StopTransformJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCodeRepository = "UpdateCodeRepository" + +// UpdateCodeRepositoryRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCodeRepository operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCodeRepository for more information on using the UpdateCodeRepository +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCodeRepositoryRequest method. +// req, resp := client.UpdateCodeRepositoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateCodeRepository +func (c *SageMaker) UpdateCodeRepositoryRequest(input *UpdateCodeRepositoryInput) (req *request.Request, output *UpdateCodeRepositoryOutput) { + op := &request.Operation{ + Name: opUpdateCodeRepository, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateCodeRepositoryInput{} + } + + output = &UpdateCodeRepositoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateCodeRepository API operation for Amazon SageMaker Service. +// +// Updates the specified Git repository with the specified values. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation UpdateCodeRepository for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateCodeRepository +func (c *SageMaker) UpdateCodeRepository(input *UpdateCodeRepositoryInput) (*UpdateCodeRepositoryOutput, error) { + req, out := c.UpdateCodeRepositoryRequest(input) + return out, req.Send() +} + +// UpdateCodeRepositoryWithContext is the same as UpdateCodeRepository with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCodeRepository for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) UpdateCodeRepositoryWithContext(ctx aws.Context, input *UpdateCodeRepositoryInput, opts ...request.Option) (*UpdateCodeRepositoryOutput, error) { + req, out := c.UpdateCodeRepositoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpoint = "UpdateEndpoint" + +// UpdateEndpointRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpoint operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateEndpoint for more information on using the UpdateEndpoint +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateEndpointRequest method. +// req, resp := client.UpdateEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint +func (c *SageMaker) UpdateEndpointRequest(input *UpdateEndpointInput) (req *request.Request, output *UpdateEndpointOutput) { + op := &request.Operation{ + Name: opUpdateEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateEndpointInput{} + } + + output = &UpdateEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpoint API operation for Amazon SageMaker Service. +// +// Deploys the new EndpointConfig specified in the request, switches to using +// newly created endpoint, and then deletes resources provisioned for the endpoint +// using the previous EndpointConfig (there is no availability loss). +// +// When Amazon SageMaker receives the request, it sets the endpoint status to +// Updating. After updating the endpoint, it sets the status to InService. To +// check the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) +// API. +// +// You cannot update an endpoint with the current EndpointConfig. To update +// an endpoint, you must create a new EndpointConfig. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation UpdateEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpoint +func (c *SageMaker) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { + req, out := c.UpdateEndpointRequest(input) + return out, req.Send() +} + +// UpdateEndpointWithContext is the same as UpdateEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpoint for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) UpdateEndpointWithContext(ctx aws.Context, input *UpdateEndpointInput, opts ...request.Option) (*UpdateEndpointOutput, error) { + req, out := c.UpdateEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpointWeightsAndCapacities = "UpdateEndpointWeightsAndCapacities" + +// UpdateEndpointWeightsAndCapacitiesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpointWeightsAndCapacities operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateEndpointWeightsAndCapacities for more information on using the UpdateEndpointWeightsAndCapacities +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateEndpointWeightsAndCapacitiesRequest method. +// req, resp := client.UpdateEndpointWeightsAndCapacitiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities +func (c *SageMaker) UpdateEndpointWeightsAndCapacitiesRequest(input *UpdateEndpointWeightsAndCapacitiesInput) (req *request.Request, output *UpdateEndpointWeightsAndCapacitiesOutput) { + op := &request.Operation{ + Name: opUpdateEndpointWeightsAndCapacities, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateEndpointWeightsAndCapacitiesInput{} + } + + output = &UpdateEndpointWeightsAndCapacitiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpointWeightsAndCapacities API operation for Amazon SageMaker Service. +// +// Updates variant weight of one or more variants associated with an existing +// endpoint, or capacity of one variant associated with an existing endpoint. +// When it receives the request, Amazon SageMaker sets the endpoint status to +// Updating. After updating the endpoint, it sets the status to InService. To +// check the status of an endpoint, use the DescribeEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_DescribeEndpoint.html) +// API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation UpdateEndpointWeightsAndCapacities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateEndpointWeightsAndCapacities +func (c *SageMaker) UpdateEndpointWeightsAndCapacities(input *UpdateEndpointWeightsAndCapacitiesInput) (*UpdateEndpointWeightsAndCapacitiesOutput, error) { + req, out := c.UpdateEndpointWeightsAndCapacitiesRequest(input) + return out, req.Send() +} + +// UpdateEndpointWeightsAndCapacitiesWithContext is the same as UpdateEndpointWeightsAndCapacities with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpointWeightsAndCapacities for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) UpdateEndpointWeightsAndCapacitiesWithContext(ctx aws.Context, input *UpdateEndpointWeightsAndCapacitiesInput, opts ...request.Option) (*UpdateEndpointWeightsAndCapacitiesOutput, error) { + req, out := c.UpdateEndpointWeightsAndCapacitiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateNotebookInstance = "UpdateNotebookInstance" + +// UpdateNotebookInstanceRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNotebookInstance operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateNotebookInstance for more information on using the UpdateNotebookInstance +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateNotebookInstanceRequest method. +// req, resp := client.UpdateNotebookInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance +func (c *SageMaker) UpdateNotebookInstanceRequest(input *UpdateNotebookInstanceInput) (req *request.Request, output *UpdateNotebookInstanceOutput) { + op := &request.Operation{ + Name: opUpdateNotebookInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateNotebookInstanceInput{} + } + + output = &UpdateNotebookInstanceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateNotebookInstance API operation for Amazon SageMaker Service. +// +// Updates a notebook instance. NotebookInstance updates include upgrading or +// downgrading the ML compute instance used for your notebook instance to accommodate +// changes in your workload requirements. You can also update the VPC security +// groups. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation UpdateNotebookInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstance +func (c *SageMaker) UpdateNotebookInstance(input *UpdateNotebookInstanceInput) (*UpdateNotebookInstanceOutput, error) { + req, out := c.UpdateNotebookInstanceRequest(input) + return out, req.Send() +} + +// UpdateNotebookInstanceWithContext is the same as UpdateNotebookInstance with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNotebookInstance for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) UpdateNotebookInstanceWithContext(ctx aws.Context, input *UpdateNotebookInstanceInput, opts ...request.Option) (*UpdateNotebookInstanceOutput, error) { + req, out := c.UpdateNotebookInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateNotebookInstanceLifecycleConfig = "UpdateNotebookInstanceLifecycleConfig" + +// UpdateNotebookInstanceLifecycleConfigRequest generates a "aws/request.Request" representing the +// client's request for the UpdateNotebookInstanceLifecycleConfig operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateNotebookInstanceLifecycleConfig for more information on using the UpdateNotebookInstanceLifecycleConfig +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateNotebookInstanceLifecycleConfigRequest method. +// req, resp := client.UpdateNotebookInstanceLifecycleConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstanceLifecycleConfig +func (c *SageMaker) UpdateNotebookInstanceLifecycleConfigRequest(input *UpdateNotebookInstanceLifecycleConfigInput) (req *request.Request, output *UpdateNotebookInstanceLifecycleConfigOutput) { + op := &request.Operation{ + Name: opUpdateNotebookInstanceLifecycleConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateNotebookInstanceLifecycleConfigInput{} + } + + output = &UpdateNotebookInstanceLifecycleConfigOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateNotebookInstanceLifecycleConfig API operation for Amazon SageMaker Service. +// +// Updates a notebook instance lifecycle configuration created with the CreateNotebookInstanceLifecycleConfig +// API. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation UpdateNotebookInstanceLifecycleConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateNotebookInstanceLifecycleConfig +func (c *SageMaker) UpdateNotebookInstanceLifecycleConfig(input *UpdateNotebookInstanceLifecycleConfigInput) (*UpdateNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.UpdateNotebookInstanceLifecycleConfigRequest(input) + return out, req.Send() +} + +// UpdateNotebookInstanceLifecycleConfigWithContext is the same as UpdateNotebookInstanceLifecycleConfig with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateNotebookInstanceLifecycleConfig for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) UpdateNotebookInstanceLifecycleConfigWithContext(ctx aws.Context, input *UpdateNotebookInstanceLifecycleConfigInput, opts ...request.Option) (*UpdateNotebookInstanceLifecycleConfigOutput, error) { + req, out := c.UpdateNotebookInstanceLifecycleConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateWorkteam = "UpdateWorkteam" + +// UpdateWorkteamRequest generates a "aws/request.Request" representing the +// client's request for the UpdateWorkteam operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateWorkteam for more information on using the UpdateWorkteam +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateWorkteamRequest method. +// req, resp := client.UpdateWorkteamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkteam +func (c *SageMaker) UpdateWorkteamRequest(input *UpdateWorkteamInput) (req *request.Request, output *UpdateWorkteamOutput) { + op := &request.Operation{ + Name: opUpdateWorkteam, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateWorkteamInput{} + } + + output = &UpdateWorkteamOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateWorkteam API operation for Amazon SageMaker Service. +// +// Updates an existing work team with new member definitions or description. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon SageMaker Service's +// API operation UpdateWorkteam for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// You have exceeded an Amazon SageMaker resource limit. For example, you might +// have too many training jobs created. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/UpdateWorkteam +func (c *SageMaker) UpdateWorkteam(input *UpdateWorkteamInput) (*UpdateWorkteamOutput, error) { + req, out := c.UpdateWorkteamRequest(input) + return out, req.Send() +} + +// UpdateWorkteamWithContext is the same as UpdateWorkteam with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateWorkteam for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) UpdateWorkteamWithContext(ctx aws.Context, input *UpdateWorkteamInput, opts ...request.Option) (*UpdateWorkteamOutput, error) { + req, out := c.UpdateWorkteamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AddTagsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that you want to tag. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // An array of Tag objects. Each tag is a key-value pair. Only the key parameter + // is required. If you don't specify a value, Amazon SageMaker sets the value + // to an empty string. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s AddTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *AddTagsInput) SetResourceArn(v string) *AddTagsInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { + s.Tags = v + return s +} + +type AddTagsOutput struct { + _ struct{} `type:"structure"` + + // A list of tags associated with the Amazon SageMaker resource. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s AddTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddTagsOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *AddTagsOutput) SetTags(v []*Tag) *AddTagsOutput { + s.Tags = v + return s +} + +// Specifies the training algorithm to use in a CreateTrainingJob (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html) +// request. +// +// For more information about algorithms provided by Amazon SageMaker, see Algorithms +// (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). For information +// about using your own algorithms, see Using Your Own Algorithms with Amazon +// SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html). +type AlgorithmSpecification struct { + _ struct{} `type:"structure"` + + // The name of the algorithm resource to use for the training job. This must + // be an algorithm resource that you created or subscribe to on AWS Marketplace. + // If you specify a value for this parameter, you can't specify a value for + // TrainingImage. + AlgorithmName *string `min:"1" type:"string"` + + // A list of metric definition objects. Each object specifies the metric name + // and regular expressions used to parse algorithm logs. Amazon SageMaker publishes + // each metric to Amazon CloudWatch. + MetricDefinitions []*MetricDefinition `type:"list"` + + // The registry path of the Docker image that contains the training algorithm. + // For information about docker registry paths for built-in algorithms, see + // Algorithms Provided by Amazon SageMaker: Common Parameters (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html). + TrainingImage *string `type:"string"` + + // The input mode that the algorithm supports. For the input modes that Amazon + // SageMaker algorithms support, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). + // If an algorithm supports the File input mode, Amazon SageMaker downloads + // the training data from S3 to the provisioned ML storage Volume, and mounts + // the directory to docker volume for training container. If an algorithm supports + // the Pipe input mode, Amazon SageMaker streams data directly from S3 to the + // container. + // + // In File mode, make sure you provision ML storage volume with sufficient capacity + // to accommodate the data download from S3. In addition to the training data, + // the ML storage volume also stores the output model. The algorithm container + // use ML storage volume to also store intermediate information, if any. + // + // For distributed algorithms using File mode, training data is distributed + // uniformly, and your training duration is predictable if the input data objects + // size is approximately same. Amazon SageMaker does not split the files any + // further for model training. If the object sizes are skewed, training won't + // be optimal as the data distribution is also skewed where one host in a training + // cluster is overloaded, thus becoming bottleneck in training. + // + // TrainingInputMode is a required field + TrainingInputMode *string `type:"string" required:"true" enum:"TrainingInputMode"` +} + +// String returns the string representation +func (s AlgorithmSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlgorithmSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AlgorithmSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AlgorithmSpecification"} + if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) + } + if s.TrainingInputMode == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingInputMode")) + } + if s.MetricDefinitions != nil { + for i, v := range s.MetricDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *AlgorithmSpecification) SetAlgorithmName(v string) *AlgorithmSpecification { + s.AlgorithmName = &v + return s +} + +// SetMetricDefinitions sets the MetricDefinitions field's value. +func (s *AlgorithmSpecification) SetMetricDefinitions(v []*MetricDefinition) *AlgorithmSpecification { + s.MetricDefinitions = v + return s +} + +// SetTrainingImage sets the TrainingImage field's value. +func (s *AlgorithmSpecification) SetTrainingImage(v string) *AlgorithmSpecification { + s.TrainingImage = &v + return s +} + +// SetTrainingInputMode sets the TrainingInputMode field's value. +func (s *AlgorithmSpecification) SetTrainingInputMode(v string) *AlgorithmSpecification { + s.TrainingInputMode = &v + return s +} + +// Specifies the validation and image scan statuses of the algorithm. +type AlgorithmStatusDetails struct { + _ struct{} `type:"structure"` + + // The status of the scan of the algorithm's Docker image container. + ImageScanStatuses []*AlgorithmStatusItem `type:"list"` + + // The status of algorithm validation. + ValidationStatuses []*AlgorithmStatusItem `type:"list"` +} + +// String returns the string representation +func (s AlgorithmStatusDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlgorithmStatusDetails) GoString() string { + return s.String() +} + +// SetImageScanStatuses sets the ImageScanStatuses field's value. +func (s *AlgorithmStatusDetails) SetImageScanStatuses(v []*AlgorithmStatusItem) *AlgorithmStatusDetails { + s.ImageScanStatuses = v + return s +} + +// SetValidationStatuses sets the ValidationStatuses field's value. +func (s *AlgorithmStatusDetails) SetValidationStatuses(v []*AlgorithmStatusItem) *AlgorithmStatusDetails { + s.ValidationStatuses = v + return s +} + +// Represents the overall status of an algorithm. +type AlgorithmStatusItem struct { + _ struct{} `type:"structure"` + + // if the overall status is Failed, the reason for the failure. + FailureReason *string `type:"string"` + + // The name of the algorithm for which the overall status is being reported. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The current status. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"DetailedAlgorithmStatus"` +} + +// String returns the string representation +func (s AlgorithmStatusItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlgorithmStatusItem) GoString() string { + return s.String() +} + +// SetFailureReason sets the FailureReason field's value. +func (s *AlgorithmStatusItem) SetFailureReason(v string) *AlgorithmStatusItem { + s.FailureReason = &v + return s +} + +// SetName sets the Name field's value. +func (s *AlgorithmStatusItem) SetName(v string) *AlgorithmStatusItem { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AlgorithmStatusItem) SetStatus(v string) *AlgorithmStatusItem { + s.Status = &v + return s +} + +// Provides summary information about an algorithm. +type AlgorithmSummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the algorithm. + // + // AlgorithmArn is a required field + AlgorithmArn *string `min:"1" type:"string" required:"true"` + + // A brief description of the algorithm. + AlgorithmDescription *string `type:"string"` + + // The name of the algorithm that is described by the summary. + // + // AlgorithmName is a required field + AlgorithmName *string `min:"1" type:"string" required:"true"` + + // The overall status of the algorithm. + // + // AlgorithmStatus is a required field + AlgorithmStatus *string `type:"string" required:"true" enum:"AlgorithmStatus"` + + // A timestamp that shows when the algorithm was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s AlgorithmSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlgorithmSummary) GoString() string { + return s.String() +} + +// SetAlgorithmArn sets the AlgorithmArn field's value. +func (s *AlgorithmSummary) SetAlgorithmArn(v string) *AlgorithmSummary { + s.AlgorithmArn = &v + return s +} + +// SetAlgorithmDescription sets the AlgorithmDescription field's value. +func (s *AlgorithmSummary) SetAlgorithmDescription(v string) *AlgorithmSummary { + s.AlgorithmDescription = &v + return s +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *AlgorithmSummary) SetAlgorithmName(v string) *AlgorithmSummary { + s.AlgorithmName = &v + return s +} + +// SetAlgorithmStatus sets the AlgorithmStatus field's value. +func (s *AlgorithmSummary) SetAlgorithmStatus(v string) *AlgorithmSummary { + s.AlgorithmStatus = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *AlgorithmSummary) SetCreationTime(v time.Time) *AlgorithmSummary { + s.CreationTime = &v + return s +} + +// Defines a training job and a batch transform job that Amazon SageMaker runs +// to validate your algorithm. +// +// The data provided in the validation profile is made available to your buyers +// on AWS Marketplace. +type AlgorithmValidationProfile struct { + _ struct{} `type:"structure"` + + // The name of the profile for the algorithm. The name must have 1 to 63 characters. + // Valid characters are a-z, A-Z, 0-9, and - (hyphen). + // + // ProfileName is a required field + ProfileName *string `min:"1" type:"string" required:"true"` + + // The TrainingJobDefinition object that describes the training job that Amazon + // SageMaker runs to validate your algorithm. + // + // TrainingJobDefinition is a required field + TrainingJobDefinition *TrainingJobDefinition `type:"structure" required:"true"` + + // The TransformJobDefinition object that describes the transform job that Amazon + // SageMaker runs to validate your algorithm. + TransformJobDefinition *TransformJobDefinition `type:"structure"` +} + +// String returns the string representation +func (s AlgorithmValidationProfile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlgorithmValidationProfile) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AlgorithmValidationProfile) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AlgorithmValidationProfile"} + if s.ProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("ProfileName")) + } + if s.ProfileName != nil && len(*s.ProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProfileName", 1)) + } + if s.TrainingJobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingJobDefinition")) + } + if s.TrainingJobDefinition != nil { + if err := s.TrainingJobDefinition.Validate(); err != nil { + invalidParams.AddNested("TrainingJobDefinition", err.(request.ErrInvalidParams)) + } + } + if s.TransformJobDefinition != nil { + if err := s.TransformJobDefinition.Validate(); err != nil { + invalidParams.AddNested("TransformJobDefinition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProfileName sets the ProfileName field's value. +func (s *AlgorithmValidationProfile) SetProfileName(v string) *AlgorithmValidationProfile { + s.ProfileName = &v + return s +} + +// SetTrainingJobDefinition sets the TrainingJobDefinition field's value. +func (s *AlgorithmValidationProfile) SetTrainingJobDefinition(v *TrainingJobDefinition) *AlgorithmValidationProfile { + s.TrainingJobDefinition = v + return s +} + +// SetTransformJobDefinition sets the TransformJobDefinition field's value. +func (s *AlgorithmValidationProfile) SetTransformJobDefinition(v *TransformJobDefinition) *AlgorithmValidationProfile { + s.TransformJobDefinition = v + return s +} + +// Specifies configurations for one or more training jobs that Amazon SageMaker +// runs to test the algorithm. +type AlgorithmValidationSpecification struct { + _ struct{} `type:"structure"` + + // An array of AlgorithmValidationProfile objects, each of which specifies a + // training job and batch transform job that Amazon SageMaker runs to validate + // your algorithm. + // + // ValidationProfiles is a required field + ValidationProfiles []*AlgorithmValidationProfile `min:"1" type:"list" required:"true"` + + // The IAM roles that Amazon SageMaker uses to run the training jobs. + // + // ValidationRole is a required field + ValidationRole *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s AlgorithmValidationSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlgorithmValidationSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AlgorithmValidationSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AlgorithmValidationSpecification"} + if s.ValidationProfiles == nil { + invalidParams.Add(request.NewErrParamRequired("ValidationProfiles")) + } + if s.ValidationProfiles != nil && len(s.ValidationProfiles) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ValidationProfiles", 1)) + } + if s.ValidationRole == nil { + invalidParams.Add(request.NewErrParamRequired("ValidationRole")) + } + if s.ValidationRole != nil && len(*s.ValidationRole) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ValidationRole", 20)) + } + if s.ValidationProfiles != nil { + for i, v := range s.ValidationProfiles { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ValidationProfiles", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetValidationProfiles sets the ValidationProfiles field's value. +func (s *AlgorithmValidationSpecification) SetValidationProfiles(v []*AlgorithmValidationProfile) *AlgorithmValidationSpecification { + s.ValidationProfiles = v + return s +} + +// SetValidationRole sets the ValidationRole field's value. +func (s *AlgorithmValidationSpecification) SetValidationRole(v string) *AlgorithmValidationSpecification { + s.ValidationRole = &v + return s +} + +// Configures how labels are consolidated across human workers. +type AnnotationConsolidationConfig struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of a Lambda function implements the logic + // for annotation consolidation. + // + // For the built-in bounding box, image classification, semantic segmentation, + // and text classification task types, Amazon SageMaker Ground Truth provides + // the following Lambda functions: + // + // * Bounding box - Finds the most similar boxes from different workers based + // on the Jaccard index of the boxes. + // + // arn:aws:lambda:us-east-1:432418664414:function:ACS-BoundingBox + // + // arn:aws:lambda:us-east-2:266458841044:function:ACS-BoundingBox + // + // arn:aws:lambda:us-west-2:081040173940:function:ACS-BoundingBox + // + // arn:aws:lambda:eu-west-1:568282634449:function:ACS-BoundingBox + // + // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-BoundingBox + // + // * Image classification - Uses a variant of the Expectation Maximization + // approach to estimate the true class of an image based on annotations from + // individual workers. + // + // arn:aws:lambda:us-east-1:432418664414:function:ACS-ImageMultiClass + // + // arn:aws:lambda:us-east-2:266458841044:function:ACS-ImageMultiClass + // + // arn:aws:lambda:us-west-2:081040173940:function:ACS-ImageMultiClass + // + // arn:aws:lambda:eu-west-1:568282634449:function:ACS-ImageMultiClass + // + // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-ImageMultiClass + // + // * Semantic segmentation - Treats each pixel in an image as a multi-class + // classification and treats pixel annotations from workers as "votes" for + // the correct label. + // + // arn:aws:lambda:us-east-1:432418664414:function:ACS-SemanticSegmentation + // + // arn:aws:lambda:us-east-2:266458841044:function:ACS-SemanticSegmentation + // + // arn:aws:lambda:us-west-2:081040173940:function:ACS-SemanticSegmentation + // + // arn:aws:lambda:eu-west-1:568282634449:function:ACS-SemanticSegmentation + // + // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-SemanticSegmentation + // + // * Text classification - Uses a variant of the Expectation Maximization + // approach to estimate the true class of text based on annotations from + // individual workers. + // + // arn:aws:lambda:us-east-1:432418664414:function:ACS-TextMultiClass + // + // arn:aws:lambda:us-east-2:266458841044:function:ACS-TextMultiClass + // + // arn:aws:lambda:us-west-2:081040173940:function:ACS-TextMultiClass + // + // arn:aws:lambda:eu-west-1:568282634449:function:ACS-TextMultiClass + // + // arn:aws:lambda:ap-northeast-1:477331159723:function:ACS-TextMultiClass + // + // For more information, see Annotation Consolidation (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html). + // + // AnnotationConsolidationLambdaArn is a required field + AnnotationConsolidationLambdaArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AnnotationConsolidationConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnnotationConsolidationConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AnnotationConsolidationConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AnnotationConsolidationConfig"} + if s.AnnotationConsolidationLambdaArn == nil { + invalidParams.Add(request.NewErrParamRequired("AnnotationConsolidationLambdaArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnnotationConsolidationLambdaArn sets the AnnotationConsolidationLambdaArn field's value. +func (s *AnnotationConsolidationConfig) SetAnnotationConsolidationLambdaArn(v string) *AnnotationConsolidationConfig { + s.AnnotationConsolidationLambdaArn = &v + return s +} + +// A list of categorical hyperparameters to tune. +type CategoricalParameterRange struct { + _ struct{} `type:"structure"` + + // The name of the categorical hyperparameter to tune. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // A list of the categories for the hyperparameter. + // + // Values is a required field + Values []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s CategoricalParameterRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CategoricalParameterRange) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CategoricalParameterRange) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CategoricalParameterRange"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *CategoricalParameterRange) SetName(v string) *CategoricalParameterRange { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *CategoricalParameterRange) SetValues(v []*string) *CategoricalParameterRange { + s.Values = v + return s +} + +// Defines the possible values for a categorical hyperparameter. +type CategoricalParameterRangeSpecification struct { + _ struct{} `type:"structure"` + + // The allowed categories for the hyperparameter. + // + // Values is a required field + Values []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s CategoricalParameterRangeSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CategoricalParameterRangeSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CategoricalParameterRangeSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CategoricalParameterRangeSpecification"} + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetValues sets the Values field's value. +func (s *CategoricalParameterRangeSpecification) SetValues(v []*string) *CategoricalParameterRangeSpecification { + s.Values = v + return s +} + +// A channel is a named input source that training algorithms can consume. +type Channel struct { + _ struct{} `type:"structure"` + + // The name of the channel. + // + // ChannelName is a required field + ChannelName *string `min:"1" type:"string" required:"true"` + + // If training data is compressed, the compression type. The default value is + // None. CompressionType is used only in Pipe input mode. In File mode, leave + // this field unset or set it to None. + CompressionType *string `type:"string" enum:"CompressionType"` + + // The MIME type of the data. + ContentType *string `type:"string"` + + // The location of the channel data. + // + // DataSource is a required field + DataSource *DataSource `type:"structure" required:"true"` + + // (Optional) The input mode to use for the data channel in a training job. + // If you don't set a value for InputMode, Amazon SageMaker uses the value set + // for TrainingInputMode. Use this parameter to override the TrainingInputMode + // setting in a AlgorithmSpecification request when you have a channel that + // needs a different input mode from the training job's general setting. To + // download the data from Amazon Simple Storage Service (Amazon S3) to the provisioned + // ML storage volume, and mount the directory to a Docker volume, use File input + // mode. To stream data directly from Amazon S3 to the container, choose Pipe + // input mode. + // + // To use a model for incremental training, choose File input model. + InputMode *string `type:"string" enum:"TrainingInputMode"` + + // Specify RecordIO as the value when input data is in raw format but the training + // algorithm requires the RecordIO format. In this case, Amazon SageMaker wraps + // each individual S3 object in a RecordIO record. If the input data is already + // in RecordIO format, you don't need to set this attribute. For more information, + // see Create a Dataset Using RecordIO (https://mxnet.incubator.apache.org/architecture/note_data_loading.html#data-format) + RecordWrapperType *string `type:"string" enum:"RecordWrapper"` + + // A configuration for a shuffle option for input data in a channel. If you + // use S3Prefix for S3DataType, this shuffles the results of the S3 key prefix + // matches. If you use ManifestFile, the order of the S3 object references in + // the ManifestFile is shuffled. If you use AugmentedManifestFile, the order + // of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling + // order is determined using the Seed value. + // + // For Pipe input mode, shuffling is done at the start of every epoch. With + // large datasets this ensures that the order of the training data is different + // for each epoch, it helps reduce bias and possible overfitting. In a multi-node + // training job when ShuffleConfig is combined with S3DataDistributionType of + // ShardedByS3Key, the data is shuffled across nodes so that the content sent + // to a particular node on the first epoch might be sent to a different node + // on the second epoch. + ShuffleConfig *ShuffleConfig `type:"structure"` +} + +// String returns the string representation +func (s Channel) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Channel) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Channel) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Channel"} + if s.ChannelName == nil { + invalidParams.Add(request.NewErrParamRequired("ChannelName")) + } + if s.ChannelName != nil && len(*s.ChannelName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ChannelName", 1)) + } + if s.DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("DataSource")) + } + if s.DataSource != nil { + if err := s.DataSource.Validate(); err != nil { + invalidParams.AddNested("DataSource", err.(request.ErrInvalidParams)) + } + } + if s.ShuffleConfig != nil { + if err := s.ShuffleConfig.Validate(); err != nil { + invalidParams.AddNested("ShuffleConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetChannelName sets the ChannelName field's value. +func (s *Channel) SetChannelName(v string) *Channel { + s.ChannelName = &v + return s +} + +// SetCompressionType sets the CompressionType field's value. +func (s *Channel) SetCompressionType(v string) *Channel { + s.CompressionType = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *Channel) SetContentType(v string) *Channel { + s.ContentType = &v + return s +} + +// SetDataSource sets the DataSource field's value. +func (s *Channel) SetDataSource(v *DataSource) *Channel { + s.DataSource = v + return s +} + +// SetInputMode sets the InputMode field's value. +func (s *Channel) SetInputMode(v string) *Channel { + s.InputMode = &v + return s +} + +// SetRecordWrapperType sets the RecordWrapperType field's value. +func (s *Channel) SetRecordWrapperType(v string) *Channel { + s.RecordWrapperType = &v + return s +} + +// SetShuffleConfig sets the ShuffleConfig field's value. +func (s *Channel) SetShuffleConfig(v *ShuffleConfig) *Channel { + s.ShuffleConfig = v + return s +} + +// Defines a named input source, called a channel, to be used by an algorithm. +type ChannelSpecification struct { + _ struct{} `type:"structure"` + + // A brief description of the channel. + Description *string `type:"string"` + + // Indicates whether the channel is required by the algorithm. + IsRequired *bool `type:"boolean"` + + // The name of the channel. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The allowed compression types, if data compression is used. + SupportedCompressionTypes []*string `type:"list"` + + // The supported MIME types for the data. + // + // SupportedContentTypes is a required field + SupportedContentTypes []*string `type:"list" required:"true"` + + // The allowed input mode, either FILE or PIPE. + // + // In FILE mode, Amazon SageMaker copies the data from the input source onto + // the local Amazon Elastic Block Store (Amazon EBS) volumes before starting + // your training algorithm. This is the most commonly used input mode. + // + // In PIPE mode, Amazon SageMaker streams input data from the source directly + // to your algorithm without using the EBS volume. + // + // SupportedInputModes is a required field + SupportedInputModes []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ChannelSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ChannelSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ChannelSpecification"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.SupportedContentTypes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedContentTypes")) + } + if s.SupportedInputModes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedInputModes")) + } + if s.SupportedInputModes != nil && len(s.SupportedInputModes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SupportedInputModes", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ChannelSpecification) SetDescription(v string) *ChannelSpecification { + s.Description = &v + return s +} + +// SetIsRequired sets the IsRequired field's value. +func (s *ChannelSpecification) SetIsRequired(v bool) *ChannelSpecification { + s.IsRequired = &v + return s +} + +// SetName sets the Name field's value. +func (s *ChannelSpecification) SetName(v string) *ChannelSpecification { + s.Name = &v + return s +} + +// SetSupportedCompressionTypes sets the SupportedCompressionTypes field's value. +func (s *ChannelSpecification) SetSupportedCompressionTypes(v []*string) *ChannelSpecification { + s.SupportedCompressionTypes = v + return s +} + +// SetSupportedContentTypes sets the SupportedContentTypes field's value. +func (s *ChannelSpecification) SetSupportedContentTypes(v []*string) *ChannelSpecification { + s.SupportedContentTypes = v + return s +} + +// SetSupportedInputModes sets the SupportedInputModes field's value. +func (s *ChannelSpecification) SetSupportedInputModes(v []*string) *ChannelSpecification { + s.SupportedInputModes = v + return s +} + +// Specifies summary information about a Git repository. +type CodeRepositorySummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Git repository. + // + // CodeRepositoryArn is a required field + CodeRepositoryArn *string `min:"1" type:"string" required:"true"` + + // The name of the Git repository. + // + // CodeRepositoryName is a required field + CodeRepositoryName *string `min:"1" type:"string" required:"true"` + + // The date and time that the Git repository was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Configuration details for the Git repository, including the URL where it + // is located and the ARN of the AWS Secrets Manager secret that contains the + // credentials used to access the repository. + GitConfig *GitConfig `type:"structure"` + + // The date and time that the Git repository was last modified. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s CodeRepositorySummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CodeRepositorySummary) GoString() string { + return s.String() +} + +// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. +func (s *CodeRepositorySummary) SetCodeRepositoryArn(v string) *CodeRepositorySummary { + s.CodeRepositoryArn = &v + return s +} + +// SetCodeRepositoryName sets the CodeRepositoryName field's value. +func (s *CodeRepositorySummary) SetCodeRepositoryName(v string) *CodeRepositorySummary { + s.CodeRepositoryName = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CodeRepositorySummary) SetCreationTime(v time.Time) *CodeRepositorySummary { + s.CreationTime = &v + return s +} + +// SetGitConfig sets the GitConfig field's value. +func (s *CodeRepositorySummary) SetGitConfig(v *GitConfig) *CodeRepositorySummary { + s.GitConfig = v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *CodeRepositorySummary) SetLastModifiedTime(v time.Time) *CodeRepositorySummary { + s.LastModifiedTime = &v + return s +} + +// Identifies a Amazon Cognito user group. A user group can be used in on or +// more work teams. +type CognitoMemberDefinition struct { + _ struct{} `type:"structure"` + + // An identifier for an application client. You must create the app client ID + // using Amazon Cognito. + // + // ClientId is a required field + ClientId *string `min:"1" type:"string" required:"true"` + + // An identifier for a user group. + // + // UserGroup is a required field + UserGroup *string `min:"1" type:"string" required:"true"` + + // An identifier for a user pool. The user pool must be in the same region as + // the service that you are calling. + // + // UserPool is a required field + UserPool *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CognitoMemberDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CognitoMemberDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CognitoMemberDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CognitoMemberDefinition"} + if s.ClientId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientId")) + } + if s.ClientId != nil && len(*s.ClientId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientId", 1)) + } + if s.UserGroup == nil { + invalidParams.Add(request.NewErrParamRequired("UserGroup")) + } + if s.UserGroup != nil && len(*s.UserGroup) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserGroup", 1)) + } + if s.UserPool == nil { + invalidParams.Add(request.NewErrParamRequired("UserPool")) + } + if s.UserPool != nil && len(*s.UserPool) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserPool", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientId sets the ClientId field's value. +func (s *CognitoMemberDefinition) SetClientId(v string) *CognitoMemberDefinition { + s.ClientId = &v + return s +} + +// SetUserGroup sets the UserGroup field's value. +func (s *CognitoMemberDefinition) SetUserGroup(v string) *CognitoMemberDefinition { + s.UserGroup = &v + return s +} + +// SetUserPool sets the UserPool field's value. +func (s *CognitoMemberDefinition) SetUserPool(v string) *CognitoMemberDefinition { + s.UserPool = &v + return s +} + +// A summary of a model compilation job. +type CompilationJobSummary struct { + _ struct{} `type:"structure"` + + // The time when the model compilation job completed. + CompilationEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the model compilation job. + // + // CompilationJobArn is a required field + CompilationJobArn *string `type:"string" required:"true"` + + // The name of the model compilation job that you want a summary for. + // + // CompilationJobName is a required field + CompilationJobName *string `min:"1" type:"string" required:"true"` + + // The status of the model compilation job. + // + // CompilationJobStatus is a required field + CompilationJobStatus *string `type:"string" required:"true" enum:"CompilationJobStatus"` + + // The time when the model compilation job started. + CompilationStartTime *time.Time `type:"timestamp"` + + // The type of device that the model will run on after compilation has completed. + // + // CompilationTargetDevice is a required field + CompilationTargetDevice *string `type:"string" required:"true" enum:"TargetDevice"` + + // The time when the model compilation job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The time when the model compilation job was last modified. + LastModifiedTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CompilationJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompilationJobSummary) GoString() string { + return s.String() +} + +// SetCompilationEndTime sets the CompilationEndTime field's value. +func (s *CompilationJobSummary) SetCompilationEndTime(v time.Time) *CompilationJobSummary { + s.CompilationEndTime = &v + return s +} + +// SetCompilationJobArn sets the CompilationJobArn field's value. +func (s *CompilationJobSummary) SetCompilationJobArn(v string) *CompilationJobSummary { + s.CompilationJobArn = &v + return s +} + +// SetCompilationJobName sets the CompilationJobName field's value. +func (s *CompilationJobSummary) SetCompilationJobName(v string) *CompilationJobSummary { + s.CompilationJobName = &v + return s +} + +// SetCompilationJobStatus sets the CompilationJobStatus field's value. +func (s *CompilationJobSummary) SetCompilationJobStatus(v string) *CompilationJobSummary { + s.CompilationJobStatus = &v + return s +} + +// SetCompilationStartTime sets the CompilationStartTime field's value. +func (s *CompilationJobSummary) SetCompilationStartTime(v time.Time) *CompilationJobSummary { + s.CompilationStartTime = &v + return s +} + +// SetCompilationTargetDevice sets the CompilationTargetDevice field's value. +func (s *CompilationJobSummary) SetCompilationTargetDevice(v string) *CompilationJobSummary { + s.CompilationTargetDevice = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CompilationJobSummary) SetCreationTime(v time.Time) *CompilationJobSummary { + s.CreationTime = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *CompilationJobSummary) SetLastModifiedTime(v time.Time) *CompilationJobSummary { + s.LastModifiedTime = &v + return s +} + +// Describes the container, as part of model definition. +type ContainerDefinition struct { + _ struct{} `type:"structure"` + + // The DNS host name for the container after Amazon SageMaker deploys it. + ContainerHostname *string `type:"string"` + + // The environment variables to set in the Docker container. Each key and value + // in the Environment string to string map can have length of up to 1024. We + // support up to 16 entries in the map. + Environment map[string]*string `type:"map"` + + // The Amazon EC2 Container Registry (Amazon ECR) path where inference code + // is stored. If you are using your own custom algorithm instead of an algorithm + // provided by Amazon SageMaker, the inference code must meet Amazon SageMaker + // requirements. Amazon SageMaker supports both registry/repository[:tag] and + // registry/repository[@digest] image path formats. For more information, see + // Using Your Own Algorithms with Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html) + Image *string `type:"string"` + + // The S3 path where the model artifacts, which result from model training, + // are stored. This path must point to a single gzip compressed tar archive + // (.tar.gz suffix). + // + // If you provide a value for this parameter, Amazon SageMaker uses AWS Security + // Token Service to download model artifacts from the S3 path you provide. AWS + // STS is activated in your IAM user account by default. If you previously deactivated + // AWS STS for a region, you need to reactivate AWS STS for that region. For + // more information, see Activating and Deactivating AWS STS in an AWS Region + // (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) + // in the AWS Identity and Access Management User Guide. + ModelDataUrl *string `type:"string"` + + // The name of the model package to use to create the model. + ModelPackageName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ContainerDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContainerDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContainerDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContainerDefinition"} + if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerHostname sets the ContainerHostname field's value. +func (s *ContainerDefinition) SetContainerHostname(v string) *ContainerDefinition { + s.ContainerHostname = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *ContainerDefinition) SetEnvironment(v map[string]*string) *ContainerDefinition { + s.Environment = v + return s +} + +// SetImage sets the Image field's value. +func (s *ContainerDefinition) SetImage(v string) *ContainerDefinition { + s.Image = &v + return s +} + +// SetModelDataUrl sets the ModelDataUrl field's value. +func (s *ContainerDefinition) SetModelDataUrl(v string) *ContainerDefinition { + s.ModelDataUrl = &v + return s +} + +// SetModelPackageName sets the ModelPackageName field's value. +func (s *ContainerDefinition) SetModelPackageName(v string) *ContainerDefinition { + s.ModelPackageName = &v + return s +} + +// A list of continuous hyperparameters to tune. +type ContinuousParameterRange struct { + _ struct{} `type:"structure"` + + // The maximum value for the hyperparameter. The tuning job uses floating-point + // values between MinValue value and this value for tuning. + // + // MaxValue is a required field + MaxValue *string `type:"string" required:"true"` + + // The minimum value for the hyperparameter. The tuning job uses floating-point + // values between this value and MaxValuefor tuning. + // + // MinValue is a required field + MinValue *string `type:"string" required:"true"` + + // The name of the continuous hyperparameter to tune. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ContinuousParameterRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContinuousParameterRange) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContinuousParameterRange) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContinuousParameterRange"} + if s.MaxValue == nil { + invalidParams.Add(request.NewErrParamRequired("MaxValue")) + } + if s.MinValue == nil { + invalidParams.Add(request.NewErrParamRequired("MinValue")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxValue sets the MaxValue field's value. +func (s *ContinuousParameterRange) SetMaxValue(v string) *ContinuousParameterRange { + s.MaxValue = &v + return s +} + +// SetMinValue sets the MinValue field's value. +func (s *ContinuousParameterRange) SetMinValue(v string) *ContinuousParameterRange { + s.MinValue = &v + return s +} + +// SetName sets the Name field's value. +func (s *ContinuousParameterRange) SetName(v string) *ContinuousParameterRange { + s.Name = &v + return s +} + +// Defines the possible values for a continuous hyperparameter. +type ContinuousParameterRangeSpecification struct { + _ struct{} `type:"structure"` + + // The maximum floating-point value allowed. + // + // MaxValue is a required field + MaxValue *string `type:"string" required:"true"` + + // The minimum floating-point value allowed. + // + // MinValue is a required field + MinValue *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ContinuousParameterRangeSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ContinuousParameterRangeSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ContinuousParameterRangeSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ContinuousParameterRangeSpecification"} + if s.MaxValue == nil { + invalidParams.Add(request.NewErrParamRequired("MaxValue")) + } + if s.MinValue == nil { + invalidParams.Add(request.NewErrParamRequired("MinValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxValue sets the MaxValue field's value. +func (s *ContinuousParameterRangeSpecification) SetMaxValue(v string) *ContinuousParameterRangeSpecification { + s.MaxValue = &v + return s +} + +// SetMinValue sets the MinValue field's value. +func (s *ContinuousParameterRangeSpecification) SetMinValue(v string) *ContinuousParameterRangeSpecification { + s.MinValue = &v + return s +} + +type CreateAlgorithmInput struct { + _ struct{} `type:"structure"` + + // A description of the algorithm. + AlgorithmDescription *string `type:"string"` + + // The name of the algorithm. + // + // AlgorithmName is a required field + AlgorithmName *string `min:"1" type:"string" required:"true"` + + // Whether to certify the algorithm so that it can be listed in AWS Marketplace. + CertifyForMarketplace *bool `type:"boolean"` + + // Specifies details about inference jobs that the algorithm runs, including + // the following: + // + // * The Amazon ECR paths of containers that contain the inference code and + // model artifacts. + // + // * The instance types that the algorithm supports for transform jobs and + // real-time endpoints used for inference. + // + // * The input and output content formats that the algorithm supports for + // inference. + InferenceSpecification *InferenceSpecification `type:"structure"` + + // Specifies details about training jobs run by this algorithm, including the + // following: + // + // * The Amazon ECR path of the container and the version digest of the algorithm. + // + // * The hyperparameters that the algorithm supports. + // + // * The instance types that the algorithm supports for training. + // + // * Whether the algorithm supports distributed training. + // + // * The metrics that the algorithm emits to Amazon CloudWatch. + // + // * Which metrics that the algorithm emits can be used as the objective + // metric for hyperparameter tuning jobs. + // + // * The input channels that the algorithm supports for training data. For + // example, an algorithm might support train, validation, and test channels. + // + // TrainingSpecification is a required field + TrainingSpecification *TrainingSpecification `type:"structure" required:"true"` + + // Specifies configurations for one or more training jobs and that Amazon SageMaker + // runs to test the algorithm's training code and, optionally, one or more batch + // transform jobs that Amazon SageMaker runs to test the algorithm's inference + // code. + ValidationSpecification *AlgorithmValidationSpecification `type:"structure"` +} + +// String returns the string representation +func (s CreateAlgorithmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAlgorithmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAlgorithmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAlgorithmInput"} + if s.AlgorithmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) + } + if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) + } + if s.TrainingSpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingSpecification")) + } + if s.InferenceSpecification != nil { + if err := s.InferenceSpecification.Validate(); err != nil { + invalidParams.AddNested("InferenceSpecification", err.(request.ErrInvalidParams)) + } + } + if s.TrainingSpecification != nil { + if err := s.TrainingSpecification.Validate(); err != nil { + invalidParams.AddNested("TrainingSpecification", err.(request.ErrInvalidParams)) + } + } + if s.ValidationSpecification != nil { + if err := s.ValidationSpecification.Validate(); err != nil { + invalidParams.AddNested("ValidationSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmDescription sets the AlgorithmDescription field's value. +func (s *CreateAlgorithmInput) SetAlgorithmDescription(v string) *CreateAlgorithmInput { + s.AlgorithmDescription = &v + return s +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *CreateAlgorithmInput) SetAlgorithmName(v string) *CreateAlgorithmInput { + s.AlgorithmName = &v + return s +} + +// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. +func (s *CreateAlgorithmInput) SetCertifyForMarketplace(v bool) *CreateAlgorithmInput { + s.CertifyForMarketplace = &v + return s +} + +// SetInferenceSpecification sets the InferenceSpecification field's value. +func (s *CreateAlgorithmInput) SetInferenceSpecification(v *InferenceSpecification) *CreateAlgorithmInput { + s.InferenceSpecification = v + return s +} + +// SetTrainingSpecification sets the TrainingSpecification field's value. +func (s *CreateAlgorithmInput) SetTrainingSpecification(v *TrainingSpecification) *CreateAlgorithmInput { + s.TrainingSpecification = v + return s +} + +// SetValidationSpecification sets the ValidationSpecification field's value. +func (s *CreateAlgorithmInput) SetValidationSpecification(v *AlgorithmValidationSpecification) *CreateAlgorithmInput { + s.ValidationSpecification = v + return s +} + +type CreateAlgorithmOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the new algorithm. + // + // AlgorithmArn is a required field + AlgorithmArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateAlgorithmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAlgorithmOutput) GoString() string { + return s.String() +} + +// SetAlgorithmArn sets the AlgorithmArn field's value. +func (s *CreateAlgorithmOutput) SetAlgorithmArn(v string) *CreateAlgorithmOutput { + s.AlgorithmArn = &v + return s +} + +type CreateCodeRepositoryInput struct { + _ struct{} `type:"structure"` + + // The name of the Git repository. The name must have 1 to 63 characters. Valid + // characters are a-z, A-Z, 0-9, and - (hyphen). + // + // CodeRepositoryName is a required field + CodeRepositoryName *string `min:"1" type:"string" required:"true"` + + // Specifies details about the repository, including the URL where the repository + // is located, the default branch, and credentials to use to access the repository. + // + // GitConfig is a required field + GitConfig *GitConfig `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCodeRepositoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCodeRepositoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCodeRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCodeRepositoryInput"} + if s.CodeRepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) + } + if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) + } + if s.GitConfig == nil { + invalidParams.Add(request.NewErrParamRequired("GitConfig")) + } + if s.GitConfig != nil { + if err := s.GitConfig.Validate(); err != nil { + invalidParams.AddNested("GitConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodeRepositoryName sets the CodeRepositoryName field's value. +func (s *CreateCodeRepositoryInput) SetCodeRepositoryName(v string) *CreateCodeRepositoryInput { + s.CodeRepositoryName = &v + return s +} + +// SetGitConfig sets the GitConfig field's value. +func (s *CreateCodeRepositoryInput) SetGitConfig(v *GitConfig) *CreateCodeRepositoryInput { + s.GitConfig = v + return s +} + +type CreateCodeRepositoryOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the new repository. + // + // CodeRepositoryArn is a required field + CodeRepositoryArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateCodeRepositoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCodeRepositoryOutput) GoString() string { + return s.String() +} + +// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. +func (s *CreateCodeRepositoryOutput) SetCodeRepositoryArn(v string) *CreateCodeRepositoryOutput { + s.CodeRepositoryArn = &v + return s +} + +type CreateCompilationJobInput struct { + _ struct{} `type:"structure"` + + // A name for the model compilation job. The name must be unique within the + // AWS Region and within your AWS account. + // + // CompilationJobName is a required field + CompilationJobName *string `min:"1" type:"string" required:"true"` + + // Provides information about the location of input model artifacts, the name + // and shape of the expected data inputs, and the framework in which the model + // was trained. + // + // InputConfig is a required field + InputConfig *InputConfig `type:"structure" required:"true"` + + // Provides information about the output location for the compiled model and + // the target device the model runs on. + // + // OutputConfig is a required field + OutputConfig *OutputConfig `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of an IIAMAM role that enables Amazon SageMaker + // to perform tasks on your behalf. + // + // During model compilation, Amazon SageMaker needs your permission to: + // + // * Read input data from an S3 bucket + // + // * Write model artifacts to an S3 bucket + // + // * Write logs to Amazon CloudWatch Logs + // + // * Publish metrics to Amazon CloudWatch + // + // You grant permissions for all of these tasks to an IAM role. To pass this + // role to Amazon SageMaker, the caller of this API must have the iam:PassRole + // permission. For more information, see Amazon SageMaker Roles. (https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html) + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // The duration allowed for model compilation. + // + // StoppingCondition is a required field + StoppingCondition *StoppingCondition `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCompilationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCompilationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCompilationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCompilationJobInput"} + if s.CompilationJobName == nil { + invalidParams.Add(request.NewErrParamRequired("CompilationJobName")) + } + if s.CompilationJobName != nil && len(*s.CompilationJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CompilationJobName", 1)) + } + if s.InputConfig == nil { + invalidParams.Add(request.NewErrParamRequired("InputConfig")) + } + if s.OutputConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputConfig")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.StoppingCondition == nil { + invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) + } + if s.InputConfig != nil { + if err := s.InputConfig.Validate(); err != nil { + invalidParams.AddNested("InputConfig", err.(request.ErrInvalidParams)) + } + } + if s.OutputConfig != nil { + if err := s.OutputConfig.Validate(); err != nil { + invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) + } + } + if s.StoppingCondition != nil { + if err := s.StoppingCondition.Validate(); err != nil { + invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompilationJobName sets the CompilationJobName field's value. +func (s *CreateCompilationJobInput) SetCompilationJobName(v string) *CreateCompilationJobInput { + s.CompilationJobName = &v + return s +} + +// SetInputConfig sets the InputConfig field's value. +func (s *CreateCompilationJobInput) SetInputConfig(v *InputConfig) *CreateCompilationJobInput { + s.InputConfig = v + return s +} + +// SetOutputConfig sets the OutputConfig field's value. +func (s *CreateCompilationJobInput) SetOutputConfig(v *OutputConfig) *CreateCompilationJobInput { + s.OutputConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateCompilationJobInput) SetRoleArn(v string) *CreateCompilationJobInput { + s.RoleArn = &v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *CreateCompilationJobInput) SetStoppingCondition(v *StoppingCondition) *CreateCompilationJobInput { + s.StoppingCondition = v + return s +} + +type CreateCompilationJobOutput struct { + _ struct{} `type:"structure"` + + // If the action is successful, the service sends back an HTTP 200 response. + // Amazon SageMaker returns the following data in JSON format: + // + // * CompilationJobArn: The Amazon Resource Name (ARN) of the compiled job. + // + // CompilationJobArn is a required field + CompilationJobArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateCompilationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCompilationJobOutput) GoString() string { + return s.String() +} + +// SetCompilationJobArn sets the CompilationJobArn field's value. +func (s *CreateCompilationJobOutput) SetCompilationJobArn(v string) *CreateCompilationJobOutput { + s.CompilationJobArn = &v + return s +} + +type CreateEndpointConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the endpoint configuration. You specify this name in a CreateEndpoint + // (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html) + // request. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of a AWS Key Management Service key that Amazon + // SageMaker uses to encrypt data on the storage volume attached to the ML compute + // instance that hosts the endpoint. + KmsKeyId *string `type:"string"` + + // An array of ProductionVariant objects, one for each model that you want to + // host at this endpoint. + // + // ProductionVariants is a required field + ProductionVariants []*ProductionVariant `min:"1" type:"list" required:"true"` + + // An array of key-value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateEndpointConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEndpointConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEndpointConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEndpointConfigInput"} + if s.EndpointConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) + } + if s.ProductionVariants == nil { + invalidParams.Add(request.NewErrParamRequired("ProductionVariants")) + } + if s.ProductionVariants != nil && len(s.ProductionVariants) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductionVariants", 1)) + } + if s.ProductionVariants != nil { + for i, v := range s.ProductionVariants { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ProductionVariants", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *CreateEndpointConfigInput) SetEndpointConfigName(v string) *CreateEndpointConfigInput { + s.EndpointConfigName = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateEndpointConfigInput) SetKmsKeyId(v string) *CreateEndpointConfigInput { + s.KmsKeyId = &v + return s +} + +// SetProductionVariants sets the ProductionVariants field's value. +func (s *CreateEndpointConfigInput) SetProductionVariants(v []*ProductionVariant) *CreateEndpointConfigInput { + s.ProductionVariants = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateEndpointConfigInput) SetTags(v []*Tag) *CreateEndpointConfigInput { + s.Tags = v + return s +} + +type CreateEndpointConfigOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the endpoint configuration. + // + // EndpointConfigArn is a required field + EndpointConfigArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateEndpointConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEndpointConfigOutput) GoString() string { + return s.String() +} + +// SetEndpointConfigArn sets the EndpointConfigArn field's value. +func (s *CreateEndpointConfigOutput) SetEndpointConfigArn(v string) *CreateEndpointConfigOutput { + s.EndpointConfigArn = &v + return s +} + +type CreateEndpointInput struct { + _ struct{} `type:"structure"` + + // The name of an endpoint configuration. For more information, see CreateEndpointConfig + // (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpointConfig.html). + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` + + // The name of the endpoint. The name must be unique within an AWS Region in + // your AWS account. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` + + // An array of key-value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what)in + // the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEndpointInput"} + if s.EndpointConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) + } + if s.EndpointName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointName")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *CreateEndpointInput) SetEndpointConfigName(v string) *CreateEndpointInput { + s.EndpointConfigName = &v + return s +} + +// SetEndpointName sets the EndpointName field's value. +func (s *CreateEndpointInput) SetEndpointName(v string) *CreateEndpointInput { + s.EndpointName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateEndpointInput) SetTags(v []*Tag) *CreateEndpointInput { + s.Tags = v + return s +} + +type CreateEndpointOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the endpoint. + // + // EndpointArn is a required field + EndpointArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateEndpointOutput) GoString() string { + return s.String() +} + +// SetEndpointArn sets the EndpointArn field's value. +func (s *CreateEndpointOutput) SetEndpointArn(v string) *CreateEndpointOutput { + s.EndpointArn = &v + return s +} + +type CreateHyperParameterTuningJobInput struct { + _ struct{} `type:"structure"` + + // The HyperParameterTuningJobConfig object that describes the tuning job, including + // the search strategy, the objective metric used to evaluate training jobs, + // ranges of parameters to search, and resource limits for the tuning job. For + // more information, see automatic-model-tuning + // + // HyperParameterTuningJobConfig is a required field + HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` + + // The name of the tuning job. This name is the prefix for the names of all + // training jobs that this tuning job launches. The name must be unique within + // the same AWS account and AWS Region. The name must have { } to { } characters. + // Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name + // is not case sensitive. + // + // HyperParameterTuningJobName is a required field + HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` + + // An array of key-value pairs. You can use tags to categorize your AWS resources + // in different ways, for example, by purpose, owner, or environment. For more + // information, see AWS Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). + // + // Tags that you specify for the tuning job are also added to all training jobs + // that the tuning job launches. + Tags []*Tag `type:"list"` + + // The HyperParameterTrainingJobDefinition object that describes the training + // jobs that this tuning job launches, including static hyperparameters, input + // data configuration, output data configuration, resource configuration, and + // stopping condition. + // + // TrainingJobDefinition is a required field + TrainingJobDefinition *HyperParameterTrainingJobDefinition `type:"structure" required:"true"` + + // Specifies the configuration for starting the hyperparameter tuning job using + // one or more previous tuning jobs as a starting point. The results of previous + // tuning jobs are used to inform which combinations of hyperparameters to search + // over in the new tuning job. + // + // All training jobs launched by the new hyperparameter tuning job are evaluated + // by using the objective metric. If you specify IDENTICAL_DATA_AND_ALGORITHM + // as the WarmStartType value for the warm start configuration, the training + // job that performs the best in the new tuning job is compared to the best + // training jobs from the parent tuning jobs. From these, the training job that + // performs the best as measured by the objective metric is returned as the + // overall best training job. + // + // All training jobs launched by parent hyperparameter tuning jobs and the new + // hyperparameter tuning jobs count against the limit of training jobs for the + // tuning job. + WarmStartConfig *HyperParameterTuningJobWarmStartConfig `type:"structure"` +} + +// String returns the string representation +func (s CreateHyperParameterTuningJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHyperParameterTuningJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHyperParameterTuningJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHyperParameterTuningJobInput"} + if s.HyperParameterTuningJobConfig == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobConfig")) + } + if s.HyperParameterTuningJobName == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) + } + if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) + } + if s.TrainingJobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingJobDefinition")) + } + if s.HyperParameterTuningJobConfig != nil { + if err := s.HyperParameterTuningJobConfig.Validate(); err != nil { + invalidParams.AddNested("HyperParameterTuningJobConfig", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TrainingJobDefinition != nil { + if err := s.TrainingJobDefinition.Validate(); err != nil { + invalidParams.AddNested("TrainingJobDefinition", err.(request.ErrInvalidParams)) + } + } + if s.WarmStartConfig != nil { + if err := s.WarmStartConfig.Validate(); err != nil { + invalidParams.AddNested("WarmStartConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameterTuningJobConfig sets the HyperParameterTuningJobConfig field's value. +func (s *CreateHyperParameterTuningJobInput) SetHyperParameterTuningJobConfig(v *HyperParameterTuningJobConfig) *CreateHyperParameterTuningJobInput { + s.HyperParameterTuningJobConfig = v + return s +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *CreateHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *CreateHyperParameterTuningJobInput { + s.HyperParameterTuningJobName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateHyperParameterTuningJobInput) SetTags(v []*Tag) *CreateHyperParameterTuningJobInput { + s.Tags = v + return s +} + +// SetTrainingJobDefinition sets the TrainingJobDefinition field's value. +func (s *CreateHyperParameterTuningJobInput) SetTrainingJobDefinition(v *HyperParameterTrainingJobDefinition) *CreateHyperParameterTuningJobInput { + s.TrainingJobDefinition = v + return s +} + +// SetWarmStartConfig sets the WarmStartConfig field's value. +func (s *CreateHyperParameterTuningJobInput) SetWarmStartConfig(v *HyperParameterTuningJobWarmStartConfig) *CreateHyperParameterTuningJobInput { + s.WarmStartConfig = v + return s +} + +type CreateHyperParameterTuningJobOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the tuning job. Amazon SageMaker assigns + // an ARN to a hyperparameter tuning job when you create it. + // + // HyperParameterTuningJobArn is a required field + HyperParameterTuningJobArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateHyperParameterTuningJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHyperParameterTuningJobOutput) GoString() string { + return s.String() +} + +// SetHyperParameterTuningJobArn sets the HyperParameterTuningJobArn field's value. +func (s *CreateHyperParameterTuningJobOutput) SetHyperParameterTuningJobArn(v string) *CreateHyperParameterTuningJobOutput { + s.HyperParameterTuningJobArn = &v + return s +} + +type CreateLabelingJobInput struct { + _ struct{} `type:"structure"` + + // Configures the information required for human workers to complete a labeling + // task. + // + // HumanTaskConfig is a required field + HumanTaskConfig *HumanTaskConfig `type:"structure" required:"true"` + + // Input data for the labeling job, such as the Amazon S3 location of the data + // objects and the location of the manifest file that describes the data objects. + // + // InputConfig is a required field + InputConfig *LabelingJobInputConfig `type:"structure" required:"true"` + + // The attribute name to use for the label in the output manifest file. This + // is the key for the key/value pair formed with the label that a worker assigns + // to the object. The name can't end with "-metadata". If you are running a + // semantic segmentation labeling job, the attribute name must end with "-ref". + // If you are running any other kind of labeling job, the attribute name must + // not end with "-ref". + // + // LabelAttributeName is a required field + LabelAttributeName *string `min:"1" type:"string" required:"true"` + + // The S3 URL of the file that defines the categories used to label the data + // objects. + // + // The file is a JSON structure in the following format: + // + // { + // + // "document-version": "2018-11-28" + // + // "labels": [ + // + // { + // + // "label": "label 1" + // + // }, + // + // { + // + // "label": "label 2" + // + // }, + // + // ... + // + // { + // + // "label": "label n" + // + // } + // + // ] + // + // } + LabelCategoryConfigS3Uri *string `type:"string"` + + // Configures the information required to perform automated data labeling. + LabelingJobAlgorithmsConfig *LabelingJobAlgorithmsConfig `type:"structure"` + + // The name of the labeling job. This name is used to identify the job in a + // list of labeling jobs. + // + // LabelingJobName is a required field + LabelingJobName *string `min:"1" type:"string" required:"true"` + + // The location of the output data and the AWS Key Management Service key ID + // for the key used to encrypt the output data, if any. + // + // OutputConfig is a required field + OutputConfig *LabelingJobOutputConfig `type:"structure" required:"true"` + + // The Amazon Resource Number (ARN) that Amazon SageMaker assumes to perform + // tasks on your behalf during data labeling. You must grant this role the necessary + // permissions so that Amazon SageMaker can successfully complete data labeling. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // A set of conditions for stopping the labeling job. If any of the conditions + // are met, the job is automatically stopped. You can use these conditions to + // control the cost of data labeling. + StoppingConditions *LabelingJobStoppingConditions `type:"structure"` + + // An array of key/value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s CreateLabelingJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLabelingJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLabelingJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLabelingJobInput"} + if s.HumanTaskConfig == nil { + invalidParams.Add(request.NewErrParamRequired("HumanTaskConfig")) + } + if s.InputConfig == nil { + invalidParams.Add(request.NewErrParamRequired("InputConfig")) + } + if s.LabelAttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("LabelAttributeName")) + } + if s.LabelAttributeName != nil && len(*s.LabelAttributeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LabelAttributeName", 1)) + } + if s.LabelingJobName == nil { + invalidParams.Add(request.NewErrParamRequired("LabelingJobName")) + } + if s.LabelingJobName != nil && len(*s.LabelingJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LabelingJobName", 1)) + } + if s.OutputConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputConfig")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.HumanTaskConfig != nil { + if err := s.HumanTaskConfig.Validate(); err != nil { + invalidParams.AddNested("HumanTaskConfig", err.(request.ErrInvalidParams)) + } + } + if s.InputConfig != nil { + if err := s.InputConfig.Validate(); err != nil { + invalidParams.AddNested("InputConfig", err.(request.ErrInvalidParams)) + } + } + if s.LabelingJobAlgorithmsConfig != nil { + if err := s.LabelingJobAlgorithmsConfig.Validate(); err != nil { + invalidParams.AddNested("LabelingJobAlgorithmsConfig", err.(request.ErrInvalidParams)) + } + } + if s.OutputConfig != nil { + if err := s.OutputConfig.Validate(); err != nil { + invalidParams.AddNested("OutputConfig", err.(request.ErrInvalidParams)) + } + } + if s.StoppingConditions != nil { + if err := s.StoppingConditions.Validate(); err != nil { + invalidParams.AddNested("StoppingConditions", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHumanTaskConfig sets the HumanTaskConfig field's value. +func (s *CreateLabelingJobInput) SetHumanTaskConfig(v *HumanTaskConfig) *CreateLabelingJobInput { + s.HumanTaskConfig = v + return s +} + +// SetInputConfig sets the InputConfig field's value. +func (s *CreateLabelingJobInput) SetInputConfig(v *LabelingJobInputConfig) *CreateLabelingJobInput { + s.InputConfig = v + return s +} + +// SetLabelAttributeName sets the LabelAttributeName field's value. +func (s *CreateLabelingJobInput) SetLabelAttributeName(v string) *CreateLabelingJobInput { + s.LabelAttributeName = &v + return s +} + +// SetLabelCategoryConfigS3Uri sets the LabelCategoryConfigS3Uri field's value. +func (s *CreateLabelingJobInput) SetLabelCategoryConfigS3Uri(v string) *CreateLabelingJobInput { + s.LabelCategoryConfigS3Uri = &v + return s +} + +// SetLabelingJobAlgorithmsConfig sets the LabelingJobAlgorithmsConfig field's value. +func (s *CreateLabelingJobInput) SetLabelingJobAlgorithmsConfig(v *LabelingJobAlgorithmsConfig) *CreateLabelingJobInput { + s.LabelingJobAlgorithmsConfig = v + return s +} + +// SetLabelingJobName sets the LabelingJobName field's value. +func (s *CreateLabelingJobInput) SetLabelingJobName(v string) *CreateLabelingJobInput { + s.LabelingJobName = &v + return s +} + +// SetOutputConfig sets the OutputConfig field's value. +func (s *CreateLabelingJobInput) SetOutputConfig(v *LabelingJobOutputConfig) *CreateLabelingJobInput { + s.OutputConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateLabelingJobInput) SetRoleArn(v string) *CreateLabelingJobInput { + s.RoleArn = &v + return s +} + +// SetStoppingConditions sets the StoppingConditions field's value. +func (s *CreateLabelingJobInput) SetStoppingConditions(v *LabelingJobStoppingConditions) *CreateLabelingJobInput { + s.StoppingConditions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLabelingJobInput) SetTags(v []*Tag) *CreateLabelingJobInput { + s.Tags = v + return s +} + +type CreateLabelingJobOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the labeling job. You use this ARN to identify + // the labeling job. + // + // LabelingJobArn is a required field + LabelingJobArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateLabelingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLabelingJobOutput) GoString() string { + return s.String() +} + +// SetLabelingJobArn sets the LabelingJobArn field's value. +func (s *CreateLabelingJobOutput) SetLabelingJobArn(v string) *CreateLabelingJobOutput { + s.LabelingJobArn = &v + return s +} + +type CreateModelInput struct { + _ struct{} `type:"structure"` + + // Specifies the containers in the inference pipeline. + Containers []*ContainerDefinition `type:"list"` + + // Isolates the model container. No inbound or outbound network calls can be + // made to or from the model container. + // + // The Semantic Segmentation built-in algorithm does not support network isolation. + EnableNetworkIsolation *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can + // assume to access model artifacts and docker image for deployment on ML compute + // instances or for batch transform jobs. Deploying on ML compute instances + // is part of model hosting. For more information, see Amazon SageMaker Roles + // (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). + // + // To be able to pass this role to Amazon SageMaker, the caller of this API + // must have the iam:PassRole permission. + // + // ExecutionRoleArn is a required field + ExecutionRoleArn *string `min:"20" type:"string" required:"true"` + + // The name of the new model. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` + + // The location of the primary docker image containing inference code, associated + // artifacts, and custom environment map that the inference code uses when the + // model is deployed for predictions. + PrimaryContainer *ContainerDefinition `type:"structure"` + + // An array of key-value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` + + // A VpcConfig object that specifies the VPC that you want your model to connect + // to. Control access to and from your model container by configuring the VPC. + // VpcConfig is used in hosting services and in batch transform. For more information, + // see Protect Endpoints by Using an Amazon Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) + // and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private + // Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/batch-vpc.html). + VpcConfig *VpcConfig `type:"structure"` +} + +// String returns the string representation +func (s CreateModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateModelInput"} + if s.ExecutionRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) + } + if s.ExecutionRoleArn != nil && len(*s.ExecutionRoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleArn", 20)) + } + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.Containers != nil { + for i, v := range s.Containers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Containers", i), err.(request.ErrInvalidParams)) + } + } + } + if s.PrimaryContainer != nil { + if err := s.PrimaryContainer.Validate(); err != nil { + invalidParams.AddNested("PrimaryContainer", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.VpcConfig != nil { + if err := s.VpcConfig.Validate(); err != nil { + invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainers sets the Containers field's value. +func (s *CreateModelInput) SetContainers(v []*ContainerDefinition) *CreateModelInput { + s.Containers = v + return s +} + +// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. +func (s *CreateModelInput) SetEnableNetworkIsolation(v bool) *CreateModelInput { + s.EnableNetworkIsolation = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *CreateModelInput) SetExecutionRoleArn(v string) *CreateModelInput { + s.ExecutionRoleArn = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *CreateModelInput) SetModelName(v string) *CreateModelInput { + s.ModelName = &v + return s +} + +// SetPrimaryContainer sets the PrimaryContainer field's value. +func (s *CreateModelInput) SetPrimaryContainer(v *ContainerDefinition) *CreateModelInput { + s.PrimaryContainer = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateModelInput) SetTags(v []*Tag) *CreateModelInput { + s.Tags = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateModelInput) SetVpcConfig(v *VpcConfig) *CreateModelInput { + s.VpcConfig = v + return s +} + +type CreateModelOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the model created in Amazon SageMaker. + // + // ModelArn is a required field + ModelArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateModelOutput) GoString() string { + return s.String() +} + +// SetModelArn sets the ModelArn field's value. +func (s *CreateModelOutput) SetModelArn(v string) *CreateModelOutput { + s.ModelArn = &v + return s +} + +type CreateModelPackageInput struct { + _ struct{} `type:"structure"` + + // Whether to certify the model package for listing on AWS Marketplace. + CertifyForMarketplace *bool `type:"boolean"` + + // Specifies details about inference jobs that can be run with models based + // on this model package, including the following: + // + // * The Amazon ECR paths of containers that contain the inference code and + // model artifacts. + // + // * The instance types that the model package supports for transform jobs + // and real-time endpoints used for inference. + // + // * The input and output content formats that the model package supports + // for inference. + InferenceSpecification *InferenceSpecification `type:"structure"` + + // A description of the model package. + ModelPackageDescription *string `type:"string"` + + // The name of the model package. The name must have 1 to 63 characters. Valid + // characters are a-z, A-Z, 0-9, and - (hyphen). + // + // ModelPackageName is a required field + ModelPackageName *string `min:"1" type:"string" required:"true"` + + // Details about the algorithm that was used to create the model package. + SourceAlgorithmSpecification *SourceAlgorithmSpecification `type:"structure"` + + // Specifies configurations for one or more transform jobs that Amazon SageMaker + // runs to test the model package. + ValidationSpecification *ModelPackageValidationSpecification `type:"structure"` +} + +// String returns the string representation +func (s CreateModelPackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateModelPackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateModelPackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateModelPackageInput"} + if s.ModelPackageName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelPackageName")) + } + if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) + } + if s.InferenceSpecification != nil { + if err := s.InferenceSpecification.Validate(); err != nil { + invalidParams.AddNested("InferenceSpecification", err.(request.ErrInvalidParams)) + } + } + if s.SourceAlgorithmSpecification != nil { + if err := s.SourceAlgorithmSpecification.Validate(); err != nil { + invalidParams.AddNested("SourceAlgorithmSpecification", err.(request.ErrInvalidParams)) + } + } + if s.ValidationSpecification != nil { + if err := s.ValidationSpecification.Validate(); err != nil { + invalidParams.AddNested("ValidationSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. +func (s *CreateModelPackageInput) SetCertifyForMarketplace(v bool) *CreateModelPackageInput { + s.CertifyForMarketplace = &v + return s +} + +// SetInferenceSpecification sets the InferenceSpecification field's value. +func (s *CreateModelPackageInput) SetInferenceSpecification(v *InferenceSpecification) *CreateModelPackageInput { + s.InferenceSpecification = v + return s +} + +// SetModelPackageDescription sets the ModelPackageDescription field's value. +func (s *CreateModelPackageInput) SetModelPackageDescription(v string) *CreateModelPackageInput { + s.ModelPackageDescription = &v + return s +} + +// SetModelPackageName sets the ModelPackageName field's value. +func (s *CreateModelPackageInput) SetModelPackageName(v string) *CreateModelPackageInput { + s.ModelPackageName = &v + return s +} + +// SetSourceAlgorithmSpecification sets the SourceAlgorithmSpecification field's value. +func (s *CreateModelPackageInput) SetSourceAlgorithmSpecification(v *SourceAlgorithmSpecification) *CreateModelPackageInput { + s.SourceAlgorithmSpecification = v + return s +} + +// SetValidationSpecification sets the ValidationSpecification field's value. +func (s *CreateModelPackageInput) SetValidationSpecification(v *ModelPackageValidationSpecification) *CreateModelPackageInput { + s.ValidationSpecification = v + return s +} + +type CreateModelPackageOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the new model package. + // + // ModelPackageArn is a required field + ModelPackageArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateModelPackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateModelPackageOutput) GoString() string { + return s.String() +} + +// SetModelPackageArn sets the ModelPackageArn field's value. +func (s *CreateModelPackageOutput) SetModelPackageArn(v string) *CreateModelPackageOutput { + s.ModelPackageArn = &v + return s +} + +type CreateNotebookInstanceInput struct { + _ struct{} `type:"structure"` + + // A list of Elastic Inference (EI) instance types to associate with this notebook + // instance. Currently, only one instance type can be associated with a notebook + // instance. For more information, see Using Elastic Inference in Amazon SageMaker + // (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). + AcceleratorTypes []*string `type:"list"` + + // An array of up to three Git repositories to associate with the notebook instance. + // These can be either the names of Git repositories stored as resources in + // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository. These repositories are cloned at the same + // level as the default repository of your notebook instance. For more information, + // see Associating Git Repositories with Amazon SageMaker Notebook Instances + // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + AdditionalCodeRepositories []*string `type:"list"` + + // A Git repository to associate with the notebook instance as its default code + // repository. This can be either the name of a Git repository stored as a resource + // in your account, or the URL of a Git repository in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository. When you open a notebook instance, it opens + // in the directory that contains this repository. For more information, see + // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + DefaultCodeRepository *string `min:"1" type:"string"` + + // Sets whether Amazon SageMaker provides internet access to the notebook instance. + // If you set this to Disabled this notebook instance will be able to access + // resources only in your VPC, and will not be able to connect to Amazon SageMaker + // training and endpoint services unless your configure a NAT Gateway in your + // VPC. + // + // For more information, see Notebook Instances Are Internet-Enabled by Default + // (http://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access). + // You can set the value of this parameter to Disabled only if you set a value + // for the SubnetId parameter. + DirectInternetAccess *string `type:"string" enum:"DirectInternetAccess"` + + // The type of ML compute instance to launch for the notebook instance. + // + // InstanceType is a required field + InstanceType *string `type:"string" required:"true" enum:"InstanceType"` + + // If you provide a AWS KMS key ID, Amazon SageMaker uses it to encrypt data + // at rest on the ML storage volume that is attached to your notebook instance. + // The KMS key you provide must be enabled. For information, see Enabling and + // Disabling Keys (http://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html) + // in the AWS Key Management Service Developer Guide. + KmsKeyId *string `type:"string"` + + // The name of a lifecycle configuration to associate with the notebook instance. + // For information about lifestyle configurations, see Step 2.1: (Optional) + // Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). + LifecycleConfigName *string `type:"string"` + + // The name of the new notebook instance. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` + + // When you send any requests to AWS resources from the notebook instance, Amazon + // SageMaker assumes this role to perform tasks on your behalf. You must grant + // this role necessary permissions so Amazon SageMaker can perform these tasks. + // The policy must allow the Amazon SageMaker service principal (sagemaker.amazonaws.com) + // permissions to assume this role. For more information, see Amazon SageMaker + // Roles (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). + // + // To be able to pass this role to Amazon SageMaker, the caller of this API + // must have the iam:PassRole permission. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // The VPC security group IDs, in the form sg-xxxxxxxx. The security groups + // must be for the same VPC as specified in the subnet. + SecurityGroupIds []*string `type:"list"` + + // The ID of the subnet in a VPC to which you would like to have a connectivity + // from your ML compute instance. + SubnetId *string `type:"string"` + + // A list of tags to associate with the notebook instance. You can add tags + // later by using the CreateTags API. + Tags []*Tag `type:"list"` + + // The size, in GB, of the ML storage volume to attach to the notebook instance. + // The default value is 5 GB. + VolumeSizeInGB *int64 `min:"5" type:"integer"` +} + +// String returns the string representation +func (s CreateNotebookInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNotebookInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNotebookInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNotebookInstanceInput"} + if s.DefaultCodeRepository != nil && len(*s.DefaultCodeRepository) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DefaultCodeRepository", 1)) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.VolumeSizeInGB != nil && *s.VolumeSizeInGB < 5 { + invalidParams.Add(request.NewErrParamMinValue("VolumeSizeInGB", 5)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorTypes sets the AcceleratorTypes field's value. +func (s *CreateNotebookInstanceInput) SetAcceleratorTypes(v []*string) *CreateNotebookInstanceInput { + s.AcceleratorTypes = v + return s +} + +// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. +func (s *CreateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *CreateNotebookInstanceInput { + s.AdditionalCodeRepositories = v + return s +} + +// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. +func (s *CreateNotebookInstanceInput) SetDefaultCodeRepository(v string) *CreateNotebookInstanceInput { + s.DefaultCodeRepository = &v + return s +} + +// SetDirectInternetAccess sets the DirectInternetAccess field's value. +func (s *CreateNotebookInstanceInput) SetDirectInternetAccess(v string) *CreateNotebookInstanceInput { + s.DirectInternetAccess = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *CreateNotebookInstanceInput) SetInstanceType(v string) *CreateNotebookInstanceInput { + s.InstanceType = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateNotebookInstanceInput) SetKmsKeyId(v string) *CreateNotebookInstanceInput { + s.KmsKeyId = &v + return s +} + +// SetLifecycleConfigName sets the LifecycleConfigName field's value. +func (s *CreateNotebookInstanceInput) SetLifecycleConfigName(v string) *CreateNotebookInstanceInput { + s.LifecycleConfigName = &v + return s +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *CreateNotebookInstanceInput) SetNotebookInstanceName(v string) *CreateNotebookInstanceInput { + s.NotebookInstanceName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateNotebookInstanceInput) SetRoleArn(v string) *CreateNotebookInstanceInput { + s.RoleArn = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateNotebookInstanceInput) SetSecurityGroupIds(v []*string) *CreateNotebookInstanceInput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *CreateNotebookInstanceInput) SetSubnetId(v string) *CreateNotebookInstanceInput { + s.SubnetId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateNotebookInstanceInput) SetTags(v []*Tag) *CreateNotebookInstanceInput { + s.Tags = v + return s +} + +// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. +func (s *CreateNotebookInstanceInput) SetVolumeSizeInGB(v int64) *CreateNotebookInstanceInput { + s.VolumeSizeInGB = &v + return s +} + +type CreateNotebookInstanceLifecycleConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the lifecycle configuration. + // + // NotebookInstanceLifecycleConfigName is a required field + NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` + + // A shell script that runs only once, when you create a notebook instance. + // The shell script must be a base64-encoded string. + OnCreate []*NotebookInstanceLifecycleHook `type:"list"` + + // A shell script that runs every time you start a notebook instance, including + // when you create the notebook instance. The shell script must be a base64-encoded + // string. + OnStart []*NotebookInstanceLifecycleHook `type:"list"` +} + +// String returns the string representation +func (s CreateNotebookInstanceLifecycleConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNotebookInstanceLifecycleConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNotebookInstanceLifecycleConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNotebookInstanceLifecycleConfigInput"} + if s.NotebookInstanceLifecycleConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) + } + if s.OnCreate != nil { + for i, v := range s.OnCreate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnCreate", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OnStart != nil { + for i, v := range s.OnStart { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnStart", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *CreateNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *CreateNotebookInstanceLifecycleConfigInput { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +// SetOnCreate sets the OnCreate field's value. +func (s *CreateNotebookInstanceLifecycleConfigInput) SetOnCreate(v []*NotebookInstanceLifecycleHook) *CreateNotebookInstanceLifecycleConfigInput { + s.OnCreate = v + return s +} + +// SetOnStart sets the OnStart field's value. +func (s *CreateNotebookInstanceLifecycleConfigInput) SetOnStart(v []*NotebookInstanceLifecycleHook) *CreateNotebookInstanceLifecycleConfigInput { + s.OnStart = v + return s +} + +type CreateNotebookInstanceLifecycleConfigOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the lifecycle configuration. + NotebookInstanceLifecycleConfigArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateNotebookInstanceLifecycleConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNotebookInstanceLifecycleConfigOutput) GoString() string { + return s.String() +} + +// SetNotebookInstanceLifecycleConfigArn sets the NotebookInstanceLifecycleConfigArn field's value. +func (s *CreateNotebookInstanceLifecycleConfigOutput) SetNotebookInstanceLifecycleConfigArn(v string) *CreateNotebookInstanceLifecycleConfigOutput { + s.NotebookInstanceLifecycleConfigArn = &v + return s +} + +type CreateNotebookInstanceOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the notebook instance. + NotebookInstanceArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateNotebookInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNotebookInstanceOutput) GoString() string { + return s.String() +} + +// SetNotebookInstanceArn sets the NotebookInstanceArn field's value. +func (s *CreateNotebookInstanceOutput) SetNotebookInstanceArn(v string) *CreateNotebookInstanceOutput { + s.NotebookInstanceArn = &v + return s +} + +type CreatePresignedNotebookInstanceUrlInput struct { + _ struct{} `type:"structure"` + + // The name of the notebook instance. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` + + // The duration of the session, in seconds. The default is 12 hours. + SessionExpirationDurationInSeconds *int64 `min:"1800" type:"integer"` +} + +// String returns the string representation +func (s CreatePresignedNotebookInstanceUrlInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePresignedNotebookInstanceUrlInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreatePresignedNotebookInstanceUrlInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreatePresignedNotebookInstanceUrlInput"} + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + if s.SessionExpirationDurationInSeconds != nil && *s.SessionExpirationDurationInSeconds < 1800 { + invalidParams.Add(request.NewErrParamMinValue("SessionExpirationDurationInSeconds", 1800)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *CreatePresignedNotebookInstanceUrlInput) SetNotebookInstanceName(v string) *CreatePresignedNotebookInstanceUrlInput { + s.NotebookInstanceName = &v + return s +} + +// SetSessionExpirationDurationInSeconds sets the SessionExpirationDurationInSeconds field's value. +func (s *CreatePresignedNotebookInstanceUrlInput) SetSessionExpirationDurationInSeconds(v int64) *CreatePresignedNotebookInstanceUrlInput { + s.SessionExpirationDurationInSeconds = &v + return s +} + +type CreatePresignedNotebookInstanceUrlOutput struct { + _ struct{} `type:"structure"` + + // A JSON object that contains the URL string. + AuthorizedUrl *string `type:"string"` +} + +// String returns the string representation +func (s CreatePresignedNotebookInstanceUrlOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreatePresignedNotebookInstanceUrlOutput) GoString() string { + return s.String() +} + +// SetAuthorizedUrl sets the AuthorizedUrl field's value. +func (s *CreatePresignedNotebookInstanceUrlOutput) SetAuthorizedUrl(v string) *CreatePresignedNotebookInstanceUrlOutput { + s.AuthorizedUrl = &v + return s +} + +type CreateTrainingJobInput struct { + _ struct{} `type:"structure"` + + // The registry path of the Docker image that contains the training algorithm + // and algorithm-specific metadata, including the input mode. For more information + // about algorithms provided by Amazon SageMaker, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). + // For information about providing your own algorithms, see Using Your Own Algorithms + // with Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html). + // + // AlgorithmSpecification is a required field + AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` + + // To encrypt all communications between ML compute instances in distributed + // training, choose True,. Encryption provides greater security for distributed + // training, but training can take longer because of additional communications + // between ML compute instances. + EnableInterContainerTrafficEncryption *bool `type:"boolean"` + + // Isolates the training container. No inbound or outbound network calls can + // be made, except for calls between peers within a training cluster for distributed + // training. If you enable network isolation for training jobs that are configured + // to use a VPC, Amazon SageMaker downloads and uploads customer data and model + // artifacts through the specified VPC, but the training container does not + // have network access. + // + // The Semantic Segmentation built-in algorithm does not support network isolation. + EnableNetworkIsolation *bool `type:"boolean"` + + // Algorithm-specific parameters that influence the quality of the model. You + // set hyperparameters before you start the learning process. For a list of + // hyperparameters for each training algorithm provided by Amazon SageMaker, + // see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). + // + // You can specify a maximum of 100 hyperparameters. Each hyperparameter is + // a key-value pair. Each key and value is limited to 256 characters, as specified + // by the Length Constraint. + HyperParameters map[string]*string `type:"map"` + + // An array of Channel objects. Each channel is a named input source. InputDataConfig + // describes the input data and its location. + // + // Algorithms can accept input data from one or more channels. For example, + // an algorithm might have two channels of input data, training_data and validation_data. + // The configuration for each channel provides the S3 location where the input + // data is stored. It also provides information about the stored data: the MIME + // type, compression method, and whether the data is wrapped in RecordIO format. + // + // Depending on the input mode that the algorithm supports, Amazon SageMaker + // either copies input data files from an S3 bucket to a local directory in + // the Docker container, or makes it available as input streams. + InputDataConfig []*Channel `min:"1" type:"list"` + + // Specifies the path to the S3 bucket where you want to store model artifacts. + // Amazon SageMaker creates subfolders for the artifacts. + // + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` + + // The resources, including the ML compute instances and ML storage volumes, + // to use for model training. + // + // ML storage volumes store model artifacts and incremental states. Training + // algorithms might also use ML storage volumes for scratch space. If you want + // Amazon SageMaker to use the ML storage volume to store the training data, + // choose File as the TrainingInputMode in the algorithm specification. For + // distributed training algorithms, specify an instance count greater than 1. + // + // ResourceConfig is a required field + ResourceConfig *ResourceConfig `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume + // to perform tasks on your behalf. + // + // During model training, Amazon SageMaker needs your permission to read input + // data from an S3 bucket, download a Docker image that contains training code, + // write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, + // and publish metrics to Amazon CloudWatch. You grant permissions for all of + // these tasks to an IAM role. For more information, see Amazon SageMaker Roles + // (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). + // + // To be able to pass this role to Amazon SageMaker, the caller of this API + // must have the iam:PassRole permission. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // Sets a duration for training. Use this parameter to cap model training costs. + // To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which + // delays job termination for 120 seconds. Algorithms might use this 120-second + // window to save the model artifacts. + // + // When Amazon SageMaker terminates a job because the stopping condition has + // been met, training algorithms provided by Amazon SageMaker save the intermediate + // results of the job. This intermediate data is a valid model artifact. You + // can use it to create a model using the CreateModel API. + // + // StoppingCondition is a required field + StoppingCondition *StoppingCondition `type:"structure" required:"true"` + + // An array of key-value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` + + // The name of the training job. The name must be unique within an AWS Region + // in an AWS account. + // + // TrainingJobName is a required field + TrainingJobName *string `min:"1" type:"string" required:"true"` + + // A VpcConfig object that specifies the VPC that you want your training job + // to connect to. Control access to and from your training container by configuring + // the VPC. For more information, see Protect Training Jobs by Using an Amazon + // Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). + VpcConfig *VpcConfig `type:"structure"` +} + +// String returns the string representation +func (s CreateTrainingJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrainingJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTrainingJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTrainingJobInput"} + if s.AlgorithmSpecification == nil { + invalidParams.Add(request.NewErrParamRequired("AlgorithmSpecification")) + } + if s.InputDataConfig != nil && len(s.InputDataConfig) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputDataConfig", 1)) + } + if s.OutputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) + } + if s.ResourceConfig == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceConfig")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.StoppingCondition == nil { + invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) + } + if s.TrainingJobName == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingJobName")) + } + if s.TrainingJobName != nil && len(*s.TrainingJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TrainingJobName", 1)) + } + if s.AlgorithmSpecification != nil { + if err := s.AlgorithmSpecification.Validate(); err != nil { + invalidParams.AddNested("AlgorithmSpecification", err.(request.ErrInvalidParams)) + } + } + if s.InputDataConfig != nil { + for i, v := range s.InputDataConfig { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputDataConfig", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OutputDataConfig != nil { + if err := s.OutputDataConfig.Validate(); err != nil { + invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) + } + } + if s.ResourceConfig != nil { + if err := s.ResourceConfig.Validate(); err != nil { + invalidParams.AddNested("ResourceConfig", err.(request.ErrInvalidParams)) + } + } + if s.StoppingCondition != nil { + if err := s.StoppingCondition.Validate(); err != nil { + invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.VpcConfig != nil { + if err := s.VpcConfig.Validate(); err != nil { + invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. +func (s *CreateTrainingJobInput) SetAlgorithmSpecification(v *AlgorithmSpecification) *CreateTrainingJobInput { + s.AlgorithmSpecification = v + return s +} + +// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. +func (s *CreateTrainingJobInput) SetEnableInterContainerTrafficEncryption(v bool) *CreateTrainingJobInput { + s.EnableInterContainerTrafficEncryption = &v + return s +} + +// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. +func (s *CreateTrainingJobInput) SetEnableNetworkIsolation(v bool) *CreateTrainingJobInput { + s.EnableNetworkIsolation = &v + return s +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *CreateTrainingJobInput) SetHyperParameters(v map[string]*string) *CreateTrainingJobInput { + s.HyperParameters = v + return s +} + +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *CreateTrainingJobInput) SetInputDataConfig(v []*Channel) *CreateTrainingJobInput { + s.InputDataConfig = v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *CreateTrainingJobInput) SetOutputDataConfig(v *OutputDataConfig) *CreateTrainingJobInput { + s.OutputDataConfig = v + return s +} + +// SetResourceConfig sets the ResourceConfig field's value. +func (s *CreateTrainingJobInput) SetResourceConfig(v *ResourceConfig) *CreateTrainingJobInput { + s.ResourceConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateTrainingJobInput) SetRoleArn(v string) *CreateTrainingJobInput { + s.RoleArn = &v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *CreateTrainingJobInput) SetStoppingCondition(v *StoppingCondition) *CreateTrainingJobInput { + s.StoppingCondition = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateTrainingJobInput) SetTags(v []*Tag) *CreateTrainingJobInput { + s.Tags = v + return s +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *CreateTrainingJobInput) SetTrainingJobName(v string) *CreateTrainingJobInput { + s.TrainingJobName = &v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateTrainingJobInput) SetVpcConfig(v *VpcConfig) *CreateTrainingJobInput { + s.VpcConfig = v + return s +} + +type CreateTrainingJobOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the training job. + // + // TrainingJobArn is a required field + TrainingJobArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTrainingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTrainingJobOutput) GoString() string { + return s.String() +} + +// SetTrainingJobArn sets the TrainingJobArn field's value. +func (s *CreateTrainingJobOutput) SetTrainingJobArn(v string) *CreateTrainingJobOutput { + s.TrainingJobArn = &v + return s +} + +type CreateTransformJobInput struct { + _ struct{} `type:"structure"` + + // Determines the number of records to include in a mini-batch. If you want + // to include only one record in a mini-batch, specify SingleRecord.. If you + // want mini-batches to contain a maximum of the number of records specified + // in the MaxPayloadInMB parameter, specify MultiRecord. + // + // If you set SplitType to Line and BatchStrategy to MultiRecord, a batch transform + // automatically splits your input data into the specified payload size. There's + // no need to split the dataset into smaller files or to use larger payload + // sizes unless the records in your dataset are very large. + BatchStrategy *string `type:"string" enum:"BatchStrategy"` + + // The environment variables to set in the Docker container. We support up to + // 16 key and values entries in the map. + Environment map[string]*string `type:"map"` + + // The maximum number of parallel requests that can be sent to an algorithm + // container on an instance. This is good for algorithms that implement multiple + // workers on larger instances . The default value is 1. To allow Amazon SageMaker + // to determine the appropriate number for MaxConcurrentTransforms, do not set + // the value in the API. + MaxConcurrentTransforms *int64 `type:"integer"` + + // The maximum payload size allowed, in MB. A payload is the data portion of + // a record (without metadata). The value in MaxPayloadInMB must be greater + // or equal to the size of a single record. You can approximate the size of + // a record by dividing the size of your dataset by the number of records. Then + // multiply this value by the number of records you want in a mini-batch. We + // recommend to enter a slightly larger value than this to ensure the records + // fit within the maximum payload size. The default value is 6 MB. + // + // For cases where the payload might be arbitrarily large and is transmitted + // using HTTP chunked encoding, set the value to 0. This feature only works + // in supported algorithms. Currently, Amazon SageMaker built-in algorithms + // do not support this feature. + MaxPayloadInMB *int64 `type:"integer"` + + // The name of the model that you want to use for the transform job. ModelName + // must be the name of an existing Amazon SageMaker model within an AWS Region + // in an AWS account. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` + + // (Optional) An array of key-value pairs. For more information, see Using Cost + // Allocation Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` + + // Describes the input source and the way the transform job consumes it. + // + // TransformInput is a required field + TransformInput *TransformInput `type:"structure" required:"true"` + + // The name of the transform job. The name must be unique within an AWS Region + // in an AWS account. + // + // TransformJobName is a required field + TransformJobName *string `min:"1" type:"string" required:"true"` + + // Describes the results of the transform job. + // + // TransformOutput is a required field + TransformOutput *TransformOutput `type:"structure" required:"true"` + + // Describes the resources, including ML instance types and ML instance count, + // to use for the transform job. + // + // TransformResources is a required field + TransformResources *TransformResources `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateTransformJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransformJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTransformJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransformJobInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.TransformInput == nil { + invalidParams.Add(request.NewErrParamRequired("TransformInput")) + } + if s.TransformJobName == nil { + invalidParams.Add(request.NewErrParamRequired("TransformJobName")) + } + if s.TransformJobName != nil && len(*s.TransformJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TransformJobName", 1)) + } + if s.TransformOutput == nil { + invalidParams.Add(request.NewErrParamRequired("TransformOutput")) + } + if s.TransformResources == nil { + invalidParams.Add(request.NewErrParamRequired("TransformResources")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TransformInput != nil { + if err := s.TransformInput.Validate(); err != nil { + invalidParams.AddNested("TransformInput", err.(request.ErrInvalidParams)) + } + } + if s.TransformOutput != nil { + if err := s.TransformOutput.Validate(); err != nil { + invalidParams.AddNested("TransformOutput", err.(request.ErrInvalidParams)) + } + } + if s.TransformResources != nil { + if err := s.TransformResources.Validate(); err != nil { + invalidParams.AddNested("TransformResources", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBatchStrategy sets the BatchStrategy field's value. +func (s *CreateTransformJobInput) SetBatchStrategy(v string) *CreateTransformJobInput { + s.BatchStrategy = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *CreateTransformJobInput) SetEnvironment(v map[string]*string) *CreateTransformJobInput { + s.Environment = v + return s +} + +// SetMaxConcurrentTransforms sets the MaxConcurrentTransforms field's value. +func (s *CreateTransformJobInput) SetMaxConcurrentTransforms(v int64) *CreateTransformJobInput { + s.MaxConcurrentTransforms = &v + return s +} + +// SetMaxPayloadInMB sets the MaxPayloadInMB field's value. +func (s *CreateTransformJobInput) SetMaxPayloadInMB(v int64) *CreateTransformJobInput { + s.MaxPayloadInMB = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *CreateTransformJobInput) SetModelName(v string) *CreateTransformJobInput { + s.ModelName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateTransformJobInput) SetTags(v []*Tag) *CreateTransformJobInput { + s.Tags = v + return s +} + +// SetTransformInput sets the TransformInput field's value. +func (s *CreateTransformJobInput) SetTransformInput(v *TransformInput) *CreateTransformJobInput { + s.TransformInput = v + return s +} + +// SetTransformJobName sets the TransformJobName field's value. +func (s *CreateTransformJobInput) SetTransformJobName(v string) *CreateTransformJobInput { + s.TransformJobName = &v + return s +} + +// SetTransformOutput sets the TransformOutput field's value. +func (s *CreateTransformJobInput) SetTransformOutput(v *TransformOutput) *CreateTransformJobInput { + s.TransformOutput = v + return s +} + +// SetTransformResources sets the TransformResources field's value. +func (s *CreateTransformJobInput) SetTransformResources(v *TransformResources) *CreateTransformJobInput { + s.TransformResources = v + return s +} + +type CreateTransformJobOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the transform job. + // + // TransformJobArn is a required field + TransformJobArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTransformJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransformJobOutput) GoString() string { + return s.String() +} + +// SetTransformJobArn sets the TransformJobArn field's value. +func (s *CreateTransformJobOutput) SetTransformJobArn(v string) *CreateTransformJobOutput { + s.TransformJobArn = &v + return s +} + +type CreateWorkteamInput struct { + _ struct{} `type:"structure"` + + // A description of the work team. + // + // Description is a required field + Description *string `min:"1" type:"string" required:"true"` + + // A list of MemberDefinition objects that contains objects that identify the + // Amazon Cognito user pool that makes up the work team. For more information, + // see Amazon Cognito User Pools (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html). + // + // All of the CognitoMemberDefinition objects that make up the member definition + // must have the same ClientId and UserPool values. + // + // MemberDefinitions is a required field + MemberDefinitions []*MemberDefinition `min:"1" type:"list" required:"true"` + + Tags []*Tag `type:"list"` + + // The name of the work team. Use this name to identify the work team. + // + // WorkteamName is a required field + WorkteamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateWorkteamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWorkteamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateWorkteamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateWorkteamInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.MemberDefinitions == nil { + invalidParams.Add(request.NewErrParamRequired("MemberDefinitions")) + } + if s.MemberDefinitions != nil && len(s.MemberDefinitions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MemberDefinitions", 1)) + } + if s.WorkteamName == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamName")) + } + if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) + } + if s.MemberDefinitions != nil { + for i, v := range s.MemberDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MemberDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateWorkteamInput) SetDescription(v string) *CreateWorkteamInput { + s.Description = &v + return s +} + +// SetMemberDefinitions sets the MemberDefinitions field's value. +func (s *CreateWorkteamInput) SetMemberDefinitions(v []*MemberDefinition) *CreateWorkteamInput { + s.MemberDefinitions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateWorkteamInput) SetTags(v []*Tag) *CreateWorkteamInput { + s.Tags = v + return s +} + +// SetWorkteamName sets the WorkteamName field's value. +func (s *CreateWorkteamInput) SetWorkteamName(v string) *CreateWorkteamInput { + s.WorkteamName = &v + return s +} + +type CreateWorkteamOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the work team. You can use this ARN to + // identify the work team. + WorkteamArn *string `type:"string"` +} + +// String returns the string representation +func (s CreateWorkteamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWorkteamOutput) GoString() string { + return s.String() +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *CreateWorkteamOutput) SetWorkteamArn(v string) *CreateWorkteamOutput { + s.WorkteamArn = &v + return s +} + +// Describes the location of the channel data. +type DataSource struct { + _ struct{} `type:"structure"` + + // The S3 location of the data source that is associated with a channel. + // + // S3DataSource is a required field + S3DataSource *S3DataSource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DataSource"} + if s.S3DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataSource")) + } + if s.S3DataSource != nil { + if err := s.S3DataSource.Validate(); err != nil { + invalidParams.AddNested("S3DataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3DataSource sets the S3DataSource field's value. +func (s *DataSource) SetS3DataSource(v *S3DataSource) *DataSource { + s.S3DataSource = v + return s +} + +type DeleteAlgorithmInput struct { + _ struct{} `type:"structure"` + + // The name of the algorithm to delete. + // + // AlgorithmName is a required field + AlgorithmName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAlgorithmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAlgorithmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAlgorithmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAlgorithmInput"} + if s.AlgorithmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) + } + if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *DeleteAlgorithmInput) SetAlgorithmName(v string) *DeleteAlgorithmInput { + s.AlgorithmName = &v + return s +} + +type DeleteAlgorithmOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteAlgorithmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAlgorithmOutput) GoString() string { + return s.String() +} + +type DeleteCodeRepositoryInput struct { + _ struct{} `type:"structure"` + + // The name of the Git repository to delete. + // + // CodeRepositoryName is a required field + CodeRepositoryName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCodeRepositoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCodeRepositoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCodeRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCodeRepositoryInput"} + if s.CodeRepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) + } + if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodeRepositoryName sets the CodeRepositoryName field's value. +func (s *DeleteCodeRepositoryInput) SetCodeRepositoryName(v string) *DeleteCodeRepositoryInput { + s.CodeRepositoryName = &v + return s +} + +type DeleteCodeRepositoryOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCodeRepositoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCodeRepositoryOutput) GoString() string { + return s.String() +} + +type DeleteEndpointConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the endpoint configuration that you want to delete. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEndpointConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointConfigInput"} + if s.EndpointConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *DeleteEndpointConfigInput) SetEndpointConfigName(v string) *DeleteEndpointConfigInput { + s.EndpointConfigName = &v + return s +} + +type DeleteEndpointConfigOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteEndpointConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointConfigOutput) GoString() string { + return s.String() +} + +type DeleteEndpointInput struct { + _ struct{} `type:"structure"` + + // The name of the endpoint that you want to delete. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} + if s.EndpointName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointName sets the EndpointName field's value. +func (s *DeleteEndpointInput) SetEndpointName(v string) *DeleteEndpointInput { + s.EndpointName = &v + return s +} + +type DeleteEndpointOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointOutput) GoString() string { + return s.String() +} + +type DeleteModelInput struct { + _ struct{} `type:"structure"` + + // The name of the model to delete. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteModelInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelName sets the ModelName field's value. +func (s *DeleteModelInput) SetModelName(v string) *DeleteModelInput { + s.ModelName = &v + return s +} + +type DeleteModelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteModelOutput) GoString() string { + return s.String() +} + +type DeleteModelPackageInput struct { + _ struct{} `type:"structure"` + + // The name of the model package. The name must have 1 to 63 characters. Valid + // characters are a-z, A-Z, 0-9, and - (hyphen). + // + // ModelPackageName is a required field + ModelPackageName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteModelPackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteModelPackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteModelPackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteModelPackageInput"} + if s.ModelPackageName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelPackageName")) + } + if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelPackageName sets the ModelPackageName field's value. +func (s *DeleteModelPackageInput) SetModelPackageName(v string) *DeleteModelPackageInput { + s.ModelPackageName = &v + return s +} + +type DeleteModelPackageOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteModelPackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteModelPackageOutput) GoString() string { + return s.String() +} + +type DeleteNotebookInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the Amazon SageMaker notebook instance to delete. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteNotebookInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotebookInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNotebookInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNotebookInstanceInput"} + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *DeleteNotebookInstanceInput) SetNotebookInstanceName(v string) *DeleteNotebookInstanceInput { + s.NotebookInstanceName = &v + return s +} + +type DeleteNotebookInstanceLifecycleConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the lifecycle configuration to delete. + // + // NotebookInstanceLifecycleConfigName is a required field + NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteNotebookInstanceLifecycleConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotebookInstanceLifecycleConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNotebookInstanceLifecycleConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNotebookInstanceLifecycleConfigInput"} + if s.NotebookInstanceLifecycleConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *DeleteNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *DeleteNotebookInstanceLifecycleConfigInput { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +type DeleteNotebookInstanceLifecycleConfigOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotebookInstanceLifecycleConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotebookInstanceLifecycleConfigOutput) GoString() string { + return s.String() +} + +type DeleteNotebookInstanceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteNotebookInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNotebookInstanceOutput) GoString() string { + return s.String() +} + +type DeleteTagsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource whose tags you want to delete. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` + + // An array or one or more tag keys to delete. + // + // TagKeys is a required field + TagKeys []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DeleteTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.TagKeys != nil && len(s.TagKeys) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteTagsInput) SetResourceArn(v string) *DeleteTagsInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { + s.TagKeys = v + return s +} + +type DeleteTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() +} + +type DeleteWorkteamInput struct { + _ struct{} `type:"structure"` + + // The name of the work team to delete. + // + // WorkteamName is a required field + WorkteamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteWorkteamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWorkteamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteWorkteamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteWorkteamInput"} + if s.WorkteamName == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamName")) + } + if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkteamName sets the WorkteamName field's value. +func (s *DeleteWorkteamInput) SetWorkteamName(v string) *DeleteWorkteamInput { + s.WorkteamName = &v + return s +} + +type DeleteWorkteamOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the work team was successfully deleted; otherwise, returns + // false. + // + // Success is a required field + Success *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s DeleteWorkteamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWorkteamOutput) GoString() string { + return s.String() +} + +// SetSuccess sets the Success field's value. +func (s *DeleteWorkteamOutput) SetSuccess(v bool) *DeleteWorkteamOutput { + s.Success = &v + return s +} + +// Gets the Amazon EC2 Container Registry path of the docker image of the model +// that is hosted in this ProductionVariant. +// +// If you used the registry/repository[:tag] form to specify the image path +// of the primary container when you created the model hosted in this ProductionVariant, +// the path resolves to a path of the form registry/repository[@digest]. A digest +// is a hash value that identifies a specific version of an image. For information +// about Amazon ECR paths, see Pulling an Image (http://docs.aws.amazon.com//AmazonECR/latest/userguide/docker-pull-ecr-image.html) +// in the Amazon ECR User Guide. +type DeployedImage struct { + _ struct{} `type:"structure"` + + // The date and time when the image path for the model resolved to the ResolvedImage + ResolutionTime *time.Time `type:"timestamp"` + + // The specific digest path of the image hosted in this ProductionVariant. + ResolvedImage *string `type:"string"` + + // The image path you specified when you created the model. + SpecifiedImage *string `type:"string"` +} + +// String returns the string representation +func (s DeployedImage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeployedImage) GoString() string { + return s.String() +} + +// SetResolutionTime sets the ResolutionTime field's value. +func (s *DeployedImage) SetResolutionTime(v time.Time) *DeployedImage { + s.ResolutionTime = &v + return s +} + +// SetResolvedImage sets the ResolvedImage field's value. +func (s *DeployedImage) SetResolvedImage(v string) *DeployedImage { + s.ResolvedImage = &v + return s +} + +// SetSpecifiedImage sets the SpecifiedImage field's value. +func (s *DeployedImage) SetSpecifiedImage(v string) *DeployedImage { + s.SpecifiedImage = &v + return s +} + +type DescribeAlgorithmInput struct { + _ struct{} `type:"structure"` + + // The name of the algorithm to describe. + // + // AlgorithmName is a required field + AlgorithmName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAlgorithmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAlgorithmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAlgorithmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAlgorithmInput"} + if s.AlgorithmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) + } + if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *DescribeAlgorithmInput) SetAlgorithmName(v string) *DescribeAlgorithmInput { + s.AlgorithmName = &v + return s +} + +type DescribeAlgorithmOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the algorithm. + // + // AlgorithmArn is a required field + AlgorithmArn *string `min:"1" type:"string" required:"true"` + + // A brief summary about the algorithm. + AlgorithmDescription *string `type:"string"` + + // The name of the algorithm being described. + // + // AlgorithmName is a required field + AlgorithmName *string `min:"1" type:"string" required:"true"` + + // The current status of the algorithm. + // + // AlgorithmStatus is a required field + AlgorithmStatus *string `type:"string" required:"true" enum:"AlgorithmStatus"` + + // Details about the current status of the algorithm. + // + // AlgorithmStatusDetails is a required field + AlgorithmStatusDetails *AlgorithmStatusDetails `type:"structure" required:"true"` + + // Whether the algorithm is certified to be listed in AWS Marketplace. + CertifyForMarketplace *bool `type:"boolean"` + + // A timestamp specifying when the algorithm was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Details about inference jobs that the algorithm runs. + InferenceSpecification *InferenceSpecification `type:"structure"` + + // The product identifier of the algorithm. + ProductId *string `type:"string"` + + // Details about training jobs run by this algorithm. + // + // TrainingSpecification is a required field + TrainingSpecification *TrainingSpecification `type:"structure" required:"true"` + + // Details about configurations for one or more training jobs that Amazon SageMaker + // runs to test the algorithm. + ValidationSpecification *AlgorithmValidationSpecification `type:"structure"` +} + +// String returns the string representation +func (s DescribeAlgorithmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAlgorithmOutput) GoString() string { + return s.String() +} + +// SetAlgorithmArn sets the AlgorithmArn field's value. +func (s *DescribeAlgorithmOutput) SetAlgorithmArn(v string) *DescribeAlgorithmOutput { + s.AlgorithmArn = &v + return s +} + +// SetAlgorithmDescription sets the AlgorithmDescription field's value. +func (s *DescribeAlgorithmOutput) SetAlgorithmDescription(v string) *DescribeAlgorithmOutput { + s.AlgorithmDescription = &v + return s +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *DescribeAlgorithmOutput) SetAlgorithmName(v string) *DescribeAlgorithmOutput { + s.AlgorithmName = &v + return s +} + +// SetAlgorithmStatus sets the AlgorithmStatus field's value. +func (s *DescribeAlgorithmOutput) SetAlgorithmStatus(v string) *DescribeAlgorithmOutput { + s.AlgorithmStatus = &v + return s +} + +// SetAlgorithmStatusDetails sets the AlgorithmStatusDetails field's value. +func (s *DescribeAlgorithmOutput) SetAlgorithmStatusDetails(v *AlgorithmStatusDetails) *DescribeAlgorithmOutput { + s.AlgorithmStatusDetails = v + return s +} + +// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. +func (s *DescribeAlgorithmOutput) SetCertifyForMarketplace(v bool) *DescribeAlgorithmOutput { + s.CertifyForMarketplace = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeAlgorithmOutput) SetCreationTime(v time.Time) *DescribeAlgorithmOutput { + s.CreationTime = &v + return s +} + +// SetInferenceSpecification sets the InferenceSpecification field's value. +func (s *DescribeAlgorithmOutput) SetInferenceSpecification(v *InferenceSpecification) *DescribeAlgorithmOutput { + s.InferenceSpecification = v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DescribeAlgorithmOutput) SetProductId(v string) *DescribeAlgorithmOutput { + s.ProductId = &v + return s +} + +// SetTrainingSpecification sets the TrainingSpecification field's value. +func (s *DescribeAlgorithmOutput) SetTrainingSpecification(v *TrainingSpecification) *DescribeAlgorithmOutput { + s.TrainingSpecification = v + return s +} + +// SetValidationSpecification sets the ValidationSpecification field's value. +func (s *DescribeAlgorithmOutput) SetValidationSpecification(v *AlgorithmValidationSpecification) *DescribeAlgorithmOutput { + s.ValidationSpecification = v + return s +} + +type DescribeCodeRepositoryInput struct { + _ struct{} `type:"structure"` + + // The name of the Git repository to describe. + // + // CodeRepositoryName is a required field + CodeRepositoryName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCodeRepositoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCodeRepositoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCodeRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCodeRepositoryInput"} + if s.CodeRepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) + } + if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodeRepositoryName sets the CodeRepositoryName field's value. +func (s *DescribeCodeRepositoryInput) SetCodeRepositoryName(v string) *DescribeCodeRepositoryInput { + s.CodeRepositoryName = &v + return s +} + +type DescribeCodeRepositoryOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Git repository. + // + // CodeRepositoryArn is a required field + CodeRepositoryArn *string `min:"1" type:"string" required:"true"` + + // The name of the Git repository. + // + // CodeRepositoryName is a required field + CodeRepositoryName *string `min:"1" type:"string" required:"true"` + + // The date and time that the repository was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Configuration details about the repository, including the URL where the repository + // is located, the default branch, and the Amazon Resource Name (ARN) of the + // AWS Secrets Manager secret that contains the credentials used to access the + // repository. + GitConfig *GitConfig `type:"structure"` + + // The date and time that the repository was last changed. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s DescribeCodeRepositoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCodeRepositoryOutput) GoString() string { + return s.String() +} + +// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. +func (s *DescribeCodeRepositoryOutput) SetCodeRepositoryArn(v string) *DescribeCodeRepositoryOutput { + s.CodeRepositoryArn = &v + return s +} + +// SetCodeRepositoryName sets the CodeRepositoryName field's value. +func (s *DescribeCodeRepositoryOutput) SetCodeRepositoryName(v string) *DescribeCodeRepositoryOutput { + s.CodeRepositoryName = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeCodeRepositoryOutput) SetCreationTime(v time.Time) *DescribeCodeRepositoryOutput { + s.CreationTime = &v + return s +} + +// SetGitConfig sets the GitConfig field's value. +func (s *DescribeCodeRepositoryOutput) SetGitConfig(v *GitConfig) *DescribeCodeRepositoryOutput { + s.GitConfig = v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeCodeRepositoryOutput) SetLastModifiedTime(v time.Time) *DescribeCodeRepositoryOutput { + s.LastModifiedTime = &v + return s +} + +type DescribeCompilationJobInput struct { + _ struct{} `type:"structure"` + + // The name of the model compilation job that you want information about. + // + // CompilationJobName is a required field + CompilationJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCompilationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCompilationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCompilationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCompilationJobInput"} + if s.CompilationJobName == nil { + invalidParams.Add(request.NewErrParamRequired("CompilationJobName")) + } + if s.CompilationJobName != nil && len(*s.CompilationJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CompilationJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompilationJobName sets the CompilationJobName field's value. +func (s *DescribeCompilationJobInput) SetCompilationJobName(v string) *DescribeCompilationJobInput { + s.CompilationJobName = &v + return s +} + +type DescribeCompilationJobOutput struct { + _ struct{} `type:"structure"` + + // The time when the model compilation job on a compilation job instance ended. + // For a successful or stopped job, this is when the job's model artifacts have + // finished uploading. For a failed job, this is when Amazon SageMaker detected + // that the job failed. + CompilationEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker assumes + // to perform the model compilation job. + // + // CompilationJobArn is a required field + CompilationJobArn *string `type:"string" required:"true"` + + // The name of the model compilation job. + // + // CompilationJobName is a required field + CompilationJobName *string `min:"1" type:"string" required:"true"` + + // The status of the model compilation job. + // + // CompilationJobStatus is a required field + CompilationJobStatus *string `type:"string" required:"true" enum:"CompilationJobStatus"` + + // The time when the model compilation job started the CompilationJob instances. + // + // You are billed for the time between this timestamp and the timestamp in the + // DescribeCompilationJobResponse$CompilationEndTime field. In Amazon CloudWatch + // Logs, the start time might be later than this time. That's because it takes + // time to download the compilation job, which depends on the size of the compilation + // job container. + CompilationStartTime *time.Time `type:"timestamp"` + + // The time that the model compilation job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // If a model compilation job failed, the reason it failed. + // + // FailureReason is a required field + FailureReason *string `type:"string" required:"true"` + + // Information about the location in Amazon S3 of the input model artifacts, + // the name and shape of the expected data inputs, and the framework in which + // the model was trained. + // + // InputConfig is a required field + InputConfig *InputConfig `type:"structure" required:"true"` + + // The time that the status of the model compilation job was last modified. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` + + // Information about the location in Amazon S3 that has been configured for + // storing the model artifacts used in the compilation job. + // + // ModelArtifacts is a required field + ModelArtifacts *ModelArtifacts `type:"structure" required:"true"` + + // Information about the output location for the compiled model and the target + // device that the model runs on. + // + // OutputConfig is a required field + OutputConfig *OutputConfig `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of the model compilation job. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // The duration allowed for model compilation. + // + // StoppingCondition is a required field + StoppingCondition *StoppingCondition `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeCompilationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCompilationJobOutput) GoString() string { + return s.String() +} + +// SetCompilationEndTime sets the CompilationEndTime field's value. +func (s *DescribeCompilationJobOutput) SetCompilationEndTime(v time.Time) *DescribeCompilationJobOutput { + s.CompilationEndTime = &v + return s +} + +// SetCompilationJobArn sets the CompilationJobArn field's value. +func (s *DescribeCompilationJobOutput) SetCompilationJobArn(v string) *DescribeCompilationJobOutput { + s.CompilationJobArn = &v + return s +} + +// SetCompilationJobName sets the CompilationJobName field's value. +func (s *DescribeCompilationJobOutput) SetCompilationJobName(v string) *DescribeCompilationJobOutput { + s.CompilationJobName = &v + return s +} + +// SetCompilationJobStatus sets the CompilationJobStatus field's value. +func (s *DescribeCompilationJobOutput) SetCompilationJobStatus(v string) *DescribeCompilationJobOutput { + s.CompilationJobStatus = &v + return s +} + +// SetCompilationStartTime sets the CompilationStartTime field's value. +func (s *DescribeCompilationJobOutput) SetCompilationStartTime(v time.Time) *DescribeCompilationJobOutput { + s.CompilationStartTime = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeCompilationJobOutput) SetCreationTime(v time.Time) *DescribeCompilationJobOutput { + s.CreationTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeCompilationJobOutput) SetFailureReason(v string) *DescribeCompilationJobOutput { + s.FailureReason = &v + return s +} + +// SetInputConfig sets the InputConfig field's value. +func (s *DescribeCompilationJobOutput) SetInputConfig(v *InputConfig) *DescribeCompilationJobOutput { + s.InputConfig = v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeCompilationJobOutput) SetLastModifiedTime(v time.Time) *DescribeCompilationJobOutput { + s.LastModifiedTime = &v + return s +} + +// SetModelArtifacts sets the ModelArtifacts field's value. +func (s *DescribeCompilationJobOutput) SetModelArtifacts(v *ModelArtifacts) *DescribeCompilationJobOutput { + s.ModelArtifacts = v + return s +} + +// SetOutputConfig sets the OutputConfig field's value. +func (s *DescribeCompilationJobOutput) SetOutputConfig(v *OutputConfig) *DescribeCompilationJobOutput { + s.OutputConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeCompilationJobOutput) SetRoleArn(v string) *DescribeCompilationJobOutput { + s.RoleArn = &v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *DescribeCompilationJobOutput) SetStoppingCondition(v *StoppingCondition) *DescribeCompilationJobOutput { + s.StoppingCondition = v + return s +} + +type DescribeEndpointConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the endpoint configuration. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEndpointConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointConfigInput"} + if s.EndpointConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *DescribeEndpointConfigInput) SetEndpointConfigName(v string) *DescribeEndpointConfigInput { + s.EndpointConfigName = &v + return s +} + +type DescribeEndpointConfigOutput struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the endpoint configuration was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of the endpoint configuration. + // + // EndpointConfigArn is a required field + EndpointConfigArn *string `min:"20" type:"string" required:"true"` + + // Name of the Amazon SageMaker endpoint configuration. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` + + // AWS KMS key ID Amazon SageMaker uses to encrypt data when storing it on the + // ML storage volume attached to the instance. + KmsKeyId *string `type:"string"` + + // An array of ProductionVariant objects, one for each model that you want to + // host at this endpoint. + // + // ProductionVariants is a required field + ProductionVariants []*ProductionVariant `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointConfigOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeEndpointConfigOutput) SetCreationTime(v time.Time) *DescribeEndpointConfigOutput { + s.CreationTime = &v + return s +} + +// SetEndpointConfigArn sets the EndpointConfigArn field's value. +func (s *DescribeEndpointConfigOutput) SetEndpointConfigArn(v string) *DescribeEndpointConfigOutput { + s.EndpointConfigArn = &v + return s +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *DescribeEndpointConfigOutput) SetEndpointConfigName(v string) *DescribeEndpointConfigOutput { + s.EndpointConfigName = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DescribeEndpointConfigOutput) SetKmsKeyId(v string) *DescribeEndpointConfigOutput { + s.KmsKeyId = &v + return s +} + +// SetProductionVariants sets the ProductionVariants field's value. +func (s *DescribeEndpointConfigOutput) SetProductionVariants(v []*ProductionVariant) *DescribeEndpointConfigOutput { + s.ProductionVariants = v + return s +} + +type DescribeEndpointInput struct { + _ struct{} `type:"structure"` + + // The name of the endpoint. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeEndpointInput"} + if s.EndpointName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointName sets the EndpointName field's value. +func (s *DescribeEndpointInput) SetEndpointName(v string) *DescribeEndpointInput { + s.EndpointName = &v + return s +} + +type DescribeEndpointOutput struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the endpoint was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of the endpoint. + // + // EndpointArn is a required field + EndpointArn *string `min:"20" type:"string" required:"true"` + + // The name of the endpoint configuration associated with this endpoint. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` + + // Name of the endpoint. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` + + // The status of the endpoint. + // + // * OutOfService: Endpoint is not available to take incoming requests. + // + // * Creating: CreateEndpoint is executing. + // + // * Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. + // + // * SystemUpdating: Endpoint is undergoing maintenance and cannot be updated + // or deleted or re-scaled until it has completed. This maintenance operation + // does not change any customer-specified values such as VPC config, KMS + // encryption, model, instance type, or instance count. + // + // * RollingBack: Endpoint fails to scale up or down or change its variant + // weight and is in the process of rolling back to its previous configuration. + // Once the rollback completes, endpoint returns to an InService status. + // This transitional status only applies to an endpoint that has autoscaling + // enabled and is undergoing variant weight or capacity changes as part of + // an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities + // operation is called explicitly. + // + // * InService: Endpoint is available to process incoming requests. + // + // * Deleting: DeleteEndpoint is executing. + // + // * Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason + // for information about the failure. DeleteEndpoint is the only operation + // that can be performed on a failed endpoint. + // + // EndpointStatus is a required field + EndpointStatus *string `type:"string" required:"true" enum:"EndpointStatus"` + + // If the status of the endpoint is Failed, the reason why it failed. + FailureReason *string `type:"string"` + + // A timestamp that shows when the endpoint was last modified. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` + + // An array of ProductionVariantSummary objects, one for each model hosted behind + // this endpoint. + ProductionVariants []*ProductionVariantSummary `min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeEndpointOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeEndpointOutput) SetCreationTime(v time.Time) *DescribeEndpointOutput { + s.CreationTime = &v + return s +} + +// SetEndpointArn sets the EndpointArn field's value. +func (s *DescribeEndpointOutput) SetEndpointArn(v string) *DescribeEndpointOutput { + s.EndpointArn = &v + return s +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *DescribeEndpointOutput) SetEndpointConfigName(v string) *DescribeEndpointOutput { + s.EndpointConfigName = &v + return s +} + +// SetEndpointName sets the EndpointName field's value. +func (s *DescribeEndpointOutput) SetEndpointName(v string) *DescribeEndpointOutput { + s.EndpointName = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *DescribeEndpointOutput) SetEndpointStatus(v string) *DescribeEndpointOutput { + s.EndpointStatus = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeEndpointOutput) SetFailureReason(v string) *DescribeEndpointOutput { + s.FailureReason = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeEndpointOutput) SetLastModifiedTime(v time.Time) *DescribeEndpointOutput { + s.LastModifiedTime = &v + return s +} + +// SetProductionVariants sets the ProductionVariants field's value. +func (s *DescribeEndpointOutput) SetProductionVariants(v []*ProductionVariantSummary) *DescribeEndpointOutput { + s.ProductionVariants = v + return s +} + +type DescribeHyperParameterTuningJobInput struct { + _ struct{} `type:"structure"` + + // The name of the tuning job to describe. + // + // HyperParameterTuningJobName is a required field + HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeHyperParameterTuningJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeHyperParameterTuningJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeHyperParameterTuningJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeHyperParameterTuningJobInput"} + if s.HyperParameterTuningJobName == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) + } + if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *DescribeHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *DescribeHyperParameterTuningJobInput { + s.HyperParameterTuningJobName = &v + return s +} + +type DescribeHyperParameterTuningJobOutput struct { + _ struct{} `type:"structure"` + + // A TrainingJobSummary object that describes the training job that completed + // with the best current HyperParameterTuningJobObjective. + BestTrainingJob *HyperParameterTrainingJobSummary `type:"structure"` + + // The date and time that the tuning job started. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // If the tuning job failed, the reason it failed. + FailureReason *string `type:"string"` + + // The date and time that the tuning job ended. + HyperParameterTuningEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the tuning job. + // + // HyperParameterTuningJobArn is a required field + HyperParameterTuningJobArn *string `type:"string" required:"true"` + + // The HyperParameterTuningJobConfig object that specifies the configuration + // of the tuning job. + // + // HyperParameterTuningJobConfig is a required field + HyperParameterTuningJobConfig *HyperParameterTuningJobConfig `type:"structure" required:"true"` + + // The name of the tuning job. + // + // HyperParameterTuningJobName is a required field + HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` + + // The status of the tuning job: InProgress, Completed, Failed, Stopping, or + // Stopped. + // + // HyperParameterTuningJobStatus is a required field + HyperParameterTuningJobStatus *string `type:"string" required:"true" enum:"HyperParameterTuningJobStatus"` + + // The date and time that the status of the tuning job was modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The ObjectiveStatusCounters object that specifies the number of training + // jobs, categorized by the status of their final objective metric, that this + // tuning job launched. + // + // ObjectiveStatusCounters is a required field + ObjectiveStatusCounters *ObjectiveStatusCounters `type:"structure" required:"true"` + + // If the hyperparameter tuning job is an warm start tuning job with a WarmStartType + // of IDENTICAL_DATA_AND_ALGORITHM, this is the TrainingJobSummary for the training + // job with the best objective metric value of all training jobs launched by + // this tuning job and all parent jobs specified for the warm start tuning job. + OverallBestTrainingJob *HyperParameterTrainingJobSummary `type:"structure"` + + // The HyperParameterTrainingJobDefinition object that specifies the definition + // of the training jobs that this tuning job launches. + // + // TrainingJobDefinition is a required field + TrainingJobDefinition *HyperParameterTrainingJobDefinition `type:"structure" required:"true"` + + // The TrainingJobStatusCounters object that specifies the number of training + // jobs, categorized by status, that this tuning job launched. + // + // TrainingJobStatusCounters is a required field + TrainingJobStatusCounters *TrainingJobStatusCounters `type:"structure" required:"true"` + + // The configuration for starting the hyperparameter parameter tuning job using + // one or more previous tuning jobs as a starting point. The results of previous + // tuning jobs are used to inform which combinations of hyperparameters to search + // over in the new tuning job. + WarmStartConfig *HyperParameterTuningJobWarmStartConfig `type:"structure"` +} + +// String returns the string representation +func (s DescribeHyperParameterTuningJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeHyperParameterTuningJobOutput) GoString() string { + return s.String() +} + +// SetBestTrainingJob sets the BestTrainingJob field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetBestTrainingJob(v *HyperParameterTrainingJobSummary) *DescribeHyperParameterTuningJobOutput { + s.BestTrainingJob = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetCreationTime(v time.Time) *DescribeHyperParameterTuningJobOutput { + s.CreationTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetFailureReason(v string) *DescribeHyperParameterTuningJobOutput { + s.FailureReason = &v + return s +} + +// SetHyperParameterTuningEndTime sets the HyperParameterTuningEndTime field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningEndTime(v time.Time) *DescribeHyperParameterTuningJobOutput { + s.HyperParameterTuningEndTime = &v + return s +} + +// SetHyperParameterTuningJobArn sets the HyperParameterTuningJobArn field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobArn(v string) *DescribeHyperParameterTuningJobOutput { + s.HyperParameterTuningJobArn = &v + return s +} + +// SetHyperParameterTuningJobConfig sets the HyperParameterTuningJobConfig field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobConfig(v *HyperParameterTuningJobConfig) *DescribeHyperParameterTuningJobOutput { + s.HyperParameterTuningJobConfig = v + return s +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobName(v string) *DescribeHyperParameterTuningJobOutput { + s.HyperParameterTuningJobName = &v + return s +} + +// SetHyperParameterTuningJobStatus sets the HyperParameterTuningJobStatus field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetHyperParameterTuningJobStatus(v string) *DescribeHyperParameterTuningJobOutput { + s.HyperParameterTuningJobStatus = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetLastModifiedTime(v time.Time) *DescribeHyperParameterTuningJobOutput { + s.LastModifiedTime = &v + return s +} + +// SetObjectiveStatusCounters sets the ObjectiveStatusCounters field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetObjectiveStatusCounters(v *ObjectiveStatusCounters) *DescribeHyperParameterTuningJobOutput { + s.ObjectiveStatusCounters = v + return s +} + +// SetOverallBestTrainingJob sets the OverallBestTrainingJob field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetOverallBestTrainingJob(v *HyperParameterTrainingJobSummary) *DescribeHyperParameterTuningJobOutput { + s.OverallBestTrainingJob = v + return s +} + +// SetTrainingJobDefinition sets the TrainingJobDefinition field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetTrainingJobDefinition(v *HyperParameterTrainingJobDefinition) *DescribeHyperParameterTuningJobOutput { + s.TrainingJobDefinition = v + return s +} + +// SetTrainingJobStatusCounters sets the TrainingJobStatusCounters field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetTrainingJobStatusCounters(v *TrainingJobStatusCounters) *DescribeHyperParameterTuningJobOutput { + s.TrainingJobStatusCounters = v + return s +} + +// SetWarmStartConfig sets the WarmStartConfig field's value. +func (s *DescribeHyperParameterTuningJobOutput) SetWarmStartConfig(v *HyperParameterTuningJobWarmStartConfig) *DescribeHyperParameterTuningJobOutput { + s.WarmStartConfig = v + return s +} + +type DescribeLabelingJobInput struct { + _ struct{} `type:"structure"` + + // The name of the labeling job to return information for. + // + // LabelingJobName is a required field + LabelingJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeLabelingJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLabelingJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLabelingJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLabelingJobInput"} + if s.LabelingJobName == nil { + invalidParams.Add(request.NewErrParamRequired("LabelingJobName")) + } + if s.LabelingJobName != nil && len(*s.LabelingJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LabelingJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLabelingJobName sets the LabelingJobName field's value. +func (s *DescribeLabelingJobInput) SetLabelingJobName(v string) *DescribeLabelingJobInput { + s.LabelingJobName = &v + return s +} + +type DescribeLabelingJobOutput struct { + _ struct{} `type:"structure"` + + // The date and time that the labeling job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // If the job failed, the reason that it failed. + FailureReason *string `type:"string"` + + // Configuration information required for human workers to complete a labeling + // task. + // + // HumanTaskConfig is a required field + HumanTaskConfig *HumanTaskConfig `type:"structure" required:"true"` + + // Input configuration information for the labeling job, such as the Amazon + // S3 location of the data objects and the location of the manifest file that + // describes the data objects. + // + // InputConfig is a required field + InputConfig *LabelingJobInputConfig `type:"structure" required:"true"` + + // A unique identifier for work done as part of a labeling job. + // + // JobReferenceCode is a required field + JobReferenceCode *string `min:"1" type:"string" required:"true"` + + // The attribute used as the label in the output manifest file. + LabelAttributeName *string `min:"1" type:"string"` + + // The S3 location of the JSON file that defines the categories used to label + // data objects. + // + // The file is a JSON structure in the following format: + // + // { + // + // "document-version": "2018-11-28" + // + // "labels": [ + // + // { + // + // "label": "label 1" + // + // }, + // + // { + // + // "label": "label 2" + // + // }, + // + // ... + // + // { + // + // "label": "label n" + // + // } + // + // ] + // + // } + LabelCategoryConfigS3Uri *string `type:"string"` + + // Provides a breakdown of the number of data objects labeled by humans, the + // number of objects labeled by machine, the number of objects than couldn't + // be labeled, and the total number of objects labeled. + // + // LabelCounters is a required field + LabelCounters *LabelCounters `type:"structure" required:"true"` + + // Configuration information for automated data labeling. + LabelingJobAlgorithmsConfig *LabelingJobAlgorithmsConfig `type:"structure"` + + // The Amazon Resource Name (ARN) of the labeling job. + // + // LabelingJobArn is a required field + LabelingJobArn *string `type:"string" required:"true"` + + // The name assigned to the labeling job when it was created. + // + // LabelingJobName is a required field + LabelingJobName *string `min:"1" type:"string" required:"true"` + + // The location of the output produced by the labeling job. + LabelingJobOutput *LabelingJobOutput `type:"structure"` + + // The processing status of the labeling job. + // + // LabelingJobStatus is a required field + LabelingJobStatus *string `type:"string" required:"true" enum:"LabelingJobStatus"` + + // The date and time that the labeling job was last updated. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` + + // The location of the job's output data and the AWS Key Management Service + // key ID for the key used to encrypt the output data, if any. + // + // OutputConfig is a required field + OutputConfig *LabelingJobOutputConfig `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) that Amazon SageMaker assumes to perform tasks + // on your behalf during data labeling. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // A set of conditions for stopping a labeling job. If any of the conditions + // are met, the job is automatically stopped. + StoppingConditions *LabelingJobStoppingConditions `type:"structure"` + + // An array of key/value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s DescribeLabelingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLabelingJobOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeLabelingJobOutput) SetCreationTime(v time.Time) *DescribeLabelingJobOutput { + s.CreationTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeLabelingJobOutput) SetFailureReason(v string) *DescribeLabelingJobOutput { + s.FailureReason = &v + return s +} + +// SetHumanTaskConfig sets the HumanTaskConfig field's value. +func (s *DescribeLabelingJobOutput) SetHumanTaskConfig(v *HumanTaskConfig) *DescribeLabelingJobOutput { + s.HumanTaskConfig = v + return s +} + +// SetInputConfig sets the InputConfig field's value. +func (s *DescribeLabelingJobOutput) SetInputConfig(v *LabelingJobInputConfig) *DescribeLabelingJobOutput { + s.InputConfig = v + return s +} + +// SetJobReferenceCode sets the JobReferenceCode field's value. +func (s *DescribeLabelingJobOutput) SetJobReferenceCode(v string) *DescribeLabelingJobOutput { + s.JobReferenceCode = &v + return s +} + +// SetLabelAttributeName sets the LabelAttributeName field's value. +func (s *DescribeLabelingJobOutput) SetLabelAttributeName(v string) *DescribeLabelingJobOutput { + s.LabelAttributeName = &v + return s +} + +// SetLabelCategoryConfigS3Uri sets the LabelCategoryConfigS3Uri field's value. +func (s *DescribeLabelingJobOutput) SetLabelCategoryConfigS3Uri(v string) *DescribeLabelingJobOutput { + s.LabelCategoryConfigS3Uri = &v + return s +} + +// SetLabelCounters sets the LabelCounters field's value. +func (s *DescribeLabelingJobOutput) SetLabelCounters(v *LabelCounters) *DescribeLabelingJobOutput { + s.LabelCounters = v + return s +} + +// SetLabelingJobAlgorithmsConfig sets the LabelingJobAlgorithmsConfig field's value. +func (s *DescribeLabelingJobOutput) SetLabelingJobAlgorithmsConfig(v *LabelingJobAlgorithmsConfig) *DescribeLabelingJobOutput { + s.LabelingJobAlgorithmsConfig = v + return s +} + +// SetLabelingJobArn sets the LabelingJobArn field's value. +func (s *DescribeLabelingJobOutput) SetLabelingJobArn(v string) *DescribeLabelingJobOutput { + s.LabelingJobArn = &v + return s +} + +// SetLabelingJobName sets the LabelingJobName field's value. +func (s *DescribeLabelingJobOutput) SetLabelingJobName(v string) *DescribeLabelingJobOutput { + s.LabelingJobName = &v + return s +} + +// SetLabelingJobOutput sets the LabelingJobOutput field's value. +func (s *DescribeLabelingJobOutput) SetLabelingJobOutput(v *LabelingJobOutput) *DescribeLabelingJobOutput { + s.LabelingJobOutput = v + return s +} + +// SetLabelingJobStatus sets the LabelingJobStatus field's value. +func (s *DescribeLabelingJobOutput) SetLabelingJobStatus(v string) *DescribeLabelingJobOutput { + s.LabelingJobStatus = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeLabelingJobOutput) SetLastModifiedTime(v time.Time) *DescribeLabelingJobOutput { + s.LastModifiedTime = &v + return s +} + +// SetOutputConfig sets the OutputConfig field's value. +func (s *DescribeLabelingJobOutput) SetOutputConfig(v *LabelingJobOutputConfig) *DescribeLabelingJobOutput { + s.OutputConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeLabelingJobOutput) SetRoleArn(v string) *DescribeLabelingJobOutput { + s.RoleArn = &v + return s +} + +// SetStoppingConditions sets the StoppingConditions field's value. +func (s *DescribeLabelingJobOutput) SetStoppingConditions(v *LabelingJobStoppingConditions) *DescribeLabelingJobOutput { + s.StoppingConditions = v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribeLabelingJobOutput) SetTags(v []*Tag) *DescribeLabelingJobOutput { + s.Tags = v + return s +} + +type DescribeModelInput struct { + _ struct{} `type:"structure"` + + // The name of the model. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeModelInput"} + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelName sets the ModelName field's value. +func (s *DescribeModelInput) SetModelName(v string) *DescribeModelInput { + s.ModelName = &v + return s +} + +type DescribeModelOutput struct { + _ struct{} `type:"structure"` + + // The containers in the inference pipeline. + Containers []*ContainerDefinition `type:"list"` + + // A timestamp that shows when the model was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // If True, no inbound or outbound network calls can be made to or from the + // model container. + // + // The Semantic Segmentation built-in algorithm does not support network isolation. + EnableNetworkIsolation *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the IAM role that you specified for the + // model. + // + // ExecutionRoleArn is a required field + ExecutionRoleArn *string `min:"20" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the model. + // + // ModelArn is a required field + ModelArn *string `min:"20" type:"string" required:"true"` + + // Name of the Amazon SageMaker model. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` + + // The location of the primary inference code, associated artifacts, and custom + // environment map that the inference code uses when it is deployed in production. + PrimaryContainer *ContainerDefinition `type:"structure"` + + // A VpcConfig object that specifies the VPC that this model has access to. + // For more information, see Protect Endpoints by Using an Amazon Virtual Private + // Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) + VpcConfig *VpcConfig `type:"structure"` +} + +// String returns the string representation +func (s DescribeModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeModelOutput) GoString() string { + return s.String() +} + +// SetContainers sets the Containers field's value. +func (s *DescribeModelOutput) SetContainers(v []*ContainerDefinition) *DescribeModelOutput { + s.Containers = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeModelOutput) SetCreationTime(v time.Time) *DescribeModelOutput { + s.CreationTime = &v + return s +} + +// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. +func (s *DescribeModelOutput) SetEnableNetworkIsolation(v bool) *DescribeModelOutput { + s.EnableNetworkIsolation = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *DescribeModelOutput) SetExecutionRoleArn(v string) *DescribeModelOutput { + s.ExecutionRoleArn = &v + return s +} + +// SetModelArn sets the ModelArn field's value. +func (s *DescribeModelOutput) SetModelArn(v string) *DescribeModelOutput { + s.ModelArn = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *DescribeModelOutput) SetModelName(v string) *DescribeModelOutput { + s.ModelName = &v + return s +} + +// SetPrimaryContainer sets the PrimaryContainer field's value. +func (s *DescribeModelOutput) SetPrimaryContainer(v *ContainerDefinition) *DescribeModelOutput { + s.PrimaryContainer = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *DescribeModelOutput) SetVpcConfig(v *VpcConfig) *DescribeModelOutput { + s.VpcConfig = v + return s +} + +type DescribeModelPackageInput struct { + _ struct{} `type:"structure"` + + // The name of the model package to describe. + // + // ModelPackageName is a required field + ModelPackageName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeModelPackageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeModelPackageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeModelPackageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeModelPackageInput"} + if s.ModelPackageName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelPackageName")) + } + if s.ModelPackageName != nil && len(*s.ModelPackageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelPackageName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelPackageName sets the ModelPackageName field's value. +func (s *DescribeModelPackageInput) SetModelPackageName(v string) *DescribeModelPackageInput { + s.ModelPackageName = &v + return s +} + +type DescribeModelPackageOutput struct { + _ struct{} `type:"structure"` + + // Whether the model package is certified for listing on AWS Marketplace. + CertifyForMarketplace *bool `type:"boolean"` + + // A timestamp specifying when the model package was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Details about inference jobs that can be run with models based on this model + // package. + InferenceSpecification *InferenceSpecification `type:"structure"` + + // The Amazon Resource Name (ARN) of the model package. + // + // ModelPackageArn is a required field + ModelPackageArn *string `min:"1" type:"string" required:"true"` + + // A brief summary of the model package. + ModelPackageDescription *string `type:"string"` + + // The name of the model package being described. + // + // ModelPackageName is a required field + ModelPackageName *string `min:"1" type:"string" required:"true"` + + // The current status of the model package. + // + // ModelPackageStatus is a required field + ModelPackageStatus *string `type:"string" required:"true" enum:"ModelPackageStatus"` + + // Details about the current status of the model package. + // + // ModelPackageStatusDetails is a required field + ModelPackageStatusDetails *ModelPackageStatusDetails `type:"structure" required:"true"` + + // Details about the algorithm that was used to create the model package. + SourceAlgorithmSpecification *SourceAlgorithmSpecification `type:"structure"` + + // Configurations for one or more transform jobs that Amazon SageMaker runs + // to test the model package. + ValidationSpecification *ModelPackageValidationSpecification `type:"structure"` +} + +// String returns the string representation +func (s DescribeModelPackageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeModelPackageOutput) GoString() string { + return s.String() +} + +// SetCertifyForMarketplace sets the CertifyForMarketplace field's value. +func (s *DescribeModelPackageOutput) SetCertifyForMarketplace(v bool) *DescribeModelPackageOutput { + s.CertifyForMarketplace = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeModelPackageOutput) SetCreationTime(v time.Time) *DescribeModelPackageOutput { + s.CreationTime = &v + return s +} + +// SetInferenceSpecification sets the InferenceSpecification field's value. +func (s *DescribeModelPackageOutput) SetInferenceSpecification(v *InferenceSpecification) *DescribeModelPackageOutput { + s.InferenceSpecification = v + return s +} + +// SetModelPackageArn sets the ModelPackageArn field's value. +func (s *DescribeModelPackageOutput) SetModelPackageArn(v string) *DescribeModelPackageOutput { + s.ModelPackageArn = &v + return s +} + +// SetModelPackageDescription sets the ModelPackageDescription field's value. +func (s *DescribeModelPackageOutput) SetModelPackageDescription(v string) *DescribeModelPackageOutput { + s.ModelPackageDescription = &v + return s +} + +// SetModelPackageName sets the ModelPackageName field's value. +func (s *DescribeModelPackageOutput) SetModelPackageName(v string) *DescribeModelPackageOutput { + s.ModelPackageName = &v + return s +} + +// SetModelPackageStatus sets the ModelPackageStatus field's value. +func (s *DescribeModelPackageOutput) SetModelPackageStatus(v string) *DescribeModelPackageOutput { + s.ModelPackageStatus = &v + return s +} + +// SetModelPackageStatusDetails sets the ModelPackageStatusDetails field's value. +func (s *DescribeModelPackageOutput) SetModelPackageStatusDetails(v *ModelPackageStatusDetails) *DescribeModelPackageOutput { + s.ModelPackageStatusDetails = v + return s +} + +// SetSourceAlgorithmSpecification sets the SourceAlgorithmSpecification field's value. +func (s *DescribeModelPackageOutput) SetSourceAlgorithmSpecification(v *SourceAlgorithmSpecification) *DescribeModelPackageOutput { + s.SourceAlgorithmSpecification = v + return s +} + +// SetValidationSpecification sets the ValidationSpecification field's value. +func (s *DescribeModelPackageOutput) SetValidationSpecification(v *ModelPackageValidationSpecification) *DescribeModelPackageOutput { + s.ValidationSpecification = v + return s +} + +type DescribeNotebookInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the notebook instance that you want information about. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeNotebookInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotebookInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNotebookInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNotebookInstanceInput"} + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *DescribeNotebookInstanceInput) SetNotebookInstanceName(v string) *DescribeNotebookInstanceInput { + s.NotebookInstanceName = &v + return s +} + +type DescribeNotebookInstanceLifecycleConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the lifecycle configuration to describe. + // + // NotebookInstanceLifecycleConfigName is a required field + NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeNotebookInstanceLifecycleConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotebookInstanceLifecycleConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNotebookInstanceLifecycleConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNotebookInstanceLifecycleConfigInput"} + if s.NotebookInstanceLifecycleConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *DescribeNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *DescribeNotebookInstanceLifecycleConfigInput { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +type DescribeNotebookInstanceLifecycleConfigOutput struct { + _ struct{} `type:"structure"` + + // A timestamp that tells when the lifecycle configuration was created. + CreationTime *time.Time `type:"timestamp"` + + // A timestamp that tells when the lifecycle configuration was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the lifecycle configuration. + NotebookInstanceLifecycleConfigArn *string `type:"string"` + + // The name of the lifecycle configuration. + NotebookInstanceLifecycleConfigName *string `type:"string"` + + // The shell script that runs only once, when you create a notebook instance. + OnCreate []*NotebookInstanceLifecycleHook `type:"list"` + + // The shell script that runs every time you start a notebook instance, including + // when you create the notebook instance. + OnStart []*NotebookInstanceLifecycleHook `type:"list"` +} + +// String returns the string representation +func (s DescribeNotebookInstanceLifecycleConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotebookInstanceLifecycleConfigOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetCreationTime(v time.Time) *DescribeNotebookInstanceLifecycleConfigOutput { + s.CreationTime = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetLastModifiedTime(v time.Time) *DescribeNotebookInstanceLifecycleConfigOutput { + s.LastModifiedTime = &v + return s +} + +// SetNotebookInstanceLifecycleConfigArn sets the NotebookInstanceLifecycleConfigArn field's value. +func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetNotebookInstanceLifecycleConfigArn(v string) *DescribeNotebookInstanceLifecycleConfigOutput { + s.NotebookInstanceLifecycleConfigArn = &v + return s +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetNotebookInstanceLifecycleConfigName(v string) *DescribeNotebookInstanceLifecycleConfigOutput { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +// SetOnCreate sets the OnCreate field's value. +func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetOnCreate(v []*NotebookInstanceLifecycleHook) *DescribeNotebookInstanceLifecycleConfigOutput { + s.OnCreate = v + return s +} + +// SetOnStart sets the OnStart field's value. +func (s *DescribeNotebookInstanceLifecycleConfigOutput) SetOnStart(v []*NotebookInstanceLifecycleHook) *DescribeNotebookInstanceLifecycleConfigOutput { + s.OnStart = v + return s +} + +type DescribeNotebookInstanceOutput struct { + _ struct{} `type:"structure"` + + // A list of the Elastic Inference (EI) instance types associated with this + // notebook instance. Currently only one EI instance type can be associated + // with a notebook instance. For more information, see Using Elastic Inference + // in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). + AcceleratorTypes []*string `type:"list"` + + // An array of up to three Git repositories associated with the notebook instance. + // These can be either the names of Git repositories stored as resources in + // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository. These repositories are cloned at the same + // level as the default repository of your notebook instance. For more information, + // see Associating Git Repositories with Amazon SageMaker Notebook Instances + // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + AdditionalCodeRepositories []*string `type:"list"` + + // A timestamp. Use this parameter to return the time when the notebook instance + // was created + CreationTime *time.Time `type:"timestamp"` + + // The Git repository associated with the notebook instance as its default code + // repository. This can be either the name of a Git repository stored as a resource + // in your account, or the URL of a Git repository in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository. When you open a notebook instance, it opens + // in the directory that contains this repository. For more information, see + // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + DefaultCodeRepository *string `min:"1" type:"string"` + + // Describes whether Amazon SageMaker provides internet access to the notebook + // instance. If this value is set to Disabled, he notebook instance does not + // have internet access, and cannot connect to Amazon SageMaker training and + // endpoint services. + // + // For more information, see Notebook Instances Are Internet-Enabled by Default + // (http://docs.aws.amazon.com/sagemaker/latest/dg/appendix-additional-considerations.html#appendix-notebook-and-internet-access). + DirectInternetAccess *string `type:"string" enum:"DirectInternetAccess"` + + // If status is Failed, the reason it failed. + FailureReason *string `type:"string"` + + // The type of ML compute instance running on the notebook instance. + InstanceType *string `type:"string" enum:"InstanceType"` + + // The AWS KMS key ID Amazon SageMaker uses to encrypt data when storing it + // on the ML storage volume attached to the instance. + KmsKeyId *string `type:"string"` + + // A timestamp. Use this parameter to retrieve the time when the notebook instance + // was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The network interface IDs that Amazon SageMaker created at the time of creating + // the instance. + NetworkInterfaceId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the notebook instance. + NotebookInstanceArn *string `type:"string"` + + // Returns the name of a notebook instance lifecycle configuration. + // + // For information about notebook instance lifestyle configurations, see Step + // 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html) + NotebookInstanceLifecycleConfigName *string `type:"string"` + + // The name of the Amazon SageMaker notebook instance. + NotebookInstanceName *string `type:"string"` + + // The status of the notebook instance. + NotebookInstanceStatus *string `type:"string" enum:"NotebookInstanceStatus"` + + // The Amazon Resource Name (ARN) of the IAM role associated with the instance. + RoleArn *string `min:"20" type:"string"` + + // The IDs of the VPC security groups. + SecurityGroups []*string `type:"list"` + + // The ID of the VPC subnet. + SubnetId *string `type:"string"` + + // The URL that you use to connect to the Jupyter notebook that is running in + // your notebook instance. + Url *string `type:"string"` + + // The size, in GB, of the ML storage volume attached to the notebook instance. + VolumeSizeInGB *int64 `min:"5" type:"integer"` +} + +// String returns the string representation +func (s DescribeNotebookInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNotebookInstanceOutput) GoString() string { + return s.String() +} + +// SetAcceleratorTypes sets the AcceleratorTypes field's value. +func (s *DescribeNotebookInstanceOutput) SetAcceleratorTypes(v []*string) *DescribeNotebookInstanceOutput { + s.AcceleratorTypes = v + return s +} + +// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. +func (s *DescribeNotebookInstanceOutput) SetAdditionalCodeRepositories(v []*string) *DescribeNotebookInstanceOutput { + s.AdditionalCodeRepositories = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeNotebookInstanceOutput) SetCreationTime(v time.Time) *DescribeNotebookInstanceOutput { + s.CreationTime = &v + return s +} + +// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. +func (s *DescribeNotebookInstanceOutput) SetDefaultCodeRepository(v string) *DescribeNotebookInstanceOutput { + s.DefaultCodeRepository = &v + return s +} + +// SetDirectInternetAccess sets the DirectInternetAccess field's value. +func (s *DescribeNotebookInstanceOutput) SetDirectInternetAccess(v string) *DescribeNotebookInstanceOutput { + s.DirectInternetAccess = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeNotebookInstanceOutput) SetFailureReason(v string) *DescribeNotebookInstanceOutput { + s.FailureReason = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *DescribeNotebookInstanceOutput) SetInstanceType(v string) *DescribeNotebookInstanceOutput { + s.InstanceType = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DescribeNotebookInstanceOutput) SetKmsKeyId(v string) *DescribeNotebookInstanceOutput { + s.KmsKeyId = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeNotebookInstanceOutput) SetLastModifiedTime(v time.Time) *DescribeNotebookInstanceOutput { + s.LastModifiedTime = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *DescribeNotebookInstanceOutput) SetNetworkInterfaceId(v string) *DescribeNotebookInstanceOutput { + s.NetworkInterfaceId = &v + return s +} + +// SetNotebookInstanceArn sets the NotebookInstanceArn field's value. +func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceArn(v string) *DescribeNotebookInstanceOutput { + s.NotebookInstanceArn = &v + return s +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceLifecycleConfigName(v string) *DescribeNotebookInstanceOutput { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceName(v string) *DescribeNotebookInstanceOutput { + s.NotebookInstanceName = &v + return s +} + +// SetNotebookInstanceStatus sets the NotebookInstanceStatus field's value. +func (s *DescribeNotebookInstanceOutput) SetNotebookInstanceStatus(v string) *DescribeNotebookInstanceOutput { + s.NotebookInstanceStatus = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeNotebookInstanceOutput) SetRoleArn(v string) *DescribeNotebookInstanceOutput { + s.RoleArn = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *DescribeNotebookInstanceOutput) SetSecurityGroups(v []*string) *DescribeNotebookInstanceOutput { + s.SecurityGroups = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *DescribeNotebookInstanceOutput) SetSubnetId(v string) *DescribeNotebookInstanceOutput { + s.SubnetId = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *DescribeNotebookInstanceOutput) SetUrl(v string) *DescribeNotebookInstanceOutput { + s.Url = &v + return s +} + +// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. +func (s *DescribeNotebookInstanceOutput) SetVolumeSizeInGB(v int64) *DescribeNotebookInstanceOutput { + s.VolumeSizeInGB = &v + return s +} + +type DescribeSubscribedWorkteamInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the subscribed work team to describe. + // + // WorkteamArn is a required field + WorkteamArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSubscribedWorkteamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubscribedWorkteamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSubscribedWorkteamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSubscribedWorkteamInput"} + if s.WorkteamArn == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *DescribeSubscribedWorkteamInput) SetWorkteamArn(v string) *DescribeSubscribedWorkteamInput { + s.WorkteamArn = &v + return s +} + +type DescribeSubscribedWorkteamOutput struct { + _ struct{} `type:"structure"` + + // A Workteam instance that contains information about the work team. + // + // SubscribedWorkteam is a required field + SubscribedWorkteam *SubscribedWorkteam `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeSubscribedWorkteamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubscribedWorkteamOutput) GoString() string { + return s.String() +} + +// SetSubscribedWorkteam sets the SubscribedWorkteam field's value. +func (s *DescribeSubscribedWorkteamOutput) SetSubscribedWorkteam(v *SubscribedWorkteam) *DescribeSubscribedWorkteamOutput { + s.SubscribedWorkteam = v + return s +} + +type DescribeTrainingJobInput struct { + _ struct{} `type:"structure"` + + // The name of the training job. + // + // TrainingJobName is a required field + TrainingJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTrainingJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrainingJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTrainingJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTrainingJobInput"} + if s.TrainingJobName == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingJobName")) + } + if s.TrainingJobName != nil && len(*s.TrainingJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TrainingJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *DescribeTrainingJobInput) SetTrainingJobName(v string) *DescribeTrainingJobInput { + s.TrainingJobName = &v + return s +} + +type DescribeTrainingJobOutput struct { + _ struct{} `type:"structure"` + + // Information about the algorithm used for training, and algorithm metadata. + // + // AlgorithmSpecification is a required field + AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` + + // A timestamp that indicates when the training job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // To encrypt all communications between ML compute instances in distributed + // training, specify True. Encryption provides greater security for distributed + // training, but training take longer because of the additional communications + // between ML compute instances. + EnableInterContainerTrafficEncryption *bool `type:"boolean"` + + // If you want to allow inbound or outbound network calls, except for calls + // between peers within a training cluster for distributed training, choose + // True. If you enable network isolation for training jobs that are configured + // to use a VPC, Amazon SageMaker downloads and uploads customer data and model + // artifacts through the specified VPC, but the training container does not + // have network access. + // + // The Semantic Segmentation built-in algorithm does not support network isolation. + EnableNetworkIsolation *bool `type:"boolean"` + + // If the training job failed, the reason it failed. + FailureReason *string `type:"string"` + + // A collection of MetricData objects that specify the names, values, and dates + // and times that the training algorithm emitted to Amazon CloudWatch. + FinalMetricDataList []*MetricData `type:"list"` + + // Algorithm-specific parameters. + HyperParameters map[string]*string `type:"map"` + + // An array of Channel objects that describes each data input channel. + InputDataConfig []*Channel `min:"1" type:"list"` + + // The Amazon Resource Name (ARN) of the Amazon SageMaker Ground Truth labeling + // job that created the transform or training job. + LabelingJobArn *string `type:"string"` + + // A timestamp that indicates when the status of the training job was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // Information about the Amazon S3 location that is configured for storing model + // artifacts. + // + // ModelArtifacts is a required field + ModelArtifacts *ModelArtifacts `type:"structure" required:"true"` + + // The S3 path where model artifacts that you configured when creating the job + // are stored. Amazon SageMaker creates subfolders for model artifacts. + OutputDataConfig *OutputDataConfig `type:"structure"` + + // Resources, including ML compute instances and ML storage volumes, that are + // configured for model training. + // + // ResourceConfig is a required field + ResourceConfig *ResourceConfig `type:"structure" required:"true"` + + // The AWS Identity and Access Management (IAM) role configured for the training + // job. + RoleArn *string `min:"20" type:"string"` + + // Provides detailed information about the state of the training job. For detailed + // information on the secondary status of the training job, see StatusMessage + // under SecondaryStatusTransition. + // + // Amazon SageMaker provides primary statuses and secondary statuses that apply + // to each of them: + // + // InProgressStarting - Starting the training job. + // + // Downloading - An optional stage for algorithms that support File training + // input mode. It indicates that data is being downloaded to the ML storage + // volumes. + // + // Training - Training is in progress. + // + // Uploading - Training is complete and the model artifacts are being uploaded + // to the S3 location. + // + // CompletedCompleted - The training job has completed. + // + // FailedFailed - The training job has failed. The reason for the failure is + // returned in the FailureReason field of DescribeTrainingJobResponse. + // + // StoppedMaxRuntimeExceeded - The job stopped because it exceeded the maximum + // allowed runtime. + // + // Stopped - The training job has stopped. + // + // StoppingStopping - Stopping the training job. + // + // Valid values for SecondaryStatus are subject to change. + // + // We no longer support the following secondary statuses: + // + // * LaunchingMLInstances + // + // * PreparingTrainingStack + // + // * DownloadingTrainingImage + // + // SecondaryStatus is a required field + SecondaryStatus *string `type:"string" required:"true" enum:"SecondaryStatus"` + + // A history of all of the secondary statuses that the training job has transitioned + // through. + SecondaryStatusTransitions []*SecondaryStatusTransition `type:"list"` + + // The condition under which to stop the training job. + // + // StoppingCondition is a required field + StoppingCondition *StoppingCondition `type:"structure" required:"true"` + + // Indicates the time when the training job ends on training instances. You + // are billed for the time interval between the value of TrainingStartTime and + // this time. For successful jobs and stopped jobs, this is the time after model + // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker + // detects a job failure. + TrainingEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the training job. + // + // TrainingJobArn is a required field + TrainingJobArn *string `type:"string" required:"true"` + + // Name of the model training job. + // + // TrainingJobName is a required field + TrainingJobName *string `min:"1" type:"string" required:"true"` + + // The status of the training job. + // + // Amazon SageMaker provides the following training job statuses: + // + // * InProgress - The training is in progress. + // + // * Completed - The training job has completed. + // + // * Failed - The training job has failed. To see the reason for the failure, + // see the FailureReason field in the response to a DescribeTrainingJobResponse + // call. + // + // * Stopping - The training job is stopping. + // + // * Stopped - The training job has stopped. + // + // For more detailed information, see SecondaryStatus. + // + // TrainingJobStatus is a required field + TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` + + // Indicates the time when the training job starts on training instances. You + // are billed for the time interval between this time and the value of TrainingEndTime. + // The start time in CloudWatch Logs might be later than this time. The difference + // is due to the time it takes to download the training data and to the size + // of the training container. + TrainingStartTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the associated hyperparameter tuning job + // if the training job was launched by a hyperparameter tuning job. + TuningJobArn *string `type:"string"` + + // A VpcConfig object that specifies the VPC that this training job has access + // to. For more information, see Protect Training Jobs by Using an Amazon Virtual + // Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). + VpcConfig *VpcConfig `type:"structure"` +} + +// String returns the string representation +func (s DescribeTrainingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrainingJobOutput) GoString() string { + return s.String() +} + +// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. +func (s *DescribeTrainingJobOutput) SetAlgorithmSpecification(v *AlgorithmSpecification) *DescribeTrainingJobOutput { + s.AlgorithmSpecification = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeTrainingJobOutput) SetCreationTime(v time.Time) *DescribeTrainingJobOutput { + s.CreationTime = &v + return s +} + +// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. +func (s *DescribeTrainingJobOutput) SetEnableInterContainerTrafficEncryption(v bool) *DescribeTrainingJobOutput { + s.EnableInterContainerTrafficEncryption = &v + return s +} + +// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. +func (s *DescribeTrainingJobOutput) SetEnableNetworkIsolation(v bool) *DescribeTrainingJobOutput { + s.EnableNetworkIsolation = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeTrainingJobOutput) SetFailureReason(v string) *DescribeTrainingJobOutput { + s.FailureReason = &v + return s +} + +// SetFinalMetricDataList sets the FinalMetricDataList field's value. +func (s *DescribeTrainingJobOutput) SetFinalMetricDataList(v []*MetricData) *DescribeTrainingJobOutput { + s.FinalMetricDataList = v + return s +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *DescribeTrainingJobOutput) SetHyperParameters(v map[string]*string) *DescribeTrainingJobOutput { + s.HyperParameters = v + return s +} + +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *DescribeTrainingJobOutput) SetInputDataConfig(v []*Channel) *DescribeTrainingJobOutput { + s.InputDataConfig = v + return s +} + +// SetLabelingJobArn sets the LabelingJobArn field's value. +func (s *DescribeTrainingJobOutput) SetLabelingJobArn(v string) *DescribeTrainingJobOutput { + s.LabelingJobArn = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *DescribeTrainingJobOutput) SetLastModifiedTime(v time.Time) *DescribeTrainingJobOutput { + s.LastModifiedTime = &v + return s +} + +// SetModelArtifacts sets the ModelArtifacts field's value. +func (s *DescribeTrainingJobOutput) SetModelArtifacts(v *ModelArtifacts) *DescribeTrainingJobOutput { + s.ModelArtifacts = v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *DescribeTrainingJobOutput) SetOutputDataConfig(v *OutputDataConfig) *DescribeTrainingJobOutput { + s.OutputDataConfig = v + return s +} + +// SetResourceConfig sets the ResourceConfig field's value. +func (s *DescribeTrainingJobOutput) SetResourceConfig(v *ResourceConfig) *DescribeTrainingJobOutput { + s.ResourceConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DescribeTrainingJobOutput) SetRoleArn(v string) *DescribeTrainingJobOutput { + s.RoleArn = &v + return s +} + +// SetSecondaryStatus sets the SecondaryStatus field's value. +func (s *DescribeTrainingJobOutput) SetSecondaryStatus(v string) *DescribeTrainingJobOutput { + s.SecondaryStatus = &v + return s +} + +// SetSecondaryStatusTransitions sets the SecondaryStatusTransitions field's value. +func (s *DescribeTrainingJobOutput) SetSecondaryStatusTransitions(v []*SecondaryStatusTransition) *DescribeTrainingJobOutput { + s.SecondaryStatusTransitions = v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *DescribeTrainingJobOutput) SetStoppingCondition(v *StoppingCondition) *DescribeTrainingJobOutput { + s.StoppingCondition = v + return s +} + +// SetTrainingEndTime sets the TrainingEndTime field's value. +func (s *DescribeTrainingJobOutput) SetTrainingEndTime(v time.Time) *DescribeTrainingJobOutput { + s.TrainingEndTime = &v + return s +} + +// SetTrainingJobArn sets the TrainingJobArn field's value. +func (s *DescribeTrainingJobOutput) SetTrainingJobArn(v string) *DescribeTrainingJobOutput { + s.TrainingJobArn = &v + return s +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *DescribeTrainingJobOutput) SetTrainingJobName(v string) *DescribeTrainingJobOutput { + s.TrainingJobName = &v + return s +} + +// SetTrainingJobStatus sets the TrainingJobStatus field's value. +func (s *DescribeTrainingJobOutput) SetTrainingJobStatus(v string) *DescribeTrainingJobOutput { + s.TrainingJobStatus = &v + return s +} + +// SetTrainingStartTime sets the TrainingStartTime field's value. +func (s *DescribeTrainingJobOutput) SetTrainingStartTime(v time.Time) *DescribeTrainingJobOutput { + s.TrainingStartTime = &v + return s +} + +// SetTuningJobArn sets the TuningJobArn field's value. +func (s *DescribeTrainingJobOutput) SetTuningJobArn(v string) *DescribeTrainingJobOutput { + s.TuningJobArn = &v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *DescribeTrainingJobOutput) SetVpcConfig(v *VpcConfig) *DescribeTrainingJobOutput { + s.VpcConfig = v + return s +} + +type DescribeTransformJobInput struct { + _ struct{} `type:"structure"` + + // The name of the transform job that you want to view details of. + // + // TransformJobName is a required field + TransformJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTransformJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransformJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransformJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransformJobInput"} + if s.TransformJobName == nil { + invalidParams.Add(request.NewErrParamRequired("TransformJobName")) + } + if s.TransformJobName != nil && len(*s.TransformJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TransformJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTransformJobName sets the TransformJobName field's value. +func (s *DescribeTransformJobInput) SetTransformJobName(v string) *DescribeTransformJobInput { + s.TransformJobName = &v + return s +} + +type DescribeTransformJobOutput struct { + _ struct{} `type:"structure"` + + // If you want to include only one record in a batch, specify SingleRecord.. + // If you want batches to contain a maximum of the number of records specified + // in the MaxPayloadInMB parameter, specify MultiRecord.S + BatchStrategy *string `type:"string" enum:"BatchStrategy"` + + // A timestamp that shows when the transform Job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + Environment map[string]*string `type:"map"` + + // If the transform job failed, the reason that it failed. + FailureReason *string `type:"string"` + + // The Amazon Resource Name (ARN) of the Amazon SageMaker Ground Truth labeling + // job that created the transform or training job. + LabelingJobArn *string `type:"string"` + + // The maximum number of parallel requests on each instance node that can be + // launched in a transform job. The default value is 1. + MaxConcurrentTransforms *int64 `type:"integer"` + + // The maximum payload size, in MB, used in the transform job. + MaxPayloadInMB *int64 `type:"integer"` + + // The name of the model used in the transform job. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` + + // Indicates when the transform job has been completed, or has stopped or failed. + // You are billed for the time interval between this time and the value of TransformStartTime. + TransformEndTime *time.Time `type:"timestamp"` + + // Describes the dataset to be transformed and the Amazon S3 location where + // it is stored. + // + // TransformInput is a required field + TransformInput *TransformInput `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of the transform job. + // + // TransformJobArn is a required field + TransformJobArn *string `type:"string" required:"true"` + + // The name of the transform job. + // + // TransformJobName is a required field + TransformJobName *string `min:"1" type:"string" required:"true"` + + // The status of the transform job. If the transform job failed, the reason + // is returned in the FailureReason field. + // + // TransformJobStatus is a required field + TransformJobStatus *string `type:"string" required:"true" enum:"TransformJobStatus"` + + // Identifies the Amazon S3 location where you want Amazon SageMaker to save + // the results from the transform job. + TransformOutput *TransformOutput `type:"structure"` + + // Describes the resources, including ML instance types and ML instance count, + // to use for the transform job. + // + // TransformResources is a required field + TransformResources *TransformResources `type:"structure" required:"true"` + + // Indicates when the transform job starts on ML instances. You are billed for + // the time interval between this time and the value of TransformEndTime. + TransformStartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s DescribeTransformJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransformJobOutput) GoString() string { + return s.String() +} + +// SetBatchStrategy sets the BatchStrategy field's value. +func (s *DescribeTransformJobOutput) SetBatchStrategy(v string) *DescribeTransformJobOutput { + s.BatchStrategy = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *DescribeTransformJobOutput) SetCreationTime(v time.Time) *DescribeTransformJobOutput { + s.CreationTime = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *DescribeTransformJobOutput) SetEnvironment(v map[string]*string) *DescribeTransformJobOutput { + s.Environment = v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *DescribeTransformJobOutput) SetFailureReason(v string) *DescribeTransformJobOutput { + s.FailureReason = &v + return s +} + +// SetLabelingJobArn sets the LabelingJobArn field's value. +func (s *DescribeTransformJobOutput) SetLabelingJobArn(v string) *DescribeTransformJobOutput { + s.LabelingJobArn = &v + return s +} + +// SetMaxConcurrentTransforms sets the MaxConcurrentTransforms field's value. +func (s *DescribeTransformJobOutput) SetMaxConcurrentTransforms(v int64) *DescribeTransformJobOutput { + s.MaxConcurrentTransforms = &v + return s +} + +// SetMaxPayloadInMB sets the MaxPayloadInMB field's value. +func (s *DescribeTransformJobOutput) SetMaxPayloadInMB(v int64) *DescribeTransformJobOutput { + s.MaxPayloadInMB = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *DescribeTransformJobOutput) SetModelName(v string) *DescribeTransformJobOutput { + s.ModelName = &v + return s +} + +// SetTransformEndTime sets the TransformEndTime field's value. +func (s *DescribeTransformJobOutput) SetTransformEndTime(v time.Time) *DescribeTransformJobOutput { + s.TransformEndTime = &v + return s +} + +// SetTransformInput sets the TransformInput field's value. +func (s *DescribeTransformJobOutput) SetTransformInput(v *TransformInput) *DescribeTransformJobOutput { + s.TransformInput = v + return s +} + +// SetTransformJobArn sets the TransformJobArn field's value. +func (s *DescribeTransformJobOutput) SetTransformJobArn(v string) *DescribeTransformJobOutput { + s.TransformJobArn = &v + return s +} + +// SetTransformJobName sets the TransformJobName field's value. +func (s *DescribeTransformJobOutput) SetTransformJobName(v string) *DescribeTransformJobOutput { + s.TransformJobName = &v + return s +} + +// SetTransformJobStatus sets the TransformJobStatus field's value. +func (s *DescribeTransformJobOutput) SetTransformJobStatus(v string) *DescribeTransformJobOutput { + s.TransformJobStatus = &v + return s +} + +// SetTransformOutput sets the TransformOutput field's value. +func (s *DescribeTransformJobOutput) SetTransformOutput(v *TransformOutput) *DescribeTransformJobOutput { + s.TransformOutput = v + return s +} + +// SetTransformResources sets the TransformResources field's value. +func (s *DescribeTransformJobOutput) SetTransformResources(v *TransformResources) *DescribeTransformJobOutput { + s.TransformResources = v + return s +} + +// SetTransformStartTime sets the TransformStartTime field's value. +func (s *DescribeTransformJobOutput) SetTransformStartTime(v time.Time) *DescribeTransformJobOutput { + s.TransformStartTime = &v + return s +} + +type DescribeWorkteamInput struct { + _ struct{} `type:"structure"` + + // The name of the work team to return a description of. + // + // WorkteamName is a required field + WorkteamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkteamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkteamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkteamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkteamInput"} + if s.WorkteamName == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamName")) + } + if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkteamName sets the WorkteamName field's value. +func (s *DescribeWorkteamInput) SetWorkteamName(v string) *DescribeWorkteamInput { + s.WorkteamName = &v + return s +} + +type DescribeWorkteamOutput struct { + _ struct{} `type:"structure"` + + // A Workteam instance that contains information about the work team. + // + // Workteam is a required field + Workteam *Workteam `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeWorkteamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkteamOutput) GoString() string { + return s.String() +} + +// SetWorkteam sets the Workteam field's value. +func (s *DescribeWorkteamOutput) SetWorkteam(v *Workteam) *DescribeWorkteamOutput { + s.Workteam = v + return s +} + +// Specifies weight and capacity values for a production variant. +type DesiredWeightAndCapacity struct { + _ struct{} `type:"structure"` + + // The variant's capacity. + DesiredInstanceCount *int64 `min:"1" type:"integer"` + + // The variant's weight. + DesiredWeight *float64 `type:"float"` + + // The name of the variant to update. + // + // VariantName is a required field + VariantName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DesiredWeightAndCapacity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DesiredWeightAndCapacity) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DesiredWeightAndCapacity) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DesiredWeightAndCapacity"} + if s.DesiredInstanceCount != nil && *s.DesiredInstanceCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("DesiredInstanceCount", 1)) + } + if s.VariantName == nil { + invalidParams.Add(request.NewErrParamRequired("VariantName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDesiredInstanceCount sets the DesiredInstanceCount field's value. +func (s *DesiredWeightAndCapacity) SetDesiredInstanceCount(v int64) *DesiredWeightAndCapacity { + s.DesiredInstanceCount = &v + return s +} + +// SetDesiredWeight sets the DesiredWeight field's value. +func (s *DesiredWeightAndCapacity) SetDesiredWeight(v float64) *DesiredWeightAndCapacity { + s.DesiredWeight = &v + return s +} + +// SetVariantName sets the VariantName field's value. +func (s *DesiredWeightAndCapacity) SetVariantName(v string) *DesiredWeightAndCapacity { + s.VariantName = &v + return s +} + +// Provides summary information for an endpoint configuration. +type EndpointConfigSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the endpoint configuration was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of the endpoint configuration. + // + // EndpointConfigArn is a required field + EndpointConfigArn *string `min:"20" type:"string" required:"true"` + + // The name of the endpoint configuration. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s EndpointConfigSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointConfigSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *EndpointConfigSummary) SetCreationTime(v time.Time) *EndpointConfigSummary { + s.CreationTime = &v + return s +} + +// SetEndpointConfigArn sets the EndpointConfigArn field's value. +func (s *EndpointConfigSummary) SetEndpointConfigArn(v string) *EndpointConfigSummary { + s.EndpointConfigArn = &v + return s +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *EndpointConfigSummary) SetEndpointConfigName(v string) *EndpointConfigSummary { + s.EndpointConfigName = &v + return s +} + +// Provides summary information for an endpoint. +type EndpointSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the endpoint was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of the endpoint. + // + // EndpointArn is a required field + EndpointArn *string `min:"20" type:"string" required:"true"` + + // The name of the endpoint. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` + + // The status of the endpoint. + // + // * OutOfService: Endpoint is not available to take incoming requests. + // + // * Creating: CreateEndpoint is executing. + // + // * Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. + // + // * SystemUpdating: Endpoint is undergoing maintenance and cannot be updated + // or deleted or re-scaled until it has completed. This mainenance operation + // does not change any customer-specified values such as VPC config, KMS + // encryption, model, instance type, or instance count. + // + // * RollingBack: Endpoint fails to scale up or down or change its variant + // weight and is in the process of rolling back to its previous configuration. + // Once the rollback completes, endpoint returns to an InService status. + // This transitional status only applies to an endpoint that has autoscaling + // enabled and is undergoing variant weight or capacity changes as part of + // an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities + // operation is called explicitly. + // + // * InService: Endpoint is available to process incoming requests. + // + // * Deleting: DeleteEndpoint is executing. + // + // * Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason + // for information about the failure. DeleteEndpoint is the only operation + // that can be performed on a failed endpoint. + // + // To get a list of endpoints with a specified status, use the ListEndpointsInput$StatusEquals + // filter. + // + // EndpointStatus is a required field + EndpointStatus *string `type:"string" required:"true" enum:"EndpointStatus"` + + // A timestamp that shows when the endpoint was last modified. + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s EndpointSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *EndpointSummary) SetCreationTime(v time.Time) *EndpointSummary { + s.CreationTime = &v + return s +} + +// SetEndpointArn sets the EndpointArn field's value. +func (s *EndpointSummary) SetEndpointArn(v string) *EndpointSummary { + s.EndpointArn = &v + return s +} + +// SetEndpointName sets the EndpointName field's value. +func (s *EndpointSummary) SetEndpointName(v string) *EndpointSummary { + s.EndpointName = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointSummary) SetEndpointStatus(v string) *EndpointSummary { + s.EndpointStatus = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *EndpointSummary) SetLastModifiedTime(v time.Time) *EndpointSummary { + s.LastModifiedTime = &v + return s +} + +// A conditional statement for a search expression that includes a Boolean operator, +// a resource property, and a value. +// +// If you don't specify an Operator and a Value, the filter searches for only +// the specified property. For example, defining a Filter for the FailureReason +// for the TrainingJobResource searches for training job objects that have a +// value in the FailureReason field. +// +// If you specify a Value, but not an Operator, Amazon SageMaker uses the equals +// operator as the default. +// +// In search, there are several property types: +// +// MetricsTo define a metric filter, enter a value using the form "Metrics.", +// where is a metric name. For example, the following filter searches +// for training jobs with an "accuracy" metric greater than "0.9": +// +// { +// +// "Name": "Metrics.accuracy", +// +// "Operator": "GREATER_THAN", +// +// "Value": "0.9" +// +// } +// +// HyperParametersTo define a hyperparameter filter, enter a value with the +// form "HyperParameters.". Decimal hyperparameter values are treated +// as a decimal in a comparison if the specified Value is also a decimal value. +// If the specified Value is an integer, the decimal hyperparameter values are +// treated as integers. For example, the following filter is satisfied by training +// jobs with a "learning_rate" hyperparameter that is less than "0.5": +// +// { +// +// "Name": "HyperParameters.learning_rate", +// +// "Operator": "LESS_THAN", +// +// "Value": "0.5" +// +// } +// +// TagsTo define a tag filter, enter a value with the form "Tags.". +type Filter struct { + _ struct{} `type:"structure"` + + // A property name. For example, TrainingJobName. For the list of valid property + // names returned in a search result for each supported resource, see TrainingJob + // properties. You must specify a valid property name for the resource. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // A Boolean binary operator that is used to evaluate the filter. The operator + // field contains one of the following values: + // + // EqualsThe specified resource in Name equals the specified Value. + // + // NotEqualsThe specified resource in Name does not equal the specified Value. + // + // GreaterThanThe specified resource in Name is greater than the specified Value. + // Not supported for text-based properties. + // + // GreaterThanOrEqualToThe specified resource in Name is greater than or equal + // to the specified Value. Not supported for text-based properties. + // + // LessThanThe specified resource in Name is less than the specified Value. + // Not supported for text-based properties. + // + // LessThanOrEqualToThe specified resource in Name is less than or equal to + // the specified Value. Not supported for text-based properties. + // + // ContainsOnly supported for text-based properties. The word-list of the property + // contains the specified Value. + // + // If you have specified a filter Value, the default is Equals. + Operator *string `type:"string" enum:"Operator"` + + // A value used with Resource and Operator to determine if objects satisfy the + // filter's condition. For numerical properties, Value must be an integer or + // floating-point decimal. For timestamp properties, Value must be an ISO 8601 + // date-time string of the following format: YYYY-mm-dd'T'HH:MM:SS. + Value *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Filter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *Filter) SetOperator(v string) *Filter { + s.Operator = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Filter) SetValue(v string) *Filter { + s.Value = &v + return s +} + +// Shows the final value for the objective metric for a training job that was +// launched by a hyperparameter tuning job. You define the objective metric +// in the HyperParameterTuningJobObjective parameter of HyperParameterTuningJobConfig. +type FinalHyperParameterTuningJobObjectiveMetric struct { + _ struct{} `type:"structure"` + + // The name of the objective metric. + // + // MetricName is a required field + MetricName *string `min:"1" type:"string" required:"true"` + + // Whether to minimize or maximize the objective metric. Valid values are Minimize + // and Maximize. + Type *string `type:"string" enum:"HyperParameterTuningJobObjectiveType"` + + // The value of the objective metric. + // + // Value is a required field + Value *float64 `type:"float" required:"true"` +} + +// String returns the string representation +func (s FinalHyperParameterTuningJobObjectiveMetric) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FinalHyperParameterTuningJobObjectiveMetric) GoString() string { + return s.String() +} + +// SetMetricName sets the MetricName field's value. +func (s *FinalHyperParameterTuningJobObjectiveMetric) SetMetricName(v string) *FinalHyperParameterTuningJobObjectiveMetric { + s.MetricName = &v + return s +} + +// SetType sets the Type field's value. +func (s *FinalHyperParameterTuningJobObjectiveMetric) SetType(v string) *FinalHyperParameterTuningJobObjectiveMetric { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *FinalHyperParameterTuningJobObjectiveMetric) SetValue(v float64) *FinalHyperParameterTuningJobObjectiveMetric { + s.Value = &v + return s +} + +type GetSearchSuggestionsInput struct { + _ struct{} `type:"structure"` + + // The name of the Amazon SageMaker resource to Search for. The only valid Resource + // value is TrainingJob. + // + // Resource is a required field + Resource *string `type:"string" required:"true" enum:"ResourceType"` + + // Limits the property names that are included in the response. + SuggestionQuery *SuggestionQuery `type:"structure"` +} + +// String returns the string representation +func (s GetSearchSuggestionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSearchSuggestionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSearchSuggestionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSearchSuggestionsInput"} + if s.Resource == nil { + invalidParams.Add(request.NewErrParamRequired("Resource")) + } + if s.SuggestionQuery != nil { + if err := s.SuggestionQuery.Validate(); err != nil { + invalidParams.AddNested("SuggestionQuery", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResource sets the Resource field's value. +func (s *GetSearchSuggestionsInput) SetResource(v string) *GetSearchSuggestionsInput { + s.Resource = &v + return s +} + +// SetSuggestionQuery sets the SuggestionQuery field's value. +func (s *GetSearchSuggestionsInput) SetSuggestionQuery(v *SuggestionQuery) *GetSearchSuggestionsInput { + s.SuggestionQuery = v + return s +} + +type GetSearchSuggestionsOutput struct { + _ struct{} `type:"structure"` + + // A list of property names for a Resource that match a SuggestionQuery. + PropertyNameSuggestions []*PropertyNameSuggestion `type:"list"` +} + +// String returns the string representation +func (s GetSearchSuggestionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSearchSuggestionsOutput) GoString() string { + return s.String() +} + +// SetPropertyNameSuggestions sets the PropertyNameSuggestions field's value. +func (s *GetSearchSuggestionsOutput) SetPropertyNameSuggestions(v []*PropertyNameSuggestion) *GetSearchSuggestionsOutput { + s.PropertyNameSuggestions = v + return s +} + +// Specifies configuration details for a Git repository in your AWS account. +type GitConfig struct { + _ struct{} `type:"structure"` + + // The default branch for the Git repository. + Branch *string `min:"1" type:"string"` + + // The URL where the Git repository is located. + // + // RepositoryUrl is a required field + RepositoryUrl *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains + // the credentials used to access the git repository. The secret must have a + // staging label of AWSCURRENT and must be in the following format: + // + // {"username": UserName, "password": Password} + SecretArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GitConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GitConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GitConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GitConfig"} + if s.Branch != nil && len(*s.Branch) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Branch", 1)) + } + if s.RepositoryUrl == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryUrl")) + } + if s.SecretArn != nil && len(*s.SecretArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranch sets the Branch field's value. +func (s *GitConfig) SetBranch(v string) *GitConfig { + s.Branch = &v + return s +} + +// SetRepositoryUrl sets the RepositoryUrl field's value. +func (s *GitConfig) SetRepositoryUrl(v string) *GitConfig { + s.RepositoryUrl = &v + return s +} + +// SetSecretArn sets the SecretArn field's value. +func (s *GitConfig) SetSecretArn(v string) *GitConfig { + s.SecretArn = &v + return s +} + +// Specifies configuration details for a Git repository when the repository +// is updated. +type GitConfigForUpdate struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the AWS Secrets Manager secret that contains + // the credentials used to access the git repository. The secret must have a + // staging label of AWSCURRENT and must be in the following format: + // + // {"username": UserName, "password": Password} + SecretArn *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GitConfigForUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GitConfigForUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GitConfigForUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GitConfigForUpdate"} + if s.SecretArn != nil && len(*s.SecretArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecretArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecretArn sets the SecretArn field's value. +func (s *GitConfigForUpdate) SetSecretArn(v string) *GitConfigForUpdate { + s.SecretArn = &v + return s +} + +// Information required for human workers to complete a labeling task. +type HumanTaskConfig struct { + _ struct{} `type:"structure"` + + // Configures how labels are consolidated across human workers. + // + // AnnotationConsolidationConfig is a required field + AnnotationConsolidationConfig *AnnotationConsolidationConfig `type:"structure" required:"true"` + + // Defines the maximum number of data objects that can be labeled by human workers + // at the same time. Each object may have more than one worker at one time. + MaxConcurrentTaskCount *int64 `min:"1" type:"integer"` + + // The number of human workers that will label an object. + // + // NumberOfHumanWorkersPerDataObject is a required field + NumberOfHumanWorkersPerDataObject *int64 `min:"1" type:"integer" required:"true"` + + // The Amazon Resource Name (ARN) of a Lambda function that is run before a + // data object is sent to a human worker. Use this function to provide input + // to a custom labeling job. + // + // For the built-in bounding box, image classification, semantic segmentation, + // and text classification task types, Amazon SageMaker Ground Truth provides + // the following Lambda functions: + // + // US East (Northern Virginia) (us-east-1): + // + // * arn:aws:lambda:us-east-1:432418664414:function:PRE-BoundingBox + // + // * arn:aws:lambda:us-east-1:432418664414:function:PRE-ImageMultiClass + // + // * arn:aws:lambda:us-east-1:432418664414:function:PRE-SemanticSegmentation + // + // * arn:aws:lambda:us-east-1:432418664414:function:PRE-TextMultiClass + // + // US East (Ohio) (us-east-2): + // + // * arn:aws:lambda:us-east-2:266458841044:function:PRE-BoundingBox + // + // * arn:aws:lambda:us-east-2:266458841044:function:PRE-ImageMultiClass + // + // * arn:aws:lambda:us-east-2:266458841044:function:PRE-SemanticSegmentation + // + // * arn:aws:lambda:us-east-2:266458841044:function:PRE-TextMultiClass + // + // US West (Oregon) (us-west-2): + // + // * arn:aws:lambda:us-west-2:081040173940:function:PRE-BoundingBox + // + // * arn:aws:lambda:us-west-2:081040173940:function:PRE-ImageMultiClass + // + // * arn:aws:lambda:us-west-2:081040173940:function:PRE-SemanticSegmentation + // + // * arn:aws:lambda:us-west-2:081040173940:function:PRE-TextMultiClass + // + // EU (Ireland) (eu-west-1): + // + // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-BoundingBox + // + // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-ImageMultiClass + // + // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-SemanticSegmentation + // + // * arn:aws:lambda:eu-west-1:568282634449:function:PRE-TextMultiClass + // + // Asia Pacific (Tokyo (ap-northeast-1): + // + // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-BoundingBox + // + // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-ImageMultiClass + // + // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-SemanticSegmentation + // + // * arn:aws:lambda:ap-northeast-1:477331159723:function:PRE-TextMultiClass + // + // PreHumanTaskLambdaArn is a required field + PreHumanTaskLambdaArn *string `type:"string" required:"true"` + + // The price that you pay for each task performed by a public worker. + PublicWorkforceTaskPrice *PublicWorkforceTaskPrice `type:"structure"` + + // The length of time that a task remains available for labelling by human workers. + TaskAvailabilityLifetimeInSeconds *int64 `min:"1" type:"integer"` + + // A description of the task for your human workers. + // + // TaskDescription is a required field + TaskDescription *string `min:"1" type:"string" required:"true"` + + // Keywords used to describe the task so that workers on Amazon Mechanical Turk + // can discover the task. + TaskKeywords []*string `min:"1" type:"list"` + + // The amount of time that a worker has to complete a task. + // + // TaskTimeLimitInSeconds is a required field + TaskTimeLimitInSeconds *int64 `min:"1" type:"integer" required:"true"` + + // A title for the task for your human workers. + // + // TaskTitle is a required field + TaskTitle *string `min:"1" type:"string" required:"true"` + + // Information about the user interface that workers use to complete the labeling + // task. + // + // UiConfig is a required field + UiConfig *UiConfig `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of the work team assigned to complete the + // tasks. + // + // WorkteamArn is a required field + WorkteamArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s HumanTaskConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HumanTaskConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HumanTaskConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HumanTaskConfig"} + if s.AnnotationConsolidationConfig == nil { + invalidParams.Add(request.NewErrParamRequired("AnnotationConsolidationConfig")) + } + if s.MaxConcurrentTaskCount != nil && *s.MaxConcurrentTaskCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxConcurrentTaskCount", 1)) + } + if s.NumberOfHumanWorkersPerDataObject == nil { + invalidParams.Add(request.NewErrParamRequired("NumberOfHumanWorkersPerDataObject")) + } + if s.NumberOfHumanWorkersPerDataObject != nil && *s.NumberOfHumanWorkersPerDataObject < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfHumanWorkersPerDataObject", 1)) + } + if s.PreHumanTaskLambdaArn == nil { + invalidParams.Add(request.NewErrParamRequired("PreHumanTaskLambdaArn")) + } + if s.TaskAvailabilityLifetimeInSeconds != nil && *s.TaskAvailabilityLifetimeInSeconds < 1 { + invalidParams.Add(request.NewErrParamMinValue("TaskAvailabilityLifetimeInSeconds", 1)) + } + if s.TaskDescription == nil { + invalidParams.Add(request.NewErrParamRequired("TaskDescription")) + } + if s.TaskDescription != nil && len(*s.TaskDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskDescription", 1)) + } + if s.TaskKeywords != nil && len(s.TaskKeywords) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskKeywords", 1)) + } + if s.TaskTimeLimitInSeconds == nil { + invalidParams.Add(request.NewErrParamRequired("TaskTimeLimitInSeconds")) + } + if s.TaskTimeLimitInSeconds != nil && *s.TaskTimeLimitInSeconds < 1 { + invalidParams.Add(request.NewErrParamMinValue("TaskTimeLimitInSeconds", 1)) + } + if s.TaskTitle == nil { + invalidParams.Add(request.NewErrParamRequired("TaskTitle")) + } + if s.TaskTitle != nil && len(*s.TaskTitle) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskTitle", 1)) + } + if s.UiConfig == nil { + invalidParams.Add(request.NewErrParamRequired("UiConfig")) + } + if s.WorkteamArn == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamArn")) + } + if s.AnnotationConsolidationConfig != nil { + if err := s.AnnotationConsolidationConfig.Validate(); err != nil { + invalidParams.AddNested("AnnotationConsolidationConfig", err.(request.ErrInvalidParams)) + } + } + if s.UiConfig != nil { + if err := s.UiConfig.Validate(); err != nil { + invalidParams.AddNested("UiConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnnotationConsolidationConfig sets the AnnotationConsolidationConfig field's value. +func (s *HumanTaskConfig) SetAnnotationConsolidationConfig(v *AnnotationConsolidationConfig) *HumanTaskConfig { + s.AnnotationConsolidationConfig = v + return s +} + +// SetMaxConcurrentTaskCount sets the MaxConcurrentTaskCount field's value. +func (s *HumanTaskConfig) SetMaxConcurrentTaskCount(v int64) *HumanTaskConfig { + s.MaxConcurrentTaskCount = &v + return s +} + +// SetNumberOfHumanWorkersPerDataObject sets the NumberOfHumanWorkersPerDataObject field's value. +func (s *HumanTaskConfig) SetNumberOfHumanWorkersPerDataObject(v int64) *HumanTaskConfig { + s.NumberOfHumanWorkersPerDataObject = &v + return s +} + +// SetPreHumanTaskLambdaArn sets the PreHumanTaskLambdaArn field's value. +func (s *HumanTaskConfig) SetPreHumanTaskLambdaArn(v string) *HumanTaskConfig { + s.PreHumanTaskLambdaArn = &v + return s +} + +// SetPublicWorkforceTaskPrice sets the PublicWorkforceTaskPrice field's value. +func (s *HumanTaskConfig) SetPublicWorkforceTaskPrice(v *PublicWorkforceTaskPrice) *HumanTaskConfig { + s.PublicWorkforceTaskPrice = v + return s +} + +// SetTaskAvailabilityLifetimeInSeconds sets the TaskAvailabilityLifetimeInSeconds field's value. +func (s *HumanTaskConfig) SetTaskAvailabilityLifetimeInSeconds(v int64) *HumanTaskConfig { + s.TaskAvailabilityLifetimeInSeconds = &v + return s +} + +// SetTaskDescription sets the TaskDescription field's value. +func (s *HumanTaskConfig) SetTaskDescription(v string) *HumanTaskConfig { + s.TaskDescription = &v + return s +} + +// SetTaskKeywords sets the TaskKeywords field's value. +func (s *HumanTaskConfig) SetTaskKeywords(v []*string) *HumanTaskConfig { + s.TaskKeywords = v + return s +} + +// SetTaskTimeLimitInSeconds sets the TaskTimeLimitInSeconds field's value. +func (s *HumanTaskConfig) SetTaskTimeLimitInSeconds(v int64) *HumanTaskConfig { + s.TaskTimeLimitInSeconds = &v + return s +} + +// SetTaskTitle sets the TaskTitle field's value. +func (s *HumanTaskConfig) SetTaskTitle(v string) *HumanTaskConfig { + s.TaskTitle = &v + return s +} + +// SetUiConfig sets the UiConfig field's value. +func (s *HumanTaskConfig) SetUiConfig(v *UiConfig) *HumanTaskConfig { + s.UiConfig = v + return s +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *HumanTaskConfig) SetWorkteamArn(v string) *HumanTaskConfig { + s.WorkteamArn = &v + return s +} + +// Specifies which training algorithm to use for training jobs that a hyperparameter +// tuning job launches and the metrics to monitor. +type HyperParameterAlgorithmSpecification struct { + _ struct{} `type:"structure"` + + // The name of the resource algorithm to use for the hyperparameter tuning job. + // If you specify a value for this parameter, do not specify a value for TrainingImage. + AlgorithmName *string `min:"1" type:"string"` + + // An array of MetricDefinition objects that specify the metrics that the algorithm + // emits. + MetricDefinitions []*MetricDefinition `type:"list"` + + // The registry path of the Docker image that contains the training algorithm. + // For information about Docker registry paths for built-in algorithms, see + // Algorithms Provided by Amazon SageMaker: Common Parameters (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html). + TrainingImage *string `type:"string"` + + // The input mode that the algorithm supports: File or Pipe. In File input mode, + // Amazon SageMaker downloads the training data from Amazon S3 to the storage + // volume that is attached to the training instance and mounts the directory + // to the Docker volume for the training container. In Pipe input mode, Amazon + // SageMaker streams data directly from Amazon S3 to the container. + // + // If you specify File mode, make sure that you provision the storage volume + // that is attached to the training instance with enough capacity to accommodate + // the training data downloaded from Amazon S3, the model artifacts, and intermediate + // information. + // + // For more information about input modes, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html) + // + // TrainingInputMode is a required field + TrainingInputMode *string `type:"string" required:"true" enum:"TrainingInputMode"` +} + +// String returns the string representation +func (s HyperParameterAlgorithmSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterAlgorithmSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HyperParameterAlgorithmSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HyperParameterAlgorithmSpecification"} + if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) + } + if s.TrainingInputMode == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingInputMode")) + } + if s.MetricDefinitions != nil { + for i, v := range s.MetricDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *HyperParameterAlgorithmSpecification) SetAlgorithmName(v string) *HyperParameterAlgorithmSpecification { + s.AlgorithmName = &v + return s +} + +// SetMetricDefinitions sets the MetricDefinitions field's value. +func (s *HyperParameterAlgorithmSpecification) SetMetricDefinitions(v []*MetricDefinition) *HyperParameterAlgorithmSpecification { + s.MetricDefinitions = v + return s +} + +// SetTrainingImage sets the TrainingImage field's value. +func (s *HyperParameterAlgorithmSpecification) SetTrainingImage(v string) *HyperParameterAlgorithmSpecification { + s.TrainingImage = &v + return s +} + +// SetTrainingInputMode sets the TrainingInputMode field's value. +func (s *HyperParameterAlgorithmSpecification) SetTrainingInputMode(v string) *HyperParameterAlgorithmSpecification { + s.TrainingInputMode = &v + return s +} + +// Defines a hyperparameter to be used by an algorithm. +type HyperParameterSpecification struct { + _ struct{} `type:"structure"` + + // The default value for this hyperparameter. If a default value is specified, + // a hyperparameter cannot be required. + DefaultValue *string `type:"string"` + + // A brief description of the hyperparameter. + Description *string `type:"string"` + + // Indicates whether this hyperparameter is required. + IsRequired *bool `type:"boolean"` + + // Indicates whether this hyperparameter is tunable in a hyperparameter tuning + // job. + IsTunable *bool `type:"boolean"` + + // The name of this hyperparameter. The name must be unique. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // The allowed range for this hyperparameter. + Range *ParameterRange `type:"structure"` + + // The type of this hyperparameter. The valid types are Integer, Continuous, + // Categorical, and FreeText. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"ParameterType"` +} + +// String returns the string representation +func (s HyperParameterSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HyperParameterSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HyperParameterSpecification"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Range != nil { + if err := s.Range.Validate(); err != nil { + invalidParams.AddNested("Range", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *HyperParameterSpecification) SetDefaultValue(v string) *HyperParameterSpecification { + s.DefaultValue = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *HyperParameterSpecification) SetDescription(v string) *HyperParameterSpecification { + s.Description = &v + return s +} + +// SetIsRequired sets the IsRequired field's value. +func (s *HyperParameterSpecification) SetIsRequired(v bool) *HyperParameterSpecification { + s.IsRequired = &v + return s +} + +// SetIsTunable sets the IsTunable field's value. +func (s *HyperParameterSpecification) SetIsTunable(v bool) *HyperParameterSpecification { + s.IsTunable = &v + return s +} + +// SetName sets the Name field's value. +func (s *HyperParameterSpecification) SetName(v string) *HyperParameterSpecification { + s.Name = &v + return s +} + +// SetRange sets the Range field's value. +func (s *HyperParameterSpecification) SetRange(v *ParameterRange) *HyperParameterSpecification { + s.Range = v + return s +} + +// SetType sets the Type field's value. +func (s *HyperParameterSpecification) SetType(v string) *HyperParameterSpecification { + s.Type = &v + return s +} + +// Defines the training jobs launched by a hyperparameter tuning job. +type HyperParameterTrainingJobDefinition struct { + _ struct{} `type:"structure"` + + // The HyperParameterAlgorithmSpecification object that specifies the resource + // algorithm to use for the training jobs that the tuning job launches. + // + // AlgorithmSpecification is a required field + AlgorithmSpecification *HyperParameterAlgorithmSpecification `type:"structure" required:"true"` + + // To encrypt all communications between ML compute instances in distributed + // training, specify True. Encryption provides greater security for distributed + // training, but training take longer because of the additional communications + // between ML compute instances. + EnableInterContainerTrafficEncryption *bool `type:"boolean"` + + // Isolates the training container. No inbound or outbound network calls can + // be made, except for calls between peers within a training cluster for distributed + // training. If network isolation is used for training jobs that are configured + // to use a VPC, Amazon SageMaker downloads and uploads customer data and model + // artifacts through the specified VPC, but the training container does not + // have network access. + // + // The Semantic Segmentation built-in algorithm does not support network isolation. + EnableNetworkIsolation *bool `type:"boolean"` + + // An array of Channel objects that specify the input for the training jobs + // that the tuning job launches. + InputDataConfig []*Channel `min:"1" type:"list"` + + // Specifies the path to the Amazon S3 bucket where you store model artifacts + // from the training jobs that the tuning job launches. + // + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` + + // The resources, including the compute instances and storage volumes, to use + // for the training jobs that the tuning job launches. + // + // Storage volumes store model artifacts and incremental states. Training algorithms + // might also use storage volumes for scratch space. If you want Amazon SageMaker + // to use the storage volume to store the training data, choose File as the + // TrainingInputMode in the algorithm specification. For distributed training + // algorithms, specify an instance count greater than 1. + // + // ResourceConfig is a required field + ResourceConfig *ResourceConfig `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role associated with the training + // jobs that the tuning job launches. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // Specifies the values of hyperparameters that do not change for the tuning + // job. + StaticHyperParameters map[string]*string `type:"map"` + + // Sets a maximum duration for the training jobs that the tuning job launches. + // Use this parameter to limit model training costs. + // + // To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal. This + // delays job termination for 120 seconds. Algorithms might use this 120-second + // window to save the model artifacts. + // + // When Amazon SageMaker terminates a job because the stopping condition has + // been met, training algorithms provided by Amazon SageMaker save the intermediate + // results of the job. + // + // StoppingCondition is a required field + StoppingCondition *StoppingCondition `type:"structure" required:"true"` + + // The VpcConfig object that specifies the VPC that you want the training jobs + // that this hyperparameter tuning job launches to connect to. Control access + // to and from your training container by configuring the VPC. For more information, + // see Protect Training Jobs by Using an Amazon Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). + VpcConfig *VpcConfig `type:"structure"` +} + +// String returns the string representation +func (s HyperParameterTrainingJobDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterTrainingJobDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HyperParameterTrainingJobDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HyperParameterTrainingJobDefinition"} + if s.AlgorithmSpecification == nil { + invalidParams.Add(request.NewErrParamRequired("AlgorithmSpecification")) + } + if s.InputDataConfig != nil && len(s.InputDataConfig) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputDataConfig", 1)) + } + if s.OutputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) + } + if s.ResourceConfig == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceConfig")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.StoppingCondition == nil { + invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) + } + if s.AlgorithmSpecification != nil { + if err := s.AlgorithmSpecification.Validate(); err != nil { + invalidParams.AddNested("AlgorithmSpecification", err.(request.ErrInvalidParams)) + } + } + if s.InputDataConfig != nil { + for i, v := range s.InputDataConfig { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputDataConfig", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OutputDataConfig != nil { + if err := s.OutputDataConfig.Validate(); err != nil { + invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) + } + } + if s.ResourceConfig != nil { + if err := s.ResourceConfig.Validate(); err != nil { + invalidParams.AddNested("ResourceConfig", err.(request.ErrInvalidParams)) + } + } + if s.StoppingCondition != nil { + if err := s.StoppingCondition.Validate(); err != nil { + invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) + } + } + if s.VpcConfig != nil { + if err := s.VpcConfig.Validate(); err != nil { + invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. +func (s *HyperParameterTrainingJobDefinition) SetAlgorithmSpecification(v *HyperParameterAlgorithmSpecification) *HyperParameterTrainingJobDefinition { + s.AlgorithmSpecification = v + return s +} + +// SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value. +func (s *HyperParameterTrainingJobDefinition) SetEnableInterContainerTrafficEncryption(v bool) *HyperParameterTrainingJobDefinition { + s.EnableInterContainerTrafficEncryption = &v + return s +} + +// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. +func (s *HyperParameterTrainingJobDefinition) SetEnableNetworkIsolation(v bool) *HyperParameterTrainingJobDefinition { + s.EnableNetworkIsolation = &v + return s +} + +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *HyperParameterTrainingJobDefinition) SetInputDataConfig(v []*Channel) *HyperParameterTrainingJobDefinition { + s.InputDataConfig = v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *HyperParameterTrainingJobDefinition) SetOutputDataConfig(v *OutputDataConfig) *HyperParameterTrainingJobDefinition { + s.OutputDataConfig = v + return s +} + +// SetResourceConfig sets the ResourceConfig field's value. +func (s *HyperParameterTrainingJobDefinition) SetResourceConfig(v *ResourceConfig) *HyperParameterTrainingJobDefinition { + s.ResourceConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *HyperParameterTrainingJobDefinition) SetRoleArn(v string) *HyperParameterTrainingJobDefinition { + s.RoleArn = &v + return s +} + +// SetStaticHyperParameters sets the StaticHyperParameters field's value. +func (s *HyperParameterTrainingJobDefinition) SetStaticHyperParameters(v map[string]*string) *HyperParameterTrainingJobDefinition { + s.StaticHyperParameters = v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *HyperParameterTrainingJobDefinition) SetStoppingCondition(v *StoppingCondition) *HyperParameterTrainingJobDefinition { + s.StoppingCondition = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *HyperParameterTrainingJobDefinition) SetVpcConfig(v *VpcConfig) *HyperParameterTrainingJobDefinition { + s.VpcConfig = v + return s +} + +// Specifies summary information about a training job. +type HyperParameterTrainingJobSummary struct { + _ struct{} `type:"structure"` + + // The date and time that the training job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The reason that the training job failed. + FailureReason *string `type:"string"` + + // The FinalHyperParameterTuningJobObjectiveMetric object that specifies the + // value of the objective metric of the tuning job that launched this training + // job. + FinalHyperParameterTuningJobObjectiveMetric *FinalHyperParameterTuningJobObjectiveMetric `type:"structure"` + + // The status of the objective metric for the training job: + // + // * Succeeded: The final objective metric for the training job was evaluated + // by the hyperparameter tuning job and used in the hyperparameter tuning + // process. + // + // * Pending: The training job is in progress and evaluation of its final + // objective metric is pending. + // + // * Failed: The final objective metric for the training job was not evaluated, + // and was not used in the hyperparameter tuning process. This typically + // occurs when the training job failed or did not emit an objective metric. + ObjectiveStatus *string `type:"string" enum:"ObjectiveStatus"` + + // Specifies the time when the training job ends on training instances. You + // are billed for the time interval between the value of TrainingStartTime and + // this time. For successful jobs and stopped jobs, this is the time after model + // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker + // detects a job failure. + TrainingEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the training job. + // + // TrainingJobArn is a required field + TrainingJobArn *string `type:"string" required:"true"` + + // The name of the training job. + // + // TrainingJobName is a required field + TrainingJobName *string `min:"1" type:"string" required:"true"` + + // The status of the training job. + // + // TrainingJobStatus is a required field + TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` + + // The date and time that the training job started. + TrainingStartTime *time.Time `type:"timestamp"` + + // A list of the hyperparameters for which you specified ranges to search. + // + // TunedHyperParameters is a required field + TunedHyperParameters map[string]*string `type:"map" required:"true"` + + // The HyperParameter tuning job that launched the training job. + TuningJobName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s HyperParameterTrainingJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterTrainingJobSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *HyperParameterTrainingJobSummary) SetCreationTime(v time.Time) *HyperParameterTrainingJobSummary { + s.CreationTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *HyperParameterTrainingJobSummary) SetFailureReason(v string) *HyperParameterTrainingJobSummary { + s.FailureReason = &v + return s +} + +// SetFinalHyperParameterTuningJobObjectiveMetric sets the FinalHyperParameterTuningJobObjectiveMetric field's value. +func (s *HyperParameterTrainingJobSummary) SetFinalHyperParameterTuningJobObjectiveMetric(v *FinalHyperParameterTuningJobObjectiveMetric) *HyperParameterTrainingJobSummary { + s.FinalHyperParameterTuningJobObjectiveMetric = v + return s +} + +// SetObjectiveStatus sets the ObjectiveStatus field's value. +func (s *HyperParameterTrainingJobSummary) SetObjectiveStatus(v string) *HyperParameterTrainingJobSummary { + s.ObjectiveStatus = &v + return s +} + +// SetTrainingEndTime sets the TrainingEndTime field's value. +func (s *HyperParameterTrainingJobSummary) SetTrainingEndTime(v time.Time) *HyperParameterTrainingJobSummary { + s.TrainingEndTime = &v + return s +} + +// SetTrainingJobArn sets the TrainingJobArn field's value. +func (s *HyperParameterTrainingJobSummary) SetTrainingJobArn(v string) *HyperParameterTrainingJobSummary { + s.TrainingJobArn = &v + return s +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *HyperParameterTrainingJobSummary) SetTrainingJobName(v string) *HyperParameterTrainingJobSummary { + s.TrainingJobName = &v + return s +} + +// SetTrainingJobStatus sets the TrainingJobStatus field's value. +func (s *HyperParameterTrainingJobSummary) SetTrainingJobStatus(v string) *HyperParameterTrainingJobSummary { + s.TrainingJobStatus = &v + return s +} + +// SetTrainingStartTime sets the TrainingStartTime field's value. +func (s *HyperParameterTrainingJobSummary) SetTrainingStartTime(v time.Time) *HyperParameterTrainingJobSummary { + s.TrainingStartTime = &v + return s +} + +// SetTunedHyperParameters sets the TunedHyperParameters field's value. +func (s *HyperParameterTrainingJobSummary) SetTunedHyperParameters(v map[string]*string) *HyperParameterTrainingJobSummary { + s.TunedHyperParameters = v + return s +} + +// SetTuningJobName sets the TuningJobName field's value. +func (s *HyperParameterTrainingJobSummary) SetTuningJobName(v string) *HyperParameterTrainingJobSummary { + s.TuningJobName = &v + return s +} + +// Configures a hyperparameter tuning job. +type HyperParameterTuningJobConfig struct { + _ struct{} `type:"structure"` + + // The HyperParameterTuningJobObjective object that specifies the objective + // metric for this tuning job. + // + // HyperParameterTuningJobObjective is a required field + HyperParameterTuningJobObjective *HyperParameterTuningJobObjective `type:"structure" required:"true"` + + // The ParameterRanges object that specifies the ranges of hyperparameters that + // this tuning job searches. + // + // ParameterRanges is a required field + ParameterRanges *ParameterRanges `type:"structure" required:"true"` + + // The ResourceLimits object that specifies the maximum number of training jobs + // and parallel training jobs for this tuning job. + // + // ResourceLimits is a required field + ResourceLimits *ResourceLimits `type:"structure" required:"true"` + + // Specifies the search strategy for hyperparameters. Currently, the only valid + // value is Bayesian. + // + // Strategy is a required field + Strategy *string `type:"string" required:"true" enum:"HyperParameterTuningJobStrategyType"` + + // Specifies whether to use early stopping for training jobs launched by the + // hyperparameter tuning job. This can be one of the following values (the default + // value is OFF): + // + // OFFTraining jobs launched by the hyperparameter tuning job do not use early + // stopping. + // + // AUTOAmazon SageMaker stops training jobs launched by the hyperparameter tuning + // job when they are unlikely to perform better than previously completed training + // jobs. For more information, see Stop Training Jobs Early (http://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-early-stopping.html). + TrainingJobEarlyStoppingType *string `type:"string" enum:"TrainingJobEarlyStoppingType"` +} + +// String returns the string representation +func (s HyperParameterTuningJobConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterTuningJobConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HyperParameterTuningJobConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HyperParameterTuningJobConfig"} + if s.HyperParameterTuningJobObjective == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobObjective")) + } + if s.ParameterRanges == nil { + invalidParams.Add(request.NewErrParamRequired("ParameterRanges")) + } + if s.ResourceLimits == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceLimits")) + } + if s.Strategy == nil { + invalidParams.Add(request.NewErrParamRequired("Strategy")) + } + if s.HyperParameterTuningJobObjective != nil { + if err := s.HyperParameterTuningJobObjective.Validate(); err != nil { + invalidParams.AddNested("HyperParameterTuningJobObjective", err.(request.ErrInvalidParams)) + } + } + if s.ParameterRanges != nil { + if err := s.ParameterRanges.Validate(); err != nil { + invalidParams.AddNested("ParameterRanges", err.(request.ErrInvalidParams)) + } + } + if s.ResourceLimits != nil { + if err := s.ResourceLimits.Validate(); err != nil { + invalidParams.AddNested("ResourceLimits", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameterTuningJobObjective sets the HyperParameterTuningJobObjective field's value. +func (s *HyperParameterTuningJobConfig) SetHyperParameterTuningJobObjective(v *HyperParameterTuningJobObjective) *HyperParameterTuningJobConfig { + s.HyperParameterTuningJobObjective = v + return s +} + +// SetParameterRanges sets the ParameterRanges field's value. +func (s *HyperParameterTuningJobConfig) SetParameterRanges(v *ParameterRanges) *HyperParameterTuningJobConfig { + s.ParameterRanges = v + return s +} + +// SetResourceLimits sets the ResourceLimits field's value. +func (s *HyperParameterTuningJobConfig) SetResourceLimits(v *ResourceLimits) *HyperParameterTuningJobConfig { + s.ResourceLimits = v + return s +} + +// SetStrategy sets the Strategy field's value. +func (s *HyperParameterTuningJobConfig) SetStrategy(v string) *HyperParameterTuningJobConfig { + s.Strategy = &v + return s +} + +// SetTrainingJobEarlyStoppingType sets the TrainingJobEarlyStoppingType field's value. +func (s *HyperParameterTuningJobConfig) SetTrainingJobEarlyStoppingType(v string) *HyperParameterTuningJobConfig { + s.TrainingJobEarlyStoppingType = &v + return s +} + +// Defines the objective metric for a hyperparameter tuning job. Hyperparameter +// tuning uses the value of this metric to evaluate the training jobs it launches, +// and returns the training job that results in either the highest or lowest +// value for this metric, depending on the value you specify for the Type parameter. +type HyperParameterTuningJobObjective struct { + _ struct{} `type:"structure"` + + // The name of the metric to use for the objective metric. + // + // MetricName is a required field + MetricName *string `min:"1" type:"string" required:"true"` + + // Whether to minimize or maximize the objective metric. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"HyperParameterTuningJobObjectiveType"` +} + +// String returns the string representation +func (s HyperParameterTuningJobObjective) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterTuningJobObjective) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HyperParameterTuningJobObjective) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HyperParameterTuningJobObjective"} + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.MetricName != nil && len(*s.MetricName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMetricName sets the MetricName field's value. +func (s *HyperParameterTuningJobObjective) SetMetricName(v string) *HyperParameterTuningJobObjective { + s.MetricName = &v + return s +} + +// SetType sets the Type field's value. +func (s *HyperParameterTuningJobObjective) SetType(v string) *HyperParameterTuningJobObjective { + s.Type = &v + return s +} + +// Provides summary information about a hyperparameter tuning job. +type HyperParameterTuningJobSummary struct { + _ struct{} `type:"structure"` + + // The date and time that the tuning job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The date and time that the tuning job ended. + HyperParameterTuningEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the tuning job. + // + // HyperParameterTuningJobArn is a required field + HyperParameterTuningJobArn *string `type:"string" required:"true"` + + // The name of the tuning job. + // + // HyperParameterTuningJobName is a required field + HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` + + // The status of the tuning job. + // + // HyperParameterTuningJobStatus is a required field + HyperParameterTuningJobStatus *string `type:"string" required:"true" enum:"HyperParameterTuningJobStatus"` + + // The date and time that the tuning job was modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The ObjectiveStatusCounters object that specifies the numbers of training + // jobs, categorized by objective metric status, that this tuning job launched. + // + // ObjectiveStatusCounters is a required field + ObjectiveStatusCounters *ObjectiveStatusCounters `type:"structure" required:"true"` + + // The ResourceLimits object that specifies the maximum number of training jobs + // and parallel training jobs allowed for this tuning job. + ResourceLimits *ResourceLimits `type:"structure"` + + // Specifies the search strategy hyperparameter tuning uses to choose which + // hyperparameters to use for each iteration. Currently, the only valid value + // is Bayesian. + // + // Strategy is a required field + Strategy *string `type:"string" required:"true" enum:"HyperParameterTuningJobStrategyType"` + + // The TrainingJobStatusCounters object that specifies the numbers of training + // jobs, categorized by status, that this tuning job launched. + // + // TrainingJobStatusCounters is a required field + TrainingJobStatusCounters *TrainingJobStatusCounters `type:"structure" required:"true"` +} + +// String returns the string representation +func (s HyperParameterTuningJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterTuningJobSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *HyperParameterTuningJobSummary) SetCreationTime(v time.Time) *HyperParameterTuningJobSummary { + s.CreationTime = &v + return s +} + +// SetHyperParameterTuningEndTime sets the HyperParameterTuningEndTime field's value. +func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningEndTime(v time.Time) *HyperParameterTuningJobSummary { + s.HyperParameterTuningEndTime = &v + return s +} + +// SetHyperParameterTuningJobArn sets the HyperParameterTuningJobArn field's value. +func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningJobArn(v string) *HyperParameterTuningJobSummary { + s.HyperParameterTuningJobArn = &v + return s +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningJobName(v string) *HyperParameterTuningJobSummary { + s.HyperParameterTuningJobName = &v + return s +} + +// SetHyperParameterTuningJobStatus sets the HyperParameterTuningJobStatus field's value. +func (s *HyperParameterTuningJobSummary) SetHyperParameterTuningJobStatus(v string) *HyperParameterTuningJobSummary { + s.HyperParameterTuningJobStatus = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *HyperParameterTuningJobSummary) SetLastModifiedTime(v time.Time) *HyperParameterTuningJobSummary { + s.LastModifiedTime = &v + return s +} + +// SetObjectiveStatusCounters sets the ObjectiveStatusCounters field's value. +func (s *HyperParameterTuningJobSummary) SetObjectiveStatusCounters(v *ObjectiveStatusCounters) *HyperParameterTuningJobSummary { + s.ObjectiveStatusCounters = v + return s +} + +// SetResourceLimits sets the ResourceLimits field's value. +func (s *HyperParameterTuningJobSummary) SetResourceLimits(v *ResourceLimits) *HyperParameterTuningJobSummary { + s.ResourceLimits = v + return s +} + +// SetStrategy sets the Strategy field's value. +func (s *HyperParameterTuningJobSummary) SetStrategy(v string) *HyperParameterTuningJobSummary { + s.Strategy = &v + return s +} + +// SetTrainingJobStatusCounters sets the TrainingJobStatusCounters field's value. +func (s *HyperParameterTuningJobSummary) SetTrainingJobStatusCounters(v *TrainingJobStatusCounters) *HyperParameterTuningJobSummary { + s.TrainingJobStatusCounters = v + return s +} + +// Specifies the configuration for a hyperparameter tuning job that uses one +// or more previous hyperparameter tuning jobs as a starting point. The results +// of previous tuning jobs are used to inform which combinations of hyperparameters +// to search over in the new tuning job. +// +// All training jobs launched by the new hyperparameter tuning job are evaluated +// by using the objective metric, and the training job that performs the best +// is compared to the best training jobs from the parent tuning jobs. From these, +// the training job that performs the best as measured by the objective metric +// is returned as the overall best training job. +// +// All training jobs launched by parent hyperparameter tuning jobs and the new +// hyperparameter tuning jobs count against the limit of training jobs for the +// tuning job. +type HyperParameterTuningJobWarmStartConfig struct { + _ struct{} `type:"structure"` + + // An array of hyperparameter tuning jobs that are used as the starting point + // for the new hyperparameter tuning job. For more information about warm starting + // a hyperparameter tuning job, see Using a Previous Hyperparameter Tuning Job + // as a Starting Point (http://docs.aws.amazon.com/automatic-model-tuning-incremental). + // + // Hyperparameter tuning jobs created before October 1, 2018 cannot be used + // as parent jobs for warm start tuning jobs. + // + // ParentHyperParameterTuningJobs is a required field + ParentHyperParameterTuningJobs []*ParentHyperParameterTuningJob `min:"1" type:"list" required:"true"` + + // Specifies one of the following: + // + // IDENTICAL_DATA_AND_ALGORITHMThe new hyperparameter tuning job uses the same + // input data and training image as the parent tuning jobs. You can change the + // hyperparameter ranges to search and the maximum number of training jobs that + // the hyperparameter tuning job launches. You cannot use a new version of the + // training algorithm, unless the changes in the new version do not affect the + // algorithm itself. For example, changes that improve logging or adding support + // for a different data format are allowed. You can also change hyperparameters + // from tunable to static, and from static to tunable, but the total number + // of static plus tunable hyperparameters must remain the same as it is in all + // parent jobs. The objective metric for the new tuning job must be the same + // as for all parent jobs. + // + // TRANSFER_LEARNINGThe new hyperparameter tuning job can include input data, + // hyperparameter ranges, maximum number of concurrent training jobs, and maximum + // number of training jobs that are different than those of its parent hyperparameter + // tuning jobs. The training image can also be a different version from the + // version used in the parent hyperparameter tuning job. You can also change + // hyperparameters from tunable to static, and from static to tunable, but the + // total number of static plus tunable hyperparameters must remain the same + // as it is in all parent jobs. The objective metric for the new tuning job + // must be the same as for all parent jobs. + // + // WarmStartType is a required field + WarmStartType *string `type:"string" required:"true" enum:"HyperParameterTuningJobWarmStartType"` +} + +// String returns the string representation +func (s HyperParameterTuningJobWarmStartConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HyperParameterTuningJobWarmStartConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HyperParameterTuningJobWarmStartConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HyperParameterTuningJobWarmStartConfig"} + if s.ParentHyperParameterTuningJobs == nil { + invalidParams.Add(request.NewErrParamRequired("ParentHyperParameterTuningJobs")) + } + if s.ParentHyperParameterTuningJobs != nil && len(s.ParentHyperParameterTuningJobs) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ParentHyperParameterTuningJobs", 1)) + } + if s.WarmStartType == nil { + invalidParams.Add(request.NewErrParamRequired("WarmStartType")) + } + if s.ParentHyperParameterTuningJobs != nil { + for i, v := range s.ParentHyperParameterTuningJobs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParentHyperParameterTuningJobs", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParentHyperParameterTuningJobs sets the ParentHyperParameterTuningJobs field's value. +func (s *HyperParameterTuningJobWarmStartConfig) SetParentHyperParameterTuningJobs(v []*ParentHyperParameterTuningJob) *HyperParameterTuningJobWarmStartConfig { + s.ParentHyperParameterTuningJobs = v + return s +} + +// SetWarmStartType sets the WarmStartType field's value. +func (s *HyperParameterTuningJobWarmStartConfig) SetWarmStartType(v string) *HyperParameterTuningJobWarmStartConfig { + s.WarmStartType = &v + return s +} + +// Defines how to perform inference generation after a training job is run. +type InferenceSpecification struct { + _ struct{} `type:"structure"` + + // The Amazon ECR registry path of the Docker image that contains the inference + // code. + // + // Containers is a required field + Containers []*ModelPackageContainerDefinition `min:"1" type:"list" required:"true"` + + // The supported MIME types for the input data. + // + // SupportedContentTypes is a required field + SupportedContentTypes []*string `type:"list" required:"true"` + + // A list of the instance types that are used to generate inferences in real-time. + // + // SupportedRealtimeInferenceInstanceTypes is a required field + SupportedRealtimeInferenceInstanceTypes []*string `type:"list" required:"true"` + + // The supported MIME types for the output data. + // + // SupportedResponseMIMETypes is a required field + SupportedResponseMIMETypes []*string `type:"list" required:"true"` + + // A list of the instance types on which a transformation job can be run or + // on which an endpoint can be deployed. + // + // SupportedTransformInstanceTypes is a required field + SupportedTransformInstanceTypes []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s InferenceSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InferenceSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InferenceSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InferenceSpecification"} + if s.Containers == nil { + invalidParams.Add(request.NewErrParamRequired("Containers")) + } + if s.Containers != nil && len(s.Containers) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Containers", 1)) + } + if s.SupportedContentTypes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedContentTypes")) + } + if s.SupportedRealtimeInferenceInstanceTypes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedRealtimeInferenceInstanceTypes")) + } + if s.SupportedResponseMIMETypes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedResponseMIMETypes")) + } + if s.SupportedTransformInstanceTypes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedTransformInstanceTypes")) + } + if s.SupportedTransformInstanceTypes != nil && len(s.SupportedTransformInstanceTypes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SupportedTransformInstanceTypes", 1)) + } + if s.Containers != nil { + for i, v := range s.Containers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Containers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainers sets the Containers field's value. +func (s *InferenceSpecification) SetContainers(v []*ModelPackageContainerDefinition) *InferenceSpecification { + s.Containers = v + return s +} + +// SetSupportedContentTypes sets the SupportedContentTypes field's value. +func (s *InferenceSpecification) SetSupportedContentTypes(v []*string) *InferenceSpecification { + s.SupportedContentTypes = v + return s +} + +// SetSupportedRealtimeInferenceInstanceTypes sets the SupportedRealtimeInferenceInstanceTypes field's value. +func (s *InferenceSpecification) SetSupportedRealtimeInferenceInstanceTypes(v []*string) *InferenceSpecification { + s.SupportedRealtimeInferenceInstanceTypes = v + return s +} + +// SetSupportedResponseMIMETypes sets the SupportedResponseMIMETypes field's value. +func (s *InferenceSpecification) SetSupportedResponseMIMETypes(v []*string) *InferenceSpecification { + s.SupportedResponseMIMETypes = v + return s +} + +// SetSupportedTransformInstanceTypes sets the SupportedTransformInstanceTypes field's value. +func (s *InferenceSpecification) SetSupportedTransformInstanceTypes(v []*string) *InferenceSpecification { + s.SupportedTransformInstanceTypes = v + return s +} + +// Contains information about the location of input model artifacts, the name +// and shape of the expected data inputs, and the framework in which the model +// was trained. +type InputConfig struct { + _ struct{} `type:"structure"` + + // Specifies the name and shape of the expected data inputs for your trained + // model with a JSON dictionary form. The data inputs are InputConfig$Framework + // specific. + // + // * TensorFlow: You must specify the name and shape (NHWC format) of the + // expected data inputs using a dictionary format for your trained model. + // The dictionary formats required for the console and CLI are different. + // + // Examples for one input: + // + // If using the console, {"input":[1,1024,1024,3]} + // + // If using the CLI, {\"input\":[1,1024,1024,3]} + // + // Examples for two inputs: + // + // If using the console, {"data1": [1,28,28,1], "data2":[1,28,28,1]} + // + // If using the CLI, {\"data1\": [1,28,28,1], \"data2\":[1,28,28,1]} + // + // * MXNET/ONNX: You must specify the name and shape (NCHW format) of the + // expected data inputs in order using a dictionary format for your trained + // model. The dictionary formats required for the console and CLI are different. + // + // Examples for one input: + // + // If using the console, {"data":[1,3,1024,1024]} + // + // If using the CLI, {\"data\":[1,3,1024,1024]} + // + // Examples for two inputs: + // + // If using the console, {"var1": [1,1,28,28], "var2":[1,1,28,28]} + // + // If using the CLI, {\"var1\": [1,1,28,28], \"var2\":[1,1,28,28]} + // + // * PyTorch: You can either specify the name and shape (NCHW format) of + // expected data inputs in order using a dictionary format for your trained + // model or you can specify the shape only using a list format. The dictionary + // formats required for the console and CLI are different. The list formats + // for the console and CLI are the same. + // + // Examples for one input in dictionary format: + // + // If using the console, {"input0":[1,3,224,224]} + // + // If using the CLI, {\"input0\":[1,3,224,224]} + // + // Example for one input in list format: [[1,3,224,224]] + // + // Examples for two inputs in dictionary format: + // + // If using the console, {"input0":[1,3,224,224], "input1":[1,3,224,224]} + // + // If using the CLI, {\"input0\":[1,3,224,224], \"input1\":[1,3,224,224]} + // + // Example for two inputs in list format: [[1,3,224,224], [1,3,224,224]] + // + // * XGBOOST: input data name and shape are not needed. + // + // DataInputConfig is a required field + DataInputConfig *string `min:"1" type:"string" required:"true"` + + // Identifies the framework in which the model was trained. For example: TENSORFLOW. + // + // Framework is a required field + Framework *string `type:"string" required:"true" enum:"Framework"` + + // The S3 path where the model artifacts, which result from model training, + // are stored. This path must point to a single gzip compressed tar archive + // (.tar.gz suffix). + // + // S3Uri is a required field + S3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s InputConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputConfig"} + if s.DataInputConfig == nil { + invalidParams.Add(request.NewErrParamRequired("DataInputConfig")) + } + if s.DataInputConfig != nil && len(*s.DataInputConfig) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DataInputConfig", 1)) + } + if s.Framework == nil { + invalidParams.Add(request.NewErrParamRequired("Framework")) + } + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDataInputConfig sets the DataInputConfig field's value. +func (s *InputConfig) SetDataInputConfig(v string) *InputConfig { + s.DataInputConfig = &v + return s +} + +// SetFramework sets the Framework field's value. +func (s *InputConfig) SetFramework(v string) *InputConfig { + s.Framework = &v + return s +} + +// SetS3Uri sets the S3Uri field's value. +func (s *InputConfig) SetS3Uri(v string) *InputConfig { + s.S3Uri = &v + return s +} + +// For a hyperparameter of the integer type, specifies the range that a hyperparameter +// tuning job searches. +type IntegerParameterRange struct { + _ struct{} `type:"structure"` + + // The maximum value of the hyperparameter to search. + // + // MaxValue is a required field + MaxValue *string `type:"string" required:"true"` + + // The minimum value of the hyperparameter to search. + // + // MinValue is a required field + MinValue *string `type:"string" required:"true"` + + // The name of the hyperparameter to search. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s IntegerParameterRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IntegerParameterRange) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IntegerParameterRange) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IntegerParameterRange"} + if s.MaxValue == nil { + invalidParams.Add(request.NewErrParamRequired("MaxValue")) + } + if s.MinValue == nil { + invalidParams.Add(request.NewErrParamRequired("MinValue")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxValue sets the MaxValue field's value. +func (s *IntegerParameterRange) SetMaxValue(v string) *IntegerParameterRange { + s.MaxValue = &v + return s +} + +// SetMinValue sets the MinValue field's value. +func (s *IntegerParameterRange) SetMinValue(v string) *IntegerParameterRange { + s.MinValue = &v + return s +} + +// SetName sets the Name field's value. +func (s *IntegerParameterRange) SetName(v string) *IntegerParameterRange { + s.Name = &v + return s +} + +// Defines the possible values for an integer hyperparameter. +type IntegerParameterRangeSpecification struct { + _ struct{} `type:"structure"` + + // The maximum integer value allowed. + // + // MaxValue is a required field + MaxValue *string `type:"string" required:"true"` + + // The minimum integer value allowed. + // + // MinValue is a required field + MinValue *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s IntegerParameterRangeSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IntegerParameterRangeSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IntegerParameterRangeSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IntegerParameterRangeSpecification"} + if s.MaxValue == nil { + invalidParams.Add(request.NewErrParamRequired("MaxValue")) + } + if s.MinValue == nil { + invalidParams.Add(request.NewErrParamRequired("MinValue")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxValue sets the MaxValue field's value. +func (s *IntegerParameterRangeSpecification) SetMaxValue(v string) *IntegerParameterRangeSpecification { + s.MaxValue = &v + return s +} + +// SetMinValue sets the MinValue field's value. +func (s *IntegerParameterRangeSpecification) SetMinValue(v string) *IntegerParameterRangeSpecification { + s.MinValue = &v + return s +} + +// Provides a breakdown of the number of objects labeled. +type LabelCounters struct { + _ struct{} `type:"structure"` + + // The total number of objects that could not be labeled due to an error. + FailedNonRetryableError *int64 `type:"integer"` + + // The total number of objects labeled by a human worker. + HumanLabeled *int64 `type:"integer"` + + // The total number of objects labeled by automated data labeling. + MachineLabeled *int64 `type:"integer"` + + // The total number of objects labeled. + TotalLabeled *int64 `type:"integer"` + + // The total number of objects not yet labeled. + Unlabeled *int64 `type:"integer"` +} + +// String returns the string representation +func (s LabelCounters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelCounters) GoString() string { + return s.String() +} + +// SetFailedNonRetryableError sets the FailedNonRetryableError field's value. +func (s *LabelCounters) SetFailedNonRetryableError(v int64) *LabelCounters { + s.FailedNonRetryableError = &v + return s +} + +// SetHumanLabeled sets the HumanLabeled field's value. +func (s *LabelCounters) SetHumanLabeled(v int64) *LabelCounters { + s.HumanLabeled = &v + return s +} + +// SetMachineLabeled sets the MachineLabeled field's value. +func (s *LabelCounters) SetMachineLabeled(v int64) *LabelCounters { + s.MachineLabeled = &v + return s +} + +// SetTotalLabeled sets the TotalLabeled field's value. +func (s *LabelCounters) SetTotalLabeled(v int64) *LabelCounters { + s.TotalLabeled = &v + return s +} + +// SetUnlabeled sets the Unlabeled field's value. +func (s *LabelCounters) SetUnlabeled(v int64) *LabelCounters { + s.Unlabeled = &v + return s +} + +// Provides counts for human-labeled tasks in the labeling job. +type LabelCountersForWorkteam struct { + _ struct{} `type:"structure"` + + // The total number of data objects labeled by a human worker. + HumanLabeled *int64 `type:"integer"` + + // The total number of data objects that need to be labeled by a human worker. + PendingHuman *int64 `type:"integer"` + + // The total number of tasks in the labeling job. + Total *int64 `type:"integer"` +} + +// String returns the string representation +func (s LabelCountersForWorkteam) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelCountersForWorkteam) GoString() string { + return s.String() +} + +// SetHumanLabeled sets the HumanLabeled field's value. +func (s *LabelCountersForWorkteam) SetHumanLabeled(v int64) *LabelCountersForWorkteam { + s.HumanLabeled = &v + return s +} + +// SetPendingHuman sets the PendingHuman field's value. +func (s *LabelCountersForWorkteam) SetPendingHuman(v int64) *LabelCountersForWorkteam { + s.PendingHuman = &v + return s +} + +// SetTotal sets the Total field's value. +func (s *LabelCountersForWorkteam) SetTotal(v int64) *LabelCountersForWorkteam { + s.Total = &v + return s +} + +// Provides configuration information for auto-labeling of your data objects. +// A LabelingJobAlgorithmsConfig object must be supplied in order to use auto-labeling. +type LabelingJobAlgorithmsConfig struct { + _ struct{} `type:"structure"` + + // At the end of an auto-label job Amazon SageMaker Ground Truth sends the Amazon + // Resource Nam (ARN) of the final model used for auto-labeling. You can use + // this model as the starting point for subsequent similar jobs by providing + // the ARN of the model here. + InitialActiveLearningModelArn *string `min:"20" type:"string"` + + // Specifies the Amazon Resource Name (ARN) of the algorithm used for auto-labeling. + // You must select one of the following ARNs: + // + // * Image classification + // + // arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/image-classification + // + // * Text classification + // + // arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/text-classification + // + // * Object detection + // + // arn:aws:sagemaker:region:027400017018:labeling-job-algorithm-specification/object-detection + // + // LabelingJobAlgorithmSpecificationArn is a required field + LabelingJobAlgorithmSpecificationArn *string `type:"string" required:"true"` + + // Provides configuration information for a labeling job. + LabelingJobResourceConfig *LabelingJobResourceConfig `type:"structure"` +} + +// String returns the string representation +func (s LabelingJobAlgorithmsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobAlgorithmsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelingJobAlgorithmsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelingJobAlgorithmsConfig"} + if s.InitialActiveLearningModelArn != nil && len(*s.InitialActiveLearningModelArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("InitialActiveLearningModelArn", 20)) + } + if s.LabelingJobAlgorithmSpecificationArn == nil { + invalidParams.Add(request.NewErrParamRequired("LabelingJobAlgorithmSpecificationArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInitialActiveLearningModelArn sets the InitialActiveLearningModelArn field's value. +func (s *LabelingJobAlgorithmsConfig) SetInitialActiveLearningModelArn(v string) *LabelingJobAlgorithmsConfig { + s.InitialActiveLearningModelArn = &v + return s +} + +// SetLabelingJobAlgorithmSpecificationArn sets the LabelingJobAlgorithmSpecificationArn field's value. +func (s *LabelingJobAlgorithmsConfig) SetLabelingJobAlgorithmSpecificationArn(v string) *LabelingJobAlgorithmsConfig { + s.LabelingJobAlgorithmSpecificationArn = &v + return s +} + +// SetLabelingJobResourceConfig sets the LabelingJobResourceConfig field's value. +func (s *LabelingJobAlgorithmsConfig) SetLabelingJobResourceConfig(v *LabelingJobResourceConfig) *LabelingJobAlgorithmsConfig { + s.LabelingJobResourceConfig = v + return s +} + +// Attributes of the data specified by the customer. Use these to describe the +// data to be labeled. +type LabelingJobDataAttributes struct { + _ struct{} `type:"structure"` + + // Declares that your content is free of personally identifiable information + // or adult content. Amazon SageMaker may restrict the Amazon Mechanical Turk + // workers that can view your task based on this information. + ContentClassifiers []*string `type:"list"` +} + +// String returns the string representation +func (s LabelingJobDataAttributes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobDataAttributes) GoString() string { + return s.String() +} + +// SetContentClassifiers sets the ContentClassifiers field's value. +func (s *LabelingJobDataAttributes) SetContentClassifiers(v []*string) *LabelingJobDataAttributes { + s.ContentClassifiers = v + return s +} + +// Provides information about the location of input data. +type LabelingJobDataSource struct { + _ struct{} `type:"structure"` + + // The Amazon S3 location of the input data objects. + // + // S3DataSource is a required field + S3DataSource *LabelingJobS3DataSource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s LabelingJobDataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobDataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelingJobDataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelingJobDataSource"} + if s.S3DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataSource")) + } + if s.S3DataSource != nil { + if err := s.S3DataSource.Validate(); err != nil { + invalidParams.AddNested("S3DataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3DataSource sets the S3DataSource field's value. +func (s *LabelingJobDataSource) SetS3DataSource(v *LabelingJobS3DataSource) *LabelingJobDataSource { + s.S3DataSource = v + return s +} + +// Provides summary information for a work team. +type LabelingJobForWorkteamSummary struct { + _ struct{} `type:"structure"` + + // The date and time that the labeling job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // A unique identifier for a labeling job. You can use this to refer to a specific + // labeling job. + // + // JobReferenceCode is a required field + JobReferenceCode *string `min:"1" type:"string" required:"true"` + + // Provides information about the progress of a labeling job. + LabelCounters *LabelCountersForWorkteam `type:"structure"` + + // The name of the labeling job that the work team is assigned to. + LabelingJobName *string `min:"1" type:"string"` + + // WorkRequesterAccountId is a required field + WorkRequesterAccountId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s LabelingJobForWorkteamSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobForWorkteamSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *LabelingJobForWorkteamSummary) SetCreationTime(v time.Time) *LabelingJobForWorkteamSummary { + s.CreationTime = &v + return s +} + +// SetJobReferenceCode sets the JobReferenceCode field's value. +func (s *LabelingJobForWorkteamSummary) SetJobReferenceCode(v string) *LabelingJobForWorkteamSummary { + s.JobReferenceCode = &v + return s +} + +// SetLabelCounters sets the LabelCounters field's value. +func (s *LabelingJobForWorkteamSummary) SetLabelCounters(v *LabelCountersForWorkteam) *LabelingJobForWorkteamSummary { + s.LabelCounters = v + return s +} + +// SetLabelingJobName sets the LabelingJobName field's value. +func (s *LabelingJobForWorkteamSummary) SetLabelingJobName(v string) *LabelingJobForWorkteamSummary { + s.LabelingJobName = &v + return s +} + +// SetWorkRequesterAccountId sets the WorkRequesterAccountId field's value. +func (s *LabelingJobForWorkteamSummary) SetWorkRequesterAccountId(v string) *LabelingJobForWorkteamSummary { + s.WorkRequesterAccountId = &v + return s +} + +// Input configuration information for a labeling job. +type LabelingJobInputConfig struct { + _ struct{} `type:"structure"` + + // Attributes of the data specified by the customer. + DataAttributes *LabelingJobDataAttributes `type:"structure"` + + // The location of the input data. + // + // DataSource is a required field + DataSource *LabelingJobDataSource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s LabelingJobInputConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobInputConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelingJobInputConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelingJobInputConfig"} + if s.DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("DataSource")) + } + if s.DataSource != nil { + if err := s.DataSource.Validate(); err != nil { + invalidParams.AddNested("DataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDataAttributes sets the DataAttributes field's value. +func (s *LabelingJobInputConfig) SetDataAttributes(v *LabelingJobDataAttributes) *LabelingJobInputConfig { + s.DataAttributes = v + return s +} + +// SetDataSource sets the DataSource field's value. +func (s *LabelingJobInputConfig) SetDataSource(v *LabelingJobDataSource) *LabelingJobInputConfig { + s.DataSource = v + return s +} + +// Specifies the location of the output produced by the labeling job. +type LabelingJobOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the most recent Amazon SageMaker model + // trained as part of automated data labeling. + FinalActiveLearningModelArn *string `min:"20" type:"string"` + + // The Amazon S3 bucket location of the manifest file for labeled data. + // + // OutputDatasetS3Uri is a required field + OutputDatasetS3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s LabelingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobOutput) GoString() string { + return s.String() +} + +// SetFinalActiveLearningModelArn sets the FinalActiveLearningModelArn field's value. +func (s *LabelingJobOutput) SetFinalActiveLearningModelArn(v string) *LabelingJobOutput { + s.FinalActiveLearningModelArn = &v + return s +} + +// SetOutputDatasetS3Uri sets the OutputDatasetS3Uri field's value. +func (s *LabelingJobOutput) SetOutputDatasetS3Uri(v string) *LabelingJobOutput { + s.OutputDatasetS3Uri = &v + return s +} + +// Output configuration information for a labeling job. +type LabelingJobOutputConfig struct { + _ struct{} `type:"structure"` + + // The AWS Key Management Service ID of the key used to encrypt the output data, + // if any. + KmsKeyId *string `type:"string"` + + // The Amazon S3 location to write output data. + // + // S3OutputPath is a required field + S3OutputPath *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s LabelingJobOutputConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobOutputConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelingJobOutputConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelingJobOutputConfig"} + if s.S3OutputPath == nil { + invalidParams.Add(request.NewErrParamRequired("S3OutputPath")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *LabelingJobOutputConfig) SetKmsKeyId(v string) *LabelingJobOutputConfig { + s.KmsKeyId = &v + return s +} + +// SetS3OutputPath sets the S3OutputPath field's value. +func (s *LabelingJobOutputConfig) SetS3OutputPath(v string) *LabelingJobOutputConfig { + s.S3OutputPath = &v + return s +} + +// Provides configuration information for labeling jobs. +type LabelingJobResourceConfig struct { + _ struct{} `type:"structure"` + + // The AWS Key Management Service key ID for the key used to encrypt the output + // data, if any. + VolumeKmsKeyId *string `type:"string"` +} + +// String returns the string representation +func (s LabelingJobResourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobResourceConfig) GoString() string { + return s.String() +} + +// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. +func (s *LabelingJobResourceConfig) SetVolumeKmsKeyId(v string) *LabelingJobResourceConfig { + s.VolumeKmsKeyId = &v + return s +} + +// The Amazon S3 location of the input data objects. +type LabelingJobS3DataSource struct { + _ struct{} `type:"structure"` + + // The Amazon S3 location of the manifest file that describes the input data + // objects. + // + // ManifestS3Uri is a required field + ManifestS3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s LabelingJobS3DataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobS3DataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelingJobS3DataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelingJobS3DataSource"} + if s.ManifestS3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("ManifestS3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetManifestS3Uri sets the ManifestS3Uri field's value. +func (s *LabelingJobS3DataSource) SetManifestS3Uri(v string) *LabelingJobS3DataSource { + s.ManifestS3Uri = &v + return s +} + +// A set of conditions for stopping a labeling job. If any of the conditions +// are met, the job is automatically stopped. You can use these conditions to +// control the cost of data labeling. +type LabelingJobStoppingConditions struct { + _ struct{} `type:"structure"` + + // The maximum number of objects that can be labeled by human workers. + MaxHumanLabeledObjectCount *int64 `min:"1" type:"integer"` + + // The maximum number of input data objects that should be labeled. + MaxPercentageOfInputDatasetLabeled *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s LabelingJobStoppingConditions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobStoppingConditions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LabelingJobStoppingConditions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LabelingJobStoppingConditions"} + if s.MaxHumanLabeledObjectCount != nil && *s.MaxHumanLabeledObjectCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxHumanLabeledObjectCount", 1)) + } + if s.MaxPercentageOfInputDatasetLabeled != nil && *s.MaxPercentageOfInputDatasetLabeled < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxPercentageOfInputDatasetLabeled", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxHumanLabeledObjectCount sets the MaxHumanLabeledObjectCount field's value. +func (s *LabelingJobStoppingConditions) SetMaxHumanLabeledObjectCount(v int64) *LabelingJobStoppingConditions { + s.MaxHumanLabeledObjectCount = &v + return s +} + +// SetMaxPercentageOfInputDatasetLabeled sets the MaxPercentageOfInputDatasetLabeled field's value. +func (s *LabelingJobStoppingConditions) SetMaxPercentageOfInputDatasetLabeled(v int64) *LabelingJobStoppingConditions { + s.MaxPercentageOfInputDatasetLabeled = &v + return s +} + +// Provides summary information about a labeling job. +type LabelingJobSummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Lambda function used to consolidate + // the annotations from individual workers into a label for a data object. For + // more information, see Annotation Consolidation (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-annotation-consolidation.html). + AnnotationConsolidationLambdaArn *string `type:"string"` + + // The date and time that the job was created (timestamp). + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // If the LabelingJobStatus field is Failed, this field contains a description + // of the error. + FailureReason *string `type:"string"` + + // Input configuration for the labeling job. + InputConfig *LabelingJobInputConfig `type:"structure"` + + // Counts showing the progress of the labeling job. + // + // LabelCounters is a required field + LabelCounters *LabelCounters `type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) assigned to the labeling job when it was created. + // + // LabelingJobArn is a required field + LabelingJobArn *string `type:"string" required:"true"` + + // The name of the labeling job. + // + // LabelingJobName is a required field + LabelingJobName *string `min:"1" type:"string" required:"true"` + + // The location of the output produced by the labeling job. + LabelingJobOutput *LabelingJobOutput `type:"structure"` + + // The current status of the labeling job. + // + // LabelingJobStatus is a required field + LabelingJobStatus *string `type:"string" required:"true" enum:"LabelingJobStatus"` + + // The date and time that the job was last modified (timestamp). + // + // LastModifiedTime is a required field + LastModifiedTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of a Lambda function. The function is run + // before each data object is sent to a worker. + // + // PreHumanTaskLambdaArn is a required field + PreHumanTaskLambdaArn *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the work team assigned to the job. + // + // WorkteamArn is a required field + WorkteamArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s LabelingJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LabelingJobSummary) GoString() string { + return s.String() +} + +// SetAnnotationConsolidationLambdaArn sets the AnnotationConsolidationLambdaArn field's value. +func (s *LabelingJobSummary) SetAnnotationConsolidationLambdaArn(v string) *LabelingJobSummary { + s.AnnotationConsolidationLambdaArn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *LabelingJobSummary) SetCreationTime(v time.Time) *LabelingJobSummary { + s.CreationTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *LabelingJobSummary) SetFailureReason(v string) *LabelingJobSummary { + s.FailureReason = &v + return s +} + +// SetInputConfig sets the InputConfig field's value. +func (s *LabelingJobSummary) SetInputConfig(v *LabelingJobInputConfig) *LabelingJobSummary { + s.InputConfig = v + return s +} + +// SetLabelCounters sets the LabelCounters field's value. +func (s *LabelingJobSummary) SetLabelCounters(v *LabelCounters) *LabelingJobSummary { + s.LabelCounters = v + return s +} + +// SetLabelingJobArn sets the LabelingJobArn field's value. +func (s *LabelingJobSummary) SetLabelingJobArn(v string) *LabelingJobSummary { + s.LabelingJobArn = &v + return s +} + +// SetLabelingJobName sets the LabelingJobName field's value. +func (s *LabelingJobSummary) SetLabelingJobName(v string) *LabelingJobSummary { + s.LabelingJobName = &v + return s +} + +// SetLabelingJobOutput sets the LabelingJobOutput field's value. +func (s *LabelingJobSummary) SetLabelingJobOutput(v *LabelingJobOutput) *LabelingJobSummary { + s.LabelingJobOutput = v + return s +} + +// SetLabelingJobStatus sets the LabelingJobStatus field's value. +func (s *LabelingJobSummary) SetLabelingJobStatus(v string) *LabelingJobSummary { + s.LabelingJobStatus = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *LabelingJobSummary) SetLastModifiedTime(v time.Time) *LabelingJobSummary { + s.LastModifiedTime = &v + return s +} + +// SetPreHumanTaskLambdaArn sets the PreHumanTaskLambdaArn field's value. +func (s *LabelingJobSummary) SetPreHumanTaskLambdaArn(v string) *LabelingJobSummary { + s.PreHumanTaskLambdaArn = &v + return s +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *LabelingJobSummary) SetWorkteamArn(v string) *LabelingJobSummary { + s.WorkteamArn = &v + return s +} + +type ListAlgorithmsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only algorithms created after the specified time (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only algorithms created before the specified time (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of algorithms to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the algorithm name. This filter returns only algorithms whose + // name contains the specified string. + NameContains *string `type:"string"` + + // If the response to a previous ListAlgorithms request was truncated, the response + // includes a NextToken. To retrieve the next set of algorithms, use the token + // in the next request. + NextToken *string `type:"string"` + + // The parameter by which to sort the results. The default is CreationTime. + SortBy *string `type:"string" enum:"AlgorithmSortBy"` + + // The sort order for the results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s ListAlgorithmsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAlgorithmsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAlgorithmsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAlgorithmsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListAlgorithmsInput) SetCreationTimeAfter(v time.Time) *ListAlgorithmsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListAlgorithmsInput) SetCreationTimeBefore(v time.Time) *ListAlgorithmsInput { + s.CreationTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAlgorithmsInput) SetMaxResults(v int64) *ListAlgorithmsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListAlgorithmsInput) SetNameContains(v string) *ListAlgorithmsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAlgorithmsInput) SetNextToken(v string) *ListAlgorithmsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListAlgorithmsInput) SetSortBy(v string) *ListAlgorithmsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListAlgorithmsInput) SetSortOrder(v string) *ListAlgorithmsInput { + s.SortOrder = &v + return s +} + +type ListAlgorithmsOutput struct { + _ struct{} `type:"structure"` + + // >An array of AlgorithmSummary objects, each of which lists an algorithm. + // + // AlgorithmSummaryList is a required field + AlgorithmSummaryList []*AlgorithmSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of algorithms, use it in the subsequent request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListAlgorithmsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAlgorithmsOutput) GoString() string { + return s.String() +} + +// SetAlgorithmSummaryList sets the AlgorithmSummaryList field's value. +func (s *ListAlgorithmsOutput) SetAlgorithmSummaryList(v []*AlgorithmSummary) *ListAlgorithmsOutput { + s.AlgorithmSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAlgorithmsOutput) SetNextToken(v string) *ListAlgorithmsOutput { + s.NextToken = &v + return s +} + +type ListCodeRepositoriesInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only Git repositories that were created after the specified + // time. + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only Git repositories that were created before the + // specified time. + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only Git repositories that were last modified after + // the specified time. + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only Git repositories that were last modified before + // the specified time. + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of Git repositories to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the Git repositories name. This filter returns only repositories + // whose name contains the specified string. + NameContains *string `type:"string"` + + // If the result of a ListCodeRepositoriesOutput request was truncated, the + // response includes a NextToken. To get the next set of Git repositories, use + // the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is Name. + SortBy *string `type:"string" enum:"CodeRepositorySortBy"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"CodeRepositorySortOrder"` +} + +// String returns the string representation +func (s ListCodeRepositoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCodeRepositoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListCodeRepositoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListCodeRepositoriesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListCodeRepositoriesInput) SetCreationTimeAfter(v time.Time) *ListCodeRepositoriesInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListCodeRepositoriesInput) SetCreationTimeBefore(v time.Time) *ListCodeRepositoriesInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListCodeRepositoriesInput) SetLastModifiedTimeAfter(v time.Time) *ListCodeRepositoriesInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListCodeRepositoriesInput) SetLastModifiedTimeBefore(v time.Time) *ListCodeRepositoriesInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCodeRepositoriesInput) SetMaxResults(v int64) *ListCodeRepositoriesInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListCodeRepositoriesInput) SetNameContains(v string) *ListCodeRepositoriesInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCodeRepositoriesInput) SetNextToken(v string) *ListCodeRepositoriesInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListCodeRepositoriesInput) SetSortBy(v string) *ListCodeRepositoriesInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListCodeRepositoriesInput) SetSortOrder(v string) *ListCodeRepositoriesInput { + s.SortOrder = &v + return s +} + +type ListCodeRepositoriesOutput struct { + _ struct{} `type:"structure"` + + // Gets a list of summaries of the Git repositories. Each summary specifies + // the following values for the repository: + // + // * Name + // + // * Amazon Resource Name (ARN) + // + // * Creation time + // + // * Last modified time + // + // * Configuration information, including the URL location of the repository + // and the ARN of the AWS Secrets Manager secret that contains the credentials + // used to access the repository. + // + // CodeRepositorySummaryList is a required field + CodeRepositorySummaryList []*CodeRepositorySummary `type:"list" required:"true"` + + // If the result of a ListCodeRepositoriesOutput request was truncated, the + // response includes a NextToken. To get the next set of Git repositories, use + // the token in the next request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListCodeRepositoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCodeRepositoriesOutput) GoString() string { + return s.String() +} + +// SetCodeRepositorySummaryList sets the CodeRepositorySummaryList field's value. +func (s *ListCodeRepositoriesOutput) SetCodeRepositorySummaryList(v []*CodeRepositorySummary) *ListCodeRepositoriesOutput { + s.CodeRepositorySummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCodeRepositoriesOutput) SetNextToken(v string) *ListCodeRepositoriesOutput { + s.NextToken = &v + return s +} + +type ListCompilationJobsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns the model compilation jobs that were created after + // a specified time. + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns the model compilation jobs that were created before + // a specified time. + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns the model compilation jobs that were modified after + // a specified time. + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns the model compilation jobs that were modified before + // a specified time. + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of model compilation jobs to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A filter that returns the model compilation jobs whose name contains a specified + // string. + NameContains *string `type:"string"` + + // If the result of the previous ListCompilationJobs request was truncated, + // the response includes a NextToken. To retrieve the next set of model compilation + // jobs, use the token in the next request. + NextToken *string `type:"string"` + + // The field by which to sort results. The default is CreationTime. + SortBy *string `type:"string" enum:"ListCompilationJobsSortBy"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // A filter that retrieves model compilation jobs with a specific DescribeCompilationJobResponse$CompilationJobStatus + // status. + StatusEquals *string `type:"string" enum:"CompilationJobStatus"` +} + +// String returns the string representation +func (s ListCompilationJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCompilationJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListCompilationJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListCompilationJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListCompilationJobsInput) SetCreationTimeAfter(v time.Time) *ListCompilationJobsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListCompilationJobsInput) SetCreationTimeBefore(v time.Time) *ListCompilationJobsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListCompilationJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListCompilationJobsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListCompilationJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListCompilationJobsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCompilationJobsInput) SetMaxResults(v int64) *ListCompilationJobsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListCompilationJobsInput) SetNameContains(v string) *ListCompilationJobsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCompilationJobsInput) SetNextToken(v string) *ListCompilationJobsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListCompilationJobsInput) SetSortBy(v string) *ListCompilationJobsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListCompilationJobsInput) SetSortOrder(v string) *ListCompilationJobsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListCompilationJobsInput) SetStatusEquals(v string) *ListCompilationJobsInput { + s.StatusEquals = &v + return s +} + +type ListCompilationJobsOutput struct { + _ struct{} `type:"structure"` + + // An array of CompilationJobSummary objects, each describing a model compilation + // job. + // + // CompilationJobSummaries is a required field + CompilationJobSummaries []*CompilationJobSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this NextToken. To + // retrieve the next set of model compilation jobs, use this token in the next + // request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListCompilationJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListCompilationJobsOutput) GoString() string { + return s.String() +} + +// SetCompilationJobSummaries sets the CompilationJobSummaries field's value. +func (s *ListCompilationJobsOutput) SetCompilationJobSummaries(v []*CompilationJobSummary) *ListCompilationJobsOutput { + s.CompilationJobSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCompilationJobsOutput) SetNextToken(v string) *ListCompilationJobsOutput { + s.NextToken = &v + return s +} + +type ListEndpointConfigsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only endpoint configurations created after the specified + // time (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only endpoint configurations created before the specified + // time (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of training jobs to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the endpoint configuration name. This filter returns only endpoint + // configurations whose name contains the specified string. + NameContains *string `type:"string"` + + // If the result of the previous ListEndpointConfig request was truncated, the + // response includes a NextToken. To retrieve the next set of endpoint configurations, + // use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is CreationTime. + SortBy *string `type:"string" enum:"EndpointConfigSortKey"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"OrderKey"` +} + +// String returns the string representation +func (s ListEndpointConfigsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEndpointConfigsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEndpointConfigsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEndpointConfigsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListEndpointConfigsInput) SetCreationTimeAfter(v time.Time) *ListEndpointConfigsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListEndpointConfigsInput) SetCreationTimeBefore(v time.Time) *ListEndpointConfigsInput { + s.CreationTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListEndpointConfigsInput) SetMaxResults(v int64) *ListEndpointConfigsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListEndpointConfigsInput) SetNameContains(v string) *ListEndpointConfigsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEndpointConfigsInput) SetNextToken(v string) *ListEndpointConfigsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListEndpointConfigsInput) SetSortBy(v string) *ListEndpointConfigsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListEndpointConfigsInput) SetSortOrder(v string) *ListEndpointConfigsInput { + s.SortOrder = &v + return s +} + +type ListEndpointConfigsOutput struct { + _ struct{} `type:"structure"` + + // An array of endpoint configurations. + // + // EndpointConfigs is a required field + EndpointConfigs []*EndpointConfigSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of endpoint configurations, use it in the subsequent request + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListEndpointConfigsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEndpointConfigsOutput) GoString() string { + return s.String() +} + +// SetEndpointConfigs sets the EndpointConfigs field's value. +func (s *ListEndpointConfigsOutput) SetEndpointConfigs(v []*EndpointConfigSummary) *ListEndpointConfigsOutput { + s.EndpointConfigs = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEndpointConfigsOutput) SetNextToken(v string) *ListEndpointConfigsOutput { + s.NextToken = &v + return s +} + +type ListEndpointsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only endpoints that were created after the specified + // time (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only endpoints that were created before the specified + // time (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only endpoints that were modified after the specified + // timestamp. + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only endpoints that were modified before the specified + // timestamp. + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of endpoints to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in endpoint names. This filter returns only endpoints whose name + // contains the specified string. + NameContains *string `type:"string"` + + // If the result of a ListEndpoints request was truncated, the response includes + // a NextToken. To retrieve the next set of endpoints, use the token in the + // next request. + NextToken *string `type:"string"` + + // Sorts the list of results. The default is CreationTime. + SortBy *string `type:"string" enum:"EndpointSortKey"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"OrderKey"` + + // A filter that returns only endpoints with the specified status. + StatusEquals *string `type:"string" enum:"EndpointStatus"` +} + +// String returns the string representation +func (s ListEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListEndpointsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListEndpointsInput) SetCreationTimeAfter(v time.Time) *ListEndpointsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListEndpointsInput) SetCreationTimeBefore(v time.Time) *ListEndpointsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListEndpointsInput) SetLastModifiedTimeAfter(v time.Time) *ListEndpointsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListEndpointsInput) SetLastModifiedTimeBefore(v time.Time) *ListEndpointsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListEndpointsInput) SetMaxResults(v int64) *ListEndpointsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListEndpointsInput) SetNameContains(v string) *ListEndpointsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEndpointsInput) SetNextToken(v string) *ListEndpointsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListEndpointsInput) SetSortBy(v string) *ListEndpointsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListEndpointsInput) SetSortOrder(v string) *ListEndpointsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListEndpointsInput) SetStatusEquals(v string) *ListEndpointsInput { + s.StatusEquals = &v + return s +} + +type ListEndpointsOutput struct { + _ struct{} `type:"structure"` + + // An array or endpoint objects. + // + // Endpoints is a required field + Endpoints []*EndpointSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of training jobs, use it in the subsequent request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpoints sets the Endpoints field's value. +func (s *ListEndpointsOutput) SetEndpoints(v []*EndpointSummary) *ListEndpointsOutput { + s.Endpoints = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListEndpointsOutput) SetNextToken(v string) *ListEndpointsOutput { + s.NextToken = &v + return s +} + +type ListHyperParameterTuningJobsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only tuning jobs that were created after the specified + // time. + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only tuning jobs that were created before the specified + // time. + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only tuning jobs that were modified after the specified + // time. + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only tuning jobs that were modified before the specified + // time. + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of tuning jobs to return. The default value is 10. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the tuning job name. This filter returns only tuning jobs whose + // name contains the specified string. + NameContains *string `type:"string"` + + // If the result of the previous ListHyperParameterTuningJobs request was truncated, + // the response includes a NextToken. To retrieve the next set of tuning jobs, + // use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is Name. + SortBy *string `type:"string" enum:"HyperParameterTuningJobSortByOptions"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // A filter that returns only tuning jobs with the specified status. + StatusEquals *string `type:"string" enum:"HyperParameterTuningJobStatus"` +} + +// String returns the string representation +func (s ListHyperParameterTuningJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListHyperParameterTuningJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListHyperParameterTuningJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListHyperParameterTuningJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListHyperParameterTuningJobsInput) SetCreationTimeAfter(v time.Time) *ListHyperParameterTuningJobsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListHyperParameterTuningJobsInput) SetCreationTimeBefore(v time.Time) *ListHyperParameterTuningJobsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListHyperParameterTuningJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListHyperParameterTuningJobsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListHyperParameterTuningJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListHyperParameterTuningJobsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListHyperParameterTuningJobsInput) SetMaxResults(v int64) *ListHyperParameterTuningJobsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListHyperParameterTuningJobsInput) SetNameContains(v string) *ListHyperParameterTuningJobsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListHyperParameterTuningJobsInput) SetNextToken(v string) *ListHyperParameterTuningJobsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListHyperParameterTuningJobsInput) SetSortBy(v string) *ListHyperParameterTuningJobsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListHyperParameterTuningJobsInput) SetSortOrder(v string) *ListHyperParameterTuningJobsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListHyperParameterTuningJobsInput) SetStatusEquals(v string) *ListHyperParameterTuningJobsInput { + s.StatusEquals = &v + return s +} + +type ListHyperParameterTuningJobsOutput struct { + _ struct{} `type:"structure"` + + // A list of HyperParameterTuningJobSummary objects that describe the tuning + // jobs that the ListHyperParameterTuningJobs request returned. + // + // HyperParameterTuningJobSummaries is a required field + HyperParameterTuningJobSummaries []*HyperParameterTuningJobSummary `type:"list" required:"true"` + + // If the result of this ListHyperParameterTuningJobs request was truncated, + // the response includes a NextToken. To retrieve the next set of tuning jobs, + // use the token in the next request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListHyperParameterTuningJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListHyperParameterTuningJobsOutput) GoString() string { + return s.String() +} + +// SetHyperParameterTuningJobSummaries sets the HyperParameterTuningJobSummaries field's value. +func (s *ListHyperParameterTuningJobsOutput) SetHyperParameterTuningJobSummaries(v []*HyperParameterTuningJobSummary) *ListHyperParameterTuningJobsOutput { + s.HyperParameterTuningJobSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListHyperParameterTuningJobsOutput) SetNextToken(v string) *ListHyperParameterTuningJobsOutput { + s.NextToken = &v + return s +} + +type ListLabelingJobsForWorkteamInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only labeling jobs created after the specified time + // (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only labeling jobs created before the specified time + // (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter the limits jobs to only the ones whose job reference code contains + // the specified string. + JobReferenceCodeContains *string `min:"1" type:"string"` + + // The maximum number of labeling jobs to return in each page of the response. + MaxResults *int64 `min:"1" type:"integer"` + + // If the result of the previous ListLabelingJobsForWorkteam request was truncated, + // the response includes a NextToken. To retrieve the next set of labeling jobs, + // use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is CreationTime. + SortBy *string `type:"string" enum:"ListLabelingJobsForWorkteamSortByOptions"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // The Amazon Resource Name (ARN) of the work team for which you want to see + // labeling jobs for. + // + // WorkteamArn is a required field + WorkteamArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListLabelingJobsForWorkteamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLabelingJobsForWorkteamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLabelingJobsForWorkteamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLabelingJobsForWorkteamInput"} + if s.JobReferenceCodeContains != nil && len(*s.JobReferenceCodeContains) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobReferenceCodeContains", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.WorkteamArn == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListLabelingJobsForWorkteamInput) SetCreationTimeAfter(v time.Time) *ListLabelingJobsForWorkteamInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListLabelingJobsForWorkteamInput) SetCreationTimeBefore(v time.Time) *ListLabelingJobsForWorkteamInput { + s.CreationTimeBefore = &v + return s +} + +// SetJobReferenceCodeContains sets the JobReferenceCodeContains field's value. +func (s *ListLabelingJobsForWorkteamInput) SetJobReferenceCodeContains(v string) *ListLabelingJobsForWorkteamInput { + s.JobReferenceCodeContains = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLabelingJobsForWorkteamInput) SetMaxResults(v int64) *ListLabelingJobsForWorkteamInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLabelingJobsForWorkteamInput) SetNextToken(v string) *ListLabelingJobsForWorkteamInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListLabelingJobsForWorkteamInput) SetSortBy(v string) *ListLabelingJobsForWorkteamInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListLabelingJobsForWorkteamInput) SetSortOrder(v string) *ListLabelingJobsForWorkteamInput { + s.SortOrder = &v + return s +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *ListLabelingJobsForWorkteamInput) SetWorkteamArn(v string) *ListLabelingJobsForWorkteamInput { + s.WorkteamArn = &v + return s +} + +type ListLabelingJobsForWorkteamOutput struct { + _ struct{} `type:"structure"` + + // An array of LabelingJobSummary objects, each describing a labeling job. + // + // LabelingJobSummaryList is a required field + LabelingJobSummaryList []*LabelingJobForWorkteamSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of labeling jobs, use it in the subsequent request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLabelingJobsForWorkteamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLabelingJobsForWorkteamOutput) GoString() string { + return s.String() +} + +// SetLabelingJobSummaryList sets the LabelingJobSummaryList field's value. +func (s *ListLabelingJobsForWorkteamOutput) SetLabelingJobSummaryList(v []*LabelingJobForWorkteamSummary) *ListLabelingJobsForWorkteamOutput { + s.LabelingJobSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLabelingJobsForWorkteamOutput) SetNextToken(v string) *ListLabelingJobsForWorkteamOutput { + s.NextToken = &v + return s +} + +type ListLabelingJobsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only labeling jobs created after the specified time + // (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only labeling jobs created before the specified time + // (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only labeling jobs modified after the specified time + // (timestamp). + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only labeling jobs modified before the specified time + // (timestamp). + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of labeling jobs to return in each page of the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the labeling job name. This filter returns only labeling jobs + // whose name contains the specified string. + NameContains *string `type:"string"` + + // If the result of the previous ListLabelingJobs request was truncated, the + // response includes a NextToken. To retrieve the next set of labeling jobs, + // use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is CreationTime. + SortBy *string `type:"string" enum:"SortBy"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // A filter that retrieves only labeling jobs with a specific status. + StatusEquals *string `type:"string" enum:"LabelingJobStatus"` +} + +// String returns the string representation +func (s ListLabelingJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLabelingJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLabelingJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLabelingJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListLabelingJobsInput) SetCreationTimeAfter(v time.Time) *ListLabelingJobsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListLabelingJobsInput) SetCreationTimeBefore(v time.Time) *ListLabelingJobsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListLabelingJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListLabelingJobsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListLabelingJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListLabelingJobsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListLabelingJobsInput) SetMaxResults(v int64) *ListLabelingJobsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListLabelingJobsInput) SetNameContains(v string) *ListLabelingJobsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLabelingJobsInput) SetNextToken(v string) *ListLabelingJobsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListLabelingJobsInput) SetSortBy(v string) *ListLabelingJobsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListLabelingJobsInput) SetSortOrder(v string) *ListLabelingJobsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListLabelingJobsInput) SetStatusEquals(v string) *ListLabelingJobsInput { + s.StatusEquals = &v + return s +} + +type ListLabelingJobsOutput struct { + _ struct{} `type:"structure"` + + // An array of LabelingJobSummary objects, each describing a labeling job. + LabelingJobSummaryList []*LabelingJobSummary `type:"list"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of labeling jobs, use it in the subsequent request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLabelingJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLabelingJobsOutput) GoString() string { + return s.String() +} + +// SetLabelingJobSummaryList sets the LabelingJobSummaryList field's value. +func (s *ListLabelingJobsOutput) SetLabelingJobSummaryList(v []*LabelingJobSummary) *ListLabelingJobsOutput { + s.LabelingJobSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLabelingJobsOutput) SetNextToken(v string) *ListLabelingJobsOutput { + s.NextToken = &v + return s +} + +type ListModelPackagesInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only model packages created after the specified time + // (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only model packages created before the specified time + // (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of model packages to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the model package name. This filter returns only model packages + // whose name contains the specified string. + NameContains *string `type:"string"` + + // If the response to a previous ListModelPackages request was truncated, the + // response includes a NextToken. To retrieve the next set of model packages, + // use the token in the next request. + NextToken *string `type:"string"` + + // The parameter by which to sort the results. The default is CreationTime. + SortBy *string `type:"string" enum:"ModelPackageSortBy"` + + // The sort order for the results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s ListModelPackagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListModelPackagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListModelPackagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListModelPackagesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListModelPackagesInput) SetCreationTimeAfter(v time.Time) *ListModelPackagesInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListModelPackagesInput) SetCreationTimeBefore(v time.Time) *ListModelPackagesInput { + s.CreationTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListModelPackagesInput) SetMaxResults(v int64) *ListModelPackagesInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListModelPackagesInput) SetNameContains(v string) *ListModelPackagesInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListModelPackagesInput) SetNextToken(v string) *ListModelPackagesInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListModelPackagesInput) SetSortBy(v string) *ListModelPackagesInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListModelPackagesInput) SetSortOrder(v string) *ListModelPackagesInput { + s.SortOrder = &v + return s +} + +type ListModelPackagesOutput struct { + _ struct{} `type:"structure"` + + // An array of ModelPackageSummary objects, each of which lists a model package. + // + // ModelPackageSummaryList is a required field + ModelPackageSummaryList []*ModelPackageSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of model packages, use it in the subsequent request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListModelPackagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListModelPackagesOutput) GoString() string { + return s.String() +} + +// SetModelPackageSummaryList sets the ModelPackageSummaryList field's value. +func (s *ListModelPackagesOutput) SetModelPackageSummaryList(v []*ModelPackageSummary) *ListModelPackagesOutput { + s.ModelPackageSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListModelPackagesOutput) SetNextToken(v string) *ListModelPackagesOutput { + s.NextToken = &v + return s +} + +type ListModelsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only models created after the specified time (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only models created before the specified time (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of models to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the training job name. This filter returns only models in the + // training job whose name contains the specified string. + NameContains *string `type:"string"` + + // If the response to a previous ListModels request was truncated, the response + // includes a NextToken. To retrieve the next set of models, use the token in + // the next request. + NextToken *string `type:"string"` + + // Sorts the list of results. The default is CreationTime. + SortBy *string `type:"string" enum:"ModelSortKey"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"OrderKey"` +} + +// String returns the string representation +func (s ListModelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListModelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListModelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListModelsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListModelsInput) SetCreationTimeAfter(v time.Time) *ListModelsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListModelsInput) SetCreationTimeBefore(v time.Time) *ListModelsInput { + s.CreationTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListModelsInput) SetMaxResults(v int64) *ListModelsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListModelsInput) SetNameContains(v string) *ListModelsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListModelsInput) SetNextToken(v string) *ListModelsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListModelsInput) SetSortBy(v string) *ListModelsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListModelsInput) SetSortOrder(v string) *ListModelsInput { + s.SortOrder = &v + return s +} + +type ListModelsOutput struct { + _ struct{} `type:"structure"` + + // An array of ModelSummary objects, each of which lists a model. + // + // Models is a required field + Models []*ModelSummary `type:"list" required:"true"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of models, use it in the subsequent request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListModelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListModelsOutput) GoString() string { + return s.String() +} + +// SetModels sets the Models field's value. +func (s *ListModelsOutput) SetModels(v []*ModelSummary) *ListModelsOutput { + s.Models = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListModelsOutput) SetNextToken(v string) *ListModelsOutput { + s.NextToken = &v + return s +} + +type ListNotebookInstanceLifecycleConfigsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only lifecycle configurations that were created after + // the specified time (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only lifecycle configurations that were created before + // the specified time (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only lifecycle configurations that were modified after + // the specified time (timestamp). + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only lifecycle configurations that were modified before + // the specified time (timestamp). + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of lifecycle configurations to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the lifecycle configuration name. This filter returns only lifecycle + // configurations whose name contains the specified string. + NameContains *string `type:"string"` + + // If the result of a ListNotebookInstanceLifecycleConfigs request was truncated, + // the response includes a NextToken. To get the next set of lifecycle configurations, + // use the token in the next request. + NextToken *string `type:"string"` + + // Sorts the list of results. The default is CreationTime. + SortBy *string `type:"string" enum:"NotebookInstanceLifecycleConfigSortKey"` + + // The sort order for results. + SortOrder *string `type:"string" enum:"NotebookInstanceLifecycleConfigSortOrder"` +} + +// String returns the string representation +func (s ListNotebookInstanceLifecycleConfigsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNotebookInstanceLifecycleConfigsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListNotebookInstanceLifecycleConfigsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListNotebookInstanceLifecycleConfigsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetCreationTimeAfter(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetCreationTimeBefore(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetLastModifiedTimeAfter(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetLastModifiedTimeBefore(v time.Time) *ListNotebookInstanceLifecycleConfigsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetMaxResults(v int64) *ListNotebookInstanceLifecycleConfigsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetNameContains(v string) *ListNotebookInstanceLifecycleConfigsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetNextToken(v string) *ListNotebookInstanceLifecycleConfigsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetSortBy(v string) *ListNotebookInstanceLifecycleConfigsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListNotebookInstanceLifecycleConfigsInput) SetSortOrder(v string) *ListNotebookInstanceLifecycleConfigsInput { + s.SortOrder = &v + return s +} + +type ListNotebookInstanceLifecycleConfigsOutput struct { + _ struct{} `type:"structure"` + + // If the response is truncated, Amazon SageMaker returns this token. To get + // the next set of lifecycle configurations, use it in the next request. + NextToken *string `type:"string"` + + // An array of NotebookInstanceLifecycleConfiguration objects, each listing + // a lifecycle configuration. + NotebookInstanceLifecycleConfigs []*NotebookInstanceLifecycleConfigSummary `type:"list"` +} + +// String returns the string representation +func (s ListNotebookInstanceLifecycleConfigsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNotebookInstanceLifecycleConfigsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNotebookInstanceLifecycleConfigsOutput) SetNextToken(v string) *ListNotebookInstanceLifecycleConfigsOutput { + s.NextToken = &v + return s +} + +// SetNotebookInstanceLifecycleConfigs sets the NotebookInstanceLifecycleConfigs field's value. +func (s *ListNotebookInstanceLifecycleConfigsOutput) SetNotebookInstanceLifecycleConfigs(v []*NotebookInstanceLifecycleConfigSummary) *ListNotebookInstanceLifecycleConfigsOutput { + s.NotebookInstanceLifecycleConfigs = v + return s +} + +type ListNotebookInstancesInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only notebook instances with associated with the specified + // git repository. + AdditionalCodeRepositoryEquals *string `min:"1" type:"string"` + + // A filter that returns only notebook instances that were created after the + // specified time (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only notebook instances that were created before the + // specified time (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // A string in the name or URL of a Git repository associated with this notebook + // instance. This filter returns only notebook instances associated with a git + // repository with a name that contains the specified string. + DefaultCodeRepositoryContains *string `type:"string"` + + // A filter that returns only notebook instances that were modified after the + // specified time (timestamp). + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only notebook instances that were modified before the + // specified time (timestamp). + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of notebook instances to return. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the notebook instances' name. This filter returns only notebook + // instances whose name contains the specified string. + NameContains *string `type:"string"` + + // If the previous call to the ListNotebookInstances is truncated, the response + // includes a NextToken. You can use this token in your subsequent ListNotebookInstances + // request to fetch the next set of notebook instances. + // + // You might specify a filter or a sort order in your request. When response + // is truncated, you must use the same values for the filer and sort order in + // the next request. + NextToken *string `type:"string"` + + // A string in the name of a notebook instances lifecycle configuration associated + // with this notebook instance. This filter returns only notebook instances + // associated with a lifecycle configuration with a name that contains the specified + // string. + NotebookInstanceLifecycleConfigNameContains *string `type:"string"` + + // The field to sort results by. The default is Name. + SortBy *string `type:"string" enum:"NotebookInstanceSortKey"` + + // The sort order for results. + SortOrder *string `type:"string" enum:"NotebookInstanceSortOrder"` + + // A filter that returns only notebook instances with the specified status. + StatusEquals *string `type:"string" enum:"NotebookInstanceStatus"` +} + +// String returns the string representation +func (s ListNotebookInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNotebookInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListNotebookInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListNotebookInstancesInput"} + if s.AdditionalCodeRepositoryEquals != nil && len(*s.AdditionalCodeRepositoryEquals) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AdditionalCodeRepositoryEquals", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdditionalCodeRepositoryEquals sets the AdditionalCodeRepositoryEquals field's value. +func (s *ListNotebookInstancesInput) SetAdditionalCodeRepositoryEquals(v string) *ListNotebookInstancesInput { + s.AdditionalCodeRepositoryEquals = &v + return s +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListNotebookInstancesInput) SetCreationTimeAfter(v time.Time) *ListNotebookInstancesInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListNotebookInstancesInput) SetCreationTimeBefore(v time.Time) *ListNotebookInstancesInput { + s.CreationTimeBefore = &v + return s +} + +// SetDefaultCodeRepositoryContains sets the DefaultCodeRepositoryContains field's value. +func (s *ListNotebookInstancesInput) SetDefaultCodeRepositoryContains(v string) *ListNotebookInstancesInput { + s.DefaultCodeRepositoryContains = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListNotebookInstancesInput) SetLastModifiedTimeAfter(v time.Time) *ListNotebookInstancesInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListNotebookInstancesInput) SetLastModifiedTimeBefore(v time.Time) *ListNotebookInstancesInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListNotebookInstancesInput) SetMaxResults(v int64) *ListNotebookInstancesInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListNotebookInstancesInput) SetNameContains(v string) *ListNotebookInstancesInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNotebookInstancesInput) SetNextToken(v string) *ListNotebookInstancesInput { + s.NextToken = &v + return s +} + +// SetNotebookInstanceLifecycleConfigNameContains sets the NotebookInstanceLifecycleConfigNameContains field's value. +func (s *ListNotebookInstancesInput) SetNotebookInstanceLifecycleConfigNameContains(v string) *ListNotebookInstancesInput { + s.NotebookInstanceLifecycleConfigNameContains = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListNotebookInstancesInput) SetSortBy(v string) *ListNotebookInstancesInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListNotebookInstancesInput) SetSortOrder(v string) *ListNotebookInstancesInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListNotebookInstancesInput) SetStatusEquals(v string) *ListNotebookInstancesInput { + s.StatusEquals = &v + return s +} + +type ListNotebookInstancesOutput struct { + _ struct{} `type:"structure"` + + // If the response to the previous ListNotebookInstances request was truncated, + // Amazon SageMaker returns this token. To retrieve the next set of notebook + // instances, use the token in the next request. + NextToken *string `type:"string"` + + // An array of NotebookInstanceSummary objects, one for each notebook instance. + NotebookInstances []*NotebookInstanceSummary `type:"list"` +} + +// String returns the string representation +func (s ListNotebookInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListNotebookInstancesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListNotebookInstancesOutput) SetNextToken(v string) *ListNotebookInstancesOutput { + s.NextToken = &v + return s +} + +// SetNotebookInstances sets the NotebookInstances field's value. +func (s *ListNotebookInstancesOutput) SetNotebookInstances(v []*NotebookInstanceSummary) *ListNotebookInstancesOutput { + s.NotebookInstances = v + return s +} + +type ListSubscribedWorkteamsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of work teams to return in each page of the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the work team name. This filter returns only work teams whose + // name contains the specified string. + NameContains *string `min:"1" type:"string"` + + // If the result of the previous ListSubscribedWorkteams request was truncated, + // the response includes a NextToken. To retrieve the next set of labeling jobs, + // use the token in the next request. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListSubscribedWorkteamsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSubscribedWorkteamsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListSubscribedWorkteamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListSubscribedWorkteamsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NameContains != nil && len(*s.NameContains) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListSubscribedWorkteamsInput) SetMaxResults(v int64) *ListSubscribedWorkteamsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListSubscribedWorkteamsInput) SetNameContains(v string) *ListSubscribedWorkteamsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSubscribedWorkteamsInput) SetNextToken(v string) *ListSubscribedWorkteamsInput { + s.NextToken = &v + return s +} + +type ListSubscribedWorkteamsOutput struct { + _ struct{} `type:"structure"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of work teams, use it in the subsequent request. + NextToken *string `type:"string"` + + // An array of Workteam objects, each describing a work team. + // + // SubscribedWorkteams is a required field + SubscribedWorkteams []*SubscribedWorkteam `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListSubscribedWorkteamsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSubscribedWorkteamsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListSubscribedWorkteamsOutput) SetNextToken(v string) *ListSubscribedWorkteamsOutput { + s.NextToken = &v + return s +} + +// SetSubscribedWorkteams sets the SubscribedWorkteams field's value. +func (s *ListSubscribedWorkteamsOutput) SetSubscribedWorkteams(v []*SubscribedWorkteam) *ListSubscribedWorkteamsOutput { + s.SubscribedWorkteams = v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // Maximum number of tags to return. + MaxResults *int64 `min:"50" type:"integer"` + + // If the response to the previous ListTags request is truncated, Amazon SageMaker + // returns this token. To retrieve the next set of tags, use it in the subsequent + // request. + NextToken *string `type:"string"` + + // The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve. + // + // ResourceArn is a required field + ResourceArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.MaxResults != nil && *s.MaxResults < 50 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 50)) + } + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput { + s.ResourceArn = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // If response is truncated, Amazon SageMaker includes a token in the response. + // You can use this token in your subsequent request to fetch next set of tokens. + NextToken *string `type:"string"` + + // An array of Tag objects, each with a tag key and a value. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput { + s.Tags = v + return s +} + +type ListTrainingJobsForHyperParameterTuningJobInput struct { + _ struct{} `type:"structure"` + + // The name of the tuning job whose training jobs you want to list. + // + // HyperParameterTuningJobName is a required field + HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` + + // The maximum number of training jobs to return. The default value is 10. + MaxResults *int64 `min:"1" type:"integer"` + + // If the result of the previous ListTrainingJobsForHyperParameterTuningJob + // request was truncated, the response includes a NextToken. To retrieve the + // next set of training jobs, use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is Name. + // + // If the value of this field is FinalObjectiveMetricValue, any training jobs + // that did not return an objective metric are not listed. + SortBy *string `type:"string" enum:"TrainingJobSortByOptions"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // A filter that returns only training jobs with the specified status. + StatusEquals *string `type:"string" enum:"TrainingJobStatus"` +} + +// String returns the string representation +func (s ListTrainingJobsForHyperParameterTuningJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTrainingJobsForHyperParameterTuningJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTrainingJobsForHyperParameterTuningJobInput"} + if s.HyperParameterTuningJobName == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) + } + if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *ListTrainingJobsForHyperParameterTuningJobInput { + s.HyperParameterTuningJobName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetMaxResults(v int64) *ListTrainingJobsForHyperParameterTuningJobInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetNextToken(v string) *ListTrainingJobsForHyperParameterTuningJobInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetSortBy(v string) *ListTrainingJobsForHyperParameterTuningJobInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetSortOrder(v string) *ListTrainingJobsForHyperParameterTuningJobInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobInput) SetStatusEquals(v string) *ListTrainingJobsForHyperParameterTuningJobInput { + s.StatusEquals = &v + return s +} + +type ListTrainingJobsForHyperParameterTuningJobOutput struct { + _ struct{} `type:"structure"` + + // If the result of this ListTrainingJobsForHyperParameterTuningJob request + // was truncated, the response includes a NextToken. To retrieve the next set + // of training jobs, use the token in the next request. + NextToken *string `type:"string"` + + // A list of TrainingJobSummary objects that describe the training jobs that + // the ListTrainingJobsForHyperParameterTuningJob request returned. + // + // TrainingJobSummaries is a required field + TrainingJobSummaries []*HyperParameterTrainingJobSummary `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTrainingJobsForHyperParameterTuningJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTrainingJobsForHyperParameterTuningJobOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobOutput) SetNextToken(v string) *ListTrainingJobsForHyperParameterTuningJobOutput { + s.NextToken = &v + return s +} + +// SetTrainingJobSummaries sets the TrainingJobSummaries field's value. +func (s *ListTrainingJobsForHyperParameterTuningJobOutput) SetTrainingJobSummaries(v []*HyperParameterTrainingJobSummary) *ListTrainingJobsForHyperParameterTuningJobOutput { + s.TrainingJobSummaries = v + return s +} + +type ListTrainingJobsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only training jobs created after the specified time + // (timestamp). + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only training jobs created before the specified time + // (timestamp). + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only training jobs modified after the specified time + // (timestamp). + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only training jobs modified before the specified time + // (timestamp). + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of training jobs to return in the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the training job name. This filter returns only training jobs + // whose name contains the specified string. + NameContains *string `type:"string"` + + // If the result of the previous ListTrainingJobs request was truncated, the + // response includes a NextToken. To retrieve the next set of training jobs, + // use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is CreationTime. + SortBy *string `type:"string" enum:"SortBy"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // A filter that retrieves only training jobs with a specific status. + StatusEquals *string `type:"string" enum:"TrainingJobStatus"` +} + +// String returns the string representation +func (s ListTrainingJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTrainingJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTrainingJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTrainingJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListTrainingJobsInput) SetCreationTimeAfter(v time.Time) *ListTrainingJobsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListTrainingJobsInput) SetCreationTimeBefore(v time.Time) *ListTrainingJobsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListTrainingJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListTrainingJobsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListTrainingJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListTrainingJobsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTrainingJobsInput) SetMaxResults(v int64) *ListTrainingJobsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListTrainingJobsInput) SetNameContains(v string) *ListTrainingJobsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTrainingJobsInput) SetNextToken(v string) *ListTrainingJobsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListTrainingJobsInput) SetSortBy(v string) *ListTrainingJobsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListTrainingJobsInput) SetSortOrder(v string) *ListTrainingJobsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListTrainingJobsInput) SetStatusEquals(v string) *ListTrainingJobsInput { + s.StatusEquals = &v + return s +} + +type ListTrainingJobsOutput struct { + _ struct{} `type:"structure"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of training jobs, use it in the subsequent request. + NextToken *string `type:"string"` + + // An array of TrainingJobSummary objects, each listing a training job. + // + // TrainingJobSummaries is a required field + TrainingJobSummaries []*TrainingJobSummary `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTrainingJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTrainingJobsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTrainingJobsOutput) SetNextToken(v string) *ListTrainingJobsOutput { + s.NextToken = &v + return s +} + +// SetTrainingJobSummaries sets the TrainingJobSummaries field's value. +func (s *ListTrainingJobsOutput) SetTrainingJobSummaries(v []*TrainingJobSummary) *ListTrainingJobsOutput { + s.TrainingJobSummaries = v + return s +} + +type ListTransformJobsInput struct { + _ struct{} `type:"structure"` + + // A filter that returns only transform jobs created after the specified time. + CreationTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only transform jobs created before the specified time. + CreationTimeBefore *time.Time `type:"timestamp"` + + // A filter that returns only transform jobs modified after the specified time. + LastModifiedTimeAfter *time.Time `type:"timestamp"` + + // A filter that returns only transform jobs modified before the specified time. + LastModifiedTimeBefore *time.Time `type:"timestamp"` + + // The maximum number of transform jobs to return in the response. The default + // value is 10. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the transform job name. This filter returns only transform jobs + // whose name contains the specified string. + NameContains *string `type:"string"` + + // If the result of the previous ListTransformJobs request was truncated, the + // response includes a NextToken. To retrieve the next set of transform jobs, + // use the token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is CreationTime. + SortBy *string `type:"string" enum:"SortBy"` + + // The sort order for results. The default is Descending. + SortOrder *string `type:"string" enum:"SortOrder"` + + // A filter that retrieves only transform jobs with a specific status. + StatusEquals *string `type:"string" enum:"TransformJobStatus"` +} + +// String returns the string representation +func (s ListTransformJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTransformJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTransformJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTransformJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListTransformJobsInput) SetCreationTimeAfter(v time.Time) *ListTransformJobsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListTransformJobsInput) SetCreationTimeBefore(v time.Time) *ListTransformJobsInput { + s.CreationTimeBefore = &v + return s +} + +// SetLastModifiedTimeAfter sets the LastModifiedTimeAfter field's value. +func (s *ListTransformJobsInput) SetLastModifiedTimeAfter(v time.Time) *ListTransformJobsInput { + s.LastModifiedTimeAfter = &v + return s +} + +// SetLastModifiedTimeBefore sets the LastModifiedTimeBefore field's value. +func (s *ListTransformJobsInput) SetLastModifiedTimeBefore(v time.Time) *ListTransformJobsInput { + s.LastModifiedTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTransformJobsInput) SetMaxResults(v int64) *ListTransformJobsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListTransformJobsInput) SetNameContains(v string) *ListTransformJobsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTransformJobsInput) SetNextToken(v string) *ListTransformJobsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListTransformJobsInput) SetSortBy(v string) *ListTransformJobsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListTransformJobsInput) SetSortOrder(v string) *ListTransformJobsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListTransformJobsInput) SetStatusEquals(v string) *ListTransformJobsInput { + s.StatusEquals = &v + return s +} + +type ListTransformJobsOutput struct { + _ struct{} `type:"structure"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of transform jobs, use it in the next request. + NextToken *string `type:"string"` + + // An array of TransformJobSummary objects. + // + // TransformJobSummaries is a required field + TransformJobSummaries []*TransformJobSummary `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTransformJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTransformJobsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTransformJobsOutput) SetNextToken(v string) *ListTransformJobsOutput { + s.NextToken = &v + return s +} + +// SetTransformJobSummaries sets the TransformJobSummaries field's value. +func (s *ListTransformJobsOutput) SetTransformJobSummaries(v []*TransformJobSummary) *ListTransformJobsOutput { + s.TransformJobSummaries = v + return s +} + +type ListWorkteamsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of work teams to return in each page of the response. + MaxResults *int64 `min:"1" type:"integer"` + + // A string in the work team's name. This filter returns only work teams whose + // name contains the specified string. + NameContains *string `min:"1" type:"string"` + + // If the result of the previous ListWorkteams request was truncated, the response + // includes a NextToken. To retrieve the next set of labeling jobs, use the + // token in the next request. + NextToken *string `type:"string"` + + // The field to sort results by. The default is CreationTime. + SortBy *string `type:"string" enum:"ListWorkteamsSortByOptions"` + + // The sort order for results. The default is Ascending. + SortOrder *string `type:"string" enum:"SortOrder"` +} + +// String returns the string representation +func (s ListWorkteamsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWorkteamsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListWorkteamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListWorkteamsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NameContains != nil && len(*s.NameContains) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListWorkteamsInput) SetMaxResults(v int64) *ListWorkteamsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListWorkteamsInput) SetNameContains(v string) *ListWorkteamsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWorkteamsInput) SetNextToken(v string) *ListWorkteamsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListWorkteamsInput) SetSortBy(v string) *ListWorkteamsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListWorkteamsInput) SetSortOrder(v string) *ListWorkteamsInput { + s.SortOrder = &v + return s +} + +type ListWorkteamsOutput struct { + _ struct{} `type:"structure"` + + // If the response is truncated, Amazon SageMaker returns this token. To retrieve + // the next set of work teams, use it in the subsequent request. + NextToken *string `type:"string"` + + // An array of Workteam objects, each describing a work team. + // + // Workteams is a required field + Workteams []*Workteam `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListWorkteamsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWorkteamsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWorkteamsOutput) SetNextToken(v string) *ListWorkteamsOutput { + s.NextToken = &v + return s +} + +// SetWorkteams sets the Workteams field's value. +func (s *ListWorkteamsOutput) SetWorkteams(v []*Workteam) *ListWorkteamsOutput { + s.Workteams = v + return s +} + +// Defines the Amazon Cognito user group that is part of a work team. +type MemberDefinition struct { + _ struct{} `type:"structure"` + + // The Amazon Cognito user group that is part of the work team. + CognitoMemberDefinition *CognitoMemberDefinition `type:"structure"` +} + +// String returns the string representation +func (s MemberDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MemberDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MemberDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MemberDefinition"} + if s.CognitoMemberDefinition != nil { + if err := s.CognitoMemberDefinition.Validate(); err != nil { + invalidParams.AddNested("CognitoMemberDefinition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCognitoMemberDefinition sets the CognitoMemberDefinition field's value. +func (s *MemberDefinition) SetCognitoMemberDefinition(v *CognitoMemberDefinition) *MemberDefinition { + s.CognitoMemberDefinition = v + return s +} + +// The name, value, and date and time of a metric that was emitted to Amazon +// CloudWatch. +type MetricData struct { + _ struct{} `type:"structure"` + + // The name of the metric. + MetricName *string `min:"1" type:"string"` + + // The date and time that the algorithm emitted the metric. + Timestamp *time.Time `type:"timestamp"` + + // The value of the metric. + Value *float64 `type:"float"` +} + +// String returns the string representation +func (s MetricData) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricData) GoString() string { + return s.String() +} + +// SetMetricName sets the MetricName field's value. +func (s *MetricData) SetMetricName(v string) *MetricData { + s.MetricName = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *MetricData) SetTimestamp(v time.Time) *MetricData { + s.Timestamp = &v + return s +} + +// SetValue sets the Value field's value. +func (s *MetricData) SetValue(v float64) *MetricData { + s.Value = &v + return s +} + +// Specifies a metric that the training algorithm writes to stderr or stdout. +// Amazon SageMakerhyperparameter tuning captures all defined metrics. You specify +// one metric that a hyperparameter tuning job uses as its objective metric +// to choose the best training job. +type MetricDefinition struct { + _ struct{} `type:"structure"` + + // The name of the metric. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // A regular expression that searches the output of a training job and gets + // the value of the metric. For more information about using regular expressions + // to define metrics, see Defining Objective Metrics (http://docs.aws.amazon.com/sagemaker/latest/dg/automatic-model-tuning-define-metrics.html). + // + // Regex is a required field + Regex *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s MetricDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MetricDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MetricDefinition"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Regex == nil { + invalidParams.Add(request.NewErrParamRequired("Regex")) + } + if s.Regex != nil && len(*s.Regex) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Regex", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *MetricDefinition) SetName(v string) *MetricDefinition { + s.Name = &v + return s +} + +// SetRegex sets the Regex field's value. +func (s *MetricDefinition) SetRegex(v string) *MetricDefinition { + s.Regex = &v + return s +} + +// Provides information about the location that is configured for storing model +// artifacts. +type ModelArtifacts struct { + _ struct{} `type:"structure"` + + // The path of the S3 object that contains the model artifacts. For example, + // s3://bucket-name/keynameprefix/model.tar.gz. + // + // S3ModelArtifacts is a required field + S3ModelArtifacts *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModelArtifacts) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelArtifacts) GoString() string { + return s.String() +} + +// SetS3ModelArtifacts sets the S3ModelArtifacts field's value. +func (s *ModelArtifacts) SetS3ModelArtifacts(v string) *ModelArtifacts { + s.S3ModelArtifacts = &v + return s +} + +// Describes the Docker container for the model package. +type ModelPackageContainerDefinition struct { + _ struct{} `type:"structure"` + + // The DNS host name for the Docker container. + ContainerHostname *string `type:"string"` + + // The Amazon EC2 Container Registry (Amazon ECR) path where inference code + // is stored. + // + // If you are using your own custom algorithm instead of an algorithm provided + // by Amazon SageMaker, the inference code must meet Amazon SageMaker requirements. + // Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] + // image path formats. For more information, see Using Your Own Algorithms with + // Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html). + // + // Image is a required field + Image *string `type:"string" required:"true"` + + // An MD5 hash of the training algorithm that identifies the Docker image used + // for training. + ImageDigest *string `type:"string"` + + // The Amazon S3 path where the model artifacts, which result from model training, + // are stored. This path must point to a single gzip compressed tar archive + // (.tar.gz suffix). + ModelDataUrl *string `type:"string"` + + // The AWS Marketplace product ID of the model package. + ProductId *string `type:"string"` +} + +// String returns the string representation +func (s ModelPackageContainerDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelPackageContainerDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModelPackageContainerDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModelPackageContainerDefinition"} + if s.Image == nil { + invalidParams.Add(request.NewErrParamRequired("Image")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerHostname sets the ContainerHostname field's value. +func (s *ModelPackageContainerDefinition) SetContainerHostname(v string) *ModelPackageContainerDefinition { + s.ContainerHostname = &v + return s +} + +// SetImage sets the Image field's value. +func (s *ModelPackageContainerDefinition) SetImage(v string) *ModelPackageContainerDefinition { + s.Image = &v + return s +} + +// SetImageDigest sets the ImageDigest field's value. +func (s *ModelPackageContainerDefinition) SetImageDigest(v string) *ModelPackageContainerDefinition { + s.ImageDigest = &v + return s +} + +// SetModelDataUrl sets the ModelDataUrl field's value. +func (s *ModelPackageContainerDefinition) SetModelDataUrl(v string) *ModelPackageContainerDefinition { + s.ModelDataUrl = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ModelPackageContainerDefinition) SetProductId(v string) *ModelPackageContainerDefinition { + s.ProductId = &v + return s +} + +// Specifies the validation and image scan statuses of the model package. +type ModelPackageStatusDetails struct { + _ struct{} `type:"structure"` + + // The status of the scan of the Docker image container for the model package. + ImageScanStatuses []*ModelPackageStatusItem `type:"list"` + + // The validation status of the model package. + // + // ValidationStatuses is a required field + ValidationStatuses []*ModelPackageStatusItem `type:"list" required:"true"` +} + +// String returns the string representation +func (s ModelPackageStatusDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelPackageStatusDetails) GoString() string { + return s.String() +} + +// SetImageScanStatuses sets the ImageScanStatuses field's value. +func (s *ModelPackageStatusDetails) SetImageScanStatuses(v []*ModelPackageStatusItem) *ModelPackageStatusDetails { + s.ImageScanStatuses = v + return s +} + +// SetValidationStatuses sets the ValidationStatuses field's value. +func (s *ModelPackageStatusDetails) SetValidationStatuses(v []*ModelPackageStatusItem) *ModelPackageStatusDetails { + s.ValidationStatuses = v + return s +} + +// Represents the overall status of a model package. +type ModelPackageStatusItem struct { + _ struct{} `type:"structure"` + + // if the overall status is Failed, the reason for the failure. + FailureReason *string `type:"string"` + + // The name of the model package for which the overall status is being reported. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The current status. + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"DetailedModelPackageStatus"` +} + +// String returns the string representation +func (s ModelPackageStatusItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelPackageStatusItem) GoString() string { + return s.String() +} + +// SetFailureReason sets the FailureReason field's value. +func (s *ModelPackageStatusItem) SetFailureReason(v string) *ModelPackageStatusItem { + s.FailureReason = &v + return s +} + +// SetName sets the Name field's value. +func (s *ModelPackageStatusItem) SetName(v string) *ModelPackageStatusItem { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ModelPackageStatusItem) SetStatus(v string) *ModelPackageStatusItem { + s.Status = &v + return s +} + +// Provides summary information about a model package. +type ModelPackageSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the model package was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of the model package. + // + // ModelPackageArn is a required field + ModelPackageArn *string `min:"1" type:"string" required:"true"` + + // A brief description of the model package. + ModelPackageDescription *string `type:"string"` + + // The name of the model package. + // + // ModelPackageName is a required field + ModelPackageName *string `min:"1" type:"string" required:"true"` + + // The overall status of the model package. + // + // ModelPackageStatus is a required field + ModelPackageStatus *string `type:"string" required:"true" enum:"ModelPackageStatus"` +} + +// String returns the string representation +func (s ModelPackageSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelPackageSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ModelPackageSummary) SetCreationTime(v time.Time) *ModelPackageSummary { + s.CreationTime = &v + return s +} + +// SetModelPackageArn sets the ModelPackageArn field's value. +func (s *ModelPackageSummary) SetModelPackageArn(v string) *ModelPackageSummary { + s.ModelPackageArn = &v + return s +} + +// SetModelPackageDescription sets the ModelPackageDescription field's value. +func (s *ModelPackageSummary) SetModelPackageDescription(v string) *ModelPackageSummary { + s.ModelPackageDescription = &v + return s +} + +// SetModelPackageName sets the ModelPackageName field's value. +func (s *ModelPackageSummary) SetModelPackageName(v string) *ModelPackageSummary { + s.ModelPackageName = &v + return s +} + +// SetModelPackageStatus sets the ModelPackageStatus field's value. +func (s *ModelPackageSummary) SetModelPackageStatus(v string) *ModelPackageSummary { + s.ModelPackageStatus = &v + return s +} + +// Contains data, such as the inputs and targeted instance types that are used +// in the process of validating the model package. +// +// The data provided in the validation profile is made available to your buyers +// on AWS Marketplace. +type ModelPackageValidationProfile struct { + _ struct{} `type:"structure"` + + // The name of the profile for the model package. + // + // ProfileName is a required field + ProfileName *string `min:"1" type:"string" required:"true"` + + // The TransformJobDefinition object that describes the transform job used for + // the validation of the model package. + // + // TransformJobDefinition is a required field + TransformJobDefinition *TransformJobDefinition `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ModelPackageValidationProfile) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelPackageValidationProfile) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModelPackageValidationProfile) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModelPackageValidationProfile"} + if s.ProfileName == nil { + invalidParams.Add(request.NewErrParamRequired("ProfileName")) + } + if s.ProfileName != nil && len(*s.ProfileName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProfileName", 1)) + } + if s.TransformJobDefinition == nil { + invalidParams.Add(request.NewErrParamRequired("TransformJobDefinition")) + } + if s.TransformJobDefinition != nil { + if err := s.TransformJobDefinition.Validate(); err != nil { + invalidParams.AddNested("TransformJobDefinition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProfileName sets the ProfileName field's value. +func (s *ModelPackageValidationProfile) SetProfileName(v string) *ModelPackageValidationProfile { + s.ProfileName = &v + return s +} + +// SetTransformJobDefinition sets the TransformJobDefinition field's value. +func (s *ModelPackageValidationProfile) SetTransformJobDefinition(v *TransformJobDefinition) *ModelPackageValidationProfile { + s.TransformJobDefinition = v + return s +} + +// Specifies batch transform jobs that Amazon SageMaker runs to validate your +// model package. +type ModelPackageValidationSpecification struct { + _ struct{} `type:"structure"` + + // An array of ModelPackageValidationProfile objects, each of which specifies + // a batch transform job that Amazon SageMaker runs to validate your model package. + // + // ValidationProfiles is a required field + ValidationProfiles []*ModelPackageValidationProfile `min:"1" type:"list" required:"true"` + + // The IAM roles to be used for the validation of the model package. + // + // ValidationRole is a required field + ValidationRole *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s ModelPackageValidationSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelPackageValidationSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModelPackageValidationSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModelPackageValidationSpecification"} + if s.ValidationProfiles == nil { + invalidParams.Add(request.NewErrParamRequired("ValidationProfiles")) + } + if s.ValidationProfiles != nil && len(s.ValidationProfiles) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ValidationProfiles", 1)) + } + if s.ValidationRole == nil { + invalidParams.Add(request.NewErrParamRequired("ValidationRole")) + } + if s.ValidationRole != nil && len(*s.ValidationRole) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ValidationRole", 20)) + } + if s.ValidationProfiles != nil { + for i, v := range s.ValidationProfiles { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ValidationProfiles", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetValidationProfiles sets the ValidationProfiles field's value. +func (s *ModelPackageValidationSpecification) SetValidationProfiles(v []*ModelPackageValidationProfile) *ModelPackageValidationSpecification { + s.ValidationProfiles = v + return s +} + +// SetValidationRole sets the ValidationRole field's value. +func (s *ModelPackageValidationSpecification) SetValidationRole(v string) *ModelPackageValidationSpecification { + s.ValidationRole = &v + return s +} + +// Provides summary information about a model. +type ModelSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that indicates when the model was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // The Amazon Resource Name (ARN) of the model. + // + // ModelArn is a required field + ModelArn *string `min:"20" type:"string" required:"true"` + + // The name of the model that you want a summary for. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModelSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModelSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ModelSummary) SetCreationTime(v time.Time) *ModelSummary { + s.CreationTime = &v + return s +} + +// SetModelArn sets the ModelArn field's value. +func (s *ModelSummary) SetModelArn(v string) *ModelSummary { + s.ModelArn = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *ModelSummary) SetModelName(v string) *ModelSummary { + s.ModelName = &v + return s +} + +// Defines a list of NestedFilters objects. To satisfy the conditions specified +// in the NestedFilters call, a resource must satisfy the conditions of all +// of the filters. +// +// For example, you could define a NestedFilters using the training job's InputDataConfig +// property to filter on Channel objects. +// +// A NestedFilters object contains multiple filters. For example, to find all +// training jobs whose name contains train and that have cat/data in their S3Uri +// (specified in InputDataConfig), you need to create a NestedFilters object +// that specifies the InputDataConfig property with the following Filter objects: +// +// * '{Name:"InputDataConfig.ChannelName", "Operator":"EQUALS", "Value":"train"}', +// +// * '{Name:"InputDataConfig.DataSource.S3DataSource.S3Uri", "Operator":"CONTAINS", +// "Value":"cat/data"}' +type NestedFilters struct { + _ struct{} `type:"structure"` + + // A list of filters. Each filter acts on a property. Filters must contain at + // least one Filters value. For example, a NestedFilters call might include + // a filter on the PropertyName parameter of the InputDataConfig property: InputDataConfig.DataSource.S3DataSource.S3Uri. + // + // Filters is a required field + Filters []*Filter `min:"1" type:"list" required:"true"` + + // The name of the property to use in the nested filters. The value must match + // a listed property name, such as InputDataConfig. + // + // NestedPropertyName is a required field + NestedPropertyName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s NestedFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NestedFilters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NestedFilters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NestedFilters"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.NestedPropertyName == nil { + invalidParams.Add(request.NewErrParamRequired("NestedPropertyName")) + } + if s.NestedPropertyName != nil && len(*s.NestedPropertyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NestedPropertyName", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *NestedFilters) SetFilters(v []*Filter) *NestedFilters { + s.Filters = v + return s +} + +// SetNestedPropertyName sets the NestedPropertyName field's value. +func (s *NestedFilters) SetNestedPropertyName(v string) *NestedFilters { + s.NestedPropertyName = &v + return s +} + +// Provides a summary of a notebook instance lifecycle configuration. +type NotebookInstanceLifecycleConfigSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that tells when the lifecycle configuration was created. + CreationTime *time.Time `type:"timestamp"` + + // A timestamp that tells when the lifecycle configuration was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the lifecycle configuration. + // + // NotebookInstanceLifecycleConfigArn is a required field + NotebookInstanceLifecycleConfigArn *string `type:"string" required:"true"` + + // The name of the lifecycle configuration. + // + // NotebookInstanceLifecycleConfigName is a required field + NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s NotebookInstanceLifecycleConfigSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotebookInstanceLifecycleConfigSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *NotebookInstanceLifecycleConfigSummary) SetCreationTime(v time.Time) *NotebookInstanceLifecycleConfigSummary { + s.CreationTime = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *NotebookInstanceLifecycleConfigSummary) SetLastModifiedTime(v time.Time) *NotebookInstanceLifecycleConfigSummary { + s.LastModifiedTime = &v + return s +} + +// SetNotebookInstanceLifecycleConfigArn sets the NotebookInstanceLifecycleConfigArn field's value. +func (s *NotebookInstanceLifecycleConfigSummary) SetNotebookInstanceLifecycleConfigArn(v string) *NotebookInstanceLifecycleConfigSummary { + s.NotebookInstanceLifecycleConfigArn = &v + return s +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *NotebookInstanceLifecycleConfigSummary) SetNotebookInstanceLifecycleConfigName(v string) *NotebookInstanceLifecycleConfigSummary { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +// Contains the notebook instance lifecycle configuration script. +// +// Each lifecycle configuration script has a limit of 16384 characters. +// +// The value of the $PATH environment variable that is available to both scripts +// is /sbin:bin:/usr/sbin:/usr/bin. +// +// View CloudWatch Logs for notebook instance lifecycle configurations in log +// group /aws/sagemaker/NotebookInstances in log stream [notebook-instance-name]/[LifecycleConfigHook]. +// +// Lifecycle configuration scripts cannot run for longer than 5 minutes. If +// a script runs for longer than 5 minutes, it fails and the notebook instance +// is not created or started. +// +// For information about notebook instance lifestyle configurations, see Step +// 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). +type NotebookInstanceLifecycleHook struct { + _ struct{} `type:"structure"` + + // A base64-encoded string that contains a shell script for a notebook instance + // lifecycle configuration. + Content *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s NotebookInstanceLifecycleHook) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotebookInstanceLifecycleHook) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NotebookInstanceLifecycleHook) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NotebookInstanceLifecycleHook"} + if s.Content != nil && len(*s.Content) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Content", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContent sets the Content field's value. +func (s *NotebookInstanceLifecycleHook) SetContent(v string) *NotebookInstanceLifecycleHook { + s.Content = &v + return s +} + +// Provides summary information for an Amazon SageMaker notebook instance. +type NotebookInstanceSummary struct { + _ struct{} `type:"structure"` + + // An array of up to three Git repositories associated with the notebook instance. + // These can be either the names of Git repositories stored as resources in + // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository. These repositories are cloned at the same + // level as the default repository of your notebook instance. For more information, + // see Associating Git Repositories with Amazon SageMaker Notebook Instances + // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + AdditionalCodeRepositories []*string `type:"list"` + + // A timestamp that shows when the notebook instance was created. + CreationTime *time.Time `type:"timestamp"` + + // The Git repository associated with the notebook instance as its default code + // repository. This can be either the name of a Git repository stored as a resource + // in your account, or the URL of a Git repository in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository. When you open a notebook instance, it opens + // in the directory that contains this repository. For more information, see + // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + DefaultCodeRepository *string `min:"1" type:"string"` + + // The type of ML compute instance that the notebook instance is running on. + InstanceType *string `type:"string" enum:"InstanceType"` + + // A timestamp that shows when the notebook instance was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the notebook instance. + // + // NotebookInstanceArn is a required field + NotebookInstanceArn *string `type:"string" required:"true"` + + // The name of a notebook instance lifecycle configuration associated with this + // notebook instance. + // + // For information about notebook instance lifestyle configurations, see Step + // 2.1: (Optional) Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). + NotebookInstanceLifecycleConfigName *string `type:"string"` + + // The name of the notebook instance that you want a summary for. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` + + // The status of the notebook instance. + NotebookInstanceStatus *string `type:"string" enum:"NotebookInstanceStatus"` + + // The URL that you use to connect to the Jupyter instance running in your notebook + // instance. + Url *string `type:"string"` +} + +// String returns the string representation +func (s NotebookInstanceSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NotebookInstanceSummary) GoString() string { + return s.String() +} + +// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. +func (s *NotebookInstanceSummary) SetAdditionalCodeRepositories(v []*string) *NotebookInstanceSummary { + s.AdditionalCodeRepositories = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *NotebookInstanceSummary) SetCreationTime(v time.Time) *NotebookInstanceSummary { + s.CreationTime = &v + return s +} + +// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. +func (s *NotebookInstanceSummary) SetDefaultCodeRepository(v string) *NotebookInstanceSummary { + s.DefaultCodeRepository = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *NotebookInstanceSummary) SetInstanceType(v string) *NotebookInstanceSummary { + s.InstanceType = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *NotebookInstanceSummary) SetLastModifiedTime(v time.Time) *NotebookInstanceSummary { + s.LastModifiedTime = &v + return s +} + +// SetNotebookInstanceArn sets the NotebookInstanceArn field's value. +func (s *NotebookInstanceSummary) SetNotebookInstanceArn(v string) *NotebookInstanceSummary { + s.NotebookInstanceArn = &v + return s +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *NotebookInstanceSummary) SetNotebookInstanceLifecycleConfigName(v string) *NotebookInstanceSummary { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *NotebookInstanceSummary) SetNotebookInstanceName(v string) *NotebookInstanceSummary { + s.NotebookInstanceName = &v + return s +} + +// SetNotebookInstanceStatus sets the NotebookInstanceStatus field's value. +func (s *NotebookInstanceSummary) SetNotebookInstanceStatus(v string) *NotebookInstanceSummary { + s.NotebookInstanceStatus = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *NotebookInstanceSummary) SetUrl(v string) *NotebookInstanceSummary { + s.Url = &v + return s +} + +// Specifies the number of training jobs that this hyperparameter tuning job +// launched, categorized by the status of their objective metric. The objective +// metric status shows whether the final objective metric for the training job +// has been evaluated by the tuning job and used in the hyperparameter tuning +// process. +type ObjectiveStatusCounters struct { + _ struct{} `type:"structure"` + + // The number of training jobs whose final objective metric was not evaluated + // and used in the hyperparameter tuning process. This typically occurs when + // the training job failed or did not emit an objective metric. + Failed *int64 `type:"integer"` + + // The number of training jobs that are in progress and pending evaluation of + // their final objective metric. + Pending *int64 `type:"integer"` + + // The number of training jobs whose final objective metric was evaluated by + // the hyperparameter tuning job and used in the hyperparameter tuning process. + Succeeded *int64 `type:"integer"` +} + +// String returns the string representation +func (s ObjectiveStatusCounters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ObjectiveStatusCounters) GoString() string { + return s.String() +} + +// SetFailed sets the Failed field's value. +func (s *ObjectiveStatusCounters) SetFailed(v int64) *ObjectiveStatusCounters { + s.Failed = &v + return s +} + +// SetPending sets the Pending field's value. +func (s *ObjectiveStatusCounters) SetPending(v int64) *ObjectiveStatusCounters { + s.Pending = &v + return s +} + +// SetSucceeded sets the Succeeded field's value. +func (s *ObjectiveStatusCounters) SetSucceeded(v int64) *ObjectiveStatusCounters { + s.Succeeded = &v + return s +} + +// Contains information about the output location for the compiled model and +// the device (target) that the model runs on. +type OutputConfig struct { + _ struct{} `type:"structure"` + + // Identifies the S3 path where you want Amazon SageMaker to store the model + // artifacts. For example, s3://bucket-name/key-name-prefix. + // + // S3OutputLocation is a required field + S3OutputLocation *string `type:"string" required:"true"` + + // Identifies the device that you want to run your model on after it has been + // compiled. For example: ml_c5. + // + // TargetDevice is a required field + TargetDevice *string `type:"string" required:"true" enum:"TargetDevice"` +} + +// String returns the string representation +func (s OutputConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputConfig"} + if s.S3OutputLocation == nil { + invalidParams.Add(request.NewErrParamRequired("S3OutputLocation")) + } + if s.TargetDevice == nil { + invalidParams.Add(request.NewErrParamRequired("TargetDevice")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3OutputLocation sets the S3OutputLocation field's value. +func (s *OutputConfig) SetS3OutputLocation(v string) *OutputConfig { + s.S3OutputLocation = &v + return s +} + +// SetTargetDevice sets the TargetDevice field's value. +func (s *OutputConfig) SetTargetDevice(v string) *OutputConfig { + s.TargetDevice = &v + return s +} + +// Provides information about how to store model training results (model artifacts). +type OutputDataConfig struct { + _ struct{} `type:"structure"` + + // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to + // encrypt the model artifacts at rest using Amazon S3 server-side encryption. + // The KmsKeyId can be any of the following formats: + // + // * // KMS Key ID + // + // "1234abcd-12ab-34cd-56ef-1234567890ab" + // + // * // Amazon Resource Name (ARN) of a KMS Key + // + // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + // + // * // KMS Key Alias + // + // "alias/ExampleAlias" + // + // * // Amazon Resource Name (ARN) of a KMS Key Alias + // + // "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" + // + // If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS + // key for Amazon S3 for your role's account. For more information, see KMS-Managed + // Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // The KMS key policy must grant permission to the IAM role that you specify + // in your CreateTramsformJob request. For more information, see Using Key Policies + // in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) + // in the AWS Key Management Service Developer Guide. + KmsKeyId *string `type:"string"` + + // Identifies the S3 path where you want Amazon SageMaker to store the model + // artifacts. For example, s3://bucket-name/key-name-prefix. + // + // S3OutputPath is a required field + S3OutputPath *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s OutputDataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputDataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputDataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} + if s.S3OutputPath == nil { + invalidParams.Add(request.NewErrParamRequired("S3OutputPath")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *OutputDataConfig) SetKmsKeyId(v string) *OutputDataConfig { + s.KmsKeyId = &v + return s +} + +// SetS3OutputPath sets the S3OutputPath field's value. +func (s *OutputDataConfig) SetS3OutputPath(v string) *OutputDataConfig { + s.S3OutputPath = &v + return s +} + +// Defines the possible values for categorical, continuous, and integer hyperparameters +// to be used by an algorithm. +type ParameterRange struct { + _ struct{} `type:"structure"` + + // A CategoricalParameterRangeSpecification object that defines the possible + // values for a categorical hyperparameter. + CategoricalParameterRangeSpecification *CategoricalParameterRangeSpecification `type:"structure"` + + // A ContinuousParameterRangeSpecification object that defines the possible + // values for a continuous hyperparameter. + ContinuousParameterRangeSpecification *ContinuousParameterRangeSpecification `type:"structure"` + + // A IntegerParameterRangeSpecification object that defines the possible values + // for an integer hyperparameter. + IntegerParameterRangeSpecification *IntegerParameterRangeSpecification `type:"structure"` +} + +// String returns the string representation +func (s ParameterRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterRange) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParameterRange) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParameterRange"} + if s.CategoricalParameterRangeSpecification != nil { + if err := s.CategoricalParameterRangeSpecification.Validate(); err != nil { + invalidParams.AddNested("CategoricalParameterRangeSpecification", err.(request.ErrInvalidParams)) + } + } + if s.ContinuousParameterRangeSpecification != nil { + if err := s.ContinuousParameterRangeSpecification.Validate(); err != nil { + invalidParams.AddNested("ContinuousParameterRangeSpecification", err.(request.ErrInvalidParams)) + } + } + if s.IntegerParameterRangeSpecification != nil { + if err := s.IntegerParameterRangeSpecification.Validate(); err != nil { + invalidParams.AddNested("IntegerParameterRangeSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategoricalParameterRangeSpecification sets the CategoricalParameterRangeSpecification field's value. +func (s *ParameterRange) SetCategoricalParameterRangeSpecification(v *CategoricalParameterRangeSpecification) *ParameterRange { + s.CategoricalParameterRangeSpecification = v + return s +} + +// SetContinuousParameterRangeSpecification sets the ContinuousParameterRangeSpecification field's value. +func (s *ParameterRange) SetContinuousParameterRangeSpecification(v *ContinuousParameterRangeSpecification) *ParameterRange { + s.ContinuousParameterRangeSpecification = v + return s +} + +// SetIntegerParameterRangeSpecification sets the IntegerParameterRangeSpecification field's value. +func (s *ParameterRange) SetIntegerParameterRangeSpecification(v *IntegerParameterRangeSpecification) *ParameterRange { + s.IntegerParameterRangeSpecification = v + return s +} + +// Specifies ranges of integer, continuous, and categorical hyperparameters +// that a hyperparameter tuning job searches. The hyperparameter tuning job +// launches training jobs with hyperparameter values within these ranges to +// find the combination of values that result in the training job with the best +// performance as measured by the objective metric of the hyperparameter tuning +// job. +// +// You can specify a maximum of 20 hyperparameters that a hyperparameter tuning +// job can search over. Every possible value of a categorical parameter range +// counts against this limit. +type ParameterRanges struct { + _ struct{} `type:"structure"` + + // The array of CategoricalParameterRange objects that specify ranges of categorical + // hyperparameters that a hyperparameter tuning job searches. + CategoricalParameterRanges []*CategoricalParameterRange `type:"list"` + + // The array of ContinuousParameterRange objects that specify ranges of continuous + // hyperparameters that a hyperparameter tuning job searches. + ContinuousParameterRanges []*ContinuousParameterRange `type:"list"` + + // The array of IntegerParameterRange objects that specify ranges of integer + // hyperparameters that a hyperparameter tuning job searches. + IntegerParameterRanges []*IntegerParameterRange `type:"list"` +} + +// String returns the string representation +func (s ParameterRanges) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterRanges) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParameterRanges) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParameterRanges"} + if s.CategoricalParameterRanges != nil { + for i, v := range s.CategoricalParameterRanges { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CategoricalParameterRanges", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ContinuousParameterRanges != nil { + for i, v := range s.ContinuousParameterRanges { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContinuousParameterRanges", i), err.(request.ErrInvalidParams)) + } + } + } + if s.IntegerParameterRanges != nil { + for i, v := range s.IntegerParameterRanges { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "IntegerParameterRanges", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCategoricalParameterRanges sets the CategoricalParameterRanges field's value. +func (s *ParameterRanges) SetCategoricalParameterRanges(v []*CategoricalParameterRange) *ParameterRanges { + s.CategoricalParameterRanges = v + return s +} + +// SetContinuousParameterRanges sets the ContinuousParameterRanges field's value. +func (s *ParameterRanges) SetContinuousParameterRanges(v []*ContinuousParameterRange) *ParameterRanges { + s.ContinuousParameterRanges = v + return s +} + +// SetIntegerParameterRanges sets the IntegerParameterRanges field's value. +func (s *ParameterRanges) SetIntegerParameterRanges(v []*IntegerParameterRange) *ParameterRanges { + s.IntegerParameterRanges = v + return s +} + +// A previously completed or stopped hyperparameter tuning job to be used as +// a starting point for a new hyperparameter tuning job. +type ParentHyperParameterTuningJob struct { + _ struct{} `type:"structure"` + + // The name of the hyperparameter tuning job to be used as a starting point + // for a new hyperparameter tuning job. + HyperParameterTuningJobName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ParentHyperParameterTuningJob) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParentHyperParameterTuningJob) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParentHyperParameterTuningJob) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParentHyperParameterTuningJob"} + if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *ParentHyperParameterTuningJob) SetHyperParameterTuningJobName(v string) *ParentHyperParameterTuningJob { + s.HyperParameterTuningJobName = &v + return s +} + +// Identifies a model that you want to host and the resources to deploy for +// hosting it. If you are deploying multiple models, tell Amazon SageMaker how +// to distribute traffic among the models by specifying variant weights. +type ProductionVariant struct { + _ struct{} `type:"structure"` + + // The size of the Elastic Inference (EI) instance to use for the production + // variant. EI instances provide on-demand GPU computing for inference. For + // more information, see Using Elastic Inference in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). + // For more information, see Using Elastic Inference in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). + AcceleratorType *string `type:"string" enum:"ProductionVariantAcceleratorType"` + + // Number of instances to launch initially. + // + // InitialInstanceCount is a required field + InitialInstanceCount *int64 `min:"1" type:"integer" required:"true"` + + // Determines initial traffic distribution among all of the models that you + // specify in the endpoint configuration. The traffic to a production variant + // is determined by the ratio of the VariantWeight to the sum of all VariantWeight + // values across all ProductionVariants. If unspecified, it defaults to 1.0. + InitialVariantWeight *float64 `type:"float"` + + // The ML compute instance type. + // + // InstanceType is a required field + InstanceType *string `type:"string" required:"true" enum:"ProductionVariantInstanceType"` + + // The name of the model that you want to host. This is the name that you specified + // when creating the model. + // + // ModelName is a required field + ModelName *string `type:"string" required:"true"` + + // The name of the production variant. + // + // VariantName is a required field + VariantName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ProductionVariant) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProductionVariant) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProductionVariant) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProductionVariant"} + if s.InitialInstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InitialInstanceCount")) + } + if s.InitialInstanceCount != nil && *s.InitialInstanceCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("InitialInstanceCount", 1)) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.ModelName == nil { + invalidParams.Add(request.NewErrParamRequired("ModelName")) + } + if s.VariantName == nil { + invalidParams.Add(request.NewErrParamRequired("VariantName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorType sets the AcceleratorType field's value. +func (s *ProductionVariant) SetAcceleratorType(v string) *ProductionVariant { + s.AcceleratorType = &v + return s +} + +// SetInitialInstanceCount sets the InitialInstanceCount field's value. +func (s *ProductionVariant) SetInitialInstanceCount(v int64) *ProductionVariant { + s.InitialInstanceCount = &v + return s +} + +// SetInitialVariantWeight sets the InitialVariantWeight field's value. +func (s *ProductionVariant) SetInitialVariantWeight(v float64) *ProductionVariant { + s.InitialVariantWeight = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *ProductionVariant) SetInstanceType(v string) *ProductionVariant { + s.InstanceType = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *ProductionVariant) SetModelName(v string) *ProductionVariant { + s.ModelName = &v + return s +} + +// SetVariantName sets the VariantName field's value. +func (s *ProductionVariant) SetVariantName(v string) *ProductionVariant { + s.VariantName = &v + return s +} + +// Describes weight and capacities for a production variant associated with +// an endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities +// API and the endpoint status is Updating, you get different desired and current +// values. +type ProductionVariantSummary struct { + _ struct{} `type:"structure"` + + // The number of instances associated with the variant. + CurrentInstanceCount *int64 `min:"1" type:"integer"` + + // The weight associated with the variant. + CurrentWeight *float64 `type:"float"` + + // An array of DeployedImage objects that specify the Amazon EC2 Container Registry + // paths of the inference images deployed on instances of this ProductionVariant. + DeployedImages []*DeployedImage `type:"list"` + + // The number of instances requested in the UpdateEndpointWeightsAndCapacities + // request. + DesiredInstanceCount *int64 `min:"1" type:"integer"` + + // The requested weight, as specified in the UpdateEndpointWeightsAndCapacities + // request. + DesiredWeight *float64 `type:"float"` + + // The name of the variant. + // + // VariantName is a required field + VariantName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ProductionVariantSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProductionVariantSummary) GoString() string { + return s.String() +} + +// SetCurrentInstanceCount sets the CurrentInstanceCount field's value. +func (s *ProductionVariantSummary) SetCurrentInstanceCount(v int64) *ProductionVariantSummary { + s.CurrentInstanceCount = &v + return s +} + +// SetCurrentWeight sets the CurrentWeight field's value. +func (s *ProductionVariantSummary) SetCurrentWeight(v float64) *ProductionVariantSummary { + s.CurrentWeight = &v + return s +} + +// SetDeployedImages sets the DeployedImages field's value. +func (s *ProductionVariantSummary) SetDeployedImages(v []*DeployedImage) *ProductionVariantSummary { + s.DeployedImages = v + return s +} + +// SetDesiredInstanceCount sets the DesiredInstanceCount field's value. +func (s *ProductionVariantSummary) SetDesiredInstanceCount(v int64) *ProductionVariantSummary { + s.DesiredInstanceCount = &v + return s +} + +// SetDesiredWeight sets the DesiredWeight field's value. +func (s *ProductionVariantSummary) SetDesiredWeight(v float64) *ProductionVariantSummary { + s.DesiredWeight = &v + return s +} + +// SetVariantName sets the VariantName field's value. +func (s *ProductionVariantSummary) SetVariantName(v string) *ProductionVariantSummary { + s.VariantName = &v + return s +} + +// A type of SuggestionQuery. A suggestion query for retrieving property names +// that match the specified hint. +type PropertyNameQuery struct { + _ struct{} `type:"structure"` + + // Text that is part of a property's name. The property names of hyperparameter, + // metric, and tag key names that begin with the specified text in the PropertyNameHint. + // + // PropertyNameHint is a required field + PropertyNameHint *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PropertyNameQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PropertyNameQuery) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PropertyNameQuery) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PropertyNameQuery"} + if s.PropertyNameHint == nil { + invalidParams.Add(request.NewErrParamRequired("PropertyNameHint")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPropertyNameHint sets the PropertyNameHint field's value. +func (s *PropertyNameQuery) SetPropertyNameHint(v string) *PropertyNameQuery { + s.PropertyNameHint = &v + return s +} + +// A property name returned from a GetSearchSuggestions call that specifies +// a value in the PropertyNameQuery field. +type PropertyNameSuggestion struct { + _ struct{} `type:"structure"` + + // A suggested property name based on what you entered in the search textbox + // in the Amazon SageMaker console. + PropertyName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PropertyNameSuggestion) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PropertyNameSuggestion) GoString() string { + return s.String() +} + +// SetPropertyName sets the PropertyName field's value. +func (s *PropertyNameSuggestion) SetPropertyName(v string) *PropertyNameSuggestion { + s.PropertyName = &v + return s +} + +// Defines the amount of money paid to an Amazon Mechanical Turk worker for +// each task performed. +// +// Use one of the following prices for bounding box tasks. Prices are in US +// dollars. +// +// * 0.036 +// +// * 0.048 +// +// * 0.060 +// +// * 0.072 +// +// * 0.120 +// +// * 0.240 +// +// * 0.360 +// +// * 0.480 +// +// * 0.600 +// +// * 0.720 +// +// * 0.840 +// +// * 0.960 +// +// * 1.080 +// +// * 1.200 +// +// Use one of the following prices for image classification, text classification, +// and custom tasks. Prices are in US dollars. +// +// * 0.012 +// +// * 0.024 +// +// * 0.036 +// +// * 0.048 +// +// * 0.060 +// +// * 0.072 +// +// * 0.120 +// +// * 0.240 +// +// * 0.360 +// +// * 0.480 +// +// * 0.600 +// +// * 0.720 +// +// * 0.840 +// +// * 0.960 +// +// * 1.080 +// +// * 1.200 +// +// Use one of the following prices for semantic segmentation tasks. Prices are +// in US dollars. +// +// * 0.840 +// +// * 0.960 +// +// * 1.080 +// +// * 1.200 +type PublicWorkforceTaskPrice struct { + _ struct{} `type:"structure"` + + // Defines the amount of money paid to a worker in United States dollars. + AmountInUsd *USD `type:"structure"` +} + +// String returns the string representation +func (s PublicWorkforceTaskPrice) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicWorkforceTaskPrice) GoString() string { + return s.String() +} + +// SetAmountInUsd sets the AmountInUsd field's value. +func (s *PublicWorkforceTaskPrice) SetAmountInUsd(v *USD) *PublicWorkforceTaskPrice { + s.AmountInUsd = v + return s +} + +type RenderUiTemplateInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that has access to the S3 objects that are + // used by the template. + // + // RoleArn is a required field + RoleArn *string `min:"20" type:"string" required:"true"` + + // A RenderableTask object containing a representative task to render. + // + // Task is a required field + Task *RenderableTask `type:"structure" required:"true"` + + // A Template object containing the worker UI template to render. + // + // UiTemplate is a required field + UiTemplate *UiTemplate `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RenderUiTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RenderUiTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RenderUiTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RenderUiTemplateInput"} + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.Task == nil { + invalidParams.Add(request.NewErrParamRequired("Task")) + } + if s.UiTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("UiTemplate")) + } + if s.Task != nil { + if err := s.Task.Validate(); err != nil { + invalidParams.AddNested("Task", err.(request.ErrInvalidParams)) + } + } + if s.UiTemplate != nil { + if err := s.UiTemplate.Validate(); err != nil { + invalidParams.AddNested("UiTemplate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRoleArn sets the RoleArn field's value. +func (s *RenderUiTemplateInput) SetRoleArn(v string) *RenderUiTemplateInput { + s.RoleArn = &v + return s +} + +// SetTask sets the Task field's value. +func (s *RenderUiTemplateInput) SetTask(v *RenderableTask) *RenderUiTemplateInput { + s.Task = v + return s +} + +// SetUiTemplate sets the UiTemplate field's value. +func (s *RenderUiTemplateInput) SetUiTemplate(v *UiTemplate) *RenderUiTemplateInput { + s.UiTemplate = v + return s +} + +type RenderUiTemplateOutput struct { + _ struct{} `type:"structure"` + + // A list of one or more RenderingError objects if any were encountered while + // rendering the template. If there were no errors, the list is empty. + // + // Errors is a required field + Errors []*RenderingError `type:"list" required:"true"` + + // A Liquid template that renders the HTML for the worker UI. + // + // RenderedContent is a required field + RenderedContent *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RenderUiTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RenderUiTemplateOutput) GoString() string { + return s.String() +} + +// SetErrors sets the Errors field's value. +func (s *RenderUiTemplateOutput) SetErrors(v []*RenderingError) *RenderUiTemplateOutput { + s.Errors = v + return s +} + +// SetRenderedContent sets the RenderedContent field's value. +func (s *RenderUiTemplateOutput) SetRenderedContent(v string) *RenderUiTemplateOutput { + s.RenderedContent = &v + return s +} + +// Contains input values for a task. +type RenderableTask struct { + _ struct{} `type:"structure"` + + // A JSON object that contains values for the variables defined in the template. + // It is made available to the template under the substitution variable task.input. + // For example, if you define a variable task.input.text in your template, you + // can supply the variable in the JSON object as "text": "sample text". + // + // Input is a required field + Input *string `min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s RenderableTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RenderableTask) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RenderableTask) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RenderableTask"} + if s.Input == nil { + invalidParams.Add(request.NewErrParamRequired("Input")) + } + if s.Input != nil && len(*s.Input) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Input", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInput sets the Input field's value. +func (s *RenderableTask) SetInput(v string) *RenderableTask { + s.Input = &v + return s +} + +// A description of an error that occurred while rendering the template. +type RenderingError struct { + _ struct{} `type:"structure"` + + // A unique identifier for a specific class of errors. + // + // Code is a required field + Code *string `type:"string" required:"true"` + + // A human-readable message describing the error. + // + // Message is a required field + Message *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RenderingError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RenderingError) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *RenderingError) SetCode(v string) *RenderingError { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *RenderingError) SetMessage(v string) *RenderingError { + s.Message = &v + return s +} + +// Describes the resources, including ML compute instances and ML storage volumes, +// to use for model training. +type ResourceConfig struct { + _ struct{} `type:"structure"` + + // The number of ML compute instances to use. For distributed training, provide + // a value greater than 1. + // + // InstanceCount is a required field + InstanceCount *int64 `min:"1" type:"integer" required:"true"` + + // The ML compute instance type. + // + // InstanceType is a required field + InstanceType *string `type:"string" required:"true" enum:"TrainingInstanceType"` + + // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to + // encrypt data on the storage volume attached to the ML compute instance(s) + // that run the training job. The VolumeKmsKeyId can be any of the following + // formats: + // + // * // KMS Key ID + // + // "1234abcd-12ab-34cd-56ef-1234567890ab" + // + // * // Amazon Resource Name (ARN) of a KMS Key + // + // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + VolumeKmsKeyId *string `type:"string"` + + // The size of the ML storage volume that you want to provision. + // + // ML storage volumes store model artifacts and incremental states. Training + // algorithms might also use the ML storage volume for scratch space. If you + // want to store the training data in the ML storage volume, choose File as + // the TrainingInputMode in the algorithm specification. + // + // You must specify sufficient ML storage for your scenario. + // + // Amazon SageMaker supports only the General Purpose SSD (gp2) ML storage volume + // type. + // + // VolumeSizeInGB is a required field + VolumeSizeInGB *int64 `min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s ResourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceConfig"} + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.InstanceCount != nil && *s.InstanceCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.VolumeSizeInGB == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeSizeInGB")) + } + if s.VolumeSizeInGB != nil && *s.VolumeSizeInGB < 1 { + invalidParams.Add(request.NewErrParamMinValue("VolumeSizeInGB", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceCount sets the InstanceCount field's value. +func (s *ResourceConfig) SetInstanceCount(v int64) *ResourceConfig { + s.InstanceCount = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *ResourceConfig) SetInstanceType(v string) *ResourceConfig { + s.InstanceType = &v + return s +} + +// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. +func (s *ResourceConfig) SetVolumeKmsKeyId(v string) *ResourceConfig { + s.VolumeKmsKeyId = &v + return s +} + +// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. +func (s *ResourceConfig) SetVolumeSizeInGB(v int64) *ResourceConfig { + s.VolumeSizeInGB = &v + return s +} + +// Specifies the maximum number of training jobs and parallel training jobs +// that a hyperparameter tuning job can launch. +type ResourceLimits struct { + _ struct{} `type:"structure"` + + // The maximum number of training jobs that a hyperparameter tuning job can + // launch. + // + // MaxNumberOfTrainingJobs is a required field + MaxNumberOfTrainingJobs *int64 `min:"1" type:"integer" required:"true"` + + // The maximum number of concurrent training jobs that a hyperparameter tuning + // job can launch. + // + // MaxParallelTrainingJobs is a required field + MaxParallelTrainingJobs *int64 `min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s ResourceLimits) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceLimits) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceLimits) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceLimits"} + if s.MaxNumberOfTrainingJobs == nil { + invalidParams.Add(request.NewErrParamRequired("MaxNumberOfTrainingJobs")) + } + if s.MaxNumberOfTrainingJobs != nil && *s.MaxNumberOfTrainingJobs < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxNumberOfTrainingJobs", 1)) + } + if s.MaxParallelTrainingJobs == nil { + invalidParams.Add(request.NewErrParamRequired("MaxParallelTrainingJobs")) + } + if s.MaxParallelTrainingJobs != nil && *s.MaxParallelTrainingJobs < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxParallelTrainingJobs", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxNumberOfTrainingJobs sets the MaxNumberOfTrainingJobs field's value. +func (s *ResourceLimits) SetMaxNumberOfTrainingJobs(v int64) *ResourceLimits { + s.MaxNumberOfTrainingJobs = &v + return s +} + +// SetMaxParallelTrainingJobs sets the MaxParallelTrainingJobs field's value. +func (s *ResourceLimits) SetMaxParallelTrainingJobs(v int64) *ResourceLimits { + s.MaxParallelTrainingJobs = &v + return s +} + +// Describes the S3 data source. +type S3DataSource struct { + _ struct{} `type:"structure"` + + // A list of one or more attribute names to use that are found in a specified + // augmented manifest file. + AttributeNames []*string `type:"list"` + + // If you want Amazon SageMaker to replicate the entire dataset on each ML compute + // instance that is launched for model training, specify FullyReplicated. + // + // If you want Amazon SageMaker to replicate a subset of data on each ML compute + // instance that is launched for model training, specify ShardedByS3Key. If + // there are n ML compute instances launched for a training job, each instance + // gets approximately 1/n of the number of S3 objects. In this case, model training + // on each machine uses only the subset of training data. + // + // Don't choose more ML compute instances for training than available S3 objects. + // If you do, some nodes won't get any data and you will pay for nodes that + // aren't getting any training data. This applies in both File and Pipe modes. + // Keep this in mind when developing algorithms. + // + // In distributed training, where you use multiple ML compute EC2 instances, + // you might choose ShardedByS3Key. If the algorithm requires copying training + // data to the ML storage volume (when TrainingInputMode is set to File), this + // copies 1/n of the number of objects. + S3DataDistributionType *string `type:"string" enum:"S3DataDistribution"` + + // If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker + // uses all objects that match the specified key name prefix for model training. + // + // If you choose ManifestFile, S3Uri identifies an object that is a manifest + // file containing a list of object keys that you want Amazon SageMaker to use + // for model training. + // + // If you choose AugmentedManifestFile, S3Uri identifies an object that is an + // augmented manifest file in JSON lines format. This file contains the data + // you want to use for model training. AugmentedManifestFile can only be used + // if the Channel's input mode is Pipe. + // + // S3DataType is a required field + S3DataType *string `type:"string" required:"true" enum:"S3DataType"` + + // Depending on the value specified for the S3DataType, identifies either a + // key name prefix or a manifest. For example: + // + // * A key name prefix might look like this: s3://bucketname/exampleprefix. + // + // + // * A manifest might look like this: s3://bucketname/example.manifest + // + // The manifest is an S3 object which is a JSON file with the following format: + // + // + // [ + // + // {"prefix": "s3://customer_bucket/some/prefix/"}, + // + // "relative/path/to/custdata-1", + // + // "relative/path/custdata-2", + // + // ... + // + // ] + // + // The preceding JSON matches the following s3Uris: + // + // s3://customer_bucket/some/prefix/relative/path/to/custdata-1 + // + // s3://customer_bucket/some/prefix/relative/path/custdata-2 + // + // ... + // + // The complete set of s3uris in this manifest is the input data for the channel + // for this datasource. The object that each s3uris points to must be readable + // by the IAM role that Amazon SageMaker uses to perform tasks on your behalf. + // + // S3Uri is a required field + S3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s S3DataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3DataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3DataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3DataSource"} + if s.S3DataType == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataType")) + } + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeNames sets the AttributeNames field's value. +func (s *S3DataSource) SetAttributeNames(v []*string) *S3DataSource { + s.AttributeNames = v + return s +} + +// SetS3DataDistributionType sets the S3DataDistributionType field's value. +func (s *S3DataSource) SetS3DataDistributionType(v string) *S3DataSource { + s.S3DataDistributionType = &v + return s +} + +// SetS3DataType sets the S3DataType field's value. +func (s *S3DataSource) SetS3DataType(v string) *S3DataSource { + s.S3DataType = &v + return s +} + +// SetS3Uri sets the S3Uri field's value. +func (s *S3DataSource) SetS3Uri(v string) *S3DataSource { + s.S3Uri = &v + return s +} + +// A multi-expression that searches for the specified resource or resources +// in a search. All resource objects that satisfy the expression's condition +// are included in the search results. You must specify at least one subexpression, +// filter, or nested filter. A SearchExpression can contain up to twenty elements. +// +// A SearchExpression contains the following components: +// +// * A list of Filter objects. Each filter defines a simple Boolean expression +// comprised of a resource property name, Boolean operator, and value. +// +// * A list of NestedFilter objects. Each nested filter defines a list of +// Boolean expressions using a list of resource properties. A nested filter +// is satisfied if a single object in the list satisfies all Boolean expressions. +// +// * A list of SearchExpression objects. A search expression object can be +// nested in a list of search expression objects. +// +// * A Boolean operator: And or Or. +type SearchExpression struct { + _ struct{} `type:"structure"` + + // A list of filter objects. + Filters []*Filter `min:"1" type:"list"` + + // A list of nested filter objects. + NestedFilters []*NestedFilters `min:"1" type:"list"` + + // A Boolean operator used to evaluate the search expression. If you want every + // conditional statement in all lists to be satisfied for the entire search + // expression to be true, specify And. If only a single conditional statement + // needs to be true for the entire search expression to be true, specify Or. + // The default value is And. + Operator *string `type:"string" enum:"BooleanOperator"` + + // A list of search expression objects. + SubExpressions []*SearchExpression `min:"1" type:"list"` +} + +// String returns the string representation +func (s SearchExpression) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchExpression) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SearchExpression) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchExpression"} + if s.Filters != nil && len(s.Filters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Filters", 1)) + } + if s.NestedFilters != nil && len(s.NestedFilters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NestedFilters", 1)) + } + if s.SubExpressions != nil && len(s.SubExpressions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubExpressions", 1)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + if s.NestedFilters != nil { + for i, v := range s.NestedFilters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NestedFilters", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SubExpressions != nil { + for i, v := range s.SubExpressions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SubExpressions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *SearchExpression) SetFilters(v []*Filter) *SearchExpression { + s.Filters = v + return s +} + +// SetNestedFilters sets the NestedFilters field's value. +func (s *SearchExpression) SetNestedFilters(v []*NestedFilters) *SearchExpression { + s.NestedFilters = v + return s +} + +// SetOperator sets the Operator field's value. +func (s *SearchExpression) SetOperator(v string) *SearchExpression { + s.Operator = &v + return s +} + +// SetSubExpressions sets the SubExpressions field's value. +func (s *SearchExpression) SetSubExpressions(v []*SearchExpression) *SearchExpression { + s.SubExpressions = v + return s +} + +type SearchInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return in a SearchResponse. + MaxResults *int64 `min:"1" type:"integer"` + + // If more than MaxResults resource objects match the specified SearchExpression, + // the SearchResponse includes a NextToken. The NextToken can be passed to the + // next SearchRequest to continue retrieving results for the specified SearchExpression + // and Sort parameters. + NextToken *string `type:"string"` + + // The name of the Amazon SageMaker resource to search for. Currently, the only + // valid Resource value is TrainingJob. + // + // Resource is a required field + Resource *string `type:"string" required:"true" enum:"ResourceType"` + + // A Boolean conditional statement. Resource objects must satisfy this condition + // to be included in search results. You must provide at least one subexpression, + // filter, or nested filter. The maximum number of recursive SubExpressions, + // NestedFilters, and Filters that can be included in a SearchExpression object + // is 50. + SearchExpression *SearchExpression `type:"structure"` + + // The name of the resource property used to sort the SearchResults. The default + // is LastModifiedTime. + SortBy *string `min:"1" type:"string"` + + // How SearchResults are ordered. Valid values are Ascending or Descending. + // The default is Descending. + SortOrder *string `type:"string" enum:"SearchSortOrder"` +} + +// String returns the string representation +func (s SearchInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SearchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Resource == nil { + invalidParams.Add(request.NewErrParamRequired("Resource")) + } + if s.SortBy != nil && len(*s.SortBy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SortBy", 1)) + } + if s.SearchExpression != nil { + if err := s.SearchExpression.Validate(); err != nil { + invalidParams.AddNested("SearchExpression", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *SearchInput) SetMaxResults(v int64) *SearchInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SearchInput) SetNextToken(v string) *SearchInput { + s.NextToken = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *SearchInput) SetResource(v string) *SearchInput { + s.Resource = &v + return s +} + +// SetSearchExpression sets the SearchExpression field's value. +func (s *SearchInput) SetSearchExpression(v *SearchExpression) *SearchInput { + s.SearchExpression = v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *SearchInput) SetSortBy(v string) *SearchInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SearchInput) SetSortOrder(v string) *SearchInput { + s.SortOrder = &v + return s +} + +type SearchOutput struct { + _ struct{} `type:"structure"` + + // If the result of the previous Search request was truncated, the response + // includes a NextToken. To retrieve the next set of results, use the token + // in the next request. + NextToken *string `type:"string"` + + // A list of SearchResult objects. + Results []*SearchRecord `type:"list"` +} + +// String returns the string representation +func (s SearchOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *SearchOutput) SetNextToken(v string) *SearchOutput { + s.NextToken = &v + return s +} + +// SetResults sets the Results field's value. +func (s *SearchOutput) SetResults(v []*SearchRecord) *SearchOutput { + s.Results = v + return s +} + +// An individual search result record that contains a single resource object. +type SearchRecord struct { + _ struct{} `type:"structure"` + + // A TrainingJob object that is returned as part of a Search request. + TrainingJob *TrainingJob `type:"structure"` +} + +// String returns the string representation +func (s SearchRecord) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchRecord) GoString() string { + return s.String() +} + +// SetTrainingJob sets the TrainingJob field's value. +func (s *SearchRecord) SetTrainingJob(v *TrainingJob) *SearchRecord { + s.TrainingJob = v + return s +} + +// An array element of DescribeTrainingJobResponse$SecondaryStatusTransitions. +// It provides additional details about a status that the training job has transitioned +// through. A training job can be in one of several states, for example, starting, +// downloading, training, or uploading. Within each state, there are a number +// of intermediate states. For example, within the starting state, Amazon SageMaker +// could be starting the training job or launching the ML instances. These transitional +// states are referred to as the job's secondary status. +type SecondaryStatusTransition struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the training job transitioned out of this secondary + // status state into another secondary status state or when the training job + // has ended. + EndTime *time.Time `type:"timestamp"` + + // A timestamp that shows when the training job transitioned to the current + // secondary status state. + // + // StartTime is a required field + StartTime *time.Time `type:"timestamp" required:"true"` + + // Contains a secondary status information from a training job. + // + // Status might be one of the following secondary statuses: + // + // InProgressStarting - Starting the training job. + // + // Downloading - An optional stage for algorithms that support File training + // input mode. It indicates that data is being downloaded to the ML storage + // volumes. + // + // Training - Training is in progress. + // + // Uploading - Training is complete and the model artifacts are being uploaded + // to the S3 location. + // + // CompletedCompleted - The training job has completed. + // + // FailedFailed - The training job has failed. The reason for the failure is + // returned in the FailureReason field of DescribeTrainingJobResponse. + // + // StoppedMaxRuntimeExceeded - The job stopped because it exceeded the maximum + // allowed runtime. + // + // Stopped - The training job has stopped. + // + // StoppingStopping - Stopping the training job. + // + // We no longer support the following secondary statuses: + // + // * LaunchingMLInstances + // + // * PreparingTrainingStack + // + // * DownloadingTrainingImage + // + // Status is a required field + Status *string `type:"string" required:"true" enum:"SecondaryStatus"` + + // A detailed description of the progress within a secondary status. + // + // Amazon SageMaker provides secondary statuses and status messages that apply + // to each of them: + // + // StartingStarting the training job. + // + // Launching requested ML instances. + // + // Insufficient capacity error from EC2 while launching instances, retrying! + // + // Launched instance was unhealthy, replacing it! + // + // Preparing the instances for training. + // + // TrainingDownloading the training image. + // + // Training image download completed. Training in progress. + // + // Status messages are subject to change. Therefore, we recommend not including + // them in code that programmatically initiates actions. For examples, don't + // use status messages in if statements. + // + // To have an overview of your training job's progress, view TrainingJobStatus + // and SecondaryStatus in DescribeTrainingJobResponse, and StatusMessage together. + // For example, at the start of a training job, you might see the following: + // + // * TrainingJobStatus - InProgress + // + // * SecondaryStatus - Training + // + // * StatusMessage - Downloading the training image + StatusMessage *string `type:"string"` +} + +// String returns the string representation +func (s SecondaryStatusTransition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecondaryStatusTransition) GoString() string { + return s.String() +} + +// SetEndTime sets the EndTime field's value. +func (s *SecondaryStatusTransition) SetEndTime(v time.Time) *SecondaryStatusTransition { + s.EndTime = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *SecondaryStatusTransition) SetStartTime(v time.Time) *SecondaryStatusTransition { + s.StartTime = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *SecondaryStatusTransition) SetStatus(v string) *SecondaryStatusTransition { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *SecondaryStatusTransition) SetStatusMessage(v string) *SecondaryStatusTransition { + s.StatusMessage = &v + return s +} + +// A configuration for a shuffle option for input data in a channel. If you +// use S3Prefix for S3DataType, the results of the S3 key prefix matches are +// shuffled. If you use ManifestFile, the order of the S3 object references +// in the ManifestFile is shuffled. If you use AugmentedManifestFile, the order +// of the JSON lines in the AugmentedManifestFile is shuffled. The shuffling +// order is determined using the Seed value. +// +// For Pipe input mode, shuffling is done at the start of every epoch. With +// large datasets, this ensures that the order of the training data is different +// for each epoch, and it helps reduce bias and possible overfitting. In a multi-node +// training job when ShuffleConfig is combined with S3DataDistributionType of +// ShardedByS3Key, the data is shuffled across nodes so that the content sent +// to a particular node on the first epoch might be sent to a different node +// on the second epoch. +type ShuffleConfig struct { + _ struct{} `type:"structure"` + + // Determines the shuffling order in ShuffleConfig value. + // + // Seed is a required field + Seed *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s ShuffleConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShuffleConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ShuffleConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShuffleConfig"} + if s.Seed == nil { + invalidParams.Add(request.NewErrParamRequired("Seed")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSeed sets the Seed field's value. +func (s *ShuffleConfig) SetSeed(v int64) *ShuffleConfig { + s.Seed = &v + return s +} + +// Specifies an algorithm that was used to create the model package. The algorithm +// must be either an algorithm resource in your Amazon SageMaker account or +// an algorithm in AWS Marketplace that you are subscribed to. +type SourceAlgorithm struct { + _ struct{} `type:"structure"` + + // The name of an algorithm that was used to create the model package. The algorithm + // must be either an algorithm resource in your Amazon SageMaker account or + // an algorithm in AWS Marketplace that you are subscribed to. + // + // AlgorithmName is a required field + AlgorithmName *string `min:"1" type:"string" required:"true"` + + // The Amazon S3 path where the model artifacts, which result from model training, + // are stored. This path must point to a single gzip compressed tar archive + // (.tar.gz suffix). + ModelDataUrl *string `type:"string"` +} + +// String returns the string representation +func (s SourceAlgorithm) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceAlgorithm) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SourceAlgorithm) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SourceAlgorithm"} + if s.AlgorithmName == nil { + invalidParams.Add(request.NewErrParamRequired("AlgorithmName")) + } + if s.AlgorithmName != nil && len(*s.AlgorithmName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AlgorithmName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAlgorithmName sets the AlgorithmName field's value. +func (s *SourceAlgorithm) SetAlgorithmName(v string) *SourceAlgorithm { + s.AlgorithmName = &v + return s +} + +// SetModelDataUrl sets the ModelDataUrl field's value. +func (s *SourceAlgorithm) SetModelDataUrl(v string) *SourceAlgorithm { + s.ModelDataUrl = &v + return s +} + +// A list of algorithms that were used to create a model package. +type SourceAlgorithmSpecification struct { + _ struct{} `type:"structure"` + + // A list of the algorithms that were used to create a model package. + // + // SourceAlgorithms is a required field + SourceAlgorithms []*SourceAlgorithm `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s SourceAlgorithmSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceAlgorithmSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SourceAlgorithmSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SourceAlgorithmSpecification"} + if s.SourceAlgorithms == nil { + invalidParams.Add(request.NewErrParamRequired("SourceAlgorithms")) + } + if s.SourceAlgorithms != nil && len(s.SourceAlgorithms) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceAlgorithms", 1)) + } + if s.SourceAlgorithms != nil { + for i, v := range s.SourceAlgorithms { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SourceAlgorithms", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceAlgorithms sets the SourceAlgorithms field's value. +func (s *SourceAlgorithmSpecification) SetSourceAlgorithms(v []*SourceAlgorithm) *SourceAlgorithmSpecification { + s.SourceAlgorithms = v + return s +} + +type StartNotebookInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the notebook instance to start. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartNotebookInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartNotebookInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartNotebookInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartNotebookInstanceInput"} + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *StartNotebookInstanceInput) SetNotebookInstanceName(v string) *StartNotebookInstanceInput { + s.NotebookInstanceName = &v + return s +} + +type StartNotebookInstanceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartNotebookInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartNotebookInstanceOutput) GoString() string { + return s.String() +} + +type StopCompilationJobInput struct { + _ struct{} `type:"structure"` + + // The name of the model compilation job to stop. + // + // CompilationJobName is a required field + CompilationJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopCompilationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopCompilationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopCompilationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopCompilationJobInput"} + if s.CompilationJobName == nil { + invalidParams.Add(request.NewErrParamRequired("CompilationJobName")) + } + if s.CompilationJobName != nil && len(*s.CompilationJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CompilationJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompilationJobName sets the CompilationJobName field's value. +func (s *StopCompilationJobInput) SetCompilationJobName(v string) *StopCompilationJobInput { + s.CompilationJobName = &v + return s +} + +type StopCompilationJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopCompilationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopCompilationJobOutput) GoString() string { + return s.String() +} + +type StopHyperParameterTuningJobInput struct { + _ struct{} `type:"structure"` + + // The name of the tuning job to stop. + // + // HyperParameterTuningJobName is a required field + HyperParameterTuningJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopHyperParameterTuningJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopHyperParameterTuningJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopHyperParameterTuningJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopHyperParameterTuningJobInput"} + if s.HyperParameterTuningJobName == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameterTuningJobName")) + } + if s.HyperParameterTuningJobName != nil && len(*s.HyperParameterTuningJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HyperParameterTuningJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameterTuningJobName sets the HyperParameterTuningJobName field's value. +func (s *StopHyperParameterTuningJobInput) SetHyperParameterTuningJobName(v string) *StopHyperParameterTuningJobInput { + s.HyperParameterTuningJobName = &v + return s +} + +type StopHyperParameterTuningJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopHyperParameterTuningJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopHyperParameterTuningJobOutput) GoString() string { + return s.String() +} + +type StopLabelingJobInput struct { + _ struct{} `type:"structure"` + + // The name of the labeling job to stop. + // + // LabelingJobName is a required field + LabelingJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopLabelingJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopLabelingJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopLabelingJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopLabelingJobInput"} + if s.LabelingJobName == nil { + invalidParams.Add(request.NewErrParamRequired("LabelingJobName")) + } + if s.LabelingJobName != nil && len(*s.LabelingJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LabelingJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLabelingJobName sets the LabelingJobName field's value. +func (s *StopLabelingJobInput) SetLabelingJobName(v string) *StopLabelingJobInput { + s.LabelingJobName = &v + return s +} + +type StopLabelingJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopLabelingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopLabelingJobOutput) GoString() string { + return s.String() +} + +type StopNotebookInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the notebook instance to terminate. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StopNotebookInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopNotebookInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopNotebookInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopNotebookInstanceInput"} + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *StopNotebookInstanceInput) SetNotebookInstanceName(v string) *StopNotebookInstanceInput { + s.NotebookInstanceName = &v + return s +} + +type StopNotebookInstanceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopNotebookInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopNotebookInstanceOutput) GoString() string { + return s.String() +} + +type StopTrainingJobInput struct { + _ struct{} `type:"structure"` + + // The name of the training job to stop. + // + // TrainingJobName is a required field + TrainingJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopTrainingJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopTrainingJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopTrainingJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopTrainingJobInput"} + if s.TrainingJobName == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingJobName")) + } + if s.TrainingJobName != nil && len(*s.TrainingJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TrainingJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *StopTrainingJobInput) SetTrainingJobName(v string) *StopTrainingJobInput { + s.TrainingJobName = &v + return s +} + +type StopTrainingJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopTrainingJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopTrainingJobOutput) GoString() string { + return s.String() +} + +type StopTransformJobInput struct { + _ struct{} `type:"structure"` + + // The name of the transform job to stop. + // + // TransformJobName is a required field + TransformJobName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopTransformJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopTransformJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopTransformJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopTransformJobInput"} + if s.TransformJobName == nil { + invalidParams.Add(request.NewErrParamRequired("TransformJobName")) + } + if s.TransformJobName != nil && len(*s.TransformJobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TransformJobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTransformJobName sets the TransformJobName field's value. +func (s *StopTransformJobInput) SetTransformJobName(v string) *StopTransformJobInput { + s.TransformJobName = &v + return s +} + +type StopTransformJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopTransformJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopTransformJobOutput) GoString() string { + return s.String() +} + +// Specifies how long model training can run. When model training reaches the +// limit, Amazon SageMaker ends the training job. Use this API to cap model +// training cost. +// +// To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which +// delays job termination for120 seconds. Algorithms might use this 120-second +// window to save the model artifacts, so the results of training is not lost. +// +// Training algorithms provided by Amazon SageMaker automatically saves the +// intermediate results of a model training job (it is best effort case, as +// model might not be ready to save as some stages, for example training just +// started). This intermediate data is a valid model artifact. You can use it +// to create a model (CreateModel). +type StoppingCondition struct { + _ struct{} `type:"structure"` + + // The maximum length of time, in seconds, that the training job can run. If + // model training does not complete during this time, Amazon SageMaker ends + // the job. If value is not specified, default value is 1 day. Maximum value + // is 28 days. + MaxRuntimeInSeconds *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s StoppingCondition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StoppingCondition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StoppingCondition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StoppingCondition"} + if s.MaxRuntimeInSeconds != nil && *s.MaxRuntimeInSeconds < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxRuntimeInSeconds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxRuntimeInSeconds sets the MaxRuntimeInSeconds field's value. +func (s *StoppingCondition) SetMaxRuntimeInSeconds(v int64) *StoppingCondition { + s.MaxRuntimeInSeconds = &v + return s +} + +// Describes a work team of a vendor that does the a labelling job. +type SubscribedWorkteam struct { + _ struct{} `type:"structure"` + + ListingId *string `type:"string"` + + // The description of the vendor from the Amazon Marketplace. + MarketplaceDescription *string `min:"1" type:"string"` + + // The title of the service provided by the vendor in the Amazon Marketplace. + MarketplaceTitle *string `min:"1" type:"string"` + + // The name of the vendor in the Amazon Marketplace. + SellerName *string `type:"string"` + + // The Amazon Resource Name (ARN) of the vendor that you have subscribed. + // + // WorkteamArn is a required field + WorkteamArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s SubscribedWorkteam) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubscribedWorkteam) GoString() string { + return s.String() +} + +// SetListingId sets the ListingId field's value. +func (s *SubscribedWorkteam) SetListingId(v string) *SubscribedWorkteam { + s.ListingId = &v + return s +} + +// SetMarketplaceDescription sets the MarketplaceDescription field's value. +func (s *SubscribedWorkteam) SetMarketplaceDescription(v string) *SubscribedWorkteam { + s.MarketplaceDescription = &v + return s +} + +// SetMarketplaceTitle sets the MarketplaceTitle field's value. +func (s *SubscribedWorkteam) SetMarketplaceTitle(v string) *SubscribedWorkteam { + s.MarketplaceTitle = &v + return s +} + +// SetSellerName sets the SellerName field's value. +func (s *SubscribedWorkteam) SetSellerName(v string) *SubscribedWorkteam { + s.SellerName = &v + return s +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *SubscribedWorkteam) SetWorkteamArn(v string) *SubscribedWorkteam { + s.WorkteamArn = &v + return s +} + +// Limits the property names that are included in the response. +type SuggestionQuery struct { + _ struct{} `type:"structure"` + + // A type of SuggestionQuery. Defines a property name hint. Only property names + // that match the specified hint are included in the response. + PropertyNameQuery *PropertyNameQuery `type:"structure"` +} + +// String returns the string representation +func (s SuggestionQuery) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuggestionQuery) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SuggestionQuery) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SuggestionQuery"} + if s.PropertyNameQuery != nil { + if err := s.PropertyNameQuery.Validate(); err != nil { + invalidParams.AddNested("PropertyNameQuery", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPropertyNameQuery sets the PropertyNameQuery field's value. +func (s *SuggestionQuery) SetPropertyNameQuery(v *PropertyNameQuery) *SuggestionQuery { + s.PropertyNameQuery = v + return s +} + +// Describes a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The tag key. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The tag value. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// Contains information about a training job. +type TrainingJob struct { + _ struct{} `type:"structure"` + + // Information about the algorithm used for training, and algorithm metadata. + AlgorithmSpecification *AlgorithmSpecification `type:"structure"` + + // A timestamp that indicates when the training job was created. + CreationTime *time.Time `type:"timestamp"` + + // If the TrainingJob was created with network isolation, the value is set to + // true. If network isolation is enabled, nodes can't communicate beyond the + // VPC they run in. + EnableNetworkIsolation *bool `type:"boolean"` + + // If the training job failed, the reason it failed. + FailureReason *string `type:"string"` + + // A list of final metric values that are set when the training job completes. + // Used only if the training job was configured to use metrics. + FinalMetricDataList []*MetricData `type:"list"` + + // Algorithm-specific parameters. + HyperParameters map[string]*string `type:"map"` + + // An array of Channel objects that describes each data input channel. + InputDataConfig []*Channel `min:"1" type:"list"` + + // The Amazon Resource Name (ARN) of the labeling job. + LabelingJobArn *string `type:"string"` + + // A timestamp that indicates when the status of the training job was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // Information about the Amazon S3 location that is configured for storing model + // artifacts. + ModelArtifacts *ModelArtifacts `type:"structure"` + + // The S3 path where model artifacts that you configured when creating the job + // are stored. Amazon SageMaker creates subfolders for model artifacts. + OutputDataConfig *OutputDataConfig `type:"structure"` + + // Resources, including ML compute instances and ML storage volumes, that are + // configured for model training. + ResourceConfig *ResourceConfig `type:"structure"` + + // The AWS Identity and Access Management (IAM) role configured for the training + // job. + RoleArn *string `min:"20" type:"string"` + + // Provides detailed information about the state of the training job. For detailed + // information about the secondary status of the training job, see StatusMessage + // under SecondaryStatusTransition. + // + // Amazon SageMaker provides primary statuses and secondary statuses that apply + // to each of them: + // + // InProgressStarting - Starting the training job. + // + // Downloading - An optional stage for algorithms that support File training + // input mode. It indicates that data is being downloaded to the ML storage + // volumes. + // + // Training - Training is in progress. + // + // Uploading - Training is complete and the model artifacts are being uploaded + // to the S3 location. + // + // CompletedCompleted - The training job has completed. + // + // FailedFailed - The training job has failed. The reason for the failure is + // returned in the FailureReason field of DescribeTrainingJobResponse. + // + // StoppedMaxRuntimeExceeded - The job stopped because it exceeded the maximum + // allowed runtime. + // + // Stopped - The training job has stopped. + // + // StoppingStopping - Stopping the training job. + // + // Valid values for SecondaryStatus are subject to change. + // + // We no longer support the following secondary statuses: + // + // * LaunchingMLInstances + // + // * PreparingTrainingStack + // + // * DownloadingTrainingImage + SecondaryStatus *string `type:"string" enum:"SecondaryStatus"` + + // A history of all of the secondary statuses that the training job has transitioned + // through. + SecondaryStatusTransitions []*SecondaryStatusTransition `type:"list"` + + // The condition under which to stop the training job. + StoppingCondition *StoppingCondition `type:"structure"` + + // An array of key-value pairs. For more information, see Using Cost Allocation + // Tags (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) + // in the AWS Billing and Cost Management User Guide. + Tags []*Tag `type:"list"` + + // Indicates the time when the training job ends on training instances. You + // are billed for the time interval between the value of TrainingStartTime and + // this time. For successful jobs and stopped jobs, this is the time after model + // artifacts are uploaded. For failed jobs, this is the time when Amazon SageMaker + // detects a job failure. + TrainingEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the training job. + TrainingJobArn *string `type:"string"` + + // The name of the training job. + TrainingJobName *string `min:"1" type:"string"` + + // The status of the training job. + // + // Training job statuses are: + // + // * InProgress - The training is in progress. + // + // * Completed - The training job has completed. + // + // * Failed - The training job has failed. To see the reason for the failure, + // see the FailureReason field in the response to a DescribeTrainingJobResponse + // call. + // + // * Stopping - The training job is stopping. + // + // * Stopped - The training job has stopped. + // + // For more detailed information, see SecondaryStatus. + TrainingJobStatus *string `type:"string" enum:"TrainingJobStatus"` + + // Indicates the time when the training job starts on training instances. You + // are billed for the time interval between this time and the value of TrainingEndTime. + // The start time in CloudWatch Logs might be later than this time. The difference + // is due to the time it takes to download the training data and to the size + // of the training container. + TrainingStartTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the associated hyperparameter tuning job + // if the training job was launched by a hyperparameter tuning job. + TuningJobArn *string `type:"string"` + + // A VpcConfig object that specifies the VPC that this training job has access + // to. For more information, see Protect Training Jobs by Using an Amazon Virtual + // Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). + VpcConfig *VpcConfig `type:"structure"` +} + +// String returns the string representation +func (s TrainingJob) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrainingJob) GoString() string { + return s.String() +} + +// SetAlgorithmSpecification sets the AlgorithmSpecification field's value. +func (s *TrainingJob) SetAlgorithmSpecification(v *AlgorithmSpecification) *TrainingJob { + s.AlgorithmSpecification = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TrainingJob) SetCreationTime(v time.Time) *TrainingJob { + s.CreationTime = &v + return s +} + +// SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value. +func (s *TrainingJob) SetEnableNetworkIsolation(v bool) *TrainingJob { + s.EnableNetworkIsolation = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *TrainingJob) SetFailureReason(v string) *TrainingJob { + s.FailureReason = &v + return s +} + +// SetFinalMetricDataList sets the FinalMetricDataList field's value. +func (s *TrainingJob) SetFinalMetricDataList(v []*MetricData) *TrainingJob { + s.FinalMetricDataList = v + return s +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *TrainingJob) SetHyperParameters(v map[string]*string) *TrainingJob { + s.HyperParameters = v + return s +} + +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *TrainingJob) SetInputDataConfig(v []*Channel) *TrainingJob { + s.InputDataConfig = v + return s +} + +// SetLabelingJobArn sets the LabelingJobArn field's value. +func (s *TrainingJob) SetLabelingJobArn(v string) *TrainingJob { + s.LabelingJobArn = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *TrainingJob) SetLastModifiedTime(v time.Time) *TrainingJob { + s.LastModifiedTime = &v + return s +} + +// SetModelArtifacts sets the ModelArtifacts field's value. +func (s *TrainingJob) SetModelArtifacts(v *ModelArtifacts) *TrainingJob { + s.ModelArtifacts = v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *TrainingJob) SetOutputDataConfig(v *OutputDataConfig) *TrainingJob { + s.OutputDataConfig = v + return s +} + +// SetResourceConfig sets the ResourceConfig field's value. +func (s *TrainingJob) SetResourceConfig(v *ResourceConfig) *TrainingJob { + s.ResourceConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *TrainingJob) SetRoleArn(v string) *TrainingJob { + s.RoleArn = &v + return s +} + +// SetSecondaryStatus sets the SecondaryStatus field's value. +func (s *TrainingJob) SetSecondaryStatus(v string) *TrainingJob { + s.SecondaryStatus = &v + return s +} + +// SetSecondaryStatusTransitions sets the SecondaryStatusTransitions field's value. +func (s *TrainingJob) SetSecondaryStatusTransitions(v []*SecondaryStatusTransition) *TrainingJob { + s.SecondaryStatusTransitions = v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *TrainingJob) SetStoppingCondition(v *StoppingCondition) *TrainingJob { + s.StoppingCondition = v + return s +} + +// SetTags sets the Tags field's value. +func (s *TrainingJob) SetTags(v []*Tag) *TrainingJob { + s.Tags = v + return s +} + +// SetTrainingEndTime sets the TrainingEndTime field's value. +func (s *TrainingJob) SetTrainingEndTime(v time.Time) *TrainingJob { + s.TrainingEndTime = &v + return s +} + +// SetTrainingJobArn sets the TrainingJobArn field's value. +func (s *TrainingJob) SetTrainingJobArn(v string) *TrainingJob { + s.TrainingJobArn = &v + return s +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *TrainingJob) SetTrainingJobName(v string) *TrainingJob { + s.TrainingJobName = &v + return s +} + +// SetTrainingJobStatus sets the TrainingJobStatus field's value. +func (s *TrainingJob) SetTrainingJobStatus(v string) *TrainingJob { + s.TrainingJobStatus = &v + return s +} + +// SetTrainingStartTime sets the TrainingStartTime field's value. +func (s *TrainingJob) SetTrainingStartTime(v time.Time) *TrainingJob { + s.TrainingStartTime = &v + return s +} + +// SetTuningJobArn sets the TuningJobArn field's value. +func (s *TrainingJob) SetTuningJobArn(v string) *TrainingJob { + s.TuningJobArn = &v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *TrainingJob) SetVpcConfig(v *VpcConfig) *TrainingJob { + s.VpcConfig = v + return s +} + +// Defines the input needed to run a training job using the algorithm. +type TrainingJobDefinition struct { + _ struct{} `type:"structure"` + + // The hyperparameters used for the training job. + HyperParameters map[string]*string `type:"map"` + + // An array of Channel objects, each of which specifies an input source. + // + // InputDataConfig is a required field + InputDataConfig []*Channel `min:"1" type:"list" required:"true"` + + // the path to the S3 bucket where you want to store model artifacts. Amazon + // SageMaker creates subfolders for the artifacts. + // + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` + + // The resources, including the ML compute instances and ML storage volumes, + // to use for model training. + // + // ResourceConfig is a required field + ResourceConfig *ResourceConfig `type:"structure" required:"true"` + + // Sets a duration for training. Use this parameter to cap model training costs. + // + // To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which + // delays job termination for 120 seconds. Algorithms might use this 120-second + // window to save the model artifacts. + // + // StoppingCondition is a required field + StoppingCondition *StoppingCondition `type:"structure" required:"true"` + + // The input mode used by the algorithm for the training job. For the input + // modes that Amazon SageMaker algorithms support, see Algorithms (http://docs.aws.amazon.com/sagemaker/latest/dg/algos.html). + // + // If an algorithm supports the File input mode, Amazon SageMaker downloads + // the training data from S3 to the provisioned ML storage Volume, and mounts + // the directory to docker volume for training container. If an algorithm supports + // the Pipe input mode, Amazon SageMaker streams data directly from S3 to the + // container. + // + // TrainingInputMode is a required field + TrainingInputMode *string `type:"string" required:"true" enum:"TrainingInputMode"` +} + +// String returns the string representation +func (s TrainingJobDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrainingJobDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TrainingJobDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TrainingJobDefinition"} + if s.InputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) + } + if s.InputDataConfig != nil && len(s.InputDataConfig) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputDataConfig", 1)) + } + if s.OutputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) + } + if s.ResourceConfig == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceConfig")) + } + if s.StoppingCondition == nil { + invalidParams.Add(request.NewErrParamRequired("StoppingCondition")) + } + if s.TrainingInputMode == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingInputMode")) + } + if s.InputDataConfig != nil { + for i, v := range s.InputDataConfig { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputDataConfig", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OutputDataConfig != nil { + if err := s.OutputDataConfig.Validate(); err != nil { + invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) + } + } + if s.ResourceConfig != nil { + if err := s.ResourceConfig.Validate(); err != nil { + invalidParams.AddNested("ResourceConfig", err.(request.ErrInvalidParams)) + } + } + if s.StoppingCondition != nil { + if err := s.StoppingCondition.Validate(); err != nil { + invalidParams.AddNested("StoppingCondition", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *TrainingJobDefinition) SetHyperParameters(v map[string]*string) *TrainingJobDefinition { + s.HyperParameters = v + return s +} + +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *TrainingJobDefinition) SetInputDataConfig(v []*Channel) *TrainingJobDefinition { + s.InputDataConfig = v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *TrainingJobDefinition) SetOutputDataConfig(v *OutputDataConfig) *TrainingJobDefinition { + s.OutputDataConfig = v + return s +} + +// SetResourceConfig sets the ResourceConfig field's value. +func (s *TrainingJobDefinition) SetResourceConfig(v *ResourceConfig) *TrainingJobDefinition { + s.ResourceConfig = v + return s +} + +// SetStoppingCondition sets the StoppingCondition field's value. +func (s *TrainingJobDefinition) SetStoppingCondition(v *StoppingCondition) *TrainingJobDefinition { + s.StoppingCondition = v + return s +} + +// SetTrainingInputMode sets the TrainingInputMode field's value. +func (s *TrainingJobDefinition) SetTrainingInputMode(v string) *TrainingJobDefinition { + s.TrainingInputMode = &v + return s +} + +// The numbers of training jobs launched by a hyperparameter tuning job, categorized +// by status. +type TrainingJobStatusCounters struct { + _ struct{} `type:"structure"` + + // The number of completed training jobs launched by the hyperparameter tuning + // job. + Completed *int64 `type:"integer"` + + // The number of in-progress training jobs launched by a hyperparameter tuning + // job. + InProgress *int64 `type:"integer"` + + // The number of training jobs that failed and can't be retried. A failed training + // job can't be retried if it failed because a client error occurred. + NonRetryableError *int64 `type:"integer"` + + // The number of training jobs that failed, but can be retried. A failed training + // job can be retried only if it failed because an internal service error occurred. + RetryableError *int64 `type:"integer"` + + // The number of training jobs launched by a hyperparameter tuning job that + // were manually stopped. + Stopped *int64 `type:"integer"` +} + +// String returns the string representation +func (s TrainingJobStatusCounters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrainingJobStatusCounters) GoString() string { + return s.String() +} + +// SetCompleted sets the Completed field's value. +func (s *TrainingJobStatusCounters) SetCompleted(v int64) *TrainingJobStatusCounters { + s.Completed = &v + return s +} + +// SetInProgress sets the InProgress field's value. +func (s *TrainingJobStatusCounters) SetInProgress(v int64) *TrainingJobStatusCounters { + s.InProgress = &v + return s +} + +// SetNonRetryableError sets the NonRetryableError field's value. +func (s *TrainingJobStatusCounters) SetNonRetryableError(v int64) *TrainingJobStatusCounters { + s.NonRetryableError = &v + return s +} + +// SetRetryableError sets the RetryableError field's value. +func (s *TrainingJobStatusCounters) SetRetryableError(v int64) *TrainingJobStatusCounters { + s.RetryableError = &v + return s +} + +// SetStopped sets the Stopped field's value. +func (s *TrainingJobStatusCounters) SetStopped(v int64) *TrainingJobStatusCounters { + s.Stopped = &v + return s +} + +// Provides summary information about a training job. +type TrainingJobSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the training job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // Timestamp when the training job was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // A timestamp that shows when the training job ended. This field is set only + // if the training job has one of the terminal statuses (Completed, Failed, + // or Stopped). + TrainingEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the training job. + // + // TrainingJobArn is a required field + TrainingJobArn *string `type:"string" required:"true"` + + // The name of the training job that you want a summary for. + // + // TrainingJobName is a required field + TrainingJobName *string `min:"1" type:"string" required:"true"` + + // The status of the training job. + // + // TrainingJobStatus is a required field + TrainingJobStatus *string `type:"string" required:"true" enum:"TrainingJobStatus"` +} + +// String returns the string representation +func (s TrainingJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrainingJobSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TrainingJobSummary) SetCreationTime(v time.Time) *TrainingJobSummary { + s.CreationTime = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *TrainingJobSummary) SetLastModifiedTime(v time.Time) *TrainingJobSummary { + s.LastModifiedTime = &v + return s +} + +// SetTrainingEndTime sets the TrainingEndTime field's value. +func (s *TrainingJobSummary) SetTrainingEndTime(v time.Time) *TrainingJobSummary { + s.TrainingEndTime = &v + return s +} + +// SetTrainingJobArn sets the TrainingJobArn field's value. +func (s *TrainingJobSummary) SetTrainingJobArn(v string) *TrainingJobSummary { + s.TrainingJobArn = &v + return s +} + +// SetTrainingJobName sets the TrainingJobName field's value. +func (s *TrainingJobSummary) SetTrainingJobName(v string) *TrainingJobSummary { + s.TrainingJobName = &v + return s +} + +// SetTrainingJobStatus sets the TrainingJobStatus field's value. +func (s *TrainingJobSummary) SetTrainingJobStatus(v string) *TrainingJobSummary { + s.TrainingJobStatus = &v + return s +} + +// Defines how the algorithm is used for a training job. +type TrainingSpecification struct { + _ struct{} `type:"structure"` + + // A list of MetricDefinition objects, which are used for parsing metrics generated + // by the algorithm. + MetricDefinitions []*MetricDefinition `type:"list"` + + // A list of the HyperParameterSpecification objects, that define the supported + // hyperparameters. This is required if the algorithm supports automatic model + // tuning.> + SupportedHyperParameters []*HyperParameterSpecification `type:"list"` + + // A list of the instance types that this algorithm can use for training. + // + // SupportedTrainingInstanceTypes is a required field + SupportedTrainingInstanceTypes []*string `type:"list" required:"true"` + + // A list of the metrics that the algorithm emits that can be used as the objective + // metric in a hyperparameter tuning job. + SupportedTuningJobObjectiveMetrics []*HyperParameterTuningJobObjective `type:"list"` + + // Indicates whether the algorithm supports distributed training. If set to + // false, buyers can’t request more than one instance during training. + SupportsDistributedTraining *bool `type:"boolean"` + + // A list of ChannelSpecification objects, which specify the input sources to + // be used by the algorithm. + // + // TrainingChannels is a required field + TrainingChannels []*ChannelSpecification `min:"1" type:"list" required:"true"` + + // The Amazon ECR registry path of the Docker image that contains the training + // algorithm. + // + // TrainingImage is a required field + TrainingImage *string `type:"string" required:"true"` + + // An MD5 hash of the training algorithm that identifies the Docker image used + // for training. + TrainingImageDigest *string `type:"string"` +} + +// String returns the string representation +func (s TrainingSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrainingSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TrainingSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TrainingSpecification"} + if s.SupportedTrainingInstanceTypes == nil { + invalidParams.Add(request.NewErrParamRequired("SupportedTrainingInstanceTypes")) + } + if s.TrainingChannels == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingChannels")) + } + if s.TrainingChannels != nil && len(s.TrainingChannels) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TrainingChannels", 1)) + } + if s.TrainingImage == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingImage")) + } + if s.MetricDefinitions != nil { + for i, v := range s.MetricDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SupportedHyperParameters != nil { + for i, v := range s.SupportedHyperParameters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SupportedHyperParameters", i), err.(request.ErrInvalidParams)) + } + } + } + if s.SupportedTuningJobObjectiveMetrics != nil { + for i, v := range s.SupportedTuningJobObjectiveMetrics { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SupportedTuningJobObjectiveMetrics", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TrainingChannels != nil { + for i, v := range s.TrainingChannels { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TrainingChannels", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMetricDefinitions sets the MetricDefinitions field's value. +func (s *TrainingSpecification) SetMetricDefinitions(v []*MetricDefinition) *TrainingSpecification { + s.MetricDefinitions = v + return s +} + +// SetSupportedHyperParameters sets the SupportedHyperParameters field's value. +func (s *TrainingSpecification) SetSupportedHyperParameters(v []*HyperParameterSpecification) *TrainingSpecification { + s.SupportedHyperParameters = v + return s +} + +// SetSupportedTrainingInstanceTypes sets the SupportedTrainingInstanceTypes field's value. +func (s *TrainingSpecification) SetSupportedTrainingInstanceTypes(v []*string) *TrainingSpecification { + s.SupportedTrainingInstanceTypes = v + return s +} + +// SetSupportedTuningJobObjectiveMetrics sets the SupportedTuningJobObjectiveMetrics field's value. +func (s *TrainingSpecification) SetSupportedTuningJobObjectiveMetrics(v []*HyperParameterTuningJobObjective) *TrainingSpecification { + s.SupportedTuningJobObjectiveMetrics = v + return s +} + +// SetSupportsDistributedTraining sets the SupportsDistributedTraining field's value. +func (s *TrainingSpecification) SetSupportsDistributedTraining(v bool) *TrainingSpecification { + s.SupportsDistributedTraining = &v + return s +} + +// SetTrainingChannels sets the TrainingChannels field's value. +func (s *TrainingSpecification) SetTrainingChannels(v []*ChannelSpecification) *TrainingSpecification { + s.TrainingChannels = v + return s +} + +// SetTrainingImage sets the TrainingImage field's value. +func (s *TrainingSpecification) SetTrainingImage(v string) *TrainingSpecification { + s.TrainingImage = &v + return s +} + +// SetTrainingImageDigest sets the TrainingImageDigest field's value. +func (s *TrainingSpecification) SetTrainingImageDigest(v string) *TrainingSpecification { + s.TrainingImageDigest = &v + return s +} + +// Describes the location of the channel data. +type TransformDataSource struct { + _ struct{} `type:"structure"` + + // The S3 location of the data source that is associated with a channel. + // + // S3DataSource is a required field + S3DataSource *TransformS3DataSource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s TransformDataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformDataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransformDataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransformDataSource"} + if s.S3DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataSource")) + } + if s.S3DataSource != nil { + if err := s.S3DataSource.Validate(); err != nil { + invalidParams.AddNested("S3DataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3DataSource sets the S3DataSource field's value. +func (s *TransformDataSource) SetS3DataSource(v *TransformS3DataSource) *TransformDataSource { + s.S3DataSource = v + return s +} + +// Describes the input source of a transform job and the way the transform job +// consumes it. +type TransformInput struct { + _ struct{} `type:"structure"` + + // If your transform data is compressed, specify the compression type. Amazon + // SageMaker automatically decompresses the data for the transform job accordingly. + // The default value is None. + CompressionType *string `type:"string" enum:"CompressionType"` + + // The multipurpose internet mail extension (MIME) type of the data. Amazon + // SageMaker uses the MIME type with each http call to transfer data to the + // transform job. + ContentType *string `type:"string"` + + // Describes the location of the channel data, which is, the S3 location of + // the input data that the model can consume. + // + // DataSource is a required field + DataSource *TransformDataSource `type:"structure" required:"true"` + + // The method to use to split the transform job's data into smaller batches. + // If you don't want to split the data, specify None. If you want to split records + // on a newline character boundary, specify Line. To split records according + // to the RecordIO format, specify RecordIO. The default value is None. + // + // Amazon SageMaker sends the maximum number of records per batch in each request + // up to the MaxPayloadInMB limit. For more information, see RecordIO data format + // (http://mxnet.io/architecture/note_data_loading.html#data-format). + // + // For information about the RecordIO format, see Data Format (http://mxnet.io/architecture/note_data_loading.html#data-format). + SplitType *string `type:"string" enum:"SplitType"` +} + +// String returns the string representation +func (s TransformInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransformInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransformInput"} + if s.DataSource == nil { + invalidParams.Add(request.NewErrParamRequired("DataSource")) + } + if s.DataSource != nil { + if err := s.DataSource.Validate(); err != nil { + invalidParams.AddNested("DataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompressionType sets the CompressionType field's value. +func (s *TransformInput) SetCompressionType(v string) *TransformInput { + s.CompressionType = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *TransformInput) SetContentType(v string) *TransformInput { + s.ContentType = &v + return s +} + +// SetDataSource sets the DataSource field's value. +func (s *TransformInput) SetDataSource(v *TransformDataSource) *TransformInput { + s.DataSource = v + return s +} + +// SetSplitType sets the SplitType field's value. +func (s *TransformInput) SetSplitType(v string) *TransformInput { + s.SplitType = &v + return s +} + +// Defines the input needed to run a transform job using the inference specification +// specified in the algorithm. +type TransformJobDefinition struct { + _ struct{} `type:"structure"` + + // A string that determines the number of records included in a single mini-batch. + // + // SingleRecord means only one record is used per mini-batch. MultiRecord means + // a mini-batch is set to contain as many records that can fit within the MaxPayloadInMB + // limit. + BatchStrategy *string `type:"string" enum:"BatchStrategy"` + + // The environment variables to set in the Docker container. We support up to + // 16 key and values entries in the map. + Environment map[string]*string `type:"map"` + + // The maximum number of parallel requests that can be sent to each instance + // in a transform job. The default value is 1. + MaxConcurrentTransforms *int64 `type:"integer"` + + // The maximum payload size allowed, in MB. A payload is the data portion of + // a record (without metadata). + MaxPayloadInMB *int64 `type:"integer"` + + // A description of the input source and the way the transform job consumes + // it. + // + // TransformInput is a required field + TransformInput *TransformInput `type:"structure" required:"true"` + + // Identifies the Amazon S3 location where you want Amazon SageMaker to save + // the results from the transform job. + // + // TransformOutput is a required field + TransformOutput *TransformOutput `type:"structure" required:"true"` + + // Identifies the ML compute instances for the transform job. + // + // TransformResources is a required field + TransformResources *TransformResources `type:"structure" required:"true"` +} + +// String returns the string representation +func (s TransformJobDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformJobDefinition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransformJobDefinition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransformJobDefinition"} + if s.TransformInput == nil { + invalidParams.Add(request.NewErrParamRequired("TransformInput")) + } + if s.TransformOutput == nil { + invalidParams.Add(request.NewErrParamRequired("TransformOutput")) + } + if s.TransformResources == nil { + invalidParams.Add(request.NewErrParamRequired("TransformResources")) + } + if s.TransformInput != nil { + if err := s.TransformInput.Validate(); err != nil { + invalidParams.AddNested("TransformInput", err.(request.ErrInvalidParams)) + } + } + if s.TransformOutput != nil { + if err := s.TransformOutput.Validate(); err != nil { + invalidParams.AddNested("TransformOutput", err.(request.ErrInvalidParams)) + } + } + if s.TransformResources != nil { + if err := s.TransformResources.Validate(); err != nil { + invalidParams.AddNested("TransformResources", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBatchStrategy sets the BatchStrategy field's value. +func (s *TransformJobDefinition) SetBatchStrategy(v string) *TransformJobDefinition { + s.BatchStrategy = &v + return s +} + +// SetEnvironment sets the Environment field's value. +func (s *TransformJobDefinition) SetEnvironment(v map[string]*string) *TransformJobDefinition { + s.Environment = v + return s +} + +// SetMaxConcurrentTransforms sets the MaxConcurrentTransforms field's value. +func (s *TransformJobDefinition) SetMaxConcurrentTransforms(v int64) *TransformJobDefinition { + s.MaxConcurrentTransforms = &v + return s +} + +// SetMaxPayloadInMB sets the MaxPayloadInMB field's value. +func (s *TransformJobDefinition) SetMaxPayloadInMB(v int64) *TransformJobDefinition { + s.MaxPayloadInMB = &v + return s +} + +// SetTransformInput sets the TransformInput field's value. +func (s *TransformJobDefinition) SetTransformInput(v *TransformInput) *TransformJobDefinition { + s.TransformInput = v + return s +} + +// SetTransformOutput sets the TransformOutput field's value. +func (s *TransformJobDefinition) SetTransformOutput(v *TransformOutput) *TransformJobDefinition { + s.TransformOutput = v + return s +} + +// SetTransformResources sets the TransformResources field's value. +func (s *TransformJobDefinition) SetTransformResources(v *TransformResources) *TransformJobDefinition { + s.TransformResources = v + return s +} + +// Provides a summary of a transform job. Multiple TransformJobSummary objects +// are returned as a list after in response to a ListTransformJobs call. +type TransformJobSummary struct { + _ struct{} `type:"structure"` + + // A timestamp that shows when the transform Job was created. + // + // CreationTime is a required field + CreationTime *time.Time `type:"timestamp" required:"true"` + + // If the transform job failed, the reason it failed. + FailureReason *string `type:"string"` + + // Indicates when the transform job was last modified. + LastModifiedTime *time.Time `type:"timestamp"` + + // Indicates when the transform job ends on compute instances. For successful + // jobs and stopped jobs, this is the exact time recorded after the results + // are uploaded. For failed jobs, this is when Amazon SageMaker detected that + // the job failed. + TransformEndTime *time.Time `type:"timestamp"` + + // The Amazon Resource Name (ARN) of the transform job. + // + // TransformJobArn is a required field + TransformJobArn *string `type:"string" required:"true"` + + // The name of the transform job. + // + // TransformJobName is a required field + TransformJobName *string `min:"1" type:"string" required:"true"` + + // The status of the transform job. + // + // TransformJobStatus is a required field + TransformJobStatus *string `type:"string" required:"true" enum:"TransformJobStatus"` +} + +// String returns the string representation +func (s TransformJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformJobSummary) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransformJobSummary) SetCreationTime(v time.Time) *TransformJobSummary { + s.CreationTime = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *TransformJobSummary) SetFailureReason(v string) *TransformJobSummary { + s.FailureReason = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *TransformJobSummary) SetLastModifiedTime(v time.Time) *TransformJobSummary { + s.LastModifiedTime = &v + return s +} + +// SetTransformEndTime sets the TransformEndTime field's value. +func (s *TransformJobSummary) SetTransformEndTime(v time.Time) *TransformJobSummary { + s.TransformEndTime = &v + return s +} + +// SetTransformJobArn sets the TransformJobArn field's value. +func (s *TransformJobSummary) SetTransformJobArn(v string) *TransformJobSummary { + s.TransformJobArn = &v + return s +} + +// SetTransformJobName sets the TransformJobName field's value. +func (s *TransformJobSummary) SetTransformJobName(v string) *TransformJobSummary { + s.TransformJobName = &v + return s +} + +// SetTransformJobStatus sets the TransformJobStatus field's value. +func (s *TransformJobSummary) SetTransformJobStatus(v string) *TransformJobSummary { + s.TransformJobStatus = &v + return s +} + +// Describes the results of a transform job output. +type TransformOutput struct { + _ struct{} `type:"structure"` + + // The MIME type used to specify the output data. Amazon SageMaker uses the + // MIME type with each http call to transfer data from the transform job. + Accept *string `type:"string"` + + // Defines how to assemble the results of the transform job as a single S3 object. + // Choose a format that is most convenient to you. To concatenate the results + // in binary format, specify None. To add a newline character at the end of + // every transformed record, specify Line. + AssembleWith *string `type:"string" enum:"AssemblyType"` + + // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to + // encrypt the model artifacts at rest using Amazon S3 server-side encryption. + // The KmsKeyId can be any of the following formats: + // + // * // KMS Key ID + // + // "1234abcd-12ab-34cd-56ef-1234567890ab" + // + // * // Amazon Resource Name (ARN) of a KMS Key + // + // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + // + // * // KMS Key Alias + // + // "alias/ExampleAlias" + // + // * // Amazon Resource Name (ARN) of a KMS Key Alias + // + // "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias" + // + // If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS + // key for Amazon S3 for your role's account. For more information, see KMS-Managed + // Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) + // in the Amazon Simple Storage Service Developer Guide. + // + // The KMS key policy must grant permission to the IAM role that you specify + // in your CreateTramsformJob request. For more information, see Using Key Policies + // in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) + // in the AWS Key Management Service Developer Guide. + KmsKeyId *string `type:"string"` + + // The Amazon S3 path where you want Amazon SageMaker to store the results of + // the transform job. For example, s3://bucket-name/key-name-prefix. + // + // For every S3 object used as input for the transform job, the transformed + // data is stored in a corresponding subfolder in the location under the output + // prefix. For example, for the input data s3://bucket-name/input-name-prefix/dataset01/data.csv + // the transformed data is stored at s3://bucket-name/key-name-prefix/dataset01/. + // This is based on the original name, as a series of .part files (.part0001, + // part0002, etc.). + // + // S3OutputPath is a required field + S3OutputPath *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TransformOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformOutput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransformOutput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransformOutput"} + if s.S3OutputPath == nil { + invalidParams.Add(request.NewErrParamRequired("S3OutputPath")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccept sets the Accept field's value. +func (s *TransformOutput) SetAccept(v string) *TransformOutput { + s.Accept = &v + return s +} + +// SetAssembleWith sets the AssembleWith field's value. +func (s *TransformOutput) SetAssembleWith(v string) *TransformOutput { + s.AssembleWith = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *TransformOutput) SetKmsKeyId(v string) *TransformOutput { + s.KmsKeyId = &v + return s +} + +// SetS3OutputPath sets the S3OutputPath field's value. +func (s *TransformOutput) SetS3OutputPath(v string) *TransformOutput { + s.S3OutputPath = &v + return s +} + +// Describes the resources, including ML instance types and ML instance count, +// to use for transform job. +type TransformResources struct { + _ struct{} `type:"structure"` + + // The number of ML compute instances to use in the transform job. For distributed + // transform, provide a value greater than 1. The default value is 1. + // + // InstanceCount is a required field + InstanceCount *int64 `min:"1" type:"integer" required:"true"` + + // The ML compute instance type for the transform job. For using built-in algorithms + // to transform moderately sized datasets, ml.m4.xlarge or ml.m5.large should + // suffice. There is no default value for InstanceType. + // + // InstanceType is a required field + InstanceType *string `type:"string" required:"true" enum:"TransformInstanceType"` + + // The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to + // encrypt data on the storage volume attached to the ML compute instance(s) + // that run the batch transform job. The VolumeKmsKeyId can be any of the following + // formats: + // + // * // KMS Key ID + // + // "1234abcd-12ab-34cd-56ef-1234567890ab" + // + // * // Amazon Resource Name (ARN) of a KMS Key + // + // "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + VolumeKmsKeyId *string `type:"string"` +} + +// String returns the string representation +func (s TransformResources) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformResources) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransformResources) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransformResources"} + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.InstanceCount != nil && *s.InstanceCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("InstanceCount", 1)) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceCount sets the InstanceCount field's value. +func (s *TransformResources) SetInstanceCount(v int64) *TransformResources { + s.InstanceCount = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *TransformResources) SetInstanceType(v string) *TransformResources { + s.InstanceType = &v + return s +} + +// SetVolumeKmsKeyId sets the VolumeKmsKeyId field's value. +func (s *TransformResources) SetVolumeKmsKeyId(v string) *TransformResources { + s.VolumeKmsKeyId = &v + return s +} + +// Describes the S3 data source. +type TransformS3DataSource struct { + _ struct{} `type:"structure"` + + // If you choose S3Prefix, S3Uri identifies a key name prefix. Amazon SageMaker + // uses all objects with the specified key name prefix for batch transform. + // + // If you choose ManifestFile, S3Uri identifies an object that is a manifest + // file containing a list of object keys that you want Amazon SageMaker to use + // for batch transform. + // + // S3DataType is a required field + S3DataType *string `type:"string" required:"true" enum:"S3DataType"` + + // Depending on the value specified for the S3DataType, identifies either a + // key name prefix or a manifest. For example: + // + // * A key name prefix might look like this: s3://bucketname/exampleprefix. + // + // + // * A manifest might look like this: s3://bucketname/example.manifest + // + // The manifest is an S3 object which is a JSON file with the following format: + // + // + // [ + // + // {"prefix": "s3://customer_bucket/some/prefix/"}, + // + // "relative/path/to/custdata-1", + // + // "relative/path/custdata-2", + // + // ... + // + // ] + // + // The preceding JSON matches the following S3Uris: + // + // s3://customer_bucket/some/prefix/relative/path/to/custdata-1 + // + // s3://customer_bucket/some/prefix/relative/path/custdata-1 + // + // ... + // + // The complete set of S3Uris in this manifest constitutes the input data for + // the channel for this datasource. The object that each S3Uris points to + // must be readable by the IAM role that Amazon SageMaker uses to perform + // tasks on your behalf. + // + // S3Uri is a required field + S3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TransformS3DataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransformS3DataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransformS3DataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransformS3DataSource"} + if s.S3DataType == nil { + invalidParams.Add(request.NewErrParamRequired("S3DataType")) + } + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3DataType sets the S3DataType field's value. +func (s *TransformS3DataSource) SetS3DataType(v string) *TransformS3DataSource { + s.S3DataType = &v + return s +} + +// SetS3Uri sets the S3Uri field's value. +func (s *TransformS3DataSource) SetS3Uri(v string) *TransformS3DataSource { + s.S3Uri = &v + return s +} + +// Represents an amount of money in United States dollars/ +type USD struct { + _ struct{} `type:"structure"` + + // The fractional portion, in cents, of the amount. + Cents *int64 `type:"integer"` + + // The whole number of dollars in the amount. + Dollars *int64 `type:"integer"` + + // Fractions of a cent, in tenths. + TenthFractionsOfACent *int64 `type:"integer"` +} + +// String returns the string representation +func (s USD) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s USD) GoString() string { + return s.String() +} + +// SetCents sets the Cents field's value. +func (s *USD) SetCents(v int64) *USD { + s.Cents = &v + return s +} + +// SetDollars sets the Dollars field's value. +func (s *USD) SetDollars(v int64) *USD { + s.Dollars = &v + return s +} + +// SetTenthFractionsOfACent sets the TenthFractionsOfACent field's value. +func (s *USD) SetTenthFractionsOfACent(v int64) *USD { + s.TenthFractionsOfACent = &v + return s +} + +// Provided configuration information for the worker UI for a labeling job. +type UiConfig struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket location of the UI template. For more information about + // the contents of a UI template, see Creating Your Custom Labeling Task Template + // (http://docs.aws.amazon.com/sagemaker/latest/dg/sms-custom-templates-step2.html). + // + // UiTemplateS3Uri is a required field + UiTemplateS3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UiConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UiConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UiConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UiConfig"} + if s.UiTemplateS3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("UiTemplateS3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetUiTemplateS3Uri sets the UiTemplateS3Uri field's value. +func (s *UiConfig) SetUiTemplateS3Uri(v string) *UiConfig { + s.UiTemplateS3Uri = &v + return s +} + +// The Liquid template for the worker user interface. +type UiTemplate struct { + _ struct{} `type:"structure"` + + // The content of the Liquid template for the worker user interface. + // + // Content is a required field + Content *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UiTemplate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UiTemplate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UiTemplate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UiTemplate"} + if s.Content == nil { + invalidParams.Add(request.NewErrParamRequired("Content")) + } + if s.Content != nil && len(*s.Content) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Content", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContent sets the Content field's value. +func (s *UiTemplate) SetContent(v string) *UiTemplate { + s.Content = &v + return s +} + +type UpdateCodeRepositoryInput struct { + _ struct{} `type:"structure"` + + // The name of the Git repository to update. + // + // CodeRepositoryName is a required field + CodeRepositoryName *string `min:"1" type:"string" required:"true"` + + // The configuration of the git repository, including the URL and the Amazon + // Resource Name (ARN) of the AWS Secrets Manager secret that contains the credentials + // used to access the repository. The secret must have a staging label of AWSCURRENT + // and must be in the following format: + // + // {"username": UserName, "password": Password} + GitConfig *GitConfigForUpdate `type:"structure"` +} + +// String returns the string representation +func (s UpdateCodeRepositoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCodeRepositoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCodeRepositoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCodeRepositoryInput"} + if s.CodeRepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("CodeRepositoryName")) + } + if s.CodeRepositoryName != nil && len(*s.CodeRepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CodeRepositoryName", 1)) + } + if s.GitConfig != nil { + if err := s.GitConfig.Validate(); err != nil { + invalidParams.AddNested("GitConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCodeRepositoryName sets the CodeRepositoryName field's value. +func (s *UpdateCodeRepositoryInput) SetCodeRepositoryName(v string) *UpdateCodeRepositoryInput { + s.CodeRepositoryName = &v + return s +} + +// SetGitConfig sets the GitConfig field's value. +func (s *UpdateCodeRepositoryInput) SetGitConfig(v *GitConfigForUpdate) *UpdateCodeRepositoryInput { + s.GitConfig = v + return s +} + +type UpdateCodeRepositoryOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the Git repository. + // + // CodeRepositoryArn is a required field + CodeRepositoryArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateCodeRepositoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCodeRepositoryOutput) GoString() string { + return s.String() +} + +// SetCodeRepositoryArn sets the CodeRepositoryArn field's value. +func (s *UpdateCodeRepositoryOutput) SetCodeRepositoryArn(v string) *UpdateCodeRepositoryOutput { + s.CodeRepositoryArn = &v + return s +} + +type UpdateEndpointInput struct { + _ struct{} `type:"structure"` + + // The name of the new endpoint configuration. + // + // EndpointConfigName is a required field + EndpointConfigName *string `type:"string" required:"true"` + + // The name of the endpoint whose configuration you want to update. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointInput"} + if s.EndpointConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointConfigName")) + } + if s.EndpointName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointConfigName sets the EndpointConfigName field's value. +func (s *UpdateEndpointInput) SetEndpointConfigName(v string) *UpdateEndpointInput { + s.EndpointConfigName = &v + return s +} + +// SetEndpointName sets the EndpointName field's value. +func (s *UpdateEndpointInput) SetEndpointName(v string) *UpdateEndpointInput { + s.EndpointName = &v + return s +} + +type UpdateEndpointOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the endpoint. + // + // EndpointArn is a required field + EndpointArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointOutput) GoString() string { + return s.String() +} + +// SetEndpointArn sets the EndpointArn field's value. +func (s *UpdateEndpointOutput) SetEndpointArn(v string) *UpdateEndpointOutput { + s.EndpointArn = &v + return s +} + +type UpdateEndpointWeightsAndCapacitiesInput struct { + _ struct{} `type:"structure"` + + // An object that provides new capacity and weight values for a variant. + // + // DesiredWeightsAndCapacities is a required field + DesiredWeightsAndCapacities []*DesiredWeightAndCapacity `min:"1" type:"list" required:"true"` + + // The name of an existing Amazon SageMaker endpoint. + // + // EndpointName is a required field + EndpointName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointWeightsAndCapacitiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointWeightsAndCapacitiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointWeightsAndCapacitiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointWeightsAndCapacitiesInput"} + if s.DesiredWeightsAndCapacities == nil { + invalidParams.Add(request.NewErrParamRequired("DesiredWeightsAndCapacities")) + } + if s.DesiredWeightsAndCapacities != nil && len(s.DesiredWeightsAndCapacities) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DesiredWeightsAndCapacities", 1)) + } + if s.EndpointName == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointName")) + } + if s.DesiredWeightsAndCapacities != nil { + for i, v := range s.DesiredWeightsAndCapacities { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DesiredWeightsAndCapacities", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDesiredWeightsAndCapacities sets the DesiredWeightsAndCapacities field's value. +func (s *UpdateEndpointWeightsAndCapacitiesInput) SetDesiredWeightsAndCapacities(v []*DesiredWeightAndCapacity) *UpdateEndpointWeightsAndCapacitiesInput { + s.DesiredWeightsAndCapacities = v + return s +} + +// SetEndpointName sets the EndpointName field's value. +func (s *UpdateEndpointWeightsAndCapacitiesInput) SetEndpointName(v string) *UpdateEndpointWeightsAndCapacitiesInput { + s.EndpointName = &v + return s +} + +type UpdateEndpointWeightsAndCapacitiesOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the updated endpoint. + // + // EndpointArn is a required field + EndpointArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointWeightsAndCapacitiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointWeightsAndCapacitiesOutput) GoString() string { + return s.String() +} + +// SetEndpointArn sets the EndpointArn field's value. +func (s *UpdateEndpointWeightsAndCapacitiesOutput) SetEndpointArn(v string) *UpdateEndpointWeightsAndCapacitiesOutput { + s.EndpointArn = &v + return s +} + +type UpdateNotebookInstanceInput struct { + _ struct{} `type:"structure"` + + // A list of the Elastic Inference (EI) instance types to associate with this + // notebook instance. Currently only one EI instance type can be associated + // with a notebook instance. For more information, see Using Elastic Inference + // in Amazon SageMaker (http://docs.aws.amazon.com/sagemaker/latest/dg/ei.html). + AcceleratorTypes []*string `type:"list"` + + // An array of up to three Git repositories to associate with the notebook instance. + // These can be either the names of Git repositories stored as resources in + // your account, or the URL of Git repositories in AWS CodeCommit (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) + // or in any other Git repository.. These repositories are cloned at the same + // level as the default repository of your notebook instance. For more information, + // see Associating Git Repositories with Amazon SageMaker Notebook Instances + // (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + AdditionalCodeRepositories []*string `type:"list"` + + // The Git repository to associate with the notebook instance as its default + // code repository. This can be either the name of a Git repository stored as + // a resource in your account, or the URL of a Git repository in AWS CodeCommit + // (http://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html) or + // in any other Git repository. When you open a notebook instance, it opens + // in the directory that contains this repository. For more information, see + // Associating Git Repositories with Amazon SageMaker Notebook Instances (http://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html). + DefaultCodeRepository *string `min:"1" type:"string"` + + // A list of the Elastic Inference (EI) instance types to remove from this notebook + // instance. + DisassociateAcceleratorTypes *bool `type:"boolean"` + + // A list of names or URLs of the default Git repositories to remove from this + // notebook instance. + DisassociateAdditionalCodeRepositories *bool `type:"boolean"` + + // The name or URL of the default Git repository to remove from this notebook + // instance. + DisassociateDefaultCodeRepository *bool `type:"boolean"` + + // Set to true to remove the notebook instance lifecycle configuration currently + // associated with the notebook instance. + DisassociateLifecycleConfig *bool `type:"boolean"` + + // The Amazon ML compute instance type. + InstanceType *string `type:"string" enum:"InstanceType"` + + // The name of a lifecycle configuration to associate with the notebook instance. + // For information about lifestyle configurations, see Step 2.1: (Optional) + // Customize a Notebook Instance (http://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html). + LifecycleConfigName *string `type:"string"` + + // The name of the notebook instance to update. + // + // NotebookInstanceName is a required field + NotebookInstanceName *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can + // assume to access the notebook instance. For more information, see Amazon + // SageMaker Roles (http://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html). + // + // To be able to pass this role to Amazon SageMaker, the caller of this API + // must have the iam:PassRole permission. + RoleArn *string `min:"20" type:"string"` + + // The size, in GB, of the ML storage volume to attach to the notebook instance. + // The default value is 5 GB. + VolumeSizeInGB *int64 `min:"5" type:"integer"` +} + +// String returns the string representation +func (s UpdateNotebookInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNotebookInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateNotebookInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateNotebookInstanceInput"} + if s.DefaultCodeRepository != nil && len(*s.DefaultCodeRepository) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DefaultCodeRepository", 1)) + } + if s.NotebookInstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceName")) + } + if s.RoleArn != nil && len(*s.RoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) + } + if s.VolumeSizeInGB != nil && *s.VolumeSizeInGB < 5 { + invalidParams.Add(request.NewErrParamMinValue("VolumeSizeInGB", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceleratorTypes sets the AcceleratorTypes field's value. +func (s *UpdateNotebookInstanceInput) SetAcceleratorTypes(v []*string) *UpdateNotebookInstanceInput { + s.AcceleratorTypes = v + return s +} + +// SetAdditionalCodeRepositories sets the AdditionalCodeRepositories field's value. +func (s *UpdateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *UpdateNotebookInstanceInput { + s.AdditionalCodeRepositories = v + return s +} + +// SetDefaultCodeRepository sets the DefaultCodeRepository field's value. +func (s *UpdateNotebookInstanceInput) SetDefaultCodeRepository(v string) *UpdateNotebookInstanceInput { + s.DefaultCodeRepository = &v + return s +} + +// SetDisassociateAcceleratorTypes sets the DisassociateAcceleratorTypes field's value. +func (s *UpdateNotebookInstanceInput) SetDisassociateAcceleratorTypes(v bool) *UpdateNotebookInstanceInput { + s.DisassociateAcceleratorTypes = &v + return s +} + +// SetDisassociateAdditionalCodeRepositories sets the DisassociateAdditionalCodeRepositories field's value. +func (s *UpdateNotebookInstanceInput) SetDisassociateAdditionalCodeRepositories(v bool) *UpdateNotebookInstanceInput { + s.DisassociateAdditionalCodeRepositories = &v + return s +} + +// SetDisassociateDefaultCodeRepository sets the DisassociateDefaultCodeRepository field's value. +func (s *UpdateNotebookInstanceInput) SetDisassociateDefaultCodeRepository(v bool) *UpdateNotebookInstanceInput { + s.DisassociateDefaultCodeRepository = &v + return s +} + +// SetDisassociateLifecycleConfig sets the DisassociateLifecycleConfig field's value. +func (s *UpdateNotebookInstanceInput) SetDisassociateLifecycleConfig(v bool) *UpdateNotebookInstanceInput { + s.DisassociateLifecycleConfig = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *UpdateNotebookInstanceInput) SetInstanceType(v string) *UpdateNotebookInstanceInput { + s.InstanceType = &v + return s +} + +// SetLifecycleConfigName sets the LifecycleConfigName field's value. +func (s *UpdateNotebookInstanceInput) SetLifecycleConfigName(v string) *UpdateNotebookInstanceInput { + s.LifecycleConfigName = &v + return s +} + +// SetNotebookInstanceName sets the NotebookInstanceName field's value. +func (s *UpdateNotebookInstanceInput) SetNotebookInstanceName(v string) *UpdateNotebookInstanceInput { + s.NotebookInstanceName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *UpdateNotebookInstanceInput) SetRoleArn(v string) *UpdateNotebookInstanceInput { + s.RoleArn = &v + return s +} + +// SetVolumeSizeInGB sets the VolumeSizeInGB field's value. +func (s *UpdateNotebookInstanceInput) SetVolumeSizeInGB(v int64) *UpdateNotebookInstanceInput { + s.VolumeSizeInGB = &v + return s +} + +type UpdateNotebookInstanceLifecycleConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the lifecycle configuration. + // + // NotebookInstanceLifecycleConfigName is a required field + NotebookInstanceLifecycleConfigName *string `type:"string" required:"true"` + + // The shell script that runs only once, when you create a notebook instance + OnCreate []*NotebookInstanceLifecycleHook `type:"list"` + + // The shell script that runs every time you start a notebook instance, including + // when you create the notebook instance. + OnStart []*NotebookInstanceLifecycleHook `type:"list"` +} + +// String returns the string representation +func (s UpdateNotebookInstanceLifecycleConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNotebookInstanceLifecycleConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateNotebookInstanceLifecycleConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateNotebookInstanceLifecycleConfigInput"} + if s.NotebookInstanceLifecycleConfigName == nil { + invalidParams.Add(request.NewErrParamRequired("NotebookInstanceLifecycleConfigName")) + } + if s.OnCreate != nil { + for i, v := range s.OnCreate { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnCreate", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OnStart != nil { + for i, v := range s.OnStart { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OnStart", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNotebookInstanceLifecycleConfigName sets the NotebookInstanceLifecycleConfigName field's value. +func (s *UpdateNotebookInstanceLifecycleConfigInput) SetNotebookInstanceLifecycleConfigName(v string) *UpdateNotebookInstanceLifecycleConfigInput { + s.NotebookInstanceLifecycleConfigName = &v + return s +} + +// SetOnCreate sets the OnCreate field's value. +func (s *UpdateNotebookInstanceLifecycleConfigInput) SetOnCreate(v []*NotebookInstanceLifecycleHook) *UpdateNotebookInstanceLifecycleConfigInput { + s.OnCreate = v + return s +} + +// SetOnStart sets the OnStart field's value. +func (s *UpdateNotebookInstanceLifecycleConfigInput) SetOnStart(v []*NotebookInstanceLifecycleHook) *UpdateNotebookInstanceLifecycleConfigInput { + s.OnStart = v + return s +} + +type UpdateNotebookInstanceLifecycleConfigOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateNotebookInstanceLifecycleConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNotebookInstanceLifecycleConfigOutput) GoString() string { + return s.String() +} + +type UpdateNotebookInstanceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateNotebookInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateNotebookInstanceOutput) GoString() string { + return s.String() +} + +type UpdateWorkteamInput struct { + _ struct{} `type:"structure"` + + // An updated description for the work team. + Description *string `min:"1" type:"string"` + + // A list of MemberDefinition objects that contain the updated work team members. + MemberDefinitions []*MemberDefinition `min:"1" type:"list"` + + // The name of the work team to update. + // + // WorkteamName is a required field + WorkteamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateWorkteamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateWorkteamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateWorkteamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateWorkteamInput"} + if s.Description != nil && len(*s.Description) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Description", 1)) + } + if s.MemberDefinitions != nil && len(s.MemberDefinitions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MemberDefinitions", 1)) + } + if s.WorkteamName == nil { + invalidParams.Add(request.NewErrParamRequired("WorkteamName")) + } + if s.WorkteamName != nil && len(*s.WorkteamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkteamName", 1)) + } + if s.MemberDefinitions != nil { + for i, v := range s.MemberDefinitions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MemberDefinitions", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateWorkteamInput) SetDescription(v string) *UpdateWorkteamInput { + s.Description = &v + return s +} + +// SetMemberDefinitions sets the MemberDefinitions field's value. +func (s *UpdateWorkteamInput) SetMemberDefinitions(v []*MemberDefinition) *UpdateWorkteamInput { + s.MemberDefinitions = v + return s +} + +// SetWorkteamName sets the WorkteamName field's value. +func (s *UpdateWorkteamInput) SetWorkteamName(v string) *UpdateWorkteamInput { + s.WorkteamName = &v + return s +} + +type UpdateWorkteamOutput struct { + _ struct{} `type:"structure"` + + // A Workteam object that describes the updated work team. + // + // Workteam is a required field + Workteam *Workteam `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateWorkteamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateWorkteamOutput) GoString() string { + return s.String() +} + +// SetWorkteam sets the Workteam field's value. +func (s *UpdateWorkteamOutput) SetWorkteam(v *Workteam) *UpdateWorkteamOutput { + s.Workteam = v + return s +} + +// Specifies a VPC that your training jobs and hosted models have access to. +// Control access to and from your training and model containers by configuring +// the VPC. For more information, see Protect Endpoints by Using an Amazon Virtual +// Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html) +// and Protect Training Jobs by Using an Amazon Virtual Private Cloud (http://docs.aws.amazon.com/sagemaker/latest/dg/train-vpc.html). +type VpcConfig struct { + _ struct{} `type:"structure"` + + // The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security + // groups for the VPC that is specified in the Subnets field. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `min:"1" type:"list" required:"true"` + + // The ID of the subnets in the VPC to which you want to connect your training + // job or model. + // + // Subnets is a required field + Subnets []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s VpcConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VpcConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VpcConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VpcConfig"} + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.SecurityGroupIds != nil && len(s.SecurityGroupIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityGroupIds", 1)) + } + if s.Subnets == nil { + invalidParams.Add(request.NewErrParamRequired("Subnets")) + } + if s.Subnets != nil && len(s.Subnets) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Subnets", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { + s.SecurityGroupIds = v + return s +} + +// SetSubnets sets the Subnets field's value. +func (s *VpcConfig) SetSubnets(v []*string) *VpcConfig { + s.Subnets = v + return s +} + +// Provides details about a labeling work team. +type Workteam struct { + _ struct{} `type:"structure"` + + // The date and time that the work team was created (timestamp). + CreateDate *time.Time `type:"timestamp"` + + // A description of the work team. + // + // Description is a required field + Description *string `min:"1" type:"string" required:"true"` + + // The date and time that the work team was last updated (timestamp). + LastUpdatedDate *time.Time `type:"timestamp"` + + // The Amazon Cognito user groups that make up the work team. + // + // MemberDefinitions is a required field + MemberDefinitions []*MemberDefinition `min:"1" type:"list" required:"true"` + + // The Amazon Marketplace identifier for a vendor's work team. + ProductListingIds []*string `type:"list"` + + // The URI of the labeling job's user interface. Workers open this URI to start + // labeling your data objects. + SubDomain *string `type:"string"` + + // The Amazon Resource Name (ARN) that identifies the work team. + // + // WorkteamArn is a required field + WorkteamArn *string `type:"string" required:"true"` + + // The name of the work team. + // + // WorkteamName is a required field + WorkteamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Workteam) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Workteam) GoString() string { + return s.String() +} + +// SetCreateDate sets the CreateDate field's value. +func (s *Workteam) SetCreateDate(v time.Time) *Workteam { + s.CreateDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Workteam) SetDescription(v string) *Workteam { + s.Description = &v + return s +} + +// SetLastUpdatedDate sets the LastUpdatedDate field's value. +func (s *Workteam) SetLastUpdatedDate(v time.Time) *Workteam { + s.LastUpdatedDate = &v + return s +} + +// SetMemberDefinitions sets the MemberDefinitions field's value. +func (s *Workteam) SetMemberDefinitions(v []*MemberDefinition) *Workteam { + s.MemberDefinitions = v + return s +} + +// SetProductListingIds sets the ProductListingIds field's value. +func (s *Workteam) SetProductListingIds(v []*string) *Workteam { + s.ProductListingIds = v + return s +} + +// SetSubDomain sets the SubDomain field's value. +func (s *Workteam) SetSubDomain(v string) *Workteam { + s.SubDomain = &v + return s +} + +// SetWorkteamArn sets the WorkteamArn field's value. +func (s *Workteam) SetWorkteamArn(v string) *Workteam { + s.WorkteamArn = &v + return s +} + +// SetWorkteamName sets the WorkteamName field's value. +func (s *Workteam) SetWorkteamName(v string) *Workteam { + s.WorkteamName = &v + return s +} + +const ( + // AlgorithmSortByName is a AlgorithmSortBy enum value + AlgorithmSortByName = "Name" + + // AlgorithmSortByCreationTime is a AlgorithmSortBy enum value + AlgorithmSortByCreationTime = "CreationTime" +) + +const ( + // AlgorithmStatusPending is a AlgorithmStatus enum value + AlgorithmStatusPending = "Pending" + + // AlgorithmStatusInProgress is a AlgorithmStatus enum value + AlgorithmStatusInProgress = "InProgress" + + // AlgorithmStatusCompleted is a AlgorithmStatus enum value + AlgorithmStatusCompleted = "Completed" + + // AlgorithmStatusFailed is a AlgorithmStatus enum value + AlgorithmStatusFailed = "Failed" + + // AlgorithmStatusDeleting is a AlgorithmStatus enum value + AlgorithmStatusDeleting = "Deleting" +) + +const ( + // AssemblyTypeNone is a AssemblyType enum value + AssemblyTypeNone = "None" + + // AssemblyTypeLine is a AssemblyType enum value + AssemblyTypeLine = "Line" +) + +const ( + // BatchStrategyMultiRecord is a BatchStrategy enum value + BatchStrategyMultiRecord = "MultiRecord" + + // BatchStrategySingleRecord is a BatchStrategy enum value + BatchStrategySingleRecord = "SingleRecord" +) + +const ( + // BooleanOperatorAnd is a BooleanOperator enum value + BooleanOperatorAnd = "And" + + // BooleanOperatorOr is a BooleanOperator enum value + BooleanOperatorOr = "Or" +) + +const ( + // CodeRepositorySortByName is a CodeRepositorySortBy enum value + CodeRepositorySortByName = "Name" + + // CodeRepositorySortByCreationTime is a CodeRepositorySortBy enum value + CodeRepositorySortByCreationTime = "CreationTime" + + // CodeRepositorySortByLastModifiedTime is a CodeRepositorySortBy enum value + CodeRepositorySortByLastModifiedTime = "LastModifiedTime" +) + +const ( + // CodeRepositorySortOrderAscending is a CodeRepositorySortOrder enum value + CodeRepositorySortOrderAscending = "Ascending" + + // CodeRepositorySortOrderDescending is a CodeRepositorySortOrder enum value + CodeRepositorySortOrderDescending = "Descending" +) + +const ( + // CompilationJobStatusInprogress is a CompilationJobStatus enum value + CompilationJobStatusInprogress = "INPROGRESS" + + // CompilationJobStatusCompleted is a CompilationJobStatus enum value + CompilationJobStatusCompleted = "COMPLETED" + + // CompilationJobStatusFailed is a CompilationJobStatus enum value + CompilationJobStatusFailed = "FAILED" + + // CompilationJobStatusStarting is a CompilationJobStatus enum value + CompilationJobStatusStarting = "STARTING" + + // CompilationJobStatusStopping is a CompilationJobStatus enum value + CompilationJobStatusStopping = "STOPPING" + + // CompilationJobStatusStopped is a CompilationJobStatus enum value + CompilationJobStatusStopped = "STOPPED" +) + +const ( + // CompressionTypeNone is a CompressionType enum value + CompressionTypeNone = "None" + + // CompressionTypeGzip is a CompressionType enum value + CompressionTypeGzip = "Gzip" +) + +const ( + // ContentClassifierFreeOfPersonallyIdentifiableInformation is a ContentClassifier enum value + ContentClassifierFreeOfPersonallyIdentifiableInformation = "FreeOfPersonallyIdentifiableInformation" + + // ContentClassifierFreeOfAdultContent is a ContentClassifier enum value + ContentClassifierFreeOfAdultContent = "FreeOfAdultContent" +) + +const ( + // DetailedAlgorithmStatusNotStarted is a DetailedAlgorithmStatus enum value + DetailedAlgorithmStatusNotStarted = "NotStarted" + + // DetailedAlgorithmStatusInProgress is a DetailedAlgorithmStatus enum value + DetailedAlgorithmStatusInProgress = "InProgress" + + // DetailedAlgorithmStatusCompleted is a DetailedAlgorithmStatus enum value + DetailedAlgorithmStatusCompleted = "Completed" + + // DetailedAlgorithmStatusFailed is a DetailedAlgorithmStatus enum value + DetailedAlgorithmStatusFailed = "Failed" +) + +const ( + // DetailedModelPackageStatusNotStarted is a DetailedModelPackageStatus enum value + DetailedModelPackageStatusNotStarted = "NotStarted" + + // DetailedModelPackageStatusInProgress is a DetailedModelPackageStatus enum value + DetailedModelPackageStatusInProgress = "InProgress" + + // DetailedModelPackageStatusCompleted is a DetailedModelPackageStatus enum value + DetailedModelPackageStatusCompleted = "Completed" + + // DetailedModelPackageStatusFailed is a DetailedModelPackageStatus enum value + DetailedModelPackageStatusFailed = "Failed" +) + +const ( + // DirectInternetAccessEnabled is a DirectInternetAccess enum value + DirectInternetAccessEnabled = "Enabled" + + // DirectInternetAccessDisabled is a DirectInternetAccess enum value + DirectInternetAccessDisabled = "Disabled" +) + +const ( + // EndpointConfigSortKeyName is a EndpointConfigSortKey enum value + EndpointConfigSortKeyName = "Name" + + // EndpointConfigSortKeyCreationTime is a EndpointConfigSortKey enum value + EndpointConfigSortKeyCreationTime = "CreationTime" +) + +const ( + // EndpointSortKeyName is a EndpointSortKey enum value + EndpointSortKeyName = "Name" + + // EndpointSortKeyCreationTime is a EndpointSortKey enum value + EndpointSortKeyCreationTime = "CreationTime" + + // EndpointSortKeyStatus is a EndpointSortKey enum value + EndpointSortKeyStatus = "Status" +) + +const ( + // EndpointStatusOutOfService is a EndpointStatus enum value + EndpointStatusOutOfService = "OutOfService" + + // EndpointStatusCreating is a EndpointStatus enum value + EndpointStatusCreating = "Creating" + + // EndpointStatusUpdating is a EndpointStatus enum value + EndpointStatusUpdating = "Updating" + + // EndpointStatusSystemUpdating is a EndpointStatus enum value + EndpointStatusSystemUpdating = "SystemUpdating" + + // EndpointStatusRollingBack is a EndpointStatus enum value + EndpointStatusRollingBack = "RollingBack" + + // EndpointStatusInService is a EndpointStatus enum value + EndpointStatusInService = "InService" + + // EndpointStatusDeleting is a EndpointStatus enum value + EndpointStatusDeleting = "Deleting" + + // EndpointStatusFailed is a EndpointStatus enum value + EndpointStatusFailed = "Failed" +) + +const ( + // FrameworkTensorflow is a Framework enum value + FrameworkTensorflow = "TENSORFLOW" + + // FrameworkMxnet is a Framework enum value + FrameworkMxnet = "MXNET" + + // FrameworkOnnx is a Framework enum value + FrameworkOnnx = "ONNX" + + // FrameworkPytorch is a Framework enum value + FrameworkPytorch = "PYTORCH" + + // FrameworkXgboost is a Framework enum value + FrameworkXgboost = "XGBOOST" +) + +const ( + // HyperParameterTuningJobObjectiveTypeMaximize is a HyperParameterTuningJobObjectiveType enum value + HyperParameterTuningJobObjectiveTypeMaximize = "Maximize" + + // HyperParameterTuningJobObjectiveTypeMinimize is a HyperParameterTuningJobObjectiveType enum value + HyperParameterTuningJobObjectiveTypeMinimize = "Minimize" +) + +const ( + // HyperParameterTuningJobSortByOptionsName is a HyperParameterTuningJobSortByOptions enum value + HyperParameterTuningJobSortByOptionsName = "Name" + + // HyperParameterTuningJobSortByOptionsStatus is a HyperParameterTuningJobSortByOptions enum value + HyperParameterTuningJobSortByOptionsStatus = "Status" + + // HyperParameterTuningJobSortByOptionsCreationTime is a HyperParameterTuningJobSortByOptions enum value + HyperParameterTuningJobSortByOptionsCreationTime = "CreationTime" +) + +const ( + // HyperParameterTuningJobStatusCompleted is a HyperParameterTuningJobStatus enum value + HyperParameterTuningJobStatusCompleted = "Completed" + + // HyperParameterTuningJobStatusInProgress is a HyperParameterTuningJobStatus enum value + HyperParameterTuningJobStatusInProgress = "InProgress" + + // HyperParameterTuningJobStatusFailed is a HyperParameterTuningJobStatus enum value + HyperParameterTuningJobStatusFailed = "Failed" + + // HyperParameterTuningJobStatusStopped is a HyperParameterTuningJobStatus enum value + HyperParameterTuningJobStatusStopped = "Stopped" + + // HyperParameterTuningJobStatusStopping is a HyperParameterTuningJobStatus enum value + HyperParameterTuningJobStatusStopping = "Stopping" +) + +// The strategy hyperparameter tuning uses to find the best combination of hyperparameters +// for your model. Currently, the only supported value is Bayesian. +const ( + // HyperParameterTuningJobStrategyTypeBayesian is a HyperParameterTuningJobStrategyType enum value + HyperParameterTuningJobStrategyTypeBayesian = "Bayesian" +) + +const ( + // HyperParameterTuningJobWarmStartTypeIdenticalDataAndAlgorithm is a HyperParameterTuningJobWarmStartType enum value + HyperParameterTuningJobWarmStartTypeIdenticalDataAndAlgorithm = "IdenticalDataAndAlgorithm" + + // HyperParameterTuningJobWarmStartTypeTransferLearning is a HyperParameterTuningJobWarmStartType enum value + HyperParameterTuningJobWarmStartTypeTransferLearning = "TransferLearning" +) + +const ( + // InstanceTypeMlT2Medium is a InstanceType enum value + InstanceTypeMlT2Medium = "ml.t2.medium" + + // InstanceTypeMlT2Large is a InstanceType enum value + InstanceTypeMlT2Large = "ml.t2.large" + + // InstanceTypeMlT2Xlarge is a InstanceType enum value + InstanceTypeMlT2Xlarge = "ml.t2.xlarge" + + // InstanceTypeMlT22xlarge is a InstanceType enum value + InstanceTypeMlT22xlarge = "ml.t2.2xlarge" + + // InstanceTypeMlT3Medium is a InstanceType enum value + InstanceTypeMlT3Medium = "ml.t3.medium" + + // InstanceTypeMlT3Large is a InstanceType enum value + InstanceTypeMlT3Large = "ml.t3.large" + + // InstanceTypeMlT3Xlarge is a InstanceType enum value + InstanceTypeMlT3Xlarge = "ml.t3.xlarge" + + // InstanceTypeMlT32xlarge is a InstanceType enum value + InstanceTypeMlT32xlarge = "ml.t3.2xlarge" + + // InstanceTypeMlM4Xlarge is a InstanceType enum value + InstanceTypeMlM4Xlarge = "ml.m4.xlarge" + + // InstanceTypeMlM42xlarge is a InstanceType enum value + InstanceTypeMlM42xlarge = "ml.m4.2xlarge" + + // InstanceTypeMlM44xlarge is a InstanceType enum value + InstanceTypeMlM44xlarge = "ml.m4.4xlarge" + + // InstanceTypeMlM410xlarge is a InstanceType enum value + InstanceTypeMlM410xlarge = "ml.m4.10xlarge" + + // InstanceTypeMlM416xlarge is a InstanceType enum value + InstanceTypeMlM416xlarge = "ml.m4.16xlarge" + + // InstanceTypeMlM5Xlarge is a InstanceType enum value + InstanceTypeMlM5Xlarge = "ml.m5.xlarge" + + // InstanceTypeMlM52xlarge is a InstanceType enum value + InstanceTypeMlM52xlarge = "ml.m5.2xlarge" + + // InstanceTypeMlM54xlarge is a InstanceType enum value + InstanceTypeMlM54xlarge = "ml.m5.4xlarge" + + // InstanceTypeMlM512xlarge is a InstanceType enum value + InstanceTypeMlM512xlarge = "ml.m5.12xlarge" + + // InstanceTypeMlM524xlarge is a InstanceType enum value + InstanceTypeMlM524xlarge = "ml.m5.24xlarge" + + // InstanceTypeMlC4Xlarge is a InstanceType enum value + InstanceTypeMlC4Xlarge = "ml.c4.xlarge" + + // InstanceTypeMlC42xlarge is a InstanceType enum value + InstanceTypeMlC42xlarge = "ml.c4.2xlarge" + + // InstanceTypeMlC44xlarge is a InstanceType enum value + InstanceTypeMlC44xlarge = "ml.c4.4xlarge" + + // InstanceTypeMlC48xlarge is a InstanceType enum value + InstanceTypeMlC48xlarge = "ml.c4.8xlarge" + + // InstanceTypeMlC5Xlarge is a InstanceType enum value + InstanceTypeMlC5Xlarge = "ml.c5.xlarge" + + // InstanceTypeMlC52xlarge is a InstanceType enum value + InstanceTypeMlC52xlarge = "ml.c5.2xlarge" + + // InstanceTypeMlC54xlarge is a InstanceType enum value + InstanceTypeMlC54xlarge = "ml.c5.4xlarge" + + // InstanceTypeMlC59xlarge is a InstanceType enum value + InstanceTypeMlC59xlarge = "ml.c5.9xlarge" + + // InstanceTypeMlC518xlarge is a InstanceType enum value + InstanceTypeMlC518xlarge = "ml.c5.18xlarge" + + // InstanceTypeMlC5dXlarge is a InstanceType enum value + InstanceTypeMlC5dXlarge = "ml.c5d.xlarge" + + // InstanceTypeMlC5d2xlarge is a InstanceType enum value + InstanceTypeMlC5d2xlarge = "ml.c5d.2xlarge" + + // InstanceTypeMlC5d4xlarge is a InstanceType enum value + InstanceTypeMlC5d4xlarge = "ml.c5d.4xlarge" + + // InstanceTypeMlC5d9xlarge is a InstanceType enum value + InstanceTypeMlC5d9xlarge = "ml.c5d.9xlarge" + + // InstanceTypeMlC5d18xlarge is a InstanceType enum value + InstanceTypeMlC5d18xlarge = "ml.c5d.18xlarge" + + // InstanceTypeMlP2Xlarge is a InstanceType enum value + InstanceTypeMlP2Xlarge = "ml.p2.xlarge" + + // InstanceTypeMlP28xlarge is a InstanceType enum value + InstanceTypeMlP28xlarge = "ml.p2.8xlarge" + + // InstanceTypeMlP216xlarge is a InstanceType enum value + InstanceTypeMlP216xlarge = "ml.p2.16xlarge" + + // InstanceTypeMlP32xlarge is a InstanceType enum value + InstanceTypeMlP32xlarge = "ml.p3.2xlarge" + + // InstanceTypeMlP38xlarge is a InstanceType enum value + InstanceTypeMlP38xlarge = "ml.p3.8xlarge" + + // InstanceTypeMlP316xlarge is a InstanceType enum value + InstanceTypeMlP316xlarge = "ml.p3.16xlarge" +) + +const ( + // LabelingJobStatusInProgress is a LabelingJobStatus enum value + LabelingJobStatusInProgress = "InProgress" + + // LabelingJobStatusCompleted is a LabelingJobStatus enum value + LabelingJobStatusCompleted = "Completed" + + // LabelingJobStatusFailed is a LabelingJobStatus enum value + LabelingJobStatusFailed = "Failed" + + // LabelingJobStatusStopping is a LabelingJobStatus enum value + LabelingJobStatusStopping = "Stopping" + + // LabelingJobStatusStopped is a LabelingJobStatus enum value + LabelingJobStatusStopped = "Stopped" +) + +const ( + // ListCompilationJobsSortByName is a ListCompilationJobsSortBy enum value + ListCompilationJobsSortByName = "Name" + + // ListCompilationJobsSortByCreationTime is a ListCompilationJobsSortBy enum value + ListCompilationJobsSortByCreationTime = "CreationTime" + + // ListCompilationJobsSortByStatus is a ListCompilationJobsSortBy enum value + ListCompilationJobsSortByStatus = "Status" +) + +const ( + // ListLabelingJobsForWorkteamSortByOptionsCreationTime is a ListLabelingJobsForWorkteamSortByOptions enum value + ListLabelingJobsForWorkteamSortByOptionsCreationTime = "CreationTime" +) + +const ( + // ListWorkteamsSortByOptionsName is a ListWorkteamsSortByOptions enum value + ListWorkteamsSortByOptionsName = "Name" + + // ListWorkteamsSortByOptionsCreateDate is a ListWorkteamsSortByOptions enum value + ListWorkteamsSortByOptionsCreateDate = "CreateDate" +) + +const ( + // ModelPackageSortByName is a ModelPackageSortBy enum value + ModelPackageSortByName = "Name" + + // ModelPackageSortByCreationTime is a ModelPackageSortBy enum value + ModelPackageSortByCreationTime = "CreationTime" +) + +const ( + // ModelPackageStatusPending is a ModelPackageStatus enum value + ModelPackageStatusPending = "Pending" + + // ModelPackageStatusInProgress is a ModelPackageStatus enum value + ModelPackageStatusInProgress = "InProgress" + + // ModelPackageStatusCompleted is a ModelPackageStatus enum value + ModelPackageStatusCompleted = "Completed" + + // ModelPackageStatusFailed is a ModelPackageStatus enum value + ModelPackageStatusFailed = "Failed" + + // ModelPackageStatusDeleting is a ModelPackageStatus enum value + ModelPackageStatusDeleting = "Deleting" +) + +const ( + // ModelSortKeyName is a ModelSortKey enum value + ModelSortKeyName = "Name" + + // ModelSortKeyCreationTime is a ModelSortKey enum value + ModelSortKeyCreationTime = "CreationTime" +) + +const ( + // NotebookInstanceAcceleratorTypeMlEia1Medium is a NotebookInstanceAcceleratorType enum value + NotebookInstanceAcceleratorTypeMlEia1Medium = "ml.eia1.medium" + + // NotebookInstanceAcceleratorTypeMlEia1Large is a NotebookInstanceAcceleratorType enum value + NotebookInstanceAcceleratorTypeMlEia1Large = "ml.eia1.large" + + // NotebookInstanceAcceleratorTypeMlEia1Xlarge is a NotebookInstanceAcceleratorType enum value + NotebookInstanceAcceleratorTypeMlEia1Xlarge = "ml.eia1.xlarge" +) + +const ( + // NotebookInstanceLifecycleConfigSortKeyName is a NotebookInstanceLifecycleConfigSortKey enum value + NotebookInstanceLifecycleConfigSortKeyName = "Name" + + // NotebookInstanceLifecycleConfigSortKeyCreationTime is a NotebookInstanceLifecycleConfigSortKey enum value + NotebookInstanceLifecycleConfigSortKeyCreationTime = "CreationTime" + + // NotebookInstanceLifecycleConfigSortKeyLastModifiedTime is a NotebookInstanceLifecycleConfigSortKey enum value + NotebookInstanceLifecycleConfigSortKeyLastModifiedTime = "LastModifiedTime" +) + +const ( + // NotebookInstanceLifecycleConfigSortOrderAscending is a NotebookInstanceLifecycleConfigSortOrder enum value + NotebookInstanceLifecycleConfigSortOrderAscending = "Ascending" + + // NotebookInstanceLifecycleConfigSortOrderDescending is a NotebookInstanceLifecycleConfigSortOrder enum value + NotebookInstanceLifecycleConfigSortOrderDescending = "Descending" +) + +const ( + // NotebookInstanceSortKeyName is a NotebookInstanceSortKey enum value + NotebookInstanceSortKeyName = "Name" + + // NotebookInstanceSortKeyCreationTime is a NotebookInstanceSortKey enum value + NotebookInstanceSortKeyCreationTime = "CreationTime" + + // NotebookInstanceSortKeyStatus is a NotebookInstanceSortKey enum value + NotebookInstanceSortKeyStatus = "Status" +) + +const ( + // NotebookInstanceSortOrderAscending is a NotebookInstanceSortOrder enum value + NotebookInstanceSortOrderAscending = "Ascending" + + // NotebookInstanceSortOrderDescending is a NotebookInstanceSortOrder enum value + NotebookInstanceSortOrderDescending = "Descending" +) + +const ( + // NotebookInstanceStatusPending is a NotebookInstanceStatus enum value + NotebookInstanceStatusPending = "Pending" + + // NotebookInstanceStatusInService is a NotebookInstanceStatus enum value + NotebookInstanceStatusInService = "InService" + + // NotebookInstanceStatusStopping is a NotebookInstanceStatus enum value + NotebookInstanceStatusStopping = "Stopping" + + // NotebookInstanceStatusStopped is a NotebookInstanceStatus enum value + NotebookInstanceStatusStopped = "Stopped" + + // NotebookInstanceStatusFailed is a NotebookInstanceStatus enum value + NotebookInstanceStatusFailed = "Failed" + + // NotebookInstanceStatusDeleting is a NotebookInstanceStatus enum value + NotebookInstanceStatusDeleting = "Deleting" + + // NotebookInstanceStatusUpdating is a NotebookInstanceStatus enum value + NotebookInstanceStatusUpdating = "Updating" +) + +const ( + // ObjectiveStatusSucceeded is a ObjectiveStatus enum value + ObjectiveStatusSucceeded = "Succeeded" + + // ObjectiveStatusPending is a ObjectiveStatus enum value + ObjectiveStatusPending = "Pending" + + // ObjectiveStatusFailed is a ObjectiveStatus enum value + ObjectiveStatusFailed = "Failed" +) + +const ( + // OperatorEquals is a Operator enum value + OperatorEquals = "Equals" + + // OperatorNotEquals is a Operator enum value + OperatorNotEquals = "NotEquals" + + // OperatorGreaterThan is a Operator enum value + OperatorGreaterThan = "GreaterThan" + + // OperatorGreaterThanOrEqualTo is a Operator enum value + OperatorGreaterThanOrEqualTo = "GreaterThanOrEqualTo" + + // OperatorLessThan is a Operator enum value + OperatorLessThan = "LessThan" + + // OperatorLessThanOrEqualTo is a Operator enum value + OperatorLessThanOrEqualTo = "LessThanOrEqualTo" + + // OperatorContains is a Operator enum value + OperatorContains = "Contains" +) + +const ( + // OrderKeyAscending is a OrderKey enum value + OrderKeyAscending = "Ascending" + + // OrderKeyDescending is a OrderKey enum value + OrderKeyDescending = "Descending" +) + +const ( + // ParameterTypeInteger is a ParameterType enum value + ParameterTypeInteger = "Integer" + + // ParameterTypeContinuous is a ParameterType enum value + ParameterTypeContinuous = "Continuous" + + // ParameterTypeCategorical is a ParameterType enum value + ParameterTypeCategorical = "Categorical" + + // ParameterTypeFreeText is a ParameterType enum value + ParameterTypeFreeText = "FreeText" +) + +const ( + // ProductionVariantAcceleratorTypeMlEia1Medium is a ProductionVariantAcceleratorType enum value + ProductionVariantAcceleratorTypeMlEia1Medium = "ml.eia1.medium" + + // ProductionVariantAcceleratorTypeMlEia1Large is a ProductionVariantAcceleratorType enum value + ProductionVariantAcceleratorTypeMlEia1Large = "ml.eia1.large" + + // ProductionVariantAcceleratorTypeMlEia1Xlarge is a ProductionVariantAcceleratorType enum value + ProductionVariantAcceleratorTypeMlEia1Xlarge = "ml.eia1.xlarge" +) + +const ( + // ProductionVariantInstanceTypeMlT2Medium is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT2Medium = "ml.t2.medium" + + // ProductionVariantInstanceTypeMlT2Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT2Large = "ml.t2.large" + + // ProductionVariantInstanceTypeMlT2Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT2Xlarge = "ml.t2.xlarge" + + // ProductionVariantInstanceTypeMlT22xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlT22xlarge = "ml.t2.2xlarge" + + // ProductionVariantInstanceTypeMlM4Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM4Xlarge = "ml.m4.xlarge" + + // ProductionVariantInstanceTypeMlM42xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM42xlarge = "ml.m4.2xlarge" + + // ProductionVariantInstanceTypeMlM44xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM44xlarge = "ml.m4.4xlarge" + + // ProductionVariantInstanceTypeMlM410xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM410xlarge = "ml.m4.10xlarge" + + // ProductionVariantInstanceTypeMlM416xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM416xlarge = "ml.m4.16xlarge" + + // ProductionVariantInstanceTypeMlM5Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM5Large = "ml.m5.large" + + // ProductionVariantInstanceTypeMlM5Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM5Xlarge = "ml.m5.xlarge" + + // ProductionVariantInstanceTypeMlM52xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM52xlarge = "ml.m5.2xlarge" + + // ProductionVariantInstanceTypeMlM54xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM54xlarge = "ml.m5.4xlarge" + + // ProductionVariantInstanceTypeMlM512xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM512xlarge = "ml.m5.12xlarge" + + // ProductionVariantInstanceTypeMlM524xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlM524xlarge = "ml.m5.24xlarge" + + // ProductionVariantInstanceTypeMlC4Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC4Large = "ml.c4.large" + + // ProductionVariantInstanceTypeMlC4Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC4Xlarge = "ml.c4.xlarge" + + // ProductionVariantInstanceTypeMlC42xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC42xlarge = "ml.c4.2xlarge" + + // ProductionVariantInstanceTypeMlC44xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC44xlarge = "ml.c4.4xlarge" + + // ProductionVariantInstanceTypeMlC48xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC48xlarge = "ml.c4.8xlarge" + + // ProductionVariantInstanceTypeMlP2Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP2Xlarge = "ml.p2.xlarge" + + // ProductionVariantInstanceTypeMlP28xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP28xlarge = "ml.p2.8xlarge" + + // ProductionVariantInstanceTypeMlP216xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP216xlarge = "ml.p2.16xlarge" + + // ProductionVariantInstanceTypeMlP32xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP32xlarge = "ml.p3.2xlarge" + + // ProductionVariantInstanceTypeMlP38xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP38xlarge = "ml.p3.8xlarge" + + // ProductionVariantInstanceTypeMlP316xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlP316xlarge = "ml.p3.16xlarge" + + // ProductionVariantInstanceTypeMlC5Large is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC5Large = "ml.c5.large" + + // ProductionVariantInstanceTypeMlC5Xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC5Xlarge = "ml.c5.xlarge" + + // ProductionVariantInstanceTypeMlC52xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC52xlarge = "ml.c5.2xlarge" + + // ProductionVariantInstanceTypeMlC54xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC54xlarge = "ml.c5.4xlarge" + + // ProductionVariantInstanceTypeMlC59xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC59xlarge = "ml.c5.9xlarge" + + // ProductionVariantInstanceTypeMlC518xlarge is a ProductionVariantInstanceType enum value + ProductionVariantInstanceTypeMlC518xlarge = "ml.c5.18xlarge" +) + +const ( + // RecordWrapperNone is a RecordWrapper enum value + RecordWrapperNone = "None" + + // RecordWrapperRecordIo is a RecordWrapper enum value + RecordWrapperRecordIo = "RecordIO" +) + +const ( + // ResourceTypeTrainingJob is a ResourceType enum value + ResourceTypeTrainingJob = "TrainingJob" +) + +const ( + // S3DataDistributionFullyReplicated is a S3DataDistribution enum value + S3DataDistributionFullyReplicated = "FullyReplicated" + + // S3DataDistributionShardedByS3key is a S3DataDistribution enum value + S3DataDistributionShardedByS3key = "ShardedByS3Key" +) + +const ( + // S3DataTypeManifestFile is a S3DataType enum value + S3DataTypeManifestFile = "ManifestFile" + + // S3DataTypeS3prefix is a S3DataType enum value + S3DataTypeS3prefix = "S3Prefix" + + // S3DataTypeAugmentedManifestFile is a S3DataType enum value + S3DataTypeAugmentedManifestFile = "AugmentedManifestFile" +) + +const ( + // SearchSortOrderAscending is a SearchSortOrder enum value + SearchSortOrderAscending = "Ascending" + + // SearchSortOrderDescending is a SearchSortOrder enum value + SearchSortOrderDescending = "Descending" +) + +const ( + // SecondaryStatusStarting is a SecondaryStatus enum value + SecondaryStatusStarting = "Starting" + + // SecondaryStatusLaunchingMlinstances is a SecondaryStatus enum value + SecondaryStatusLaunchingMlinstances = "LaunchingMLInstances" + + // SecondaryStatusPreparingTrainingStack is a SecondaryStatus enum value + SecondaryStatusPreparingTrainingStack = "PreparingTrainingStack" + + // SecondaryStatusDownloading is a SecondaryStatus enum value + SecondaryStatusDownloading = "Downloading" + + // SecondaryStatusDownloadingTrainingImage is a SecondaryStatus enum value + SecondaryStatusDownloadingTrainingImage = "DownloadingTrainingImage" + + // SecondaryStatusTraining is a SecondaryStatus enum value + SecondaryStatusTraining = "Training" + + // SecondaryStatusUploading is a SecondaryStatus enum value + SecondaryStatusUploading = "Uploading" + + // SecondaryStatusStopping is a SecondaryStatus enum value + SecondaryStatusStopping = "Stopping" + + // SecondaryStatusStopped is a SecondaryStatus enum value + SecondaryStatusStopped = "Stopped" + + // SecondaryStatusMaxRuntimeExceeded is a SecondaryStatus enum value + SecondaryStatusMaxRuntimeExceeded = "MaxRuntimeExceeded" + + // SecondaryStatusCompleted is a SecondaryStatus enum value + SecondaryStatusCompleted = "Completed" + + // SecondaryStatusFailed is a SecondaryStatus enum value + SecondaryStatusFailed = "Failed" +) + +const ( + // SortByName is a SortBy enum value + SortByName = "Name" + + // SortByCreationTime is a SortBy enum value + SortByCreationTime = "CreationTime" + + // SortByStatus is a SortBy enum value + SortByStatus = "Status" +) + +const ( + // SortOrderAscending is a SortOrder enum value + SortOrderAscending = "Ascending" + + // SortOrderDescending is a SortOrder enum value + SortOrderDescending = "Descending" +) + +const ( + // SplitTypeNone is a SplitType enum value + SplitTypeNone = "None" + + // SplitTypeLine is a SplitType enum value + SplitTypeLine = "Line" + + // SplitTypeRecordIo is a SplitType enum value + SplitTypeRecordIo = "RecordIO" + + // SplitTypeTfrecord is a SplitType enum value + SplitTypeTfrecord = "TFRecord" +) + +const ( + // TargetDeviceMlM4 is a TargetDevice enum value + TargetDeviceMlM4 = "ml_m4" + + // TargetDeviceMlM5 is a TargetDevice enum value + TargetDeviceMlM5 = "ml_m5" + + // TargetDeviceMlC4 is a TargetDevice enum value + TargetDeviceMlC4 = "ml_c4" + + // TargetDeviceMlC5 is a TargetDevice enum value + TargetDeviceMlC5 = "ml_c5" + + // TargetDeviceMlP2 is a TargetDevice enum value + TargetDeviceMlP2 = "ml_p2" + + // TargetDeviceMlP3 is a TargetDevice enum value + TargetDeviceMlP3 = "ml_p3" + + // TargetDeviceJetsonTx1 is a TargetDevice enum value + TargetDeviceJetsonTx1 = "jetson_tx1" + + // TargetDeviceJetsonTx2 is a TargetDevice enum value + TargetDeviceJetsonTx2 = "jetson_tx2" + + // TargetDeviceRasp3b is a TargetDevice enum value + TargetDeviceRasp3b = "rasp3b" + + // TargetDeviceDeeplens is a TargetDevice enum value + TargetDeviceDeeplens = "deeplens" +) + +const ( + // TrainingInputModePipe is a TrainingInputMode enum value + TrainingInputModePipe = "Pipe" + + // TrainingInputModeFile is a TrainingInputMode enum value + TrainingInputModeFile = "File" +) + +const ( + // TrainingInstanceTypeMlM4Xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM4Xlarge = "ml.m4.xlarge" + + // TrainingInstanceTypeMlM42xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM42xlarge = "ml.m4.2xlarge" + + // TrainingInstanceTypeMlM44xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM44xlarge = "ml.m4.4xlarge" + + // TrainingInstanceTypeMlM410xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM410xlarge = "ml.m4.10xlarge" + + // TrainingInstanceTypeMlM416xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM416xlarge = "ml.m4.16xlarge" + + // TrainingInstanceTypeMlM5Large is a TrainingInstanceType enum value + TrainingInstanceTypeMlM5Large = "ml.m5.large" + + // TrainingInstanceTypeMlM5Xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM5Xlarge = "ml.m5.xlarge" + + // TrainingInstanceTypeMlM52xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM52xlarge = "ml.m5.2xlarge" + + // TrainingInstanceTypeMlM54xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM54xlarge = "ml.m5.4xlarge" + + // TrainingInstanceTypeMlM512xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM512xlarge = "ml.m5.12xlarge" + + // TrainingInstanceTypeMlM524xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlM524xlarge = "ml.m5.24xlarge" + + // TrainingInstanceTypeMlC4Xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC4Xlarge = "ml.c4.xlarge" + + // TrainingInstanceTypeMlC42xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC42xlarge = "ml.c4.2xlarge" + + // TrainingInstanceTypeMlC44xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC44xlarge = "ml.c4.4xlarge" + + // TrainingInstanceTypeMlC48xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC48xlarge = "ml.c4.8xlarge" + + // TrainingInstanceTypeMlP2Xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlP2Xlarge = "ml.p2.xlarge" + + // TrainingInstanceTypeMlP28xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlP28xlarge = "ml.p2.8xlarge" + + // TrainingInstanceTypeMlP216xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlP216xlarge = "ml.p2.16xlarge" + + // TrainingInstanceTypeMlP32xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlP32xlarge = "ml.p3.2xlarge" + + // TrainingInstanceTypeMlP38xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlP38xlarge = "ml.p3.8xlarge" + + // TrainingInstanceTypeMlP316xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlP316xlarge = "ml.p3.16xlarge" + + // TrainingInstanceTypeMlC5Xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC5Xlarge = "ml.c5.xlarge" + + // TrainingInstanceTypeMlC52xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC52xlarge = "ml.c5.2xlarge" + + // TrainingInstanceTypeMlC54xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC54xlarge = "ml.c5.4xlarge" + + // TrainingInstanceTypeMlC59xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC59xlarge = "ml.c5.9xlarge" + + // TrainingInstanceTypeMlC518xlarge is a TrainingInstanceType enum value + TrainingInstanceTypeMlC518xlarge = "ml.c5.18xlarge" +) + +const ( + // TrainingJobEarlyStoppingTypeOff is a TrainingJobEarlyStoppingType enum value + TrainingJobEarlyStoppingTypeOff = "Off" + + // TrainingJobEarlyStoppingTypeAuto is a TrainingJobEarlyStoppingType enum value + TrainingJobEarlyStoppingTypeAuto = "Auto" +) + +const ( + // TrainingJobSortByOptionsName is a TrainingJobSortByOptions enum value + TrainingJobSortByOptionsName = "Name" + + // TrainingJobSortByOptionsCreationTime is a TrainingJobSortByOptions enum value + TrainingJobSortByOptionsCreationTime = "CreationTime" + + // TrainingJobSortByOptionsStatus is a TrainingJobSortByOptions enum value + TrainingJobSortByOptionsStatus = "Status" + + // TrainingJobSortByOptionsFinalObjectiveMetricValue is a TrainingJobSortByOptions enum value + TrainingJobSortByOptionsFinalObjectiveMetricValue = "FinalObjectiveMetricValue" +) + +const ( + // TrainingJobStatusInProgress is a TrainingJobStatus enum value + TrainingJobStatusInProgress = "InProgress" + + // TrainingJobStatusCompleted is a TrainingJobStatus enum value + TrainingJobStatusCompleted = "Completed" + + // TrainingJobStatusFailed is a TrainingJobStatus enum value + TrainingJobStatusFailed = "Failed" + + // TrainingJobStatusStopping is a TrainingJobStatus enum value + TrainingJobStatusStopping = "Stopping" + + // TrainingJobStatusStopped is a TrainingJobStatus enum value + TrainingJobStatusStopped = "Stopped" +) + +const ( + // TransformInstanceTypeMlM4Xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM4Xlarge = "ml.m4.xlarge" + + // TransformInstanceTypeMlM42xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM42xlarge = "ml.m4.2xlarge" + + // TransformInstanceTypeMlM44xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM44xlarge = "ml.m4.4xlarge" + + // TransformInstanceTypeMlM410xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM410xlarge = "ml.m4.10xlarge" + + // TransformInstanceTypeMlM416xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM416xlarge = "ml.m4.16xlarge" + + // TransformInstanceTypeMlC4Xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC4Xlarge = "ml.c4.xlarge" + + // TransformInstanceTypeMlC42xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC42xlarge = "ml.c4.2xlarge" + + // TransformInstanceTypeMlC44xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC44xlarge = "ml.c4.4xlarge" + + // TransformInstanceTypeMlC48xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC48xlarge = "ml.c4.8xlarge" + + // TransformInstanceTypeMlP2Xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlP2Xlarge = "ml.p2.xlarge" + + // TransformInstanceTypeMlP28xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlP28xlarge = "ml.p2.8xlarge" + + // TransformInstanceTypeMlP216xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlP216xlarge = "ml.p2.16xlarge" + + // TransformInstanceTypeMlP32xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlP32xlarge = "ml.p3.2xlarge" + + // TransformInstanceTypeMlP38xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlP38xlarge = "ml.p3.8xlarge" + + // TransformInstanceTypeMlP316xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlP316xlarge = "ml.p3.16xlarge" + + // TransformInstanceTypeMlC5Xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC5Xlarge = "ml.c5.xlarge" + + // TransformInstanceTypeMlC52xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC52xlarge = "ml.c5.2xlarge" + + // TransformInstanceTypeMlC54xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC54xlarge = "ml.c5.4xlarge" + + // TransformInstanceTypeMlC59xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC59xlarge = "ml.c5.9xlarge" + + // TransformInstanceTypeMlC518xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlC518xlarge = "ml.c5.18xlarge" + + // TransformInstanceTypeMlM5Large is a TransformInstanceType enum value + TransformInstanceTypeMlM5Large = "ml.m5.large" + + // TransformInstanceTypeMlM5Xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM5Xlarge = "ml.m5.xlarge" + + // TransformInstanceTypeMlM52xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM52xlarge = "ml.m5.2xlarge" + + // TransformInstanceTypeMlM54xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM54xlarge = "ml.m5.4xlarge" + + // TransformInstanceTypeMlM512xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM512xlarge = "ml.m5.12xlarge" + + // TransformInstanceTypeMlM524xlarge is a TransformInstanceType enum value + TransformInstanceTypeMlM524xlarge = "ml.m5.24xlarge" +) + +const ( + // TransformJobStatusInProgress is a TransformJobStatus enum value + TransformJobStatusInProgress = "InProgress" + + // TransformJobStatusCompleted is a TransformJobStatus enum value + TransformJobStatusCompleted = "Completed" + + // TransformJobStatusFailed is a TransformJobStatus enum value + TransformJobStatusFailed = "Failed" + + // TransformJobStatusStopping is a TransformJobStatus enum value + TransformJobStatusStopping = "Stopping" + + // TransformJobStatusStopped is a TransformJobStatus enum value + TransformJobStatusStopped = "Stopped" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go new file mode 100644 index 000000000..d74f40297 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package sagemaker provides the client and types for making API +// requests to Amazon SageMaker Service. +// +// Definition of the public APIs exposed by SageMaker +// +// See https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24 for more information on this service. +// +// See sagemaker package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/sagemaker/ +// +// Using the Client +// +// To contact Amazon SageMaker Service with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon SageMaker Service client SageMaker for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/sagemaker/#New +package sagemaker diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go new file mode 100644 index 000000000..d7fd2c457 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/errors.go @@ -0,0 +1,25 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sagemaker + +const ( + + // ErrCodeResourceInUse for service response error code + // "ResourceInUse". + // + // Resource being accessed is in use. + ErrCodeResourceInUse = "ResourceInUse" + + // ErrCodeResourceLimitExceeded for service response error code + // "ResourceLimitExceeded". + // + // You have exceeded an Amazon SageMaker resource limit. For example, you might + // have too many training jobs created. + ErrCodeResourceLimitExceeded = "ResourceLimitExceeded" + + // ErrCodeResourceNotFound for service response error code + // "ResourceNotFound". + // + // Resource being access is not found. + ErrCodeResourceNotFound = "ResourceNotFound" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go new file mode 100644 index 000000000..7ae1df734 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sagemaker + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +// SageMaker provides the API operation methods for making requests to +// Amazon SageMaker Service. See this package's package overview docs +// for details on the service. +// +// SageMaker methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SageMaker struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "sagemaker" // Name of service. + EndpointsID = "api.sagemaker" // ID to lookup a service endpoint with. + ServiceID = "SageMaker" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the SageMaker client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a SageMaker client from just a session. +// svc := sagemaker.New(mySession) +// +// // Create a SageMaker client with additional configuration +// svc := sagemaker.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SageMaker { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "sagemaker" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *SageMaker { + svc := &SageMaker{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-07-24", + JSONVersion: "1.1", + TargetPrefix: "SageMaker", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a SageMaker operation and runs any +// custom request initialization. +func (c *SageMaker) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go new file mode 100644 index 000000000..e4054f0ff --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sagemaker/waiters.go @@ -0,0 +1,392 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sagemaker + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilEndpointDeleted uses the SageMaker API operation +// DescribeEndpoint to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilEndpointDeleted(input *DescribeEndpointInput) error { + return c.WaitUntilEndpointDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilEndpointDeletedWithContext is an extended version of WaitUntilEndpointDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilEndpointDeletedWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilEndpointDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ValidationException", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "EndpointStatus", + Expected: "Failed", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeEndpointInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEndpointRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilEndpointInService uses the SageMaker API operation +// DescribeEndpoint to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilEndpointInService(input *DescribeEndpointInput) error { + return c.WaitUntilEndpointInServiceWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilEndpointInServiceWithContext is an extended version of WaitUntilEndpointInService. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilEndpointInServiceWithContext(ctx aws.Context, input *DescribeEndpointInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilEndpointInService", + MaxAttempts: 120, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "EndpointStatus", + Expected: "InService", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "EndpointStatus", + Expected: "Failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ValidationException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeEndpointInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEndpointRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilNotebookInstanceDeleted uses the SageMaker API operation +// DescribeNotebookInstance to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilNotebookInstanceDeleted(input *DescribeNotebookInstanceInput) error { + return c.WaitUntilNotebookInstanceDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilNotebookInstanceDeletedWithContext is an extended version of WaitUntilNotebookInstanceDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilNotebookInstanceDeletedWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilNotebookInstanceDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ValidationException", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", + Expected: "Failed", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeNotebookInstanceInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNotebookInstanceRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilNotebookInstanceInService uses the SageMaker API operation +// DescribeNotebookInstance to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilNotebookInstanceInService(input *DescribeNotebookInstanceInput) error { + return c.WaitUntilNotebookInstanceInServiceWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilNotebookInstanceInServiceWithContext is an extended version of WaitUntilNotebookInstanceInService. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilNotebookInstanceInServiceWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilNotebookInstanceInService", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", + Expected: "InService", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", + Expected: "Failed", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeNotebookInstanceInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNotebookInstanceRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilNotebookInstanceStopped uses the SageMaker API operation +// DescribeNotebookInstance to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilNotebookInstanceStopped(input *DescribeNotebookInstanceInput) error { + return c.WaitUntilNotebookInstanceStoppedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilNotebookInstanceStoppedWithContext is an extended version of WaitUntilNotebookInstanceStopped. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilNotebookInstanceStoppedWithContext(ctx aws.Context, input *DescribeNotebookInstanceInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilNotebookInstanceStopped", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", + Expected: "Stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "NotebookInstanceStatus", + Expected: "Failed", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeNotebookInstanceInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNotebookInstanceRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilTrainingJobCompletedOrStopped uses the SageMaker API operation +// DescribeTrainingJob to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilTrainingJobCompletedOrStopped(input *DescribeTrainingJobInput) error { + return c.WaitUntilTrainingJobCompletedOrStoppedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilTrainingJobCompletedOrStoppedWithContext is an extended version of WaitUntilTrainingJobCompletedOrStopped. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilTrainingJobCompletedOrStoppedWithContext(ctx aws.Context, input *DescribeTrainingJobInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilTrainingJobCompletedOrStopped", + MaxAttempts: 180, + Delay: request.ConstantWaiterDelay(120 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus", + Expected: "Completed", + }, + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus", + Expected: "Stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "TrainingJobStatus", + Expected: "Failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ValidationException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeTrainingJobInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTrainingJobRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilTransformJobCompletedOrStopped uses the SageMaker API operation +// DescribeTransformJob to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *SageMaker) WaitUntilTransformJobCompletedOrStopped(input *DescribeTransformJobInput) error { + return c.WaitUntilTransformJobCompletedOrStoppedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilTransformJobCompletedOrStoppedWithContext is an extended version of WaitUntilTransformJobCompletedOrStopped. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SageMaker) WaitUntilTransformJobCompletedOrStoppedWithContext(ctx aws.Context, input *DescribeTransformJobInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilTransformJobCompletedOrStopped", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(60 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "TransformJobStatus", + Expected: "Completed", + }, + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "TransformJobStatus", + Expected: "Stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "TransformJobStatus", + Expected: "Failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ValidationException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeTransformJobInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTransformJobRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go new file mode 100644 index 000000000..d8331c988 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/api.go @@ -0,0 +1,3900 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package serverlessapplicationrepository + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opCreateApplication = "CreateApplication" + +// CreateApplicationRequest generates a "aws/request.Request" representing the +// client's request for the CreateApplication operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateApplication for more information on using the CreateApplication +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateApplicationRequest method. +// req, resp := client.CreateApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplication +func (c *ServerlessApplicationRepository) CreateApplicationRequest(input *CreateApplicationRequest) (req *request.Request, output *CreateApplicationOutput) { + op := &request.Operation{ + Name: opCreateApplication, + HTTPMethod: "POST", + HTTPPath: "/applications", + } + + if input == nil { + input = &CreateApplicationRequest{} + } + + output = &CreateApplicationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApplication API operation for AWSServerlessApplicationRepository. +// +// Creates an application, optionally including an AWS SAM file to create the +// first application version in the same call. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation CreateApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeConflictException "ConflictException" +// The resource already exists. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplication +func (c *ServerlessApplicationRepository) CreateApplication(input *CreateApplicationRequest) (*CreateApplicationOutput, error) { + req, out := c.CreateApplicationRequest(input) + return out, req.Send() +} + +// CreateApplicationWithContext is the same as CreateApplication with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApplication for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationRequest, opts ...request.Option) (*CreateApplicationOutput, error) { + req, out := c.CreateApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateApplicationVersion = "CreateApplicationVersion" + +// CreateApplicationVersionRequest generates a "aws/request.Request" representing the +// client's request for the CreateApplicationVersion operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateApplicationVersion for more information on using the CreateApplicationVersion +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateApplicationVersionRequest method. +// req, resp := client.CreateApplicationVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationVersion +func (c *ServerlessApplicationRepository) CreateApplicationVersionRequest(input *CreateApplicationVersionRequest) (req *request.Request, output *CreateApplicationVersionOutput) { + op := &request.Operation{ + Name: opCreateApplicationVersion, + HTTPMethod: "PUT", + HTTPPath: "/applications/{applicationId}/versions/{semanticVersion}", + } + + if input == nil { + input = &CreateApplicationVersionRequest{} + } + + output = &CreateApplicationVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApplicationVersion API operation for AWSServerlessApplicationRepository. +// +// Creates an application version. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation CreateApplicationVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeConflictException "ConflictException" +// The resource already exists. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateApplicationVersion +func (c *ServerlessApplicationRepository) CreateApplicationVersion(input *CreateApplicationVersionRequest) (*CreateApplicationVersionOutput, error) { + req, out := c.CreateApplicationVersionRequest(input) + return out, req.Send() +} + +// CreateApplicationVersionWithContext is the same as CreateApplicationVersion with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApplicationVersion for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) CreateApplicationVersionWithContext(ctx aws.Context, input *CreateApplicationVersionRequest, opts ...request.Option) (*CreateApplicationVersionOutput, error) { + req, out := c.CreateApplicationVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCloudFormationChangeSet = "CreateCloudFormationChangeSet" + +// CreateCloudFormationChangeSetRequest generates a "aws/request.Request" representing the +// client's request for the CreateCloudFormationChangeSet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCloudFormationChangeSet for more information on using the CreateCloudFormationChangeSet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCloudFormationChangeSetRequest method. +// req, resp := client.CreateCloudFormationChangeSetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationChangeSet +func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSetRequest(input *CreateCloudFormationChangeSetRequest) (req *request.Request, output *CreateCloudFormationChangeSetOutput) { + op := &request.Operation{ + Name: opCreateCloudFormationChangeSet, + HTTPMethod: "POST", + HTTPPath: "/applications/{applicationId}/changesets", + } + + if input == nil { + input = &CreateCloudFormationChangeSetRequest{} + } + + output = &CreateCloudFormationChangeSetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCloudFormationChangeSet API operation for AWSServerlessApplicationRepository. +// +// Creates an AWS CloudFormation change set for the given application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation CreateCloudFormationChangeSet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationChangeSet +func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSet(input *CreateCloudFormationChangeSetRequest) (*CreateCloudFormationChangeSetOutput, error) { + req, out := c.CreateCloudFormationChangeSetRequest(input) + return out, req.Send() +} + +// CreateCloudFormationChangeSetWithContext is the same as CreateCloudFormationChangeSet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCloudFormationChangeSet for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) CreateCloudFormationChangeSetWithContext(ctx aws.Context, input *CreateCloudFormationChangeSetRequest, opts ...request.Option) (*CreateCloudFormationChangeSetOutput, error) { + req, out := c.CreateCloudFormationChangeSetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCloudFormationTemplate = "CreateCloudFormationTemplate" + +// CreateCloudFormationTemplateRequest generates a "aws/request.Request" representing the +// client's request for the CreateCloudFormationTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCloudFormationTemplate for more information on using the CreateCloudFormationTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCloudFormationTemplateRequest method. +// req, resp := client.CreateCloudFormationTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationTemplate +func (c *ServerlessApplicationRepository) CreateCloudFormationTemplateRequest(input *CreateCloudFormationTemplateInput) (req *request.Request, output *CreateCloudFormationTemplateOutput) { + op := &request.Operation{ + Name: opCreateCloudFormationTemplate, + HTTPMethod: "POST", + HTTPPath: "/applications/{applicationId}/templates", + } + + if input == nil { + input = &CreateCloudFormationTemplateInput{} + } + + output = &CreateCloudFormationTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCloudFormationTemplate API operation for AWSServerlessApplicationRepository. +// +// Creates an AWS CloudFormation template. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation CreateCloudFormationTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/CreateCloudFormationTemplate +func (c *ServerlessApplicationRepository) CreateCloudFormationTemplate(input *CreateCloudFormationTemplateInput) (*CreateCloudFormationTemplateOutput, error) { + req, out := c.CreateCloudFormationTemplateRequest(input) + return out, req.Send() +} + +// CreateCloudFormationTemplateWithContext is the same as CreateCloudFormationTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCloudFormationTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) CreateCloudFormationTemplateWithContext(ctx aws.Context, input *CreateCloudFormationTemplateInput, opts ...request.Option) (*CreateCloudFormationTemplateOutput, error) { + req, out := c.CreateCloudFormationTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApplication = "DeleteApplication" + +// DeleteApplicationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApplication operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteApplication for more information on using the DeleteApplication +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteApplicationRequest method. +// req, resp := client.DeleteApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/DeleteApplication +func (c *ServerlessApplicationRepository) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) { + op := &request.Operation{ + Name: opDeleteApplication, + HTTPMethod: "DELETE", + HTTPPath: "/applications/{applicationId}", + } + + if input == nil { + input = &DeleteApplicationInput{} + } + + output = &DeleteApplicationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApplication API operation for AWSServerlessApplicationRepository. +// +// Deletes the specified application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation DeleteApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeConflictException "ConflictException" +// The resource already exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/DeleteApplication +func (c *ServerlessApplicationRepository) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) { + req, out := c.DeleteApplicationRequest(input) + return out, req.Send() +} + +// DeleteApplicationWithContext is the same as DeleteApplication with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApplication for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) { + req, out := c.DeleteApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApplication = "GetApplication" + +// GetApplicationRequest generates a "aws/request.Request" representing the +// client's request for the GetApplication operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApplication for more information on using the GetApplication +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApplicationRequest method. +// req, resp := client.GetApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplication +func (c *ServerlessApplicationRepository) GetApplicationRequest(input *GetApplicationInput) (req *request.Request, output *GetApplicationOutput) { + op := &request.Operation{ + Name: opGetApplication, + HTTPMethod: "GET", + HTTPPath: "/applications/{applicationId}", + } + + if input == nil { + input = &GetApplicationInput{} + } + + output = &GetApplicationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApplication API operation for AWSServerlessApplicationRepository. +// +// Gets the specified application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation GetApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplication +func (c *ServerlessApplicationRepository) GetApplication(input *GetApplicationInput) (*GetApplicationOutput, error) { + req, out := c.GetApplicationRequest(input) + return out, req.Send() +} + +// GetApplicationWithContext is the same as GetApplication with the addition of +// the ability to pass a context and additional request options. +// +// See GetApplication for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) GetApplicationWithContext(ctx aws.Context, input *GetApplicationInput, opts ...request.Option) (*GetApplicationOutput, error) { + req, out := c.GetApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApplicationPolicy = "GetApplicationPolicy" + +// GetApplicationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetApplicationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetApplicationPolicy for more information on using the GetApplicationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetApplicationPolicyRequest method. +// req, resp := client.GetApplicationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationPolicy +func (c *ServerlessApplicationRepository) GetApplicationPolicyRequest(input *GetApplicationPolicyInput) (req *request.Request, output *GetApplicationPolicyOutput) { + op := &request.Operation{ + Name: opGetApplicationPolicy, + HTTPMethod: "GET", + HTTPPath: "/applications/{applicationId}/policy", + } + + if input == nil { + input = &GetApplicationPolicyInput{} + } + + output = &GetApplicationPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApplicationPolicy API operation for AWSServerlessApplicationRepository. +// +// Retrieves the policy for the application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation GetApplicationPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetApplicationPolicy +func (c *ServerlessApplicationRepository) GetApplicationPolicy(input *GetApplicationPolicyInput) (*GetApplicationPolicyOutput, error) { + req, out := c.GetApplicationPolicyRequest(input) + return out, req.Send() +} + +// GetApplicationPolicyWithContext is the same as GetApplicationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetApplicationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) GetApplicationPolicyWithContext(ctx aws.Context, input *GetApplicationPolicyInput, opts ...request.Option) (*GetApplicationPolicyOutput, error) { + req, out := c.GetApplicationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCloudFormationTemplate = "GetCloudFormationTemplate" + +// GetCloudFormationTemplateRequest generates a "aws/request.Request" representing the +// client's request for the GetCloudFormationTemplate operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCloudFormationTemplate for more information on using the GetCloudFormationTemplate +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetCloudFormationTemplateRequest method. +// req, resp := client.GetCloudFormationTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetCloudFormationTemplate +func (c *ServerlessApplicationRepository) GetCloudFormationTemplateRequest(input *GetCloudFormationTemplateInput) (req *request.Request, output *GetCloudFormationTemplateOutput) { + op := &request.Operation{ + Name: opGetCloudFormationTemplate, + HTTPMethod: "GET", + HTTPPath: "/applications/{applicationId}/templates/{templateId}", + } + + if input == nil { + input = &GetCloudFormationTemplateInput{} + } + + output = &GetCloudFormationTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCloudFormationTemplate API operation for AWSServerlessApplicationRepository. +// +// Gets the specified AWS CloudFormation template. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation GetCloudFormationTemplate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/GetCloudFormationTemplate +func (c *ServerlessApplicationRepository) GetCloudFormationTemplate(input *GetCloudFormationTemplateInput) (*GetCloudFormationTemplateOutput, error) { + req, out := c.GetCloudFormationTemplateRequest(input) + return out, req.Send() +} + +// GetCloudFormationTemplateWithContext is the same as GetCloudFormationTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See GetCloudFormationTemplate for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) GetCloudFormationTemplateWithContext(ctx aws.Context, input *GetCloudFormationTemplateInput, opts ...request.Option) (*GetCloudFormationTemplateOutput, error) { + req, out := c.GetCloudFormationTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListApplicationDependencies = "ListApplicationDependencies" + +// ListApplicationDependenciesRequest generates a "aws/request.Request" representing the +// client's request for the ListApplicationDependencies operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListApplicationDependencies for more information on using the ListApplicationDependencies +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListApplicationDependenciesRequest method. +// req, resp := client.ListApplicationDependenciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationDependencies +func (c *ServerlessApplicationRepository) ListApplicationDependenciesRequest(input *ListApplicationDependenciesInput) (req *request.Request, output *ListApplicationDependenciesOutput) { + op := &request.Operation{ + Name: opListApplicationDependencies, + HTTPMethod: "GET", + HTTPPath: "/applications/{applicationId}/dependencies", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxItems", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListApplicationDependenciesInput{} + } + + output = &ListApplicationDependenciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListApplicationDependencies API operation for AWSServerlessApplicationRepository. +// +// Retrieves the list of applications nested in the containing application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation ListApplicationDependencies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationDependencies +func (c *ServerlessApplicationRepository) ListApplicationDependencies(input *ListApplicationDependenciesInput) (*ListApplicationDependenciesOutput, error) { + req, out := c.ListApplicationDependenciesRequest(input) + return out, req.Send() +} + +// ListApplicationDependenciesWithContext is the same as ListApplicationDependencies with the addition of +// the ability to pass a context and additional request options. +// +// See ListApplicationDependencies for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) ListApplicationDependenciesWithContext(ctx aws.Context, input *ListApplicationDependenciesInput, opts ...request.Option) (*ListApplicationDependenciesOutput, error) { + req, out := c.ListApplicationDependenciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListApplicationDependenciesPages iterates over the pages of a ListApplicationDependencies operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListApplicationDependencies method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListApplicationDependencies operation. +// pageNum := 0 +// err := client.ListApplicationDependenciesPages(params, +// func(page *ListApplicationDependenciesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServerlessApplicationRepository) ListApplicationDependenciesPages(input *ListApplicationDependenciesInput, fn func(*ListApplicationDependenciesOutput, bool) bool) error { + return c.ListApplicationDependenciesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListApplicationDependenciesPagesWithContext same as ListApplicationDependenciesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) ListApplicationDependenciesPagesWithContext(ctx aws.Context, input *ListApplicationDependenciesInput, fn func(*ListApplicationDependenciesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListApplicationDependenciesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListApplicationDependenciesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListApplicationDependenciesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListApplicationVersions = "ListApplicationVersions" + +// ListApplicationVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListApplicationVersions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListApplicationVersions for more information on using the ListApplicationVersions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListApplicationVersionsRequest method. +// req, resp := client.ListApplicationVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationVersions +func (c *ServerlessApplicationRepository) ListApplicationVersionsRequest(input *ListApplicationVersionsInput) (req *request.Request, output *ListApplicationVersionsOutput) { + op := &request.Operation{ + Name: opListApplicationVersions, + HTTPMethod: "GET", + HTTPPath: "/applications/{applicationId}/versions", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxItems", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListApplicationVersionsInput{} + } + + output = &ListApplicationVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListApplicationVersions API operation for AWSServerlessApplicationRepository. +// +// Lists versions for the specified application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation ListApplicationVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplicationVersions +func (c *ServerlessApplicationRepository) ListApplicationVersions(input *ListApplicationVersionsInput) (*ListApplicationVersionsOutput, error) { + req, out := c.ListApplicationVersionsRequest(input) + return out, req.Send() +} + +// ListApplicationVersionsWithContext is the same as ListApplicationVersions with the addition of +// the ability to pass a context and additional request options. +// +// See ListApplicationVersions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) ListApplicationVersionsWithContext(ctx aws.Context, input *ListApplicationVersionsInput, opts ...request.Option) (*ListApplicationVersionsOutput, error) { + req, out := c.ListApplicationVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListApplicationVersionsPages iterates over the pages of a ListApplicationVersions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListApplicationVersions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListApplicationVersions operation. +// pageNum := 0 +// err := client.ListApplicationVersionsPages(params, +// func(page *ListApplicationVersionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServerlessApplicationRepository) ListApplicationVersionsPages(input *ListApplicationVersionsInput, fn func(*ListApplicationVersionsOutput, bool) bool) error { + return c.ListApplicationVersionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListApplicationVersionsPagesWithContext same as ListApplicationVersionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) ListApplicationVersionsPagesWithContext(ctx aws.Context, input *ListApplicationVersionsInput, fn func(*ListApplicationVersionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListApplicationVersionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListApplicationVersionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListApplicationVersionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListApplications = "ListApplications" + +// ListApplicationsRequest generates a "aws/request.Request" representing the +// client's request for the ListApplications operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListApplications for more information on using the ListApplications +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListApplicationsRequest method. +// req, resp := client.ListApplicationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplications +func (c *ServerlessApplicationRepository) ListApplicationsRequest(input *ListApplicationsInput) (req *request.Request, output *ListApplicationsOutput) { + op := &request.Operation{ + Name: opListApplications, + HTTPMethod: "GET", + HTTPPath: "/applications", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxItems", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListApplicationsInput{} + } + + output = &ListApplicationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListApplications API operation for AWSServerlessApplicationRepository. +// +// Lists applications owned by the requester. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation ListApplications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/ListApplications +func (c *ServerlessApplicationRepository) ListApplications(input *ListApplicationsInput) (*ListApplicationsOutput, error) { + req, out := c.ListApplicationsRequest(input) + return out, req.Send() +} + +// ListApplicationsWithContext is the same as ListApplications with the addition of +// the ability to pass a context and additional request options. +// +// See ListApplications for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) ListApplicationsWithContext(ctx aws.Context, input *ListApplicationsInput, opts ...request.Option) (*ListApplicationsOutput, error) { + req, out := c.ListApplicationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListApplicationsPages iterates over the pages of a ListApplications operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListApplications method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListApplications operation. +// pageNum := 0 +// err := client.ListApplicationsPages(params, +// func(page *ListApplicationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServerlessApplicationRepository) ListApplicationsPages(input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool) error { + return c.ListApplicationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListApplicationsPagesWithContext same as ListApplicationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) ListApplicationsPagesWithContext(ctx aws.Context, input *ListApplicationsInput, fn func(*ListApplicationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListApplicationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListApplicationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListApplicationsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opPutApplicationPolicy = "PutApplicationPolicy" + +// PutApplicationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutApplicationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutApplicationPolicy for more information on using the PutApplicationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutApplicationPolicyRequest method. +// req, resp := client.PutApplicationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/PutApplicationPolicy +func (c *ServerlessApplicationRepository) PutApplicationPolicyRequest(input *PutApplicationPolicyInput) (req *request.Request, output *PutApplicationPolicyOutput) { + op := &request.Operation{ + Name: opPutApplicationPolicy, + HTTPMethod: "PUT", + HTTPPath: "/applications/{applicationId}/policy", + } + + if input == nil { + input = &PutApplicationPolicyInput{} + } + + output = &PutApplicationPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutApplicationPolicy API operation for AWSServerlessApplicationRepository. +// +// Sets the permission policy for an application. For the list of actions supported +// for this operation, see Application Permissions (https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions) +// . +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation PutApplicationPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/PutApplicationPolicy +func (c *ServerlessApplicationRepository) PutApplicationPolicy(input *PutApplicationPolicyInput) (*PutApplicationPolicyOutput, error) { + req, out := c.PutApplicationPolicyRequest(input) + return out, req.Send() +} + +// PutApplicationPolicyWithContext is the same as PutApplicationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutApplicationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) PutApplicationPolicyWithContext(ctx aws.Context, input *PutApplicationPolicyInput, opts ...request.Option) (*PutApplicationPolicyOutput, error) { + req, out := c.PutApplicationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApplication = "UpdateApplication" + +// UpdateApplicationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApplication operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateApplication for more information on using the UpdateApplication +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateApplicationRequest method. +// req, resp := client.UpdateApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UpdateApplication +func (c *ServerlessApplicationRepository) UpdateApplicationRequest(input *UpdateApplicationRequest) (req *request.Request, output *UpdateApplicationOutput) { + op := &request.Operation{ + Name: opUpdateApplication, + HTTPMethod: "PATCH", + HTTPPath: "/applications/{applicationId}", + } + + if input == nil { + input = &UpdateApplicationRequest{} + } + + output = &UpdateApplicationOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApplication API operation for AWSServerlessApplicationRepository. +// +// Updates the specified application. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWSServerlessApplicationRepository's +// API operation UpdateApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// One of the parameters in the request is invalid. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The AWS Serverless Application Repository service encountered an internal +// error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// The client is not authenticated. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource (for example, an access policy statement) specified in the request +// doesn't exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The client is sending more than the allowed number of requests per unit of +// time. +// +// * ErrCodeConflictException "ConflictException" +// The resource already exists. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08/UpdateApplication +func (c *ServerlessApplicationRepository) UpdateApplication(input *UpdateApplicationRequest) (*UpdateApplicationOutput, error) { + req, out := c.UpdateApplicationRequest(input) + return out, req.Send() +} + +// UpdateApplicationWithContext is the same as UpdateApplication with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApplication for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ServerlessApplicationRepository) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationRequest, opts ...request.Option) (*UpdateApplicationOutput, error) { + req, out := c.UpdateApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// A nested application summary. +type ApplicationDependencySummary struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the nested application. + // + // ApplicationId is a required field + ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` + + // The semantic version of the nested application. + // + // SemanticVersion is a required field + SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` +} + +// String returns the string representation +func (s ApplicationDependencySummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationDependencySummary) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ApplicationDependencySummary) SetApplicationId(v string) *ApplicationDependencySummary { + s.ApplicationId = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *ApplicationDependencySummary) SetSemanticVersion(v string) *ApplicationDependencySummary { + s.SemanticVersion = &v + return s +} + +// Policy statement applied to the application. +type ApplicationPolicyStatement struct { + _ struct{} `type:"structure"` + + // For the list of actions supported for this operation, see Application Permissions + // (https://docs.aws.amazon.com/serverlessrepo/latest/devguide/access-control-resource-based.html#application-permissions). + // + // Actions is a required field + Actions []*string `locationName:"actions" type:"list" required:"true"` + + // An AWS account ID, or * to make the application public. + // + // Principals is a required field + Principals []*string `locationName:"principals" type:"list" required:"true"` + + // A unique ID for the statement. + StatementId *string `locationName:"statementId" type:"string"` +} + +// String returns the string representation +func (s ApplicationPolicyStatement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationPolicyStatement) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplicationPolicyStatement) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplicationPolicyStatement"} + if s.Actions == nil { + invalidParams.Add(request.NewErrParamRequired("Actions")) + } + if s.Principals == nil { + invalidParams.Add(request.NewErrParamRequired("Principals")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActions sets the Actions field's value. +func (s *ApplicationPolicyStatement) SetActions(v []*string) *ApplicationPolicyStatement { + s.Actions = v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *ApplicationPolicyStatement) SetPrincipals(v []*string) *ApplicationPolicyStatement { + s.Principals = v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *ApplicationPolicyStatement) SetStatementId(v string) *ApplicationPolicyStatement { + s.StatementId = &v + return s +} + +// Summary of details about the application. +type ApplicationSummary struct { + _ struct{} `type:"structure"` + + // The application Amazon Resource Name (ARN). + // + // ApplicationId is a required field + ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` + + // The name of the author publishing the app. + // + // Minimum length=1. Maximum length=127. + // + // Pattern "^[a-z0-9](([a-z0-9]|-(?!-))*[a-z0-9])?$"; + // + // Author is a required field + Author *string `locationName:"author" type:"string" required:"true"` + + // The date and time this resource was created. + CreationTime *string `locationName:"creationTime" type:"string"` + + // The description of the application. + // + // Minimum length=1. Maximum length=256 + // + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` + + // A URL with more information about the application, for example the location + // of your GitHub repository for the application. + HomePageUrl *string `locationName:"homePageUrl" type:"string"` + + // Labels to improve discovery of apps in search results. + // + // Minimum length=1. Maximum length=127. Maximum number of labels: 10 + // + // Pattern: "^[a-zA-Z0-9+\\-_:\\/@]+$"; + Labels []*string `locationName:"labels" type:"list"` + + // The name of the application. + // + // Minimum length=1. Maximum length=140 + // + // Pattern: "[a-zA-Z0-9\\-]+"; + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // A valid identifier from https://spdx.org/licenses/ (https://spdx.org/licenses/). + SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` +} + +// String returns the string representation +func (s ApplicationSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationSummary) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ApplicationSummary) SetApplicationId(v string) *ApplicationSummary { + s.ApplicationId = &v + return s +} + +// SetAuthor sets the Author field's value. +func (s *ApplicationSummary) SetAuthor(v string) *ApplicationSummary { + s.Author = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ApplicationSummary) SetCreationTime(v string) *ApplicationSummary { + s.CreationTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ApplicationSummary) SetDescription(v string) *ApplicationSummary { + s.Description = &v + return s +} + +// SetHomePageUrl sets the HomePageUrl field's value. +func (s *ApplicationSummary) SetHomePageUrl(v string) *ApplicationSummary { + s.HomePageUrl = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *ApplicationSummary) SetLabels(v []*string) *ApplicationSummary { + s.Labels = v + return s +} + +// SetName sets the Name field's value. +func (s *ApplicationSummary) SetName(v string) *ApplicationSummary { + s.Name = &v + return s +} + +// SetSpdxLicenseId sets the SpdxLicenseId field's value. +func (s *ApplicationSummary) SetSpdxLicenseId(v string) *ApplicationSummary { + s.SpdxLicenseId = &v + return s +} + +type CreateApplicationOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + Author *string `locationName:"author" type:"string"` + + CreationTime *string `locationName:"creationTime" type:"string"` + + Description *string `locationName:"description" type:"string"` + + HomePageUrl *string `locationName:"homePageUrl" type:"string"` + + Labels []*string `locationName:"labels" type:"list"` + + LicenseUrl *string `locationName:"licenseUrl" type:"string"` + + Name *string `locationName:"name" type:"string"` + + ReadmeUrl *string `locationName:"readmeUrl" type:"string"` + + SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` + + // Application version details. + Version *Version `locationName:"version" type:"structure"` +} + +// String returns the string representation +func (s CreateApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateApplicationOutput) SetApplicationId(v string) *CreateApplicationOutput { + s.ApplicationId = &v + return s +} + +// SetAuthor sets the Author field's value. +func (s *CreateApplicationOutput) SetAuthor(v string) *CreateApplicationOutput { + s.Author = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CreateApplicationOutput) SetCreationTime(v string) *CreateApplicationOutput { + s.CreationTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateApplicationOutput) SetDescription(v string) *CreateApplicationOutput { + s.Description = &v + return s +} + +// SetHomePageUrl sets the HomePageUrl field's value. +func (s *CreateApplicationOutput) SetHomePageUrl(v string) *CreateApplicationOutput { + s.HomePageUrl = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *CreateApplicationOutput) SetLabels(v []*string) *CreateApplicationOutput { + s.Labels = v + return s +} + +// SetLicenseUrl sets the LicenseUrl field's value. +func (s *CreateApplicationOutput) SetLicenseUrl(v string) *CreateApplicationOutput { + s.LicenseUrl = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateApplicationOutput) SetName(v string) *CreateApplicationOutput { + s.Name = &v + return s +} + +// SetReadmeUrl sets the ReadmeUrl field's value. +func (s *CreateApplicationOutput) SetReadmeUrl(v string) *CreateApplicationOutput { + s.ReadmeUrl = &v + return s +} + +// SetSpdxLicenseId sets the SpdxLicenseId field's value. +func (s *CreateApplicationOutput) SetSpdxLicenseId(v string) *CreateApplicationOutput { + s.SpdxLicenseId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CreateApplicationOutput) SetVersion(v *Version) *CreateApplicationOutput { + s.Version = v + return s +} + +type CreateApplicationRequest struct { + _ struct{} `type:"structure"` + + // Author is a required field + Author *string `locationName:"author" type:"string" required:"true"` + + // Description is a required field + Description *string `locationName:"description" type:"string" required:"true"` + + HomePageUrl *string `locationName:"homePageUrl" type:"string"` + + Labels []*string `locationName:"labels" type:"list"` + + LicenseBody *string `locationName:"licenseBody" type:"string"` + + LicenseUrl *string `locationName:"licenseUrl" type:"string"` + + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + ReadmeBody *string `locationName:"readmeBody" type:"string"` + + ReadmeUrl *string `locationName:"readmeUrl" type:"string"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` + + SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` + + SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` + + TemplateBody *string `locationName:"templateBody" type:"string"` + + TemplateUrl *string `locationName:"templateUrl" type:"string"` +} + +// String returns the string representation +func (s CreateApplicationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApplicationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApplicationRequest"} + if s.Author == nil { + invalidParams.Add(request.NewErrParamRequired("Author")) + } + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthor sets the Author field's value. +func (s *CreateApplicationRequest) SetAuthor(v string) *CreateApplicationRequest { + s.Author = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateApplicationRequest) SetDescription(v string) *CreateApplicationRequest { + s.Description = &v + return s +} + +// SetHomePageUrl sets the HomePageUrl field's value. +func (s *CreateApplicationRequest) SetHomePageUrl(v string) *CreateApplicationRequest { + s.HomePageUrl = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *CreateApplicationRequest) SetLabels(v []*string) *CreateApplicationRequest { + s.Labels = v + return s +} + +// SetLicenseBody sets the LicenseBody field's value. +func (s *CreateApplicationRequest) SetLicenseBody(v string) *CreateApplicationRequest { + s.LicenseBody = &v + return s +} + +// SetLicenseUrl sets the LicenseUrl field's value. +func (s *CreateApplicationRequest) SetLicenseUrl(v string) *CreateApplicationRequest { + s.LicenseUrl = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateApplicationRequest) SetName(v string) *CreateApplicationRequest { + s.Name = &v + return s +} + +// SetReadmeBody sets the ReadmeBody field's value. +func (s *CreateApplicationRequest) SetReadmeBody(v string) *CreateApplicationRequest { + s.ReadmeBody = &v + return s +} + +// SetReadmeUrl sets the ReadmeUrl field's value. +func (s *CreateApplicationRequest) SetReadmeUrl(v string) *CreateApplicationRequest { + s.ReadmeUrl = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateApplicationRequest) SetSemanticVersion(v string) *CreateApplicationRequest { + s.SemanticVersion = &v + return s +} + +// SetSourceCodeUrl sets the SourceCodeUrl field's value. +func (s *CreateApplicationRequest) SetSourceCodeUrl(v string) *CreateApplicationRequest { + s.SourceCodeUrl = &v + return s +} + +// SetSpdxLicenseId sets the SpdxLicenseId field's value. +func (s *CreateApplicationRequest) SetSpdxLicenseId(v string) *CreateApplicationRequest { + s.SpdxLicenseId = &v + return s +} + +// SetTemplateBody sets the TemplateBody field's value. +func (s *CreateApplicationRequest) SetTemplateBody(v string) *CreateApplicationRequest { + s.TemplateBody = &v + return s +} + +// SetTemplateUrl sets the TemplateUrl field's value. +func (s *CreateApplicationRequest) SetTemplateUrl(v string) *CreateApplicationRequest { + s.TemplateUrl = &v + return s +} + +type CreateApplicationVersionOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + CreationTime *string `locationName:"creationTime" type:"string"` + + ParameterDefinitions []*ParameterDefinition `locationName:"parameterDefinitions" type:"list"` + + RequiredCapabilities []*string `locationName:"requiredCapabilities" type:"list"` + + ResourcesSupported *bool `locationName:"resourcesSupported" type:"boolean"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` + + SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` + + TemplateUrl *string `locationName:"templateUrl" type:"string"` +} + +// String returns the string representation +func (s CreateApplicationVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationVersionOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateApplicationVersionOutput) SetApplicationId(v string) *CreateApplicationVersionOutput { + s.ApplicationId = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CreateApplicationVersionOutput) SetCreationTime(v string) *CreateApplicationVersionOutput { + s.CreationTime = &v + return s +} + +// SetParameterDefinitions sets the ParameterDefinitions field's value. +func (s *CreateApplicationVersionOutput) SetParameterDefinitions(v []*ParameterDefinition) *CreateApplicationVersionOutput { + s.ParameterDefinitions = v + return s +} + +// SetRequiredCapabilities sets the RequiredCapabilities field's value. +func (s *CreateApplicationVersionOutput) SetRequiredCapabilities(v []*string) *CreateApplicationVersionOutput { + s.RequiredCapabilities = v + return s +} + +// SetResourcesSupported sets the ResourcesSupported field's value. +func (s *CreateApplicationVersionOutput) SetResourcesSupported(v bool) *CreateApplicationVersionOutput { + s.ResourcesSupported = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateApplicationVersionOutput) SetSemanticVersion(v string) *CreateApplicationVersionOutput { + s.SemanticVersion = &v + return s +} + +// SetSourceCodeUrl sets the SourceCodeUrl field's value. +func (s *CreateApplicationVersionOutput) SetSourceCodeUrl(v string) *CreateApplicationVersionOutput { + s.SourceCodeUrl = &v + return s +} + +// SetTemplateUrl sets the TemplateUrl field's value. +func (s *CreateApplicationVersionOutput) SetTemplateUrl(v string) *CreateApplicationVersionOutput { + s.TemplateUrl = &v + return s +} + +type CreateApplicationVersionRequest struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + // SemanticVersion is a required field + SemanticVersion *string `location:"uri" locationName:"semanticVersion" type:"string" required:"true"` + + SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` + + TemplateBody *string `locationName:"templateBody" type:"string"` + + TemplateUrl *string `locationName:"templateUrl" type:"string"` +} + +// String returns the string representation +func (s CreateApplicationVersionRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationVersionRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApplicationVersionRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApplicationVersionRequest"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SemanticVersion == nil { + invalidParams.Add(request.NewErrParamRequired("SemanticVersion")) + } + if s.SemanticVersion != nil && len(*s.SemanticVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SemanticVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateApplicationVersionRequest) SetApplicationId(v string) *CreateApplicationVersionRequest { + s.ApplicationId = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateApplicationVersionRequest) SetSemanticVersion(v string) *CreateApplicationVersionRequest { + s.SemanticVersion = &v + return s +} + +// SetSourceCodeUrl sets the SourceCodeUrl field's value. +func (s *CreateApplicationVersionRequest) SetSourceCodeUrl(v string) *CreateApplicationVersionRequest { + s.SourceCodeUrl = &v + return s +} + +// SetTemplateBody sets the TemplateBody field's value. +func (s *CreateApplicationVersionRequest) SetTemplateBody(v string) *CreateApplicationVersionRequest { + s.TemplateBody = &v + return s +} + +// SetTemplateUrl sets the TemplateUrl field's value. +func (s *CreateApplicationVersionRequest) SetTemplateUrl(v string) *CreateApplicationVersionRequest { + s.TemplateUrl = &v + return s +} + +type CreateCloudFormationChangeSetOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + ChangeSetId *string `locationName:"changeSetId" type:"string"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` + + StackId *string `locationName:"stackId" type:"string"` +} + +// String returns the string representation +func (s CreateCloudFormationChangeSetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFormationChangeSetOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateCloudFormationChangeSetOutput) SetApplicationId(v string) *CreateCloudFormationChangeSetOutput { + s.ApplicationId = &v + return s +} + +// SetChangeSetId sets the ChangeSetId field's value. +func (s *CreateCloudFormationChangeSetOutput) SetChangeSetId(v string) *CreateCloudFormationChangeSetOutput { + s.ChangeSetId = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateCloudFormationChangeSetOutput) SetSemanticVersion(v string) *CreateCloudFormationChangeSetOutput { + s.SemanticVersion = &v + return s +} + +// SetStackId sets the StackId field's value. +func (s *CreateCloudFormationChangeSetOutput) SetStackId(v string) *CreateCloudFormationChangeSetOutput { + s.StackId = &v + return s +} + +type CreateCloudFormationChangeSetRequest struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + Capabilities []*string `locationName:"capabilities" type:"list"` + + ChangeSetName *string `locationName:"changeSetName" type:"string"` + + ClientToken *string `locationName:"clientToken" type:"string"` + + Description *string `locationName:"description" type:"string"` + + NotificationArns []*string `locationName:"notificationArns" type:"list"` + + ParameterOverrides []*ParameterValue `locationName:"parameterOverrides" type:"list"` + + ResourceTypes []*string `locationName:"resourceTypes" type:"list"` + + // This property corresponds to the AWS CloudFormation RollbackConfiguration + // (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) + // Data Type. + RollbackConfiguration *RollbackConfiguration `locationName:"rollbackConfiguration" type:"structure"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` + + // StackName is a required field + StackName *string `locationName:"stackName" type:"string" required:"true"` + + Tags []*Tag `locationName:"tags" type:"list"` + + TemplateId *string `locationName:"templateId" type:"string"` +} + +// String returns the string representation +func (s CreateCloudFormationChangeSetRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFormationChangeSetRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCloudFormationChangeSetRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCloudFormationChangeSetRequest"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.ParameterOverrides != nil { + for i, v := range s.ParameterOverrides { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ParameterOverrides", i), err.(request.ErrInvalidParams)) + } + } + } + if s.RollbackConfiguration != nil { + if err := s.RollbackConfiguration.Validate(); err != nil { + invalidParams.AddNested("RollbackConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateCloudFormationChangeSetRequest) SetApplicationId(v string) *CreateCloudFormationChangeSetRequest { + s.ApplicationId = &v + return s +} + +// SetCapabilities sets the Capabilities field's value. +func (s *CreateCloudFormationChangeSetRequest) SetCapabilities(v []*string) *CreateCloudFormationChangeSetRequest { + s.Capabilities = v + return s +} + +// SetChangeSetName sets the ChangeSetName field's value. +func (s *CreateCloudFormationChangeSetRequest) SetChangeSetName(v string) *CreateCloudFormationChangeSetRequest { + s.ChangeSetName = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateCloudFormationChangeSetRequest) SetClientToken(v string) *CreateCloudFormationChangeSetRequest { + s.ClientToken = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateCloudFormationChangeSetRequest) SetDescription(v string) *CreateCloudFormationChangeSetRequest { + s.Description = &v + return s +} + +// SetNotificationArns sets the NotificationArns field's value. +func (s *CreateCloudFormationChangeSetRequest) SetNotificationArns(v []*string) *CreateCloudFormationChangeSetRequest { + s.NotificationArns = v + return s +} + +// SetParameterOverrides sets the ParameterOverrides field's value. +func (s *CreateCloudFormationChangeSetRequest) SetParameterOverrides(v []*ParameterValue) *CreateCloudFormationChangeSetRequest { + s.ParameterOverrides = v + return s +} + +// SetResourceTypes sets the ResourceTypes field's value. +func (s *CreateCloudFormationChangeSetRequest) SetResourceTypes(v []*string) *CreateCloudFormationChangeSetRequest { + s.ResourceTypes = v + return s +} + +// SetRollbackConfiguration sets the RollbackConfiguration field's value. +func (s *CreateCloudFormationChangeSetRequest) SetRollbackConfiguration(v *RollbackConfiguration) *CreateCloudFormationChangeSetRequest { + s.RollbackConfiguration = v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateCloudFormationChangeSetRequest) SetSemanticVersion(v string) *CreateCloudFormationChangeSetRequest { + s.SemanticVersion = &v + return s +} + +// SetStackName sets the StackName field's value. +func (s *CreateCloudFormationChangeSetRequest) SetStackName(v string) *CreateCloudFormationChangeSetRequest { + s.StackName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateCloudFormationChangeSetRequest) SetTags(v []*Tag) *CreateCloudFormationChangeSetRequest { + s.Tags = v + return s +} + +// SetTemplateId sets the TemplateId field's value. +func (s *CreateCloudFormationChangeSetRequest) SetTemplateId(v string) *CreateCloudFormationChangeSetRequest { + s.TemplateId = &v + return s +} + +type CreateCloudFormationTemplateInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` +} + +// String returns the string representation +func (s CreateCloudFormationTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFormationTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCloudFormationTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCloudFormationTemplateInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateCloudFormationTemplateInput) SetApplicationId(v string) *CreateCloudFormationTemplateInput { + s.ApplicationId = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateCloudFormationTemplateInput) SetSemanticVersion(v string) *CreateCloudFormationTemplateInput { + s.SemanticVersion = &v + return s +} + +type CreateCloudFormationTemplateOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + CreationTime *string `locationName:"creationTime" type:"string"` + + ExpirationTime *string `locationName:"expirationTime" type:"string"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` + + Status *string `locationName:"status" type:"string" enum:"Status"` + + TemplateId *string `locationName:"templateId" type:"string"` + + TemplateUrl *string `locationName:"templateUrl" type:"string"` +} + +// String returns the string representation +func (s CreateCloudFormationTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFormationTemplateOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateCloudFormationTemplateOutput) SetApplicationId(v string) *CreateCloudFormationTemplateOutput { + s.ApplicationId = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CreateCloudFormationTemplateOutput) SetCreationTime(v string) *CreateCloudFormationTemplateOutput { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *CreateCloudFormationTemplateOutput) SetExpirationTime(v string) *CreateCloudFormationTemplateOutput { + s.ExpirationTime = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *CreateCloudFormationTemplateOutput) SetSemanticVersion(v string) *CreateCloudFormationTemplateOutput { + s.SemanticVersion = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateCloudFormationTemplateOutput) SetStatus(v string) *CreateCloudFormationTemplateOutput { + s.Status = &v + return s +} + +// SetTemplateId sets the TemplateId field's value. +func (s *CreateCloudFormationTemplateOutput) SetTemplateId(v string) *CreateCloudFormationTemplateOutput { + s.TemplateId = &v + return s +} + +// SetTemplateUrl sets the TemplateUrl field's value. +func (s *CreateCloudFormationTemplateOutput) SetTemplateUrl(v string) *CreateCloudFormationTemplateOutput { + s.TemplateUrl = &v + return s +} + +type DeleteApplicationInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApplicationInput) SetApplicationId(v string) *DeleteApplicationInput { + s.ApplicationId = &v + return s +} + +type DeleteApplicationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationOutput) GoString() string { + return s.String() +} + +type GetApplicationInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + SemanticVersion *string `location:"querystring" locationName:"semanticVersion" type:"string"` +} + +// String returns the string representation +func (s GetApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApplicationInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApplicationInput) SetApplicationId(v string) *GetApplicationInput { + s.ApplicationId = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *GetApplicationInput) SetSemanticVersion(v string) *GetApplicationInput { + s.SemanticVersion = &v + return s +} + +type GetApplicationOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + Author *string `locationName:"author" type:"string"` + + CreationTime *string `locationName:"creationTime" type:"string"` + + Description *string `locationName:"description" type:"string"` + + HomePageUrl *string `locationName:"homePageUrl" type:"string"` + + Labels []*string `locationName:"labels" type:"list"` + + LicenseUrl *string `locationName:"licenseUrl" type:"string"` + + Name *string `locationName:"name" type:"string"` + + ReadmeUrl *string `locationName:"readmeUrl" type:"string"` + + SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` + + // Application version details. + Version *Version `locationName:"version" type:"structure"` +} + +// String returns the string representation +func (s GetApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApplicationOutput) SetApplicationId(v string) *GetApplicationOutput { + s.ApplicationId = &v + return s +} + +// SetAuthor sets the Author field's value. +func (s *GetApplicationOutput) SetAuthor(v string) *GetApplicationOutput { + s.Author = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GetApplicationOutput) SetCreationTime(v string) *GetApplicationOutput { + s.CreationTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetApplicationOutput) SetDescription(v string) *GetApplicationOutput { + s.Description = &v + return s +} + +// SetHomePageUrl sets the HomePageUrl field's value. +func (s *GetApplicationOutput) SetHomePageUrl(v string) *GetApplicationOutput { + s.HomePageUrl = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *GetApplicationOutput) SetLabels(v []*string) *GetApplicationOutput { + s.Labels = v + return s +} + +// SetLicenseUrl sets the LicenseUrl field's value. +func (s *GetApplicationOutput) SetLicenseUrl(v string) *GetApplicationOutput { + s.LicenseUrl = &v + return s +} + +// SetName sets the Name field's value. +func (s *GetApplicationOutput) SetName(v string) *GetApplicationOutput { + s.Name = &v + return s +} + +// SetReadmeUrl sets the ReadmeUrl field's value. +func (s *GetApplicationOutput) SetReadmeUrl(v string) *GetApplicationOutput { + s.ReadmeUrl = &v + return s +} + +// SetSpdxLicenseId sets the SpdxLicenseId field's value. +func (s *GetApplicationOutput) SetSpdxLicenseId(v string) *GetApplicationOutput { + s.SpdxLicenseId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetApplicationOutput) SetVersion(v *Version) *GetApplicationOutput { + s.Version = v + return s +} + +type GetApplicationPolicyInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApplicationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApplicationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApplicationPolicyInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApplicationPolicyInput) SetApplicationId(v string) *GetApplicationPolicyInput { + s.ApplicationId = &v + return s +} + +type GetApplicationPolicyOutput struct { + _ struct{} `type:"structure"` + + Statements []*ApplicationPolicyStatement `locationName:"statements" type:"list"` +} + +// String returns the string representation +func (s GetApplicationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationPolicyOutput) GoString() string { + return s.String() +} + +// SetStatements sets the Statements field's value. +func (s *GetApplicationPolicyOutput) SetStatements(v []*ApplicationPolicyStatement) *GetApplicationPolicyOutput { + s.Statements = v + return s +} + +type GetCloudFormationTemplateInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + // TemplateId is a required field + TemplateId *string `location:"uri" locationName:"templateId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCloudFormationTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFormationTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCloudFormationTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCloudFormationTemplateInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.TemplateId == nil { + invalidParams.Add(request.NewErrParamRequired("TemplateId")) + } + if s.TemplateId != nil && len(*s.TemplateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TemplateId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCloudFormationTemplateInput) SetApplicationId(v string) *GetCloudFormationTemplateInput { + s.ApplicationId = &v + return s +} + +// SetTemplateId sets the TemplateId field's value. +func (s *GetCloudFormationTemplateInput) SetTemplateId(v string) *GetCloudFormationTemplateInput { + s.TemplateId = &v + return s +} + +type GetCloudFormationTemplateOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + CreationTime *string `locationName:"creationTime" type:"string"` + + ExpirationTime *string `locationName:"expirationTime" type:"string"` + + SemanticVersion *string `locationName:"semanticVersion" type:"string"` + + Status *string `locationName:"status" type:"string" enum:"Status"` + + TemplateId *string `locationName:"templateId" type:"string"` + + TemplateUrl *string `locationName:"templateUrl" type:"string"` +} + +// String returns the string representation +func (s GetCloudFormationTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFormationTemplateOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCloudFormationTemplateOutput) SetApplicationId(v string) *GetCloudFormationTemplateOutput { + s.ApplicationId = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GetCloudFormationTemplateOutput) SetCreationTime(v string) *GetCloudFormationTemplateOutput { + s.CreationTime = &v + return s +} + +// SetExpirationTime sets the ExpirationTime field's value. +func (s *GetCloudFormationTemplateOutput) SetExpirationTime(v string) *GetCloudFormationTemplateOutput { + s.ExpirationTime = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *GetCloudFormationTemplateOutput) SetSemanticVersion(v string) *GetCloudFormationTemplateOutput { + s.SemanticVersion = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetCloudFormationTemplateOutput) SetStatus(v string) *GetCloudFormationTemplateOutput { + s.Status = &v + return s +} + +// SetTemplateId sets the TemplateId field's value. +func (s *GetCloudFormationTemplateOutput) SetTemplateId(v string) *GetCloudFormationTemplateOutput { + s.TemplateId = &v + return s +} + +// SetTemplateUrl sets the TemplateUrl field's value. +func (s *GetCloudFormationTemplateOutput) SetTemplateUrl(v string) *GetCloudFormationTemplateOutput { + s.TemplateUrl = &v + return s +} + +type ListApplicationDependenciesInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + MaxItems *int64 `location:"querystring" locationName:"maxItems" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + SemanticVersion *string `location:"querystring" locationName:"semanticVersion" type:"string"` +} + +// String returns the string representation +func (s ListApplicationDependenciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationDependenciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListApplicationDependenciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListApplicationDependenciesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ListApplicationDependenciesInput) SetApplicationId(v string) *ListApplicationDependenciesInput { + s.ApplicationId = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListApplicationDependenciesInput) SetMaxItems(v int64) *ListApplicationDependenciesInput { + s.MaxItems = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApplicationDependenciesInput) SetNextToken(v string) *ListApplicationDependenciesInput { + s.NextToken = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *ListApplicationDependenciesInput) SetSemanticVersion(v string) *ListApplicationDependenciesInput { + s.SemanticVersion = &v + return s +} + +type ListApplicationDependenciesOutput struct { + _ struct{} `type:"structure"` + + Dependencies []*ApplicationDependencySummary `locationName:"dependencies" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListApplicationDependenciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationDependenciesOutput) GoString() string { + return s.String() +} + +// SetDependencies sets the Dependencies field's value. +func (s *ListApplicationDependenciesOutput) SetDependencies(v []*ApplicationDependencySummary) *ListApplicationDependenciesOutput { + s.Dependencies = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApplicationDependenciesOutput) SetNextToken(v string) *ListApplicationDependenciesOutput { + s.NextToken = &v + return s +} + +type ListApplicationVersionsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + MaxItems *int64 `location:"querystring" locationName:"maxItems" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListApplicationVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListApplicationVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListApplicationVersionsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ListApplicationVersionsInput) SetApplicationId(v string) *ListApplicationVersionsInput { + s.ApplicationId = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListApplicationVersionsInput) SetMaxItems(v int64) *ListApplicationVersionsInput { + s.MaxItems = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApplicationVersionsInput) SetNextToken(v string) *ListApplicationVersionsInput { + s.NextToken = &v + return s +} + +type ListApplicationVersionsOutput struct { + _ struct{} `type:"structure"` + + NextToken *string `locationName:"nextToken" type:"string"` + + Versions []*VersionSummary `locationName:"versions" type:"list"` +} + +// String returns the string representation +func (s ListApplicationVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationVersionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApplicationVersionsOutput) SetNextToken(v string) *ListApplicationVersionsOutput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *ListApplicationVersionsOutput) SetVersions(v []*VersionSummary) *ListApplicationVersionsOutput { + s.Versions = v + return s +} + +type ListApplicationsInput struct { + _ struct{} `type:"structure"` + + MaxItems *int64 `location:"querystring" locationName:"maxItems" min:"1" type:"integer"` + + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListApplicationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListApplicationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListApplicationsInput"} + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListApplicationsInput) SetMaxItems(v int64) *ListApplicationsInput { + s.MaxItems = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApplicationsInput) SetNextToken(v string) *ListApplicationsInput { + s.NextToken = &v + return s +} + +type ListApplicationsOutput struct { + _ struct{} `type:"structure"` + + Applications []*ApplicationSummary `locationName:"applications" type:"list"` + + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListApplicationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationsOutput) GoString() string { + return s.String() +} + +// SetApplications sets the Applications field's value. +func (s *ListApplicationsOutput) SetApplications(v []*ApplicationSummary) *ListApplicationsOutput { + s.Applications = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput { + s.NextToken = &v + return s +} + +// Parameters supported by the application. +type ParameterDefinition struct { + _ struct{} `type:"structure"` + + // A regular expression that represents the patterns to allow for String types. + AllowedPattern *string `locationName:"allowedPattern" type:"string"` + + // An array containing the list of values allowed for the parameter. + AllowedValues []*string `locationName:"allowedValues" type:"list"` + + // A string that explains a constraint when the constraint is violated. For + // example, without a constraint description, a parameter that has an allowed + // pattern of [A-Za-z0-9]+ displays the following error message when the user + // specifies an invalid value: + // + // Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+ + // + // By adding a constraint description, such as "must contain only uppercase + // and lowercase letters and numbers," you can display the following customized + // error message: + // + // Malformed input-Parameter MyParameter must contain only uppercase and lowercase + // letters and numbers. + ConstraintDescription *string `locationName:"constraintDescription" type:"string"` + + // A value of the appropriate type for the template to use if no value is specified + // when a stack is created. If you define constraints for the parameter, you + // must specify a value that adheres to those constraints. + DefaultValue *string `locationName:"defaultValue" type:"string"` + + // A string of up to 4,000 characters that describes the parameter. + Description *string `locationName:"description" type:"string"` + + // An integer value that determines the largest number of characters that you + // want to allow for String types. + MaxLength *int64 `locationName:"maxLength" type:"integer"` + + // A numeric value that determines the largest numeric value that you want to + // allow for Number types. + MaxValue *int64 `locationName:"maxValue" type:"integer"` + + // An integer value that determines the smallest number of characters that you + // want to allow for String types. + MinLength *int64 `locationName:"minLength" type:"integer"` + + // A numeric value that determines the smallest numeric value that you want + // to allow for Number types. + MinValue *int64 `locationName:"minValue" type:"integer"` + + // The name of the parameter. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // Whether to mask the parameter value whenever anyone makes a call that describes + // the stack. If you set the value to true, the parameter value is masked with + // asterisks (*****). + NoEcho *bool `locationName:"noEcho" type:"boolean"` + + // A list of AWS SAM resources that use this parameter. + // + // ReferencedByResources is a required field + ReferencedByResources []*string `locationName:"referencedByResources" type:"list" required:"true"` + + // The type of the parameter. + // + // Valid values: String | Number | List | CommaDelimitedList + // + // String: A literal string. + // + // For example, users can specify "MyUserName". + // + // Number: An integer or float. AWS CloudFormation validates the parameter value + // as a number. However, when you use the parameter elsewhere in your template + // (for example, by using the Ref intrinsic function), the parameter value becomes + // a string. + // + // For example, users might specify "8888". + // + // List: An array of integers or floats that are separated by commas. + // AWS CloudFormation validates the parameter value as numbers. However, when + // you use the parameter elsewhere in your template (for example, by using the + // Ref intrinsic function), the parameter value becomes a list of strings. + // + // For example, users might specify "80,20", and then Ref results in ["80","20"]. + // + // CommaDelimitedList: An array of literal strings that are separated by commas. + // The total number of strings should be one more than the total number of commas. + // Also, each member string is space-trimmed. + // + // For example, users might specify "test,dev,prod", and then Ref results in + // ["test","dev","prod"]. + Type *string `locationName:"type" type:"string"` +} + +// String returns the string representation +func (s ParameterDefinition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterDefinition) GoString() string { + return s.String() +} + +// SetAllowedPattern sets the AllowedPattern field's value. +func (s *ParameterDefinition) SetAllowedPattern(v string) *ParameterDefinition { + s.AllowedPattern = &v + return s +} + +// SetAllowedValues sets the AllowedValues field's value. +func (s *ParameterDefinition) SetAllowedValues(v []*string) *ParameterDefinition { + s.AllowedValues = v + return s +} + +// SetConstraintDescription sets the ConstraintDescription field's value. +func (s *ParameterDefinition) SetConstraintDescription(v string) *ParameterDefinition { + s.ConstraintDescription = &v + return s +} + +// SetDefaultValue sets the DefaultValue field's value. +func (s *ParameterDefinition) SetDefaultValue(v string) *ParameterDefinition { + s.DefaultValue = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ParameterDefinition) SetDescription(v string) *ParameterDefinition { + s.Description = &v + return s +} + +// SetMaxLength sets the MaxLength field's value. +func (s *ParameterDefinition) SetMaxLength(v int64) *ParameterDefinition { + s.MaxLength = &v + return s +} + +// SetMaxValue sets the MaxValue field's value. +func (s *ParameterDefinition) SetMaxValue(v int64) *ParameterDefinition { + s.MaxValue = &v + return s +} + +// SetMinLength sets the MinLength field's value. +func (s *ParameterDefinition) SetMinLength(v int64) *ParameterDefinition { + s.MinLength = &v + return s +} + +// SetMinValue sets the MinValue field's value. +func (s *ParameterDefinition) SetMinValue(v int64) *ParameterDefinition { + s.MinValue = &v + return s +} + +// SetName sets the Name field's value. +func (s *ParameterDefinition) SetName(v string) *ParameterDefinition { + s.Name = &v + return s +} + +// SetNoEcho sets the NoEcho field's value. +func (s *ParameterDefinition) SetNoEcho(v bool) *ParameterDefinition { + s.NoEcho = &v + return s +} + +// SetReferencedByResources sets the ReferencedByResources field's value. +func (s *ParameterDefinition) SetReferencedByResources(v []*string) *ParameterDefinition { + s.ReferencedByResources = v + return s +} + +// SetType sets the Type field's value. +func (s *ParameterDefinition) SetType(v string) *ParameterDefinition { + s.Type = &v + return s +} + +// Parameter value of the application. +type ParameterValue struct { + _ struct{} `type:"structure"` + + // The key associated with the parameter. If you don't specify a key and value + // for a particular parameter, AWS CloudFormation uses the default value that + // is specified in your template. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The input value associated with the parameter. + // + // Value is a required field + Value *string `locationName:"value" type:"string" required:"true"` +} + +// String returns the string representation +func (s ParameterValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ParameterValue) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ParameterValue) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ParameterValue"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *ParameterValue) SetName(v string) *ParameterValue { + s.Name = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ParameterValue) SetValue(v string) *ParameterValue { + s.Value = &v + return s +} + +type PutApplicationPolicyInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + // Statements is a required field + Statements []*ApplicationPolicyStatement `locationName:"statements" type:"list" required:"true"` +} + +// String returns the string representation +func (s PutApplicationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutApplicationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutApplicationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutApplicationPolicyInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.Statements == nil { + invalidParams.Add(request.NewErrParamRequired("Statements")) + } + if s.Statements != nil { + for i, v := range s.Statements { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Statements", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *PutApplicationPolicyInput) SetApplicationId(v string) *PutApplicationPolicyInput { + s.ApplicationId = &v + return s +} + +// SetStatements sets the Statements field's value. +func (s *PutApplicationPolicyInput) SetStatements(v []*ApplicationPolicyStatement) *PutApplicationPolicyInput { + s.Statements = v + return s +} + +type PutApplicationPolicyOutput struct { + _ struct{} `type:"structure"` + + Statements []*ApplicationPolicyStatement `locationName:"statements" type:"list"` +} + +// String returns the string representation +func (s PutApplicationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutApplicationPolicyOutput) GoString() string { + return s.String() +} + +// SetStatements sets the Statements field's value. +func (s *PutApplicationPolicyOutput) SetStatements(v []*ApplicationPolicyStatement) *PutApplicationPolicyOutput { + s.Statements = v + return s +} + +// This property corresponds to the AWS CloudFormation RollbackConfiguration +// (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) +// Data Type. +type RollbackConfiguration struct { + _ struct{} `type:"structure"` + + // This property corresponds to the content of the same name for the AWS CloudFormation + // RollbackConfiguration (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) + // Data Type. + MonitoringTimeInMinutes *int64 `locationName:"monitoringTimeInMinutes" type:"integer"` + + // This property corresponds to the content of the same name for the AWS CloudFormation + // RollbackConfiguration (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackConfiguration) + // Data Type. + RollbackTriggers []*RollbackTrigger `locationName:"rollbackTriggers" type:"list"` +} + +// String returns the string representation +func (s RollbackConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RollbackConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RollbackConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RollbackConfiguration"} + if s.RollbackTriggers != nil { + for i, v := range s.RollbackTriggers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RollbackTriggers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMonitoringTimeInMinutes sets the MonitoringTimeInMinutes field's value. +func (s *RollbackConfiguration) SetMonitoringTimeInMinutes(v int64) *RollbackConfiguration { + s.MonitoringTimeInMinutes = &v + return s +} + +// SetRollbackTriggers sets the RollbackTriggers field's value. +func (s *RollbackConfiguration) SetRollbackTriggers(v []*RollbackTrigger) *RollbackConfiguration { + s.RollbackTriggers = v + return s +} + +// This property corresponds to the AWS CloudFormation RollbackTrigger (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger) +// Data Type. +type RollbackTrigger struct { + _ struct{} `type:"structure"` + + // This property corresponds to the content of the same name for the AWS CloudFormation + // RollbackTrigger (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger) + // Data Type. + // + // Arn is a required field + Arn *string `locationName:"arn" type:"string" required:"true"` + + // This property corresponds to the content of the same name for the AWS CloudFormation + // RollbackTrigger (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/RollbackTrigger) + // Data Type. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true"` +} + +// String returns the string representation +func (s RollbackTrigger) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RollbackTrigger) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RollbackTrigger) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RollbackTrigger"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *RollbackTrigger) SetArn(v string) *RollbackTrigger { + s.Arn = &v + return s +} + +// SetType sets the Type field's value. +func (s *RollbackTrigger) SetType(v string) *RollbackTrigger { + s.Type = &v + return s +} + +// This property corresponds to the AWS CloudFormation Tag (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag) +// Data Type. +type Tag struct { + _ struct{} `type:"structure"` + + // This property corresponds to the content of the same name for the AWS CloudFormation + // Tag (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag) + // Data Type. + // + // Key is a required field + Key *string `locationName:"key" type:"string" required:"true"` + + // This property corresponds to the content of the same name for the AWS CloudFormation + // Tag (https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/Tag) + // Data Type. + // + // Value is a required field + Value *string `locationName:"value" type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type UpdateApplicationOutput struct { + _ struct{} `type:"structure"` + + ApplicationId *string `locationName:"applicationId" type:"string"` + + Author *string `locationName:"author" type:"string"` + + CreationTime *string `locationName:"creationTime" type:"string"` + + Description *string `locationName:"description" type:"string"` + + HomePageUrl *string `locationName:"homePageUrl" type:"string"` + + Labels []*string `locationName:"labels" type:"list"` + + LicenseUrl *string `locationName:"licenseUrl" type:"string"` + + Name *string `locationName:"name" type:"string"` + + ReadmeUrl *string `locationName:"readmeUrl" type:"string"` + + SpdxLicenseId *string `locationName:"spdxLicenseId" type:"string"` + + // Application version details. + Version *Version `locationName:"version" type:"structure"` +} + +// String returns the string representation +func (s UpdateApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationOutput) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApplicationOutput) SetApplicationId(v string) *UpdateApplicationOutput { + s.ApplicationId = &v + return s +} + +// SetAuthor sets the Author field's value. +func (s *UpdateApplicationOutput) SetAuthor(v string) *UpdateApplicationOutput { + s.Author = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *UpdateApplicationOutput) SetCreationTime(v string) *UpdateApplicationOutput { + s.CreationTime = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateApplicationOutput) SetDescription(v string) *UpdateApplicationOutput { + s.Description = &v + return s +} + +// SetHomePageUrl sets the HomePageUrl field's value. +func (s *UpdateApplicationOutput) SetHomePageUrl(v string) *UpdateApplicationOutput { + s.HomePageUrl = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *UpdateApplicationOutput) SetLabels(v []*string) *UpdateApplicationOutput { + s.Labels = v + return s +} + +// SetLicenseUrl sets the LicenseUrl field's value. +func (s *UpdateApplicationOutput) SetLicenseUrl(v string) *UpdateApplicationOutput { + s.LicenseUrl = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateApplicationOutput) SetName(v string) *UpdateApplicationOutput { + s.Name = &v + return s +} + +// SetReadmeUrl sets the ReadmeUrl field's value. +func (s *UpdateApplicationOutput) SetReadmeUrl(v string) *UpdateApplicationOutput { + s.ReadmeUrl = &v + return s +} + +// SetSpdxLicenseId sets the SpdxLicenseId field's value. +func (s *UpdateApplicationOutput) SetSpdxLicenseId(v string) *UpdateApplicationOutput { + s.SpdxLicenseId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *UpdateApplicationOutput) SetVersion(v *Version) *UpdateApplicationOutput { + s.Version = v + return s +} + +type UpdateApplicationRequest struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"applicationId" type:"string" required:"true"` + + Author *string `locationName:"author" type:"string"` + + Description *string `locationName:"description" type:"string"` + + HomePageUrl *string `locationName:"homePageUrl" type:"string"` + + Labels []*string `locationName:"labels" type:"list"` + + ReadmeBody *string `locationName:"readmeBody" type:"string"` + + ReadmeUrl *string `locationName:"readmeUrl" type:"string"` +} + +// String returns the string representation +func (s UpdateApplicationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationRequest"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApplicationRequest) SetApplicationId(v string) *UpdateApplicationRequest { + s.ApplicationId = &v + return s +} + +// SetAuthor sets the Author field's value. +func (s *UpdateApplicationRequest) SetAuthor(v string) *UpdateApplicationRequest { + s.Author = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateApplicationRequest) SetDescription(v string) *UpdateApplicationRequest { + s.Description = &v + return s +} + +// SetHomePageUrl sets the HomePageUrl field's value. +func (s *UpdateApplicationRequest) SetHomePageUrl(v string) *UpdateApplicationRequest { + s.HomePageUrl = &v + return s +} + +// SetLabels sets the Labels field's value. +func (s *UpdateApplicationRequest) SetLabels(v []*string) *UpdateApplicationRequest { + s.Labels = v + return s +} + +// SetReadmeBody sets the ReadmeBody field's value. +func (s *UpdateApplicationRequest) SetReadmeBody(v string) *UpdateApplicationRequest { + s.ReadmeBody = &v + return s +} + +// SetReadmeUrl sets the ReadmeUrl field's value. +func (s *UpdateApplicationRequest) SetReadmeUrl(v string) *UpdateApplicationRequest { + s.ReadmeUrl = &v + return s +} + +// Application version details. +type Version struct { + _ struct{} `type:"structure"` + + // The application Amazon Resource Name (ARN). + // + // ApplicationId is a required field + ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` + + // The date and time this resource was created. + // + // CreationTime is a required field + CreationTime *string `locationName:"creationTime" type:"string" required:"true"` + + // An array of parameter types supported by the application. + // + // ParameterDefinitions is a required field + ParameterDefinitions []*ParameterDefinition `locationName:"parameterDefinitions" type:"list" required:"true"` + + // A list of values that you must specify before you can deploy certain applications. + // Some applications might include resources that can affect permissions in + // your AWS account, for example, by creating new AWS Identity and Access Management + // (IAM) users. For those applications, you must explicitly acknowledge their + // capabilities by specifying this parameter. + // + // The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM, and CAPABILITY_RESOURCE_POLICY. + // + // The following resources require you to specify CAPABILITY_IAM or CAPABILITY_NAMED_IAM: + // AWS::IAM::Group (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html), + // AWS::IAM::InstanceProfile (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html), + // AWS::IAM::Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html), + // and AWS::IAM::Role (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html). + // If the application contains IAM resources, you can specify either CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM. If the application contains IAM resources with custom + // names, you must specify CAPABILITY_NAMED_IAM. + // + // The following resources require you to specify CAPABILITY_RESOURCE_POLICY: + // AWS::Lambda::Permission (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html), + // AWS::IAM:Policy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html), + // AWS::ApplicationAutoScaling::ScalingPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html), + // AWS::S3::BucketPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html), + // AWS::SQS::QueuePolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html), + // and AWS::SNS::TopicPolicy (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html). + // + // If your application template contains any of the above resources, we recommend + // that you review all permissions associated with the application before deploying. + // If you don't specify this parameter for an application that requires capabilities, + // the call will fail. + // + // Valid values: CAPABILITY_IAM | CAPABILITY_NAMED_IAM | CAPABILITY_RESOURCE_POLICY + // + // RequiredCapabilities is a required field + RequiredCapabilities []*string `locationName:"requiredCapabilities" type:"list" required:"true"` + + // Whether all of the AWS resources contained in this application are supported + // in the region in which it is being retrieved. + // + // ResourcesSupported is a required field + ResourcesSupported *bool `locationName:"resourcesSupported" type:"boolean" required:"true"` + + // The semantic version of the application: + // + // https://semver.org/ (https://semver.org/) + // + // SemanticVersion is a required field + SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` + + // A link to a public repository for the source code of your application. + SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` + + // A link to the packaged AWS SAM template of your application. + // + // TemplateUrl is a required field + TemplateUrl *string `locationName:"templateUrl" type:"string" required:"true"` +} + +// String returns the string representation +func (s Version) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Version) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *Version) SetApplicationId(v string) *Version { + s.ApplicationId = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *Version) SetCreationTime(v string) *Version { + s.CreationTime = &v + return s +} + +// SetParameterDefinitions sets the ParameterDefinitions field's value. +func (s *Version) SetParameterDefinitions(v []*ParameterDefinition) *Version { + s.ParameterDefinitions = v + return s +} + +// SetRequiredCapabilities sets the RequiredCapabilities field's value. +func (s *Version) SetRequiredCapabilities(v []*string) *Version { + s.RequiredCapabilities = v + return s +} + +// SetResourcesSupported sets the ResourcesSupported field's value. +func (s *Version) SetResourcesSupported(v bool) *Version { + s.ResourcesSupported = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *Version) SetSemanticVersion(v string) *Version { + s.SemanticVersion = &v + return s +} + +// SetSourceCodeUrl sets the SourceCodeUrl field's value. +func (s *Version) SetSourceCodeUrl(v string) *Version { + s.SourceCodeUrl = &v + return s +} + +// SetTemplateUrl sets the TemplateUrl field's value. +func (s *Version) SetTemplateUrl(v string) *Version { + s.TemplateUrl = &v + return s +} + +// An application version summary. +type VersionSummary struct { + _ struct{} `type:"structure"` + + // The application Amazon Resource Name (ARN). + // + // ApplicationId is a required field + ApplicationId *string `locationName:"applicationId" type:"string" required:"true"` + + // The date and time this resource was created. + // + // CreationTime is a required field + CreationTime *string `locationName:"creationTime" type:"string" required:"true"` + + // The semantic version of the application: + // + // https://semver.org/ (https://semver.org/) + // + // SemanticVersion is a required field + SemanticVersion *string `locationName:"semanticVersion" type:"string" required:"true"` + + // A link to a public repository for the source code of your application. + SourceCodeUrl *string `locationName:"sourceCodeUrl" type:"string"` +} + +// String returns the string representation +func (s VersionSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VersionSummary) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *VersionSummary) SetApplicationId(v string) *VersionSummary { + s.ApplicationId = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *VersionSummary) SetCreationTime(v string) *VersionSummary { + s.CreationTime = &v + return s +} + +// SetSemanticVersion sets the SemanticVersion field's value. +func (s *VersionSummary) SetSemanticVersion(v string) *VersionSummary { + s.SemanticVersion = &v + return s +} + +// SetSourceCodeUrl sets the SourceCodeUrl field's value. +func (s *VersionSummary) SetSourceCodeUrl(v string) *VersionSummary { + s.SourceCodeUrl = &v + return s +} + +// Values that must be specified in order to deploy some applications. +const ( + // CapabilityCapabilityIam is a Capability enum value + CapabilityCapabilityIam = "CAPABILITY_IAM" + + // CapabilityCapabilityNamedIam is a Capability enum value + CapabilityCapabilityNamedIam = "CAPABILITY_NAMED_IAM" + + // CapabilityCapabilityAutoExpand is a Capability enum value + CapabilityCapabilityAutoExpand = "CAPABILITY_AUTO_EXPAND" + + // CapabilityCapabilityResourcePolicy is a Capability enum value + CapabilityCapabilityResourcePolicy = "CAPABILITY_RESOURCE_POLICY" +) + +const ( + // StatusPreparing is a Status enum value + StatusPreparing = "PREPARING" + + // StatusActive is a Status enum value + StatusActive = "ACTIVE" + + // StatusExpired is a Status enum value + StatusExpired = "EXPIRED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go new file mode 100644 index 000000000..dde60865e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/doc.go @@ -0,0 +1,58 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package serverlessapplicationrepository provides the client and types for making API +// requests to AWSServerlessApplicationRepository. +// +// The AWS Serverless Application Repository makes it easy for developers and +// enterprises to quickly find and deploy serverless applications in the AWS +// Cloud. For more information about serverless applications, see Serverless +// Computing and Applications on the AWS website. +// +// The AWS Serverless Application Repository is deeply integrated with the AWS +// Lambda console, so that developers of all levels can get started with serverless +// computing without needing to learn anything new. You can use category keywords +// to browse for applications such as web and mobile backends, data processing +// applications, or chatbots. You can also search for applications by name, +// publisher, or event source. To use an application, you simply choose it, +// configure any required fields, and deploy it with a few clicks. +// +// You can also easily publish applications, sharing them publicly with the +// community at large, or privately within your team or across your organization. +// To publish a serverless application (or app), you can use the AWS Management +// Console, AWS Command Line Interface (AWS CLI), or AWS SDKs to upload the +// code. Along with the code, you upload a simple manifest file, also known +// as the AWS Serverless Application Model (AWS SAM) template. For more information +// about AWS SAM, see AWS Serverless Application Model (AWS SAM) on the AWS +// Labs GitHub repository. +// +// The AWS Serverless Application Repository Developer Guide contains more information +// about the two developer experiences available: +// +// * Consuming Applications – Browse for applications and view information +// about them, including source code and readme files. Also install, configure, +// and deploy applications of your choosing. +// +// Publishing Applications – Configure and upload applications to make them +// available to other developers, and publish new versions of applications. +// +// See https://docs.aws.amazon.com/goto/WebAPI/serverlessrepo-2017-09-08 for more information on this service. +// +// See serverlessapplicationrepository package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/serverlessapplicationrepository/ +// +// Using the Client +// +// To contact AWSServerlessApplicationRepository with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWSServerlessApplicationRepository client ServerlessApplicationRepository for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/serverlessapplicationrepository/#New +package serverlessapplicationrepository diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go new file mode 100644 index 000000000..2855c3aec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/errors.go @@ -0,0 +1,45 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package serverlessapplicationrepository + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // One of the parameters in the request is invalid. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // The resource already exists. + ErrCodeConflictException = "ConflictException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + // + // The client is not authenticated. + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // The AWS Serverless Application Repository service encountered an internal + // error. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // The resource (for example, an access policy statement) specified in the request + // doesn't exist. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // The client is sending more than the allowed number of requests per unit of + // time. + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go new file mode 100644 index 000000000..78f8f47ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/serverlessapplicationrepository/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package serverlessapplicationrepository + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// ServerlessApplicationRepository provides the API operation methods for making requests to +// AWSServerlessApplicationRepository. See this package's package overview docs +// for details on the service. +// +// ServerlessApplicationRepository methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type ServerlessApplicationRepository struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "serverlessrepo" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "ServerlessApplicationRepository" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the ServerlessApplicationRepository client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a ServerlessApplicationRepository client from just a session. +// svc := serverlessapplicationrepository.New(mySession) +// +// // Create a ServerlessApplicationRepository client with additional configuration +// svc := serverlessapplicationrepository.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *ServerlessApplicationRepository { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "serverlessrepo" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ServerlessApplicationRepository { + svc := &ServerlessApplicationRepository{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-09-08", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a ServerlessApplicationRepository operation and runs any +// custom request initialization. +func (c *ServerlessApplicationRepository) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 383edf5bb..cd3bf7179 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -8242,9 +8242,7 @@ type CopyProductInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The Amazon Resource Name (ARN) of the source product. // @@ -8275,9 +8273,6 @@ func (s CopyProductInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CopyProductInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CopyProductInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -8380,9 +8375,7 @@ type CreateConstraintInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The constraint parameters, in JSON format. The syntax depends on the constraint // type as follows: @@ -8454,9 +8447,6 @@ func (s CreateConstraintInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateConstraintInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateConstraintInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -8594,9 +8584,7 @@ type CreatePortfolioInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The name of the portfolio provider. // @@ -8626,9 +8614,6 @@ func (s *CreatePortfolioInput) Validate() error { if s.DisplayName != nil && len(*s.DisplayName) < 1 { invalidParams.Add(request.NewErrParamMinLen("DisplayName", 1)) } - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -8846,9 +8831,7 @@ type CreateProductInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The name of the product. // @@ -8896,9 +8879,6 @@ func (s CreateProductInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateProductInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateProductInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -9064,9 +9044,7 @@ type CreateProvisionedProductPlanInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related // events. @@ -9124,9 +9102,6 @@ func (s CreateProvisionedProductPlanInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateProvisionedProductPlanInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateProvisionedProductPlanInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -9324,9 +9299,7 @@ type CreateProvisioningArtifactInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The configuration for the provisioning artifact. // @@ -9352,9 +9325,6 @@ func (s CreateProvisioningArtifactInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateProvisioningArtifactInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateProvisioningArtifactInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -9486,9 +9456,7 @@ type CreateServiceActionInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The self-service action name. // @@ -9518,9 +9486,6 @@ func (s *CreateServiceActionInput) Validate() error { if s.DefinitionType == nil { invalidParams.Add(request.NewErrParamRequired("DefinitionType")) } - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -12107,9 +12072,7 @@ type ExecuteProvisionedProductPlanInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The plan identifier. // @@ -12130,9 +12093,6 @@ func (s ExecuteProvisionedProductPlanInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ExecuteProvisionedProductPlanInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductPlanInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -12203,9 +12163,7 @@ type ExecuteProvisionedProductServiceActionInput struct { AcceptLanguage *string `type:"string"` // An idempotency token that uniquely identifies the execute request. - // - // ExecuteToken is a required field - ExecuteToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + ExecuteToken *string `min:"1" type:"string" idempotencyToken:"true"` // The identifier of the provisioned product. // @@ -12231,9 +12189,6 @@ func (s ExecuteProvisionedProductServiceActionInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ExecuteProvisionedProductServiceActionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductServiceActionInput"} - if s.ExecuteToken == nil { - invalidParams.Add(request.NewErrParamRequired("ExecuteToken")) - } if s.ExecuteToken != nil && len(*s.ExecuteToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ExecuteToken", 1)) } @@ -14602,9 +14557,7 @@ type ProvisionProductInput struct { ProductId *string `min:"1" type:"string" required:"true"` // An idempotency token that uniquely identifies the provisioning request. - // - // ProvisionToken is a required field - ProvisionToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + ProvisionToken *string `min:"1" type:"string" idempotencyToken:"true"` // A user-friendly name for the provisioned product. This value must be unique // for the AWS account and cannot be updated after the product is provisioned. @@ -14651,9 +14604,6 @@ func (s *ProvisionProductInput) Validate() error { if s.ProductId != nil && len(*s.ProductId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) } - if s.ProvisionToken == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionToken")) - } if s.ProvisionToken != nil && len(*s.ProvisionToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProvisionToken", 1)) } @@ -17394,9 +17344,7 @@ type TerminateProvisionedProductInput struct { // token is only valid during the termination process. After the provisioned // product is terminated, subsequent requests to terminate the same provisioned // product always return ResourceNotFound. - // - // TerminateToken is a required field - TerminateToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + TerminateToken *string `min:"1" type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -17418,9 +17366,6 @@ func (s *TerminateProvisionedProductInput) Validate() error { if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) } - if s.TerminateToken == nil { - invalidParams.Add(request.NewErrParamRequired("TerminateToken")) - } if s.TerminateToken != nil && len(*s.TerminateToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("TerminateToken", 1)) } @@ -17956,9 +17901,7 @@ type UpdateProvisionedProductInput struct { ProvisioningPreferences *UpdateProvisioningPreferences `type:"structure"` // The idempotency token that uniquely identifies the provisioning update request. - // - // UpdateToken is a required field - UpdateToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + UpdateToken *string `min:"1" type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -17989,9 +17932,6 @@ func (s *UpdateProvisionedProductInput) Validate() error { if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) } - if s.UpdateToken == nil { - invalidParams.Add(request.NewErrParamRequired("UpdateToken")) - } if s.UpdateToken != nil && len(*s.UpdateToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("UpdateToken", 1)) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index 84814af1b..fc6ffb5d2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -3,6 +3,7 @@ package sfn import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -860,7 +861,7 @@ func (c *SFN) GetExecutionHistoryRequest(input *GetExecutionHistoryInput) (req * // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 60 seconds. Using an expired +// unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1007,7 +1008,7 @@ func (c *SFN) ListActivitiesRequest(input *ListActivitiesInput) (req *request.Re // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 60 seconds. Using an expired +// unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. // // This operation is eventually consistent. The results are best effort and @@ -1152,7 +1153,7 @@ func (c *SFN) ListExecutionsRequest(input *ListExecutionsInput) (req *request.Re // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 60 seconds. Using an expired +// unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. // // This operation is eventually consistent. The results are best effort and @@ -1302,7 +1303,7 @@ func (c *SFN) ListStateMachinesRequest(input *ListStateMachinesInput) (req *requ // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments -// unchanged. Each pagination token expires after 60 seconds. Using an expired +// unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. // // This operation is eventually consistent. The results are best effort and @@ -1391,6 +1392,89 @@ func (c *SFN) ListStateMachinesPagesWithContext(ctx aws.Context, input *ListStat return p.Err() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListTagsForResource +func (c *SFN) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Step Functions. +// +// List tags for a given resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Step Functions's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArn "InvalidArn" +// The provided Amazon Resource Name (ARN) is invalid. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// Could not fine the referenced resource. Only state machine and activity ARNs +// are supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListTagsForResource +func (c *SFN) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SFN) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSendTaskFailure = "SendTaskFailure" // SendTaskFailureRequest generates a "aws/request.Request" representing the @@ -1847,6 +1931,179 @@ func (c *SFN) StopExecutionWithContext(ctx aws.Context, input *StopExecutionInpu return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TagResource +func (c *SFN) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Step Functions. +// +// Add a tag to a Step Functions resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Step Functions's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArn "InvalidArn" +// The provided Amazon Resource Name (ARN) is invalid. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// Could not fine the referenced resource. Only state machine and activity ARNs +// are supported. +// +// * ErrCodeTooManyTags "TooManyTags" +// You've exceeded the number of tags allowed for a resource. See the Limits +// Topic (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html) in +// the AWS Step Functions Developer Guide. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TagResource +func (c *SFN) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SFN) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UntagResource +func (c *SFN) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Step Functions. +// +// Remove a tag from a Step Functions resource +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Step Functions's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArn "InvalidArn" +// The provided Amazon Resource Name (ARN) is invalid. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// Could not fine the referenced resource. Only state machine and activity ARNs +// are supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UntagResource +func (c *SFN) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *SFN) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateStateMachine = "UpdateStateMachine" // UpdateStateMachineRequest generates a "aws/request.Request" representing the @@ -3392,7 +3649,7 @@ type GetExecutionHistoryInput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` @@ -3464,7 +3721,7 @@ type GetExecutionHistoryOutput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3576,15 +3833,16 @@ type HistoryEvent struct { // Contains details about the start of a task during an execution. TaskStartedEventDetails *TaskStartedEventDetails `locationName:"taskStartedEventDetails" type:"structure"` + // Contains details about a task that failed to submit during an execution. TaskSubmitFailedEventDetails *TaskSubmitFailedEventDetails `locationName:"taskSubmitFailedEventDetails" type:"structure"` + // Contains details about a task submitted to a resource . TaskSubmittedEventDetails *TaskSubmittedEventDetails `locationName:"taskSubmittedEventDetails" type:"structure"` - // Contains details about the start of connected service by a task state. + // Contains details about the successful completion of a task state. TaskSucceededEventDetails *TaskSucceededEventDetails `locationName:"taskSucceededEventDetails" type:"structure"` - // Contains details about a connected service timeout that occured during an - // execution. + // Contains details about a resource timeout that occurred during an execution. TaskTimedOutEventDetails *TaskTimedOutEventDetails `locationName:"taskTimedOutEventDetails" type:"structure"` // The date and time the event occurred. @@ -4011,7 +4269,7 @@ type ListActivitiesInput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4062,7 +4320,7 @@ type ListActivitiesOutput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4103,7 +4361,7 @@ type ListExecutionsInput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` @@ -4181,7 +4439,7 @@ type ListExecutionsOutput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4222,7 +4480,7 @@ type ListStateMachinesInput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4268,7 +4526,7 @@ type ListStateMachinesOutput struct { // If nextToken is returned, there are more results available. The value of // nextToken is a unique pagination token for each page. Make the call again // using the returned token to retrieve the next page. Keep all other arguments - // unchanged. Each pagination token expires after 60 seconds. Using an expired + // unchanged. Each pagination token expires after 24 hours. Using an expired // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` @@ -4298,6 +4556,70 @@ func (s *ListStateMachinesOutput) SetStateMachines(v []*StateMachineListItem) *L return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // An array of tags associated with the resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + type SendTaskFailureInput struct { _ struct{} `type:"structure"` @@ -4842,6 +5164,135 @@ func (s *StopExecutionOutput) SetStopDate(v time.Time) *StopExecutionOutput { return s } +// Tags are key-value pairs that can be associated with Step Functions state +// machines and activities. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of a tag. + Key *string `locationName:"key" min:"1" type:"string"` + + // The value of a tag. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // The list of tags to add to a resource. + // + // Tags may only contain unicode letters, digits, whitespace, or these symbols: + // _ . : / = + - @. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + // Contains details about a task failure event. type TaskFailedEventDetails struct { _ struct{} `type:"structure"` @@ -4852,12 +5303,12 @@ type TaskFailedEventDetails struct { // The error code of the failure. Error *string `locationName:"error" type:"string" sensitive:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -4901,20 +5352,22 @@ func (s *TaskFailedEventDetails) SetResourceType(v string) *TaskFailedEventDetai type TaskScheduledEventDetails struct { _ struct{} `type:"structure"` - // The JSON data passed to the connected service referenced in a task state. + // The JSON data passed to the resource referenced in a task state. // // Parameters is a required field Parameters *string `locationName:"parameters" type:"string" required:"true" sensitive:"true"` + // The region of the scheduled task + // // Region is a required field Region *string `locationName:"region" min:"1" type:"string" required:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -4973,12 +5426,12 @@ type TaskStartFailedEventDetails struct { // The error code of the failure. Error *string `locationName:"error" type:"string" sensitive:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -5022,12 +5475,12 @@ func (s *TaskStartFailedEventDetails) SetResourceType(v string) *TaskStartFailed type TaskStartedEventDetails struct { _ struct{} `type:"structure"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -5055,6 +5508,7 @@ func (s *TaskStartedEventDetails) SetResourceType(v string) *TaskStartedEventDet return s } +// Contains details about a task that failed to submit during an execution. type TaskSubmitFailedEventDetails struct { _ struct{} `type:"structure"` @@ -5064,12 +5518,12 @@ type TaskSubmitFailedEventDetails struct { // The error code of the failure. Error *string `locationName:"error" type:"string" sensitive:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -5109,18 +5563,19 @@ func (s *TaskSubmitFailedEventDetails) SetResourceType(v string) *TaskSubmitFail return s } +// Contains details about a task submitted to a resource . type TaskSubmittedEventDetails struct { _ struct{} `type:"structure"` - // The response from a connected service when a task has started. + // The response from a resource when a task has started. Output *string `locationName:"output" type:"string" sensitive:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -5154,20 +5609,20 @@ func (s *TaskSubmittedEventDetails) SetResourceType(v string) *TaskSubmittedEven return s } -// Contains details about the start of connected service by a task state. +// Contains details about the successful completion of a task state. type TaskSucceededEventDetails struct { _ struct{} `type:"structure"` - // The full JSON response from a connected service when a task has succeeded. - // This response becomes the output of the related task. + // The full JSON response from a resource when a task has succeeded. This response + // becomes the output of the related task. Output *string `locationName:"output" type:"string" sensitive:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -5201,8 +5656,7 @@ func (s *TaskSucceededEventDetails) SetResourceType(v string) *TaskSucceededEven return s } -// Contains details about a connected service timeout that occured during an -// execution. +// Contains details about a resource timeout that occurred during an execution. type TaskTimedOutEventDetails struct { _ struct{} `type:"structure"` @@ -5212,12 +5666,12 @@ type TaskTimedOutEventDetails struct { // The error code of the failure. Error *string `locationName:"error" type:"string" sensitive:"true"` - // The service name of the connected service in a task state. + // The service name of the resource in a task state. // // Resource is a required field Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` - // The action of the connected service called by a task state. + // The action of the resource called by a task state. // // ResourceType is a required field ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` @@ -5257,6 +5711,75 @@ func (s *TaskTimedOutEventDetails) SetResourceType(v string) *TaskTimedOutEventD return s } +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // The list of tags to remove from the resource. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UpdateStateMachineInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go index 84cab2731..fcf27534f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go @@ -88,6 +88,13 @@ const ( // and roleArn are not specified. ErrCodeMissingRequiredParameter = "MissingRequiredParameter" + // ErrCodeResourceNotFound for service response error code + // "ResourceNotFound". + // + // Could not fine the referenced resource. Only state machine and activity ARNs + // are supported. + ErrCodeResourceNotFound = "ResourceNotFound" + // ErrCodeStateMachineAlreadyExists for service response error code // "StateMachineAlreadyExists". // @@ -121,4 +128,12 @@ const ( // ErrCodeTaskTimedOut for service response error code // "TaskTimedOut". ErrCodeTaskTimedOut = "TaskTimedOut" + + // ErrCodeTooManyTags for service response error code + // "TooManyTags". + // + // You've exceeded the number of tags allowed for a resource. See the Limits + // Topic (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html) in + // the AWS Step Functions Developer Guide. + ErrCodeTooManyTags = "TooManyTags" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index eac9dcdac..db90e6236 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -11242,6 +11242,10 @@ type AssociationDescription struct { // The association version. AssociationVersion *string `type:"string"` + // Specify the target for the association. This target is required for associations + // that use an Automation document and target resources by using rate controls. + AutomationTargetParameterName *string `min:"1" type:"string"` + // The severity level that is assigned to the association. ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` @@ -11339,6 +11343,12 @@ func (s *AssociationDescription) SetAssociationVersion(v string) *AssociationDes return s } +// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. +func (s *AssociationDescription) SetAutomationTargetParameterName(v string) *AssociationDescription { + s.AutomationTargetParameterName = &v + return s +} + // SetComplianceSeverity sets the ComplianceSeverity field's value. func (s *AssociationDescription) SetComplianceSeverity(v string) *AssociationDescription { s.ComplianceSeverity = &v @@ -12144,10 +12154,11 @@ func (s *AttachmentContent) SetUrl(v string) *AttachmentContent { return s } -// An attribute of an attachment, such as the attachment name or size. +// An attribute of an attachment, such as the attachment name. type AttachmentInformation struct { _ struct{} `type:"structure"` + // The name of the attachment. Name *string `type:"string"` } @@ -12534,7 +12545,7 @@ type AutomationExecutionMetadata struct { // Timed out, or Cancelled. AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"` - // Use this filter with DescribeAutomationExecution. Specify either Local of + // Use this filter with DescribeAutomationExecutions. Specify either Local or // CrossAccount. CrossAccount is an Automation that executes in multiple AWS // Regions and accounts. For more information, see Concurrently Executing Automations // in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) @@ -14306,6 +14317,10 @@ type CreateAssociationBatchRequestEntry struct { // Specify a descriptive name for the association. AssociationName *string `type:"string"` + // Specify the target for the association. This target is required for associations + // that use an Automation document and target resources by using rate controls. + AutomationTargetParameterName *string `min:"1" type:"string"` + // The severity level to assign to the association. ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` @@ -14372,6 +14387,9 @@ func (s CreateAssociationBatchRequestEntry) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationBatchRequestEntry) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchRequestEntry"} + if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) + } if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) } @@ -14412,6 +14430,12 @@ func (s *CreateAssociationBatchRequestEntry) SetAssociationName(v string) *Creat return s } +// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. +func (s *CreateAssociationBatchRequestEntry) SetAutomationTargetParameterName(v string) *CreateAssociationBatchRequestEntry { + s.AutomationTargetParameterName = &v + return s +} + // SetComplianceSeverity sets the ComplianceSeverity field's value. func (s *CreateAssociationBatchRequestEntry) SetComplianceSeverity(v string) *CreateAssociationBatchRequestEntry { s.ComplianceSeverity = &v @@ -14478,6 +14502,10 @@ type CreateAssociationInput struct { // Specify a descriptive name for the association. AssociationName *string `type:"string"` + // Specify the target for the association. This target is required for associations + // that use an Automation document and target resources by using rate controls. + AutomationTargetParameterName *string `min:"1" type:"string"` + // The severity level to assign to the association. ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` @@ -14545,6 +14573,9 @@ func (s CreateAssociationInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationInput"} + if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) + } if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) } @@ -14585,6 +14616,12 @@ func (s *CreateAssociationInput) SetAssociationName(v string) *CreateAssociation return s } +// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. +func (s *CreateAssociationInput) SetAutomationTargetParameterName(v string) *CreateAssociationInput { + s.AutomationTargetParameterName = &v + return s +} + // SetComplianceSeverity sets the ComplianceSeverity field's value. func (s *CreateAssociationInput) SetComplianceSeverity(v string) *CreateAssociationInput { s.ComplianceSeverity = &v @@ -28850,9 +28887,9 @@ type PatchSource struct { // The value of the yum repo configuration. For example: // - // cachedir=/var/cache/yum/$basesearch + // [main] // - // $releasever + // cachedir=/var/cache/yum/$basesearch$releasever // // keepcache=0 // @@ -32386,6 +32423,10 @@ type UpdateAssociationInput struct { // this request succeeds, either specify $LATEST, or omit this parameter. AssociationVersion *string `type:"string"` + // Specify the target for the association. This target is required for associations + // that use an Automation document and target resources by using rate controls. + AutomationTargetParameterName *string `min:"1" type:"string"` + // The severity level to assign to the association. ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` @@ -32451,6 +32492,9 @@ func (s *UpdateAssociationInput) Validate() error { if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } + if s.AutomationTargetParameterName != nil && len(*s.AutomationTargetParameterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutomationTargetParameterName", 1)) + } if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) } @@ -32500,6 +32544,12 @@ func (s *UpdateAssociationInput) SetAssociationVersion(v string) *UpdateAssociat return s } +// SetAutomationTargetParameterName sets the AutomationTargetParameterName field's value. +func (s *UpdateAssociationInput) SetAutomationTargetParameterName(v string) *UpdateAssociationInput { + s.AutomationTargetParameterName = &v + return s +} + // SetComplianceSeverity sets the ComplianceSeverity field's value. func (s *UpdateAssociationInput) SetComplianceSeverity(v string) *UpdateAssociationInput { s.ComplianceSeverity = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go index 67009dab5..f1ba98b9b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -473,6 +473,94 @@ func (c *StorageGateway) AddWorkingStorageWithContext(ctx aws.Context, input *Ad return out, req.Send() } +const opAttachVolume = "AttachVolume" + +// AttachVolumeRequest generates a "aws/request.Request" representing the +// client's request for the AttachVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AttachVolume for more information on using the AttachVolume +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AttachVolumeRequest method. +// req, resp := client.AttachVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume +func (c *StorageGateway) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *AttachVolumeOutput) { + op := &request.Operation{ + Name: opAttachVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AttachVolumeInput{} + } + + output = &AttachVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// AttachVolume API operation for AWS Storage Gateway. +// +// Connects a volume to an iSCSI connection and then attaches the volume to +// the specified gateway. Detaching and attaching a volume enables you to recover +// your data from one gateway to a different gateway without creating a snapshot. +// It also makes it easier to move your volumes from an on-premises gateway +// to a gateway hosted on an Amazon EC2 instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation AttachVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume +func (c *StorageGateway) AttachVolume(input *AttachVolumeInput) (*AttachVolumeOutput, error) { + req, out := c.AttachVolumeRequest(input) + return out, req.Send() +} + +// AttachVolumeWithContext is the same as AttachVolume with the addition of +// the ability to pass a context and additional request options. +// +// See AttachVolume for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*AttachVolumeOutput, error) { + req, out := c.AttachVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCancelArchival = "CancelArchival" // CancelArchivalRequest generates a "aws/request.Request" representing the @@ -3855,6 +3943,94 @@ func (c *StorageGateway) DescribeWorkingStorageWithContext(ctx aws.Context, inpu return out, req.Send() } +const opDetachVolume = "DetachVolume" + +// DetachVolumeRequest generates a "aws/request.Request" representing the +// client's request for the DetachVolume operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DetachVolume for more information on using the DetachVolume +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DetachVolumeRequest method. +// req, resp := client.DetachVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume +func (c *StorageGateway) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *DetachVolumeOutput) { + op := &request.Operation{ + Name: opDetachVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetachVolumeInput{} + } + + output = &DetachVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DetachVolume API operation for AWS Storage Gateway. +// +// Disconnects a volume from an iSCSI connection and then detaches the volume +// from the specified gateway. Detaching and attaching a volume enables you +// to recover your data from one gateway to a different gateway without creating +// a snapshot. It also makes it easier to move your volumes from an on-premises +// gateway to a gateway hosted on an Amazon EC2 instance. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Storage Gateway's +// API operation DetachVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume +func (c *StorageGateway) DetachVolume(input *DetachVolumeInput) (*DetachVolumeOutput, error) { + req, out := c.DetachVolumeRequest(input) + return out, req.Send() +} + +// DetachVolumeWithContext is the same as DetachVolume with the addition of +// the ability to pass a context and additional request options. +// +// See DetachVolume for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *StorageGateway) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*DetachVolumeOutput, error) { + req, out := c.DetachVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisableGateway = "DisableGateway" // DisableGatewayRequest generates a "aws/request.Request" representing the @@ -7169,6 +7345,150 @@ func (s *AddWorkingStorageOutput) SetGatewayARN(v string) *AddWorkingStorageOutp return s } +// AttachVolumeInput +type AttachVolumeInput struct { + _ struct{} `type:"structure"` + + // The unique device ID or other distinguishing data that identifies the local + // disk used to create the volume. This value is only required when you are + // attaching a stored volume. + DiskId *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the gateway that you want to attach the + // volume to. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The network interface of the gateway on which to expose the iSCSI target. + // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a + // list of the network interfaces available on a gateway. + // + // Valid Values: A valid IP address. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // The name of the iSCSI target used by an initiator to connect to a volume + // and used as a suffix for the target ARN. For example, specifying TargetName + // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + // The target name must be unique across all volumes on a gateway. + // + // If you don't specify a value, Storage Gateway uses the value that was previously + // used for this volume as the new target name. + TargetName *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the volume to attach to the specified gateway. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachVolumeInput"} + if s.DiskId != nil && len(*s.DiskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DiskId", 1)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.TargetName != nil && len(*s.TargetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskId sets the DiskId field's value. +func (s *AttachVolumeInput) SetDiskId(v string) *AttachVolumeInput { + s.DiskId = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AttachVolumeInput) SetGatewayARN(v string) *AttachVolumeInput { + s.GatewayARN = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *AttachVolumeInput) SetNetworkInterfaceId(v string) *AttachVolumeInput { + s.NetworkInterfaceId = &v + return s +} + +// SetTargetName sets the TargetName field's value. +func (s *AttachVolumeInput) SetTargetName(v string) *AttachVolumeInput { + s.TargetName = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *AttachVolumeInput) SetVolumeARN(v string) *AttachVolumeInput { + s.VolumeARN = &v + return s +} + +// AttachVolumeOutput +type AttachVolumeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI + // name for the initiator that was used to connect to the target. + TargetARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of the volume that was attached to the gateway. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AttachVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVolumeOutput) GoString() string { + return s.String() +} + +// SetTargetARN sets the TargetARN field's value. +func (s *AttachVolumeOutput) SetTargetARN(v string) *AttachVolumeOutput { + s.TargetARN = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *AttachVolumeOutput) SetVolumeARN(v string) *AttachVolumeOutput { + s.VolumeARN = &v + return s +} + // Describes an iSCSI cached volume. type CachediSCSIVolume struct { _ struct{} `type:"structure"` @@ -7185,9 +7505,18 @@ type CachediSCSIVolume struct { // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. SourceSnapshotId *string `type:"string"` + // The name of the iSCSI target that is used by an initiator to connect to a + // volume and used as a suffix for the target ARN. For example, specifying TargetName + // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + TargetName *string `min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the storage volume. VolumeARN *string `min:"50" type:"string"` + // A value that indicates whether a storage volume is attached to or detached + // from a gateway. + VolumeAttachmentStatus *string `min:"3" type:"string"` + // The unique identifier of the volume, e.g. vol-AE4B946D. VolumeId *string `min:"12" type:"string"` @@ -7244,12 +7573,24 @@ func (s *CachediSCSIVolume) SetSourceSnapshotId(v string) *CachediSCSIVolume { return s } +// SetTargetName sets the TargetName field's value. +func (s *CachediSCSIVolume) SetTargetName(v string) *CachediSCSIVolume { + s.TargetName = &v + return s +} + // SetVolumeARN sets the VolumeARN field's value. func (s *CachediSCSIVolume) SetVolumeARN(v string) *CachediSCSIVolume { s.VolumeARN = &v return s } +// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. +func (s *CachediSCSIVolume) SetVolumeAttachmentStatus(v string) *CachediSCSIVolume { + s.VolumeAttachmentStatus = &v + return s +} + // SetVolumeId sets the VolumeId field's value. func (s *CachediSCSIVolume) SetVolumeId(v string) *CachediSCSIVolume { s.VolumeId = &v @@ -7687,7 +8028,7 @@ func (s *CreateCachediSCSIVolumeInput) SetVolumeSizeInBytes(v int64) *CreateCach type CreateCachediSCSIVolumeOutput struct { _ struct{} `type:"structure"` - // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI // name that initiators can use to connect to the target. TargetARN *string `min:"50" type:"string"` @@ -8554,7 +8895,7 @@ func (s *CreateStorediSCSIVolumeInput) SetTargetName(v string) *CreateStorediSCS type CreateStorediSCSIVolumeOutput struct { _ struct{} `type:"structure"` - // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI // name that initiators can use to connect to the target. TargetARN *string `min:"50" type:"string"` @@ -10292,7 +10633,7 @@ type DescribeSMBSettingsOutput struct { _ struct{} `type:"structure"` // The name of the domain that the gateway is joined to. - DomainName *string `type:"string"` + DomainName *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation // to return a list of gateways for your account and region. @@ -11152,6 +11493,83 @@ func (s *DescribeWorkingStorageOutput) SetWorkingStorageUsedInBytes(v int64) *De return s } +// AttachVolumeInput +type DetachVolumeInput struct { + _ struct{} `type:"structure"` + + // Set to true to forcibly remove the iSCSI connection of the target volume + // and detach the volume. The default is false. If this value is set to false, + // you must manually disconnect the iSCSI connection from the target volume. + ForceDetach *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the volume to detach from the gateway. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForceDetach sets the ForceDetach field's value. +func (s *DetachVolumeInput) SetForceDetach(v bool) *DetachVolumeInput { + s.ForceDetach = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DetachVolumeInput) SetVolumeARN(v string) *DetachVolumeInput { + s.VolumeARN = &v + return s +} + +// AttachVolumeOutput +type DetachVolumeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume that was detached. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DetachVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVolumeOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DetachVolumeOutput) SetVolumeARN(v string) *DetachVolumeOutput { + s.VolumeARN = &v + return s +} + // Lists iSCSI information about a VTL device. type DeviceiSCSIAttributes struct { _ struct{} `type:"structure"` @@ -11275,13 +11693,13 @@ func (s *DisableGatewayOutput) SetGatewayARN(v string) *DisableGatewayOutput { type Disk struct { _ struct{} `type:"structure"` - // The iSCSI Qualified Name (IQN) that is defined for a disk. This field is + // The iSCSI qualified name (IQN) that is defined for a disk. This field is // not included in the response if the local disk is not defined as an iSCSI // target. The format of this field is targetIqn::LUNNumber::region-volumeId. DiskAllocationResource *string `type:"string"` // One of the DiskAllocationType enumeration values that identifies how a local - // disk is used. Valid values: "UPLOAD_BUFFER", "CACHE_STORAGE". + // disk is used. Valid values: UPLOAD_BUFFER, CACHE_STORAGE DiskAllocationType *string `min:"3" type:"string"` // A list of values that represents attributes of a local disk. @@ -11528,28 +11946,38 @@ func (s *GatewayInfo) SetGatewayType(v string) *GatewayInfo { type JoinDomainInput struct { _ struct{} `type:"structure"` + // List of IPv4 addresses, NetBIOS names, or host names of your domain server. + // If you need to specify the port number include it after the colon (“:”). + // For example, mydc.mydomain.com:389. + DomainControllers []*string `type:"list"` + // The name of the domain that you want the gateway to join. // // DomainName is a required field - DomainName *string `type:"string" required:"true"` + DomainName *string `min:"1" type:"string" required:"true"` - // The unique Amazon Resource Name (ARN) of the file gateway you want to add - // to the Active Directory domain. + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. // // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` + // The organizational unit (OU) is a container with an Active Directory that + // can hold users, groups, computers, and other OUs and this parameter specifies + // the OU that the gateway will join within the AD domain. + OrganizationalUnit *string `min:"1" type:"string"` + // Sets the password of the user who has permission to add the gateway to the // Active Directory domain. // // Password is a required field - Password *string `type:"string" required:"true" sensitive:"true"` + Password *string `min:"1" type:"string" required:"true" sensitive:"true"` // Sets the user name of user who has permission to add the gateway to the Active // Directory domain. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -11568,18 +11996,30 @@ func (s *JoinDomainInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if s.GatewayARN == nil { invalidParams.Add(request.NewErrParamRequired("GatewayARN")) } if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) } + if s.OrganizationalUnit != nil && len(*s.OrganizationalUnit) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnit", 1)) + } if s.Password == nil { invalidParams.Add(request.NewErrParamRequired("Password")) } + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11587,6 +12027,12 @@ func (s *JoinDomainInput) Validate() error { return nil } +// SetDomainControllers sets the DomainControllers field's value. +func (s *JoinDomainInput) SetDomainControllers(v []*string) *JoinDomainInput { + s.DomainControllers = v + return s +} + // SetDomainName sets the DomainName field's value. func (s *JoinDomainInput) SetDomainName(v string) *JoinDomainInput { s.DomainName = &v @@ -11599,6 +12045,12 @@ func (s *JoinDomainInput) SetGatewayARN(v string) *JoinDomainInput { return s } +// SetOrganizationalUnit sets the OrganizationalUnit field's value. +func (s *JoinDomainInput) SetOrganizationalUnit(v string) *JoinDomainInput { + s.OrganizationalUnit = &v + return s +} + // SetPassword sets the Password field's value. func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput { s.Password = &v @@ -12768,10 +13220,11 @@ func (s *NotifyWhenUploadedOutput) SetNotificationId(v string) *NotifyWhenUpload return s } +// RefreshCacheInput type RefreshCacheInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the file share. + // The Amazon Resource Name (ARN) of the file share you want to refresh. // // FileShareARN is a required field FileShareARN *string `min:"50" type:"string" required:"true"` @@ -13711,9 +14164,18 @@ type StorediSCSIVolume struct { // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. SourceSnapshotId *string `type:"string"` + // The name of the iSCSI target that is used by an initiator to connect to a + // volume and used as a suffix for the target ARN. For example, specifying TargetName + // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + TargetName *string `min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the storage volume. VolumeARN *string `min:"50" type:"string"` + // A value that indicates whether a storage volume is attached to, detached + // from, or is in the process of detaching from a gateway. + VolumeAttachmentStatus *string `min:"3" type:"string"` + // The ID of the local disk that was specified in the CreateStorediSCSIVolume // operation. VolumeDiskId *string `min:"1" type:"string"` @@ -13780,12 +14242,24 @@ func (s *StorediSCSIVolume) SetSourceSnapshotId(v string) *StorediSCSIVolume { return s } +// SetTargetName sets the TargetName field's value. +func (s *StorediSCSIVolume) SetTargetName(v string) *StorediSCSIVolume { + s.TargetName = &v + return s +} + // SetVolumeARN sets the VolumeARN field's value. func (s *StorediSCSIVolume) SetVolumeARN(v string) *StorediSCSIVolume { s.VolumeARN = &v return s } +// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. +func (s *StorediSCSIVolume) SetVolumeAttachmentStatus(v string) *StorediSCSIVolume { + s.VolumeAttachmentStatus = &v + return s +} + // SetVolumeDiskId sets the VolumeDiskId field's value. func (s *StorediSCSIVolume) SetVolumeDiskId(v string) *StorediSCSIVolume { s.VolumeDiskId = &v @@ -15374,6 +15848,8 @@ type VolumeInfo struct { // (-). VolumeARN *string `min:"50" type:"string"` + VolumeAttachmentStatus *string `min:"3" type:"string"` + // The unique identifier assigned to the volume. This ID becomes part of the // volume Amazon Resource Name (ARN), which you use as input for other operations. // @@ -15418,6 +15894,12 @@ func (s *VolumeInfo) SetVolumeARN(v string) *VolumeInfo { return s } +// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. +func (s *VolumeInfo) SetVolumeAttachmentStatus(v string) *VolumeInfo { + s.VolumeAttachmentStatus = &v + return s +} + // SetVolumeId sets the VolumeId field's value. func (s *VolumeInfo) SetVolumeId(v string) *VolumeInfo { s.VolumeId = &v diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 3cf5c8c30..1c62375bb 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -350,8 +350,8 @@ func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, // CreateIPSet API operation for AWS WAF. // -// Creates an IPSet, which you use to specify which web requests you want to -// allow or block based on the IP addresses that the requests originate from. +// Creates an IPSet, which you use to specify which web requests that you want +// to allow or block based on the IP addresses that the requests originate from. // For example, if you're receiving a lot of requests from one or more individual // IP addresses or one or more ranges of IP addresses and you want to block // the requests, you can create an IPSet that contains those IP addresses and @@ -908,8 +908,8 @@ func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, o // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and // other predicates that identify the requests that you want to block. If you // add more than one predicate to a Rule, a request must match all of the specifications -// to be allowed or blocked. For example, suppose you add the following to a -// Rule: +// to be allowed or blocked. For example, suppose that you add the following +// to a Rule: // // * An IPSet that matches the IP address 192.0.2.44/32 // @@ -6384,16 +6384,14 @@ func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput // You can access information about all traffic that AWS WAF inspects using // the following steps: // -// Create an Amazon Kinesis Data Firehose delivery stream. For more information, -// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// Create an Amazon Kinesis Data Firehose . // -// Associate that delivery stream to your web ACL using a PutLoggingConfiguration -// request. +// Associate that firehose to your web ACL using a PutLoggingConfiguration request. // // When you successfully enable logging using a PutLoggingConfiguration request, // AWS WAF will create a service linked role with the necessary permissions -// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more -// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// to write logs to the Amazon Kinesis Data Firehose. For more information, +// see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) // in the AWS WAF Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6415,6 +6413,16 @@ func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // +// * ErrCodeServiceLinkedRoleErrorException "WAFServiceLinkedRoleErrorException" +// AWS WAF is not able to access the service linked role. This can be caused +// by a previous PutLoggingConfiguration request, which can lock the service +// linked role for about 20 seconds. Please try your request again. The service +// linked role can also be locked by a previous DeleteServiceLinkedRole request, +// which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, +// wait at least 15 minutes and try the request again. If you receive this same +// exception again, you will have to wait additional time until the role is +// unlocked. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration func (c *WAF) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { req, out := c.PutLoggingConfigurationRequest(input) @@ -7769,7 +7777,8 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests // that you want to allow, block, or count. If you add more than one predicate // to a Rule, a request must match all of the specifications to be allowed, -// blocked, or counted. For example, suppose you add the following to a Rule: +// blocked, or counted. For example, suppose that you add the following to a +// Rule: // // * A ByteMatchSet that matches the value BadBot in the User-Agent header // @@ -8369,10 +8378,10 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // You can only specify a single type of TextTransformation. // // You use SqlInjectionMatchSet objects to specify which CloudFront requests -// you want to allow, block, or count. For example, if you're receiving requests -// that contain snippets of SQL code in the query string and you want to block -// the requests, you can create a SqlInjectionMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// that you want to allow, block, or count. For example, if you're receiving +// requests that contain snippets of SQL code in the query string and you want +// to block the requests, you can create a SqlInjectionMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure a SqlInjectionMatchSet, perform the following steps: // @@ -8553,8 +8562,8 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // the default action if a request doesn't match the criteria in any of the // Rules in a WebACL. // -// * The Rules that you want to add and/or delete. If you want to replace -// one Rule with another, you delete the existing Rule and add the new one. +// * The Rules that you want to add or delete. If you want to replace one +// Rule with another, you delete the existing Rule and add the new one. // // * For each Rule, whether you want AWS WAF to allow requests, block requests, // or count requests that match the conditions in the Rule. @@ -8563,9 +8572,9 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // If you add more than one Rule to a WebACL, AWS WAF evaluates each request // against the Rules in order based on the value of Priority. (The Rule that // has the lowest value for Priority is evaluated first.) When a web request -// matches all of the predicates (such as ByteMatchSets and IPSets) in a -// Rule, AWS WAF immediately takes the corresponding action, allow or block, -// and doesn't evaluate the request against the remaining Rules in the WebACL, +// matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, +// AWS WAF immediately takes the corresponding action, allow or block, and +// doesn't evaluate the request against the remaining Rules in the WebACL, // if any. // // To create and configure a WebACL, perform the following steps: @@ -8586,6 +8595,14 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // in the WebACL, to specify the default action, and to associate the WebACL // with a CloudFront distribution. // +// The ActivatedRule can be a rule group. If you specify a rule group as your +// ActivatedRule, you can exclude specific rules from that rule group. +// +// If you already have a rule group associated with a web ACL and want to submit +// an UpdateWebACL request to exclude certain rules from that rule group, you +// must first remove the rule group from the web ACL, the re-insert it again, +// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. +// // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will // fail because the request tries to add a REGULAR rule (the default rule type) @@ -8767,8 +8784,8 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // each XssMatchTuple object, you specify the following values: // // * Action: Whether to insert the object into or delete the object from -// the array. To change a XssMatchTuple, you delete the existing object and -// add a new one. +// the array. To change an XssMatchTuple, you delete the existing object +// and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect // and, if you want AWS WAF to inspect a header or custom query parameter, @@ -8780,11 +8797,11 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // // You can only specify a single type of TextTransformation. // -// You use XssMatchSet objects to specify which CloudFront requests you want -// to allow, block, or count. For example, if you're receiving requests that -// contain cross-site scripting attacks in the request body and you want to -// block the requests, you can create an XssMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// You use XssMatchSet objects to specify which CloudFront requests that you +// want to allow, block, or count. For example, if you're receiving requests +// that contain cross-site scripting attacks in the request body and you want +// to block the requests, you can create an XssMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure an XssMatchSet, perform the following steps: // @@ -8935,10 +8952,45 @@ type ActivatedRule struct { // remaining rules in the web ACL. // // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup - // to a WebACL. In this case you do not use ActivatedRule|Action. For all other + // to a WebACL. In this case, you do not use ActivatedRule|Action. For all other // update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. Action *WafAction `type:"structure"` + // An array of rules to exclude from a rule group. This is applicable only when + // the ActivatedRule refers to a RuleGroup. + // + // Sometimes it is necessary to troubleshoot rule groups that are blocking traffic + // unexpectedly (false positives). One troubleshooting technique is to identify + // the specific rule within the rule group that is blocking the legitimate traffic + // and then disable (exclude) that particular rule. You can exclude rules from + // both your own rule groups and AWS Marketplace rule groups that have been + // associated with a web ACL. + // + // Specifying ExcludedRules does not remove those rules from the rule group. + // Rather, it changes the action for the rules to COUNT. Therefore, requests + // that match an ExcludedRule are counted but not blocked. The RuleGroup owner + // will receive COUNT metrics for each ExcludedRule. + // + // If you want to exclude rules from a rule group that is already associated + // with a web ACL, perform the following steps: + // + // Use the AWS WAF logs to identify the IDs of the rules that you want to exclude. + // For more information about the logs, see Logging Web ACL Traffic Information + // (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html). + // + // Submit an UpdateWebACL request that has two actions: + // + // The first action deletes the existing rule group from the web ACL. That is, + // in the UpdateWebACL request, the first Updates:Action should be DELETE and + // Updates:ActivatedRule:RuleId should be the rule group that contains the rules + // that you want to exclude. + // + // The second action inserts the same rule group back in, but specifying the + // rules to exclude. That is, the second Updates:Action should be INSERT, Updates:ActivatedRule:RuleId + // should be the rule group that you just removed, and ExcludedRules should + // contain the rules that you want to exclude. + ExcludedRules []*ExcludedRule `type:"list"` + // Use the OverrideAction to test your RuleGroup. // // Any rule in a RuleGroup can potentially block a request. If you set the OverrideAction @@ -9009,6 +9061,16 @@ func (s *ActivatedRule) Validate() error { invalidParams.AddNested("Action", err.(request.ErrInvalidParams)) } } + if s.ExcludedRules != nil { + for i, v := range s.ExcludedRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludedRules", i), err.(request.ErrInvalidParams)) + } + } + } if s.OverrideAction != nil { if err := s.OverrideAction.Validate(); err != nil { invalidParams.AddNested("OverrideAction", err.(request.ErrInvalidParams)) @@ -9027,6 +9089,12 @@ func (s *ActivatedRule) SetAction(v *WafAction) *ActivatedRule { return s } +// SetExcludedRules sets the ExcludedRules field's value. +func (s *ActivatedRule) SetExcludedRules(v []*ExcludedRule) *ActivatedRule { + s.ExcludedRules = v + return s +} + // SetOverrideAction sets the OverrideAction field's value. func (s *ActivatedRule) SetOverrideAction(v *WafOverrideAction) *ActivatedRule { s.OverrideAction = v @@ -9325,7 +9393,7 @@ type ByteMatchTuple struct { // // For example, suppose the value of Type is HEADER and the value of Data is // User-Agent. If you want to search the User-Agent header for the value BadBot, - // you base64-encode BadBot using MIME base64 encoding and include the resulting + // you base64-encode BadBot using MIME base64-encoding and include the resulting // value, QmFkQm90, in the value of TargetString. // // If you're using the AWS CLI or one of the AWS SDKs @@ -10212,7 +10280,7 @@ type CreateRuleInput struct { // A friendly name or description for the metrics for this Rule. The name can // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain - // whitespace. You can't change the name of the metric after you create the + // white space. You can't change the name of the metric after you create the // Rule. // // MetricName is a required field @@ -10517,7 +10585,7 @@ type CreateWebACLInput struct { // A friendly name or description for the metrics for this WebACL. The name // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change MetricName after you create the WebACL. + // contain white space. You can't change MetricName after you create the WebACL. // // MetricName is a required field MetricName *string `type:"string" required:"true"` @@ -11851,6 +11919,50 @@ func (s *DeleteXssMatchSetOutput) SetChangeToken(v string) *DeleteXssMatchSetOut return s } +// The rule to exclude from a rule group. This is applicable only when the ActivatedRule +// refers to a RuleGroup. The rule must belong to the RuleGroup that is specified +// by the ActivatedRule. +type ExcludedRule struct { + _ struct{} `type:"structure"` + + // The unique identifier for the rule to exclude from the rule group. + // + // RuleId is a required field + RuleId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExcludedRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExcludedRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExcludedRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExcludedRule"} + if s.RuleId == nil { + invalidParams.Add(request.NewErrParamRequired("RuleId")) + } + if s.RuleId != nil && len(*s.RuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRuleId sets the RuleId field's value. +func (s *ExcludedRule) SetRuleId(v string) *ExcludedRule { + s.RuleId = &v + return s +} + // Specifies where in a web request to look for TargetString. type FieldToMatch struct { _ struct{} `type:"structure"` @@ -15153,19 +15265,19 @@ func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListX return s } -// The Amazon Kinesis Data Firehose delivery streams, RedactedFields information, -// and the web ACL Amazon Resource Name (ARN). +// The Amazon Kinesis Data Firehose, RedactedFields information, and the web +// ACL Amazon Resource Name (ARN). type LoggingConfiguration struct { _ struct{} `type:"structure"` - // An array of Amazon Kinesis Data Firehose delivery stream ARNs. + // An array of Amazon Kinesis Data Firehose ARNs. // // LogDestinationConfigs is a required field LogDestinationConfigs []*string `min:"1" type:"list" required:"true"` // The parts of the request that you want redacted from the logs. For example, - // if you redact the cookie field, the cookie field in the delivery stream will - // be xxx. + // if you redact the cookie field, the cookie field in the firehose will be + // xxx. RedactedFields []*FieldToMatch `type:"list"` // The Amazon Resource Name (ARN) of the web ACL that you want to associate @@ -15322,9 +15434,9 @@ func (s *Predicate) SetType(v string) *Predicate { type PutLoggingConfigurationInput struct { _ struct{} `type:"structure"` - // The Amazon Kinesis Data Firehose delivery streams that contains the inspected - // traffic information, the redacted fields details, and the Amazon Resource - // Name (ARN) of the web ACL to monitor. + // The Amazon Kinesis Data Firehose that contains the inspected traffic information, + // the redacted fields details, and the Amazon Resource Name (ARN) of the web + // ACL to monitor. // // LoggingConfiguration is a required field LoggingConfiguration *LoggingConfiguration `type:"structure" required:"true"` @@ -18450,7 +18562,7 @@ type UpdateWebACLInput struct { // // * ActivatedRule: Contains Action, OverrideAction, Priority, RuleId, and // Type. ActivatedRule|OverrideAction applies only when updating or adding - // a RuleGroup to a WebACL. In this case you do not use ActivatedRule|Action. + // a RuleGroup to a WebACL. In this case, you do not use ActivatedRule|Action. // For all other update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction. // @@ -18570,7 +18682,7 @@ type UpdateXssMatchSetInput struct { ChangeToken *string `min:"1" type:"string" required:"true"` // An array of XssMatchSetUpdate objects that you want to insert into or delete - // from a XssMatchSet. For more information, see the applicable data types: + // from an XssMatchSet. For more information, see the applicable data types: // // * XssMatchSetUpdate: Contains Action and XssMatchTuple // @@ -18805,6 +18917,9 @@ type WebACL struct { // Rules is a required field Rules []*ActivatedRule `type:"list" required:"true"` + // Tha Amazon Resource Name (ARN) of the web ACL. + WebACLArn *string `min:"1" type:"string"` + // A unique identifier for a WebACL. You use WebACLId to get information about // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete // a WebACL from AWS WAF (see DeleteWebACL). @@ -18849,6 +18964,12 @@ func (s *WebACL) SetRules(v []*ActivatedRule) *WebACL { return s } +// SetWebACLArn sets the WebACLArn field's value. +func (s *WebACL) SetWebACLArn(v string) *WebACL { + s.WebACLArn = &v + return s +} + // SetWebACLId sets the WebACLId field's value. func (s *WebACL) SetWebACLId(v string) *WebACL { s.WebACLId = &v @@ -19063,8 +19184,8 @@ func (s *XssMatchSetSummary) SetXssMatchSetId(v string) *XssMatchSetSummary { type XssMatchSetUpdate struct { _ struct{} `type:"structure"` - // Specify INSERT to add a XssMatchSetUpdate to an XssMatchSet. Use DELETE to - // remove a XssMatchSetUpdate from an XssMatchSet. + // Specify INSERT to add an XssMatchSetUpdate to an XssMatchSet. Use DELETE + // to remove an XssMatchSetUpdate from an XssMatchSet. // // Action is a required field Action *string `type:"string" required:"true" enum:"ChangeAction"` @@ -20120,6 +20241,9 @@ const ( // ParameterExceptionFieldNextMarker is a ParameterExceptionField enum value ParameterExceptionFieldNextMarker = "NEXT_MARKER" + + // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value + ParameterExceptionFieldResourceArn = "RESOURCE_ARN" ) const ( @@ -20128,6 +20252,9 @@ const ( // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION" + + // ParameterExceptionReasonIllegalArgument is a ParameterExceptionReason enum value + ParameterExceptionReasonIllegalArgument = "ILLEGAL_ARGUMENT" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 02c9752b0..3e9995d8d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -172,6 +172,19 @@ const ( // * You tried to delete a Rule that is still referenced by a WebACL. ErrCodeReferencedItemException = "WAFReferencedItemException" + // ErrCodeServiceLinkedRoleErrorException for service response error code + // "WAFServiceLinkedRoleErrorException". + // + // AWS WAF is not able to access the service linked role. This can be caused + // by a previous PutLoggingConfiguration request, which can lock the service + // linked role for about 20 seconds. Please try your request again. The service + // linked role can also be locked by a previous DeleteServiceLinkedRole request, + // which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, + // wait at least 15 minutes and try the request again. If you receive this same + // exception again, you will have to wait additional time until the role is + // unlocked. + ErrCodeServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException" + // ErrCodeStaleDataException for service response error code // "WAFStaleDataException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index a83af96aa..2e5fb159c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -56,7 +56,8 @@ func (c *WAFRegional) AssociateWebACLRequest(input *AssociateWebACLInput) (req * // AssociateWebACL API operation for AWS WAF Regional. // -// Associates a web ACL with a resource. +// Associates a web ACL with a resource, either an application load balancer +// or Amazon API Gateway stage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -469,8 +470,8 @@ func (c *WAFRegional) CreateIPSetRequest(input *waf.CreateIPSetInput) (req *requ // CreateIPSet API operation for AWS WAF Regional. // -// Creates an IPSet, which you use to specify which web requests you want to -// allow or block based on the IP addresses that the requests originate from. +// Creates an IPSet, which you use to specify which web requests that you want +// to allow or block based on the IP addresses that the requests originate from. // For example, if you're receiving a lot of requests from one or more individual // IP addresses or one or more ranges of IP addresses and you want to block // the requests, you can create an IPSet that contains those IP addresses and @@ -1027,8 +1028,8 @@ func (c *WAFRegional) CreateRuleRequest(input *waf.CreateRuleInput) (req *reques // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and // other predicates that identify the requests that you want to block. If you // add more than one predicate to a Rule, a request must match all of the specifications -// to be allowed or blocked. For example, suppose you add the following to a -// Rule: +// to be allowed or blocked. For example, suppose that you add the following +// to a Rule: // // * An IPSet that matches the IP address 192.0.2.44/32 // @@ -3578,7 +3579,8 @@ func (c *WAFRegional) DisassociateWebACLRequest(input *DisassociateWebACLInput) // DisassociateWebACL API operation for AWS WAF Regional. // -// Removes a web ACL from the specified resource. +// Removes a web ACL from the specified resource, either an application load +// balancer or Amazon API Gateway stage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -5217,7 +5219,8 @@ func (c *WAFRegional) GetWebACLForResourceRequest(input *GetWebACLForResourceInp // GetWebACLForResource API operation for AWS WAF Regional. // -// Returns the web ACL for the specified resource. +// Returns the web ACL for the specified resource, either an application load +// balancer or Amazon API Gateway stage. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -8249,7 +8252,8 @@ func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *reques // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests // that you want to allow, block, or count. If you add more than one predicate // to a Rule, a request must match all of the specifications to be allowed, -// blocked, or counted. For example, suppose you add the following to a Rule: +// blocked, or counted. For example, suppose that you add the following to a +// Rule: // // * A ByteMatchSet that matches the value BadBot in the User-Agent header // @@ -8849,10 +8853,10 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // You can only specify a single type of TextTransformation. // // You use SqlInjectionMatchSet objects to specify which CloudFront requests -// you want to allow, block, or count. For example, if you're receiving requests -// that contain snippets of SQL code in the query string and you want to block -// the requests, you can create a SqlInjectionMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// that you want to allow, block, or count. For example, if you're receiving +// requests that contain snippets of SQL code in the query string and you want +// to block the requests, you can create a SqlInjectionMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure a SqlInjectionMatchSet, perform the following steps: // @@ -9033,8 +9037,8 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // the default action if a request doesn't match the criteria in any of the // Rules in a WebACL. // -// * The Rules that you want to add and/or delete. If you want to replace -// one Rule with another, you delete the existing Rule and add the new one. +// * The Rules that you want to add or delete. If you want to replace one +// Rule with another, you delete the existing Rule and add the new one. // // * For each Rule, whether you want AWS WAF to allow requests, block requests, // or count requests that match the conditions in the Rule. @@ -9043,9 +9047,9 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // If you add more than one Rule to a WebACL, AWS WAF evaluates each request // against the Rules in order based on the value of Priority. (The Rule that // has the lowest value for Priority is evaluated first.) When a web request -// matches all of the predicates (such as ByteMatchSets and IPSets) in a -// Rule, AWS WAF immediately takes the corresponding action, allow or block, -// and doesn't evaluate the request against the remaining Rules in the WebACL, +// matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, +// AWS WAF immediately takes the corresponding action, allow or block, and +// doesn't evaluate the request against the remaining Rules in the WebACL, // if any. // // To create and configure a WebACL, perform the following steps: @@ -9066,6 +9070,14 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // in the WebACL, to specify the default action, and to associate the WebACL // with a CloudFront distribution. // +// The ActivatedRule can be a rule group. If you specify a rule group as your +// ActivatedRule, you can exclude specific rules from that rule group. +// +// If you already have a rule group associated with a web ACL and want to submit +// an UpdateWebACL request to exclude certain rules from that rule group, you +// must first remove the rule group from the web ACL, the re-insert it again, +// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. +// // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will // fail because the request tries to add a REGULAR rule (the default rule type) @@ -9247,8 +9259,8 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // each XssMatchTuple object, you specify the following values: // // * Action: Whether to insert the object into or delete the object from -// the array. To change a XssMatchTuple, you delete the existing object and -// add a new one. +// the array. To change an XssMatchTuple, you delete the existing object +// and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect // and, if you want AWS WAF to inspect a header or custom query parameter, @@ -9260,11 +9272,11 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // // You can only specify a single type of TextTransformation. // -// You use XssMatchSet objects to specify which CloudFront requests you want -// to allow, block, or count. For example, if you're receiving requests that -// contain cross-site scripting attacks in the request body and you want to -// block the requests, you can create an XssMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// You use XssMatchSet objects to specify which CloudFront requests that you +// want to allow, block, or count. For example, if you're receiving requests +// that contain cross-site scripting attacks in the request body and you want +// to block the requests, you can create an XssMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure an XssMatchSet, perform the following steps: // @@ -9396,7 +9408,14 @@ func (c *WAFRegional) UpdateXssMatchSetWithContext(ctx aws.Context, input *waf.U type AssociateWebACLInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the resource to be protected. + // The ARN (Amazon Resource Name) of the resource to be protected, either an + // application load balancer or Amazon API Gateway stage. + // + // The ARN should be in one of the following formats: + // + // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + // + // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -9469,7 +9488,14 @@ type DisassociateWebACLInput struct { _ struct{} `type:"structure"` // The ARN (Amazon Resource Name) of the resource from which the web ACL is - // being removed. + // being removed, either an application load balancer or Amazon API Gateway + // stage. + // + // The ARN should be in one of the following formats: + // + // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + // + // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -9524,7 +9550,14 @@ func (s DisassociateWebACLOutput) GoString() string { type GetWebACLForResourceInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the resource for which to get the web ACL. + // The ARN (Amazon Resource Name) of the resource for which to get the web ACL, + // either an application load balancer or Amazon API Gateway stage. + // + // The ARN should be in one of the following formats: + // + // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + // + // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -9589,7 +9622,7 @@ func (s *GetWebACLForResourceOutput) SetWebACLSummary(v *waf.WebACLSummary) *Get type ListResourcesForWebACLInput struct { _ struct{} `type:"structure"` - // The type of resource to list, either and application load balancer or Amazon + // The type of resource to list, either an application load balancer or Amazon // API Gateway. ResourceType *string `type:"string" enum:"ResourceType"` @@ -10532,6 +10565,9 @@ const ( // ParameterExceptionFieldNextMarker is a ParameterExceptionField enum value ParameterExceptionFieldNextMarker = "NEXT_MARKER" + + // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value + ParameterExceptionFieldResourceArn = "RESOURCE_ARN" ) const ( @@ -10540,6 +10576,9 @@ const ( // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION" + + // ParameterExceptionReasonIllegalArgument is a ParameterExceptionReason enum value + ParameterExceptionReasonIllegalArgument = "ILLEGAL_ARGUMENT" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go new file mode 100644 index 000000000..f2d632f24 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/worklink/api.go @@ -0,0 +1,3904 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package worklink + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opAssociateWebsiteCertificateAuthority = "AssociateWebsiteCertificateAuthority" + +// AssociateWebsiteCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the AssociateWebsiteCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateWebsiteCertificateAuthority for more information on using the AssociateWebsiteCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateWebsiteCertificateAuthorityRequest method. +// req, resp := client.AssociateWebsiteCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/AssociateWebsiteCertificateAuthority +func (c *WorkLink) AssociateWebsiteCertificateAuthorityRequest(input *AssociateWebsiteCertificateAuthorityInput) (req *request.Request, output *AssociateWebsiteCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opAssociateWebsiteCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/associateWebsiteCertificateAuthority", + } + + if input == nil { + input = &AssociateWebsiteCertificateAuthorityInput{} + } + + output = &AssociateWebsiteCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateWebsiteCertificateAuthority API operation for Amazon WorkLink. +// +// Imports the root certificate of a certificate authority (CA) used to obtain +// TLS certificates used by associated websites within the company network. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation AssociateWebsiteCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource already exists. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/AssociateWebsiteCertificateAuthority +func (c *WorkLink) AssociateWebsiteCertificateAuthority(input *AssociateWebsiteCertificateAuthorityInput) (*AssociateWebsiteCertificateAuthorityOutput, error) { + req, out := c.AssociateWebsiteCertificateAuthorityRequest(input) + return out, req.Send() +} + +// AssociateWebsiteCertificateAuthorityWithContext is the same as AssociateWebsiteCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateWebsiteCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) AssociateWebsiteCertificateAuthorityWithContext(ctx aws.Context, input *AssociateWebsiteCertificateAuthorityInput, opts ...request.Option) (*AssociateWebsiteCertificateAuthorityOutput, error) { + req, out := c.AssociateWebsiteCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateFleet = "CreateFleet" + +// CreateFleetRequest generates a "aws/request.Request" representing the +// client's request for the CreateFleet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateFleet for more information on using the CreateFleet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateFleetRequest method. +// req, resp := client.CreateFleetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/CreateFleet +func (c *WorkLink) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, output *CreateFleetOutput) { + op := &request.Operation{ + Name: opCreateFleet, + HTTPMethod: "POST", + HTTPPath: "/createFleet", + } + + if input == nil { + input = &CreateFleetInput{} + } + + output = &CreateFleetOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFleet API operation for Amazon WorkLink. +// +// Creates a fleet. A fleet consists of resources and the configuration that +// delivers associated websites to authorized users who download and set up +// the Amazon WorkLink app. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation CreateFleet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource already exists. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/CreateFleet +func (c *WorkLink) CreateFleet(input *CreateFleetInput) (*CreateFleetOutput, error) { + req, out := c.CreateFleetRequest(input) + return out, req.Send() +} + +// CreateFleetWithContext is the same as CreateFleet with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFleet for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) CreateFleetWithContext(ctx aws.Context, input *CreateFleetInput, opts ...request.Option) (*CreateFleetOutput, error) { + req, out := c.CreateFleetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteFleet = "DeleteFleet" + +// DeleteFleetRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFleet operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteFleet for more information on using the DeleteFleet +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeleteFleetRequest method. +// req, resp := client.DeleteFleetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DeleteFleet +func (c *WorkLink) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Request, output *DeleteFleetOutput) { + op := &request.Operation{ + Name: opDeleteFleet, + HTTPMethod: "POST", + HTTPPath: "/deleteFleet", + } + + if input == nil { + input = &DeleteFleetInput{} + } + + output = &DeleteFleetOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteFleet API operation for Amazon WorkLink. +// +// Deletes a fleet. Prevents users from accessing previously associated websites. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DeleteFleet for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DeleteFleet +func (c *WorkLink) DeleteFleet(input *DeleteFleetInput) (*DeleteFleetOutput, error) { + req, out := c.DeleteFleetRequest(input) + return out, req.Send() +} + +// DeleteFleetWithContext is the same as DeleteFleet with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFleet for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DeleteFleetWithContext(ctx aws.Context, input *DeleteFleetInput, opts ...request.Option) (*DeleteFleetOutput, error) { + req, out := c.DeleteFleetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAuditStreamConfiguration = "DescribeAuditStreamConfiguration" + +// DescribeAuditStreamConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAuditStreamConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeAuditStreamConfiguration for more information on using the DescribeAuditStreamConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeAuditStreamConfigurationRequest method. +// req, resp := client.DescribeAuditStreamConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeAuditStreamConfiguration +func (c *WorkLink) DescribeAuditStreamConfigurationRequest(input *DescribeAuditStreamConfigurationInput) (req *request.Request, output *DescribeAuditStreamConfigurationOutput) { + op := &request.Operation{ + Name: opDescribeAuditStreamConfiguration, + HTTPMethod: "POST", + HTTPPath: "/describeAuditStreamConfiguration", + } + + if input == nil { + input = &DescribeAuditStreamConfigurationInput{} + } + + output = &DescribeAuditStreamConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAuditStreamConfiguration API operation for Amazon WorkLink. +// +// Describes the configuration for delivering audit streams to the customer +// account. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeAuditStreamConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeAuditStreamConfiguration +func (c *WorkLink) DescribeAuditStreamConfiguration(input *DescribeAuditStreamConfigurationInput) (*DescribeAuditStreamConfigurationOutput, error) { + req, out := c.DescribeAuditStreamConfigurationRequest(input) + return out, req.Send() +} + +// DescribeAuditStreamConfigurationWithContext is the same as DescribeAuditStreamConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAuditStreamConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeAuditStreamConfigurationWithContext(ctx aws.Context, input *DescribeAuditStreamConfigurationInput, opts ...request.Option) (*DescribeAuditStreamConfigurationOutput, error) { + req, out := c.DescribeAuditStreamConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCompanyNetworkConfiguration = "DescribeCompanyNetworkConfiguration" + +// DescribeCompanyNetworkConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCompanyNetworkConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeCompanyNetworkConfiguration for more information on using the DescribeCompanyNetworkConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeCompanyNetworkConfigurationRequest method. +// req, resp := client.DescribeCompanyNetworkConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeCompanyNetworkConfiguration +func (c *WorkLink) DescribeCompanyNetworkConfigurationRequest(input *DescribeCompanyNetworkConfigurationInput) (req *request.Request, output *DescribeCompanyNetworkConfigurationOutput) { + op := &request.Operation{ + Name: opDescribeCompanyNetworkConfiguration, + HTTPMethod: "POST", + HTTPPath: "/describeCompanyNetworkConfiguration", + } + + if input == nil { + input = &DescribeCompanyNetworkConfigurationInput{} + } + + output = &DescribeCompanyNetworkConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCompanyNetworkConfiguration API operation for Amazon WorkLink. +// +// Describes the networking configuration to access the internal websites associated +// with the specified fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeCompanyNetworkConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeCompanyNetworkConfiguration +func (c *WorkLink) DescribeCompanyNetworkConfiguration(input *DescribeCompanyNetworkConfigurationInput) (*DescribeCompanyNetworkConfigurationOutput, error) { + req, out := c.DescribeCompanyNetworkConfigurationRequest(input) + return out, req.Send() +} + +// DescribeCompanyNetworkConfigurationWithContext is the same as DescribeCompanyNetworkConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCompanyNetworkConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeCompanyNetworkConfigurationWithContext(ctx aws.Context, input *DescribeCompanyNetworkConfigurationInput, opts ...request.Option) (*DescribeCompanyNetworkConfigurationOutput, error) { + req, out := c.DescribeCompanyNetworkConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDevice = "DescribeDevice" + +// DescribeDeviceRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDevice operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDevice for more information on using the DescribeDevice +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDeviceRequest method. +// req, resp := client.DescribeDeviceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevice +func (c *WorkLink) DescribeDeviceRequest(input *DescribeDeviceInput) (req *request.Request, output *DescribeDeviceOutput) { + op := &request.Operation{ + Name: opDescribeDevice, + HTTPMethod: "POST", + HTTPPath: "/describeDevice", + } + + if input == nil { + input = &DescribeDeviceInput{} + } + + output = &DescribeDeviceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDevice API operation for Amazon WorkLink. +// +// Provides information about a user's device. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeDevice for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevice +func (c *WorkLink) DescribeDevice(input *DescribeDeviceInput) (*DescribeDeviceOutput, error) { + req, out := c.DescribeDeviceRequest(input) + return out, req.Send() +} + +// DescribeDeviceWithContext is the same as DescribeDevice with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDevice for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeDeviceWithContext(ctx aws.Context, input *DescribeDeviceInput, opts ...request.Option) (*DescribeDeviceOutput, error) { + req, out := c.DescribeDeviceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeDevicePolicyConfiguration = "DescribeDevicePolicyConfiguration" + +// DescribeDevicePolicyConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDevicePolicyConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeDevicePolicyConfiguration for more information on using the DescribeDevicePolicyConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeDevicePolicyConfigurationRequest method. +// req, resp := client.DescribeDevicePolicyConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevicePolicyConfiguration +func (c *WorkLink) DescribeDevicePolicyConfigurationRequest(input *DescribeDevicePolicyConfigurationInput) (req *request.Request, output *DescribeDevicePolicyConfigurationOutput) { + op := &request.Operation{ + Name: opDescribeDevicePolicyConfiguration, + HTTPMethod: "POST", + HTTPPath: "/describeDevicePolicyConfiguration", + } + + if input == nil { + input = &DescribeDevicePolicyConfigurationInput{} + } + + output = &DescribeDevicePolicyConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDevicePolicyConfiguration API operation for Amazon WorkLink. +// +// Describes the device policy configuration for the specified fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeDevicePolicyConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeDevicePolicyConfiguration +func (c *WorkLink) DescribeDevicePolicyConfiguration(input *DescribeDevicePolicyConfigurationInput) (*DescribeDevicePolicyConfigurationOutput, error) { + req, out := c.DescribeDevicePolicyConfigurationRequest(input) + return out, req.Send() +} + +// DescribeDevicePolicyConfigurationWithContext is the same as DescribeDevicePolicyConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDevicePolicyConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeDevicePolicyConfigurationWithContext(ctx aws.Context, input *DescribeDevicePolicyConfigurationInput, opts ...request.Option) (*DescribeDevicePolicyConfigurationOutput, error) { + req, out := c.DescribeDevicePolicyConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeFleetMetadata = "DescribeFleetMetadata" + +// DescribeFleetMetadataRequest generates a "aws/request.Request" representing the +// client's request for the DescribeFleetMetadata operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeFleetMetadata for more information on using the DescribeFleetMetadata +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeFleetMetadataRequest method. +// req, resp := client.DescribeFleetMetadataRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeFleetMetadata +func (c *WorkLink) DescribeFleetMetadataRequest(input *DescribeFleetMetadataInput) (req *request.Request, output *DescribeFleetMetadataOutput) { + op := &request.Operation{ + Name: opDescribeFleetMetadata, + HTTPMethod: "POST", + HTTPPath: "/describeFleetMetadata", + } + + if input == nil { + input = &DescribeFleetMetadataInput{} + } + + output = &DescribeFleetMetadataOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeFleetMetadata API operation for Amazon WorkLink. +// +// Provides basic information for the specified fleet, excluding identity provider, +// networking, and device configuration details. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeFleetMetadata for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeFleetMetadata +func (c *WorkLink) DescribeFleetMetadata(input *DescribeFleetMetadataInput) (*DescribeFleetMetadataOutput, error) { + req, out := c.DescribeFleetMetadataRequest(input) + return out, req.Send() +} + +// DescribeFleetMetadataWithContext is the same as DescribeFleetMetadata with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeFleetMetadata for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeFleetMetadataWithContext(ctx aws.Context, input *DescribeFleetMetadataInput, opts ...request.Option) (*DescribeFleetMetadataOutput, error) { + req, out := c.DescribeFleetMetadataRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeIdentityProviderConfiguration = "DescribeIdentityProviderConfiguration" + +// DescribeIdentityProviderConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeIdentityProviderConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeIdentityProviderConfiguration for more information on using the DescribeIdentityProviderConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeIdentityProviderConfigurationRequest method. +// req, resp := client.DescribeIdentityProviderConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeIdentityProviderConfiguration +func (c *WorkLink) DescribeIdentityProviderConfigurationRequest(input *DescribeIdentityProviderConfigurationInput) (req *request.Request, output *DescribeIdentityProviderConfigurationOutput) { + op := &request.Operation{ + Name: opDescribeIdentityProviderConfiguration, + HTTPMethod: "POST", + HTTPPath: "/describeIdentityProviderConfiguration", + } + + if input == nil { + input = &DescribeIdentityProviderConfigurationInput{} + } + + output = &DescribeIdentityProviderConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeIdentityProviderConfiguration API operation for Amazon WorkLink. +// +// Describes the identity provider configuration of the specified fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeIdentityProviderConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeIdentityProviderConfiguration +func (c *WorkLink) DescribeIdentityProviderConfiguration(input *DescribeIdentityProviderConfigurationInput) (*DescribeIdentityProviderConfigurationOutput, error) { + req, out := c.DescribeIdentityProviderConfigurationRequest(input) + return out, req.Send() +} + +// DescribeIdentityProviderConfigurationWithContext is the same as DescribeIdentityProviderConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeIdentityProviderConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeIdentityProviderConfigurationWithContext(ctx aws.Context, input *DescribeIdentityProviderConfigurationInput, opts ...request.Option) (*DescribeIdentityProviderConfigurationOutput, error) { + req, out := c.DescribeIdentityProviderConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeWebsiteCertificateAuthority = "DescribeWebsiteCertificateAuthority" + +// DescribeWebsiteCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWebsiteCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeWebsiteCertificateAuthority for more information on using the DescribeWebsiteCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeWebsiteCertificateAuthorityRequest method. +// req, resp := client.DescribeWebsiteCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeWebsiteCertificateAuthority +func (c *WorkLink) DescribeWebsiteCertificateAuthorityRequest(input *DescribeWebsiteCertificateAuthorityInput) (req *request.Request, output *DescribeWebsiteCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opDescribeWebsiteCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/describeWebsiteCertificateAuthority", + } + + if input == nil { + input = &DescribeWebsiteCertificateAuthorityInput{} + } + + output = &DescribeWebsiteCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWebsiteCertificateAuthority API operation for Amazon WorkLink. +// +// Provides information about the certificate authority. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DescribeWebsiteCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DescribeWebsiteCertificateAuthority +func (c *WorkLink) DescribeWebsiteCertificateAuthority(input *DescribeWebsiteCertificateAuthorityInput) (*DescribeWebsiteCertificateAuthorityOutput, error) { + req, out := c.DescribeWebsiteCertificateAuthorityRequest(input) + return out, req.Send() +} + +// DescribeWebsiteCertificateAuthorityWithContext is the same as DescribeWebsiteCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWebsiteCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DescribeWebsiteCertificateAuthorityWithContext(ctx aws.Context, input *DescribeWebsiteCertificateAuthorityInput, opts ...request.Option) (*DescribeWebsiteCertificateAuthorityOutput, error) { + req, out := c.DescribeWebsiteCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateWebsiteCertificateAuthority = "DisassociateWebsiteCertificateAuthority" + +// DisassociateWebsiteCertificateAuthorityRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateWebsiteCertificateAuthority operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateWebsiteCertificateAuthority for more information on using the DisassociateWebsiteCertificateAuthority +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateWebsiteCertificateAuthorityRequest method. +// req, resp := client.DisassociateWebsiteCertificateAuthorityRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DisassociateWebsiteCertificateAuthority +func (c *WorkLink) DisassociateWebsiteCertificateAuthorityRequest(input *DisassociateWebsiteCertificateAuthorityInput) (req *request.Request, output *DisassociateWebsiteCertificateAuthorityOutput) { + op := &request.Operation{ + Name: opDisassociateWebsiteCertificateAuthority, + HTTPMethod: "POST", + HTTPPath: "/disassociateWebsiteCertificateAuthority", + } + + if input == nil { + input = &DisassociateWebsiteCertificateAuthorityInput{} + } + + output = &DisassociateWebsiteCertificateAuthorityOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateWebsiteCertificateAuthority API operation for Amazon WorkLink. +// +// Removes a certificate authority (CA). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation DisassociateWebsiteCertificateAuthority for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/DisassociateWebsiteCertificateAuthority +func (c *WorkLink) DisassociateWebsiteCertificateAuthority(input *DisassociateWebsiteCertificateAuthorityInput) (*DisassociateWebsiteCertificateAuthorityOutput, error) { + req, out := c.DisassociateWebsiteCertificateAuthorityRequest(input) + return out, req.Send() +} + +// DisassociateWebsiteCertificateAuthorityWithContext is the same as DisassociateWebsiteCertificateAuthority with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateWebsiteCertificateAuthority for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) DisassociateWebsiteCertificateAuthorityWithContext(ctx aws.Context, input *DisassociateWebsiteCertificateAuthorityInput, opts ...request.Option) (*DisassociateWebsiteCertificateAuthorityOutput, error) { + req, out := c.DisassociateWebsiteCertificateAuthorityRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListDevices = "ListDevices" + +// ListDevicesRequest generates a "aws/request.Request" representing the +// client's request for the ListDevices operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListDevices for more information on using the ListDevices +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListDevicesRequest method. +// req, resp := client.ListDevicesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListDevices +func (c *WorkLink) ListDevicesRequest(input *ListDevicesInput) (req *request.Request, output *ListDevicesOutput) { + op := &request.Operation{ + Name: opListDevices, + HTTPMethod: "POST", + HTTPPath: "/listDevices", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDevicesInput{} + } + + output = &ListDevicesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDevices API operation for Amazon WorkLink. +// +// Retrieves a list of devices registered with the specified fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation ListDevices for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListDevices +func (c *WorkLink) ListDevices(input *ListDevicesInput) (*ListDevicesOutput, error) { + req, out := c.ListDevicesRequest(input) + return out, req.Send() +} + +// ListDevicesWithContext is the same as ListDevices with the addition of +// the ability to pass a context and additional request options. +// +// See ListDevices for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) ListDevicesWithContext(ctx aws.Context, input *ListDevicesInput, opts ...request.Option) (*ListDevicesOutput, error) { + req, out := c.ListDevicesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDevicesPages iterates over the pages of a ListDevices operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDevices method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListDevices operation. +// pageNum := 0 +// err := client.ListDevicesPages(params, +// func(page *ListDevicesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *WorkLink) ListDevicesPages(input *ListDevicesInput, fn func(*ListDevicesOutput, bool) bool) error { + return c.ListDevicesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListDevicesPagesWithContext same as ListDevicesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) ListDevicesPagesWithContext(ctx aws.Context, input *ListDevicesInput, fn func(*ListDevicesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListDevicesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListDevicesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListDevicesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListFleets = "ListFleets" + +// ListFleetsRequest generates a "aws/request.Request" representing the +// client's request for the ListFleets operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFleets for more information on using the ListFleets +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListFleetsRequest method. +// req, resp := client.ListFleetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListFleets +func (c *WorkLink) ListFleetsRequest(input *ListFleetsInput) (req *request.Request, output *ListFleetsOutput) { + op := &request.Operation{ + Name: opListFleets, + HTTPMethod: "POST", + HTTPPath: "/listFleets", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListFleetsInput{} + } + + output = &ListFleetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFleets API operation for Amazon WorkLink. +// +// Retrieves a list of fleets for the current account and Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation ListFleets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListFleets +func (c *WorkLink) ListFleets(input *ListFleetsInput) (*ListFleetsOutput, error) { + req, out := c.ListFleetsRequest(input) + return out, req.Send() +} + +// ListFleetsWithContext is the same as ListFleets with the addition of +// the ability to pass a context and additional request options. +// +// See ListFleets for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) ListFleetsWithContext(ctx aws.Context, input *ListFleetsInput, opts ...request.Option) (*ListFleetsOutput, error) { + req, out := c.ListFleetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListFleetsPages iterates over the pages of a ListFleets operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListFleets method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListFleets operation. +// pageNum := 0 +// err := client.ListFleetsPages(params, +// func(page *ListFleetsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *WorkLink) ListFleetsPages(input *ListFleetsInput, fn func(*ListFleetsOutput, bool) bool) error { + return c.ListFleetsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListFleetsPagesWithContext same as ListFleetsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) ListFleetsPagesWithContext(ctx aws.Context, input *ListFleetsInput, fn func(*ListFleetsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListFleetsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListFleetsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListFleetsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListWebsiteCertificateAuthorities = "ListWebsiteCertificateAuthorities" + +// ListWebsiteCertificateAuthoritiesRequest generates a "aws/request.Request" representing the +// client's request for the ListWebsiteCertificateAuthorities operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListWebsiteCertificateAuthorities for more information on using the ListWebsiteCertificateAuthorities +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListWebsiteCertificateAuthoritiesRequest method. +// req, resp := client.ListWebsiteCertificateAuthoritiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListWebsiteCertificateAuthorities +func (c *WorkLink) ListWebsiteCertificateAuthoritiesRequest(input *ListWebsiteCertificateAuthoritiesInput) (req *request.Request, output *ListWebsiteCertificateAuthoritiesOutput) { + op := &request.Operation{ + Name: opListWebsiteCertificateAuthorities, + HTTPMethod: "POST", + HTTPPath: "/listWebsiteCertificateAuthorities", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListWebsiteCertificateAuthoritiesInput{} + } + + output = &ListWebsiteCertificateAuthoritiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListWebsiteCertificateAuthorities API operation for Amazon WorkLink. +// +// Retrieves a list of certificate authorities added for the current account +// and Region. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation ListWebsiteCertificateAuthorities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/ListWebsiteCertificateAuthorities +func (c *WorkLink) ListWebsiteCertificateAuthorities(input *ListWebsiteCertificateAuthoritiesInput) (*ListWebsiteCertificateAuthoritiesOutput, error) { + req, out := c.ListWebsiteCertificateAuthoritiesRequest(input) + return out, req.Send() +} + +// ListWebsiteCertificateAuthoritiesWithContext is the same as ListWebsiteCertificateAuthorities with the addition of +// the ability to pass a context and additional request options. +// +// See ListWebsiteCertificateAuthorities for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) ListWebsiteCertificateAuthoritiesWithContext(ctx aws.Context, input *ListWebsiteCertificateAuthoritiesInput, opts ...request.Option) (*ListWebsiteCertificateAuthoritiesOutput, error) { + req, out := c.ListWebsiteCertificateAuthoritiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListWebsiteCertificateAuthoritiesPages iterates over the pages of a ListWebsiteCertificateAuthorities operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListWebsiteCertificateAuthorities method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListWebsiteCertificateAuthorities operation. +// pageNum := 0 +// err := client.ListWebsiteCertificateAuthoritiesPages(params, +// func(page *ListWebsiteCertificateAuthoritiesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *WorkLink) ListWebsiteCertificateAuthoritiesPages(input *ListWebsiteCertificateAuthoritiesInput, fn func(*ListWebsiteCertificateAuthoritiesOutput, bool) bool) error { + return c.ListWebsiteCertificateAuthoritiesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListWebsiteCertificateAuthoritiesPagesWithContext same as ListWebsiteCertificateAuthoritiesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) ListWebsiteCertificateAuthoritiesPagesWithContext(ctx aws.Context, input *ListWebsiteCertificateAuthoritiesInput, fn func(*ListWebsiteCertificateAuthoritiesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListWebsiteCertificateAuthoritiesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListWebsiteCertificateAuthoritiesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListWebsiteCertificateAuthoritiesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opSignOutUser = "SignOutUser" + +// SignOutUserRequest generates a "aws/request.Request" representing the +// client's request for the SignOutUser operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See SignOutUser for more information on using the SignOutUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the SignOutUserRequest method. +// req, resp := client.SignOutUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/SignOutUser +func (c *WorkLink) SignOutUserRequest(input *SignOutUserInput) (req *request.Request, output *SignOutUserOutput) { + op := &request.Operation{ + Name: opSignOutUser, + HTTPMethod: "POST", + HTTPPath: "/signOutUser", + } + + if input == nil { + input = &SignOutUserInput{} + } + + output = &SignOutUserOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// SignOutUser API operation for Amazon WorkLink. +// +// Signs the user out from all of their devices. The user can sign in again +// if they have valid credentials. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation SignOutUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/SignOutUser +func (c *WorkLink) SignOutUser(input *SignOutUserInput) (*SignOutUserOutput, error) { + req, out := c.SignOutUserRequest(input) + return out, req.Send() +} + +// SignOutUserWithContext is the same as SignOutUser with the addition of +// the ability to pass a context and additional request options. +// +// See SignOutUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) SignOutUserWithContext(ctx aws.Context, input *SignOutUserInput, opts ...request.Option) (*SignOutUserOutput, error) { + req, out := c.SignOutUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAuditStreamConfiguration = "UpdateAuditStreamConfiguration" + +// UpdateAuditStreamConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAuditStreamConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateAuditStreamConfiguration for more information on using the UpdateAuditStreamConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateAuditStreamConfigurationRequest method. +// req, resp := client.UpdateAuditStreamConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateAuditStreamConfiguration +func (c *WorkLink) UpdateAuditStreamConfigurationRequest(input *UpdateAuditStreamConfigurationInput) (req *request.Request, output *UpdateAuditStreamConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateAuditStreamConfiguration, + HTTPMethod: "POST", + HTTPPath: "/updateAuditStreamConfiguration", + } + + if input == nil { + input = &UpdateAuditStreamConfigurationInput{} + } + + output = &UpdateAuditStreamConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateAuditStreamConfiguration API operation for Amazon WorkLink. +// +// Updates the audit stream configuration for the fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation UpdateAuditStreamConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateAuditStreamConfiguration +func (c *WorkLink) UpdateAuditStreamConfiguration(input *UpdateAuditStreamConfigurationInput) (*UpdateAuditStreamConfigurationOutput, error) { + req, out := c.UpdateAuditStreamConfigurationRequest(input) + return out, req.Send() +} + +// UpdateAuditStreamConfigurationWithContext is the same as UpdateAuditStreamConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAuditStreamConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) UpdateAuditStreamConfigurationWithContext(ctx aws.Context, input *UpdateAuditStreamConfigurationInput, opts ...request.Option) (*UpdateAuditStreamConfigurationOutput, error) { + req, out := c.UpdateAuditStreamConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCompanyNetworkConfiguration = "UpdateCompanyNetworkConfiguration" + +// UpdateCompanyNetworkConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCompanyNetworkConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateCompanyNetworkConfiguration for more information on using the UpdateCompanyNetworkConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateCompanyNetworkConfigurationRequest method. +// req, resp := client.UpdateCompanyNetworkConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateCompanyNetworkConfiguration +func (c *WorkLink) UpdateCompanyNetworkConfigurationRequest(input *UpdateCompanyNetworkConfigurationInput) (req *request.Request, output *UpdateCompanyNetworkConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateCompanyNetworkConfiguration, + HTTPMethod: "POST", + HTTPPath: "/updateCompanyNetworkConfiguration", + } + + if input == nil { + input = &UpdateCompanyNetworkConfigurationInput{} + } + + output = &UpdateCompanyNetworkConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCompanyNetworkConfiguration API operation for Amazon WorkLink. +// +// Updates the company network configuration for the fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation UpdateCompanyNetworkConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateCompanyNetworkConfiguration +func (c *WorkLink) UpdateCompanyNetworkConfiguration(input *UpdateCompanyNetworkConfigurationInput) (*UpdateCompanyNetworkConfigurationOutput, error) { + req, out := c.UpdateCompanyNetworkConfigurationRequest(input) + return out, req.Send() +} + +// UpdateCompanyNetworkConfigurationWithContext is the same as UpdateCompanyNetworkConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCompanyNetworkConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) UpdateCompanyNetworkConfigurationWithContext(ctx aws.Context, input *UpdateCompanyNetworkConfigurationInput, opts ...request.Option) (*UpdateCompanyNetworkConfigurationOutput, error) { + req, out := c.UpdateCompanyNetworkConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDevicePolicyConfiguration = "UpdateDevicePolicyConfiguration" + +// UpdateDevicePolicyConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDevicePolicyConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateDevicePolicyConfiguration for more information on using the UpdateDevicePolicyConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateDevicePolicyConfigurationRequest method. +// req, resp := client.UpdateDevicePolicyConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateDevicePolicyConfiguration +func (c *WorkLink) UpdateDevicePolicyConfigurationRequest(input *UpdateDevicePolicyConfigurationInput) (req *request.Request, output *UpdateDevicePolicyConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateDevicePolicyConfiguration, + HTTPMethod: "POST", + HTTPPath: "/updateDevicePolicyConfiguration", + } + + if input == nil { + input = &UpdateDevicePolicyConfigurationInput{} + } + + output = &UpdateDevicePolicyConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateDevicePolicyConfiguration API operation for Amazon WorkLink. +// +// Updates the device policy configuration for the fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation UpdateDevicePolicyConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateDevicePolicyConfiguration +func (c *WorkLink) UpdateDevicePolicyConfiguration(input *UpdateDevicePolicyConfigurationInput) (*UpdateDevicePolicyConfigurationOutput, error) { + req, out := c.UpdateDevicePolicyConfigurationRequest(input) + return out, req.Send() +} + +// UpdateDevicePolicyConfigurationWithContext is the same as UpdateDevicePolicyConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDevicePolicyConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) UpdateDevicePolicyConfigurationWithContext(ctx aws.Context, input *UpdateDevicePolicyConfigurationInput, opts ...request.Option) (*UpdateDevicePolicyConfigurationOutput, error) { + req, out := c.UpdateDevicePolicyConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFleetMetadata = "UpdateFleetMetadata" + +// UpdateFleetMetadataRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFleetMetadata operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateFleetMetadata for more information on using the UpdateFleetMetadata +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateFleetMetadataRequest method. +// req, resp := client.UpdateFleetMetadataRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateFleetMetadata +func (c *WorkLink) UpdateFleetMetadataRequest(input *UpdateFleetMetadataInput) (req *request.Request, output *UpdateFleetMetadataOutput) { + op := &request.Operation{ + Name: opUpdateFleetMetadata, + HTTPMethod: "POST", + HTTPPath: "/UpdateFleetMetadata", + } + + if input == nil { + input = &UpdateFleetMetadataInput{} + } + + output = &UpdateFleetMetadataOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateFleetMetadata API operation for Amazon WorkLink. +// +// Updates fleet metadata, such as DisplayName. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation UpdateFleetMetadata for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateFleetMetadata +func (c *WorkLink) UpdateFleetMetadata(input *UpdateFleetMetadataInput) (*UpdateFleetMetadataOutput, error) { + req, out := c.UpdateFleetMetadataRequest(input) + return out, req.Send() +} + +// UpdateFleetMetadataWithContext is the same as UpdateFleetMetadata with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFleetMetadata for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) UpdateFleetMetadataWithContext(ctx aws.Context, input *UpdateFleetMetadataInput, opts ...request.Option) (*UpdateFleetMetadataOutput, error) { + req, out := c.UpdateFleetMetadataRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateIdentityProviderConfiguration = "UpdateIdentityProviderConfiguration" + +// UpdateIdentityProviderConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateIdentityProviderConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UpdateIdentityProviderConfiguration for more information on using the UpdateIdentityProviderConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UpdateIdentityProviderConfigurationRequest method. +// req, resp := client.UpdateIdentityProviderConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateIdentityProviderConfiguration +func (c *WorkLink) UpdateIdentityProviderConfigurationRequest(input *UpdateIdentityProviderConfigurationInput) (req *request.Request, output *UpdateIdentityProviderConfigurationOutput) { + op := &request.Operation{ + Name: opUpdateIdentityProviderConfiguration, + HTTPMethod: "POST", + HTTPPath: "/updateIdentityProviderConfiguration", + } + + if input == nil { + input = &UpdateIdentityProviderConfigurationInput{} + } + + output = &UpdateIdentityProviderConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateIdentityProviderConfiguration API operation for Amazon WorkLink. +// +// Updates the identity provider configuration for the fleet. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkLink's +// API operation UpdateIdentityProviderConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this action. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// The service is temporarily unavailable. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The requested resource was not found. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// The number of requests exceeds the limit. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25/UpdateIdentityProviderConfiguration +func (c *WorkLink) UpdateIdentityProviderConfiguration(input *UpdateIdentityProviderConfigurationInput) (*UpdateIdentityProviderConfigurationOutput, error) { + req, out := c.UpdateIdentityProviderConfigurationRequest(input) + return out, req.Send() +} + +// UpdateIdentityProviderConfigurationWithContext is the same as UpdateIdentityProviderConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateIdentityProviderConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *WorkLink) UpdateIdentityProviderConfigurationWithContext(ctx aws.Context, input *UpdateIdentityProviderConfigurationInput, opts ...request.Option) (*UpdateIdentityProviderConfigurationOutput, error) { + req, out := c.UpdateIdentityProviderConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AssociateWebsiteCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The root certificate of the CA. + // + // Certificate is a required field + Certificate *string `min:"1" type:"string" required:"true"` + + // The certificate name to display. + DisplayName *string `type:"string"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateWebsiteCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateWebsiteCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateWebsiteCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateWebsiteCertificateAuthorityInput"} + if s.Certificate == nil { + invalidParams.Add(request.NewErrParamRequired("Certificate")) + } + if s.Certificate != nil && len(*s.Certificate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Certificate", 1)) + } + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificate sets the Certificate field's value. +func (s *AssociateWebsiteCertificateAuthorityInput) SetCertificate(v string) *AssociateWebsiteCertificateAuthorityInput { + s.Certificate = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *AssociateWebsiteCertificateAuthorityInput) SetDisplayName(v string) *AssociateWebsiteCertificateAuthorityInput { + s.DisplayName = &v + return s +} + +// SetFleetArn sets the FleetArn field's value. +func (s *AssociateWebsiteCertificateAuthorityInput) SetFleetArn(v string) *AssociateWebsiteCertificateAuthorityInput { + s.FleetArn = &v + return s +} + +type AssociateWebsiteCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // A unique identifier for the CA. + WebsiteCaId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s AssociateWebsiteCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateWebsiteCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetWebsiteCaId sets the WebsiteCaId field's value. +func (s *AssociateWebsiteCertificateAuthorityOutput) SetWebsiteCaId(v string) *AssociateWebsiteCertificateAuthorityOutput { + s.WebsiteCaId = &v + return s +} + +type CreateFleetInput struct { + _ struct{} `type:"structure"` + + // The fleet name to display. + DisplayName *string `type:"string"` + + // A unique name for the fleet. + // + // FleetName is a required field + FleetName *string `min:"1" type:"string" required:"true"` + + // The option to optimize for better performance by routing traffic through + // the closest AWS Region to users, which may be outside of your home Region. + OptimizeForEndUserLocation *bool `type:"boolean"` +} + +// String returns the string representation +func (s CreateFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} + if s.FleetName == nil { + invalidParams.Add(request.NewErrParamRequired("FleetName")) + } + if s.FleetName != nil && len(*s.FleetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FleetName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDisplayName sets the DisplayName field's value. +func (s *CreateFleetInput) SetDisplayName(v string) *CreateFleetInput { + s.DisplayName = &v + return s +} + +// SetFleetName sets the FleetName field's value. +func (s *CreateFleetInput) SetFleetName(v string) *CreateFleetInput { + s.FleetName = &v + return s +} + +// SetOptimizeForEndUserLocation sets the OptimizeForEndUserLocation field's value. +func (s *CreateFleetInput) SetOptimizeForEndUserLocation(v bool) *CreateFleetInput { + s.OptimizeForEndUserLocation = &v + return s +} + +type CreateFleetOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + FleetArn *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s CreateFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetOutput) GoString() string { + return s.String() +} + +// SetFleetArn sets the FleetArn field's value. +func (s *CreateFleetOutput) SetFleetArn(v string) *CreateFleetOutput { + s.FleetArn = &v + return s +} + +type DeleteFleetInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFleetInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DeleteFleetInput) SetFleetArn(v string) *DeleteFleetInput { + s.FleetArn = &v + return s +} + +type DeleteFleetOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteFleetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetOutput) GoString() string { + return s.String() +} + +type DescribeAuditStreamConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeAuditStreamConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAuditStreamConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAuditStreamConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAuditStreamConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeAuditStreamConfigurationInput) SetFleetArn(v string) *DescribeAuditStreamConfigurationInput { + s.FleetArn = &v + return s +} + +type DescribeAuditStreamConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the Amazon Kinesis data stream that will receive the audit events. + AuditStreamArn *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAuditStreamConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAuditStreamConfigurationOutput) GoString() string { + return s.String() +} + +// SetAuditStreamArn sets the AuditStreamArn field's value. +func (s *DescribeAuditStreamConfigurationOutput) SetAuditStreamArn(v string) *DescribeAuditStreamConfigurationOutput { + s.AuditStreamArn = &v + return s +} + +type DescribeCompanyNetworkConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeCompanyNetworkConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCompanyNetworkConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCompanyNetworkConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCompanyNetworkConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeCompanyNetworkConfigurationInput) SetFleetArn(v string) *DescribeCompanyNetworkConfigurationInput { + s.FleetArn = &v + return s +} + +type DescribeCompanyNetworkConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The security groups associated with access to the provided subnets. + SecurityGroupIds []*string `type:"list"` + + // The subnets used for X-ENI connections from Amazon WorkLink rendering containers. + SubnetIds []*string `type:"list"` + + // The VPC with connectivity to associated websites. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s DescribeCompanyNetworkConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCompanyNetworkConfigurationOutput) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *DescribeCompanyNetworkConfigurationOutput) SetSecurityGroupIds(v []*string) *DescribeCompanyNetworkConfigurationOutput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *DescribeCompanyNetworkConfigurationOutput) SetSubnetIds(v []*string) *DescribeCompanyNetworkConfigurationOutput { + s.SubnetIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DescribeCompanyNetworkConfigurationOutput) SetVpcId(v string) *DescribeCompanyNetworkConfigurationOutput { + s.VpcId = &v + return s +} + +type DescribeDeviceInput struct { + _ struct{} `type:"structure"` + + // A unique identifier for a registered user's device. + // + // DeviceId is a required field + DeviceId *string `min:"1" type:"string" required:"true"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDeviceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDeviceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDeviceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDeviceInput"} + if s.DeviceId == nil { + invalidParams.Add(request.NewErrParamRequired("DeviceId")) + } + if s.DeviceId != nil && len(*s.DeviceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) + } + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceId sets the DeviceId field's value. +func (s *DescribeDeviceInput) SetDeviceId(v string) *DescribeDeviceInput { + s.DeviceId = &v + return s +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeDeviceInput) SetFleetArn(v string) *DescribeDeviceInput { + s.FleetArn = &v + return s +} + +type DescribeDeviceOutput struct { + _ struct{} `type:"structure"` + + // The date that the device first signed in to Amazon WorkLink. + FirstAccessedTime *time.Time `type:"timestamp"` + + // The date that the device last accessed Amazon WorkLink. + LastAccessedTime *time.Time `type:"timestamp"` + + // The manufacturer of the device. + Manufacturer *string `min:"1" type:"string"` + + // The model of the device. + Model *string `min:"1" type:"string"` + + // The operating system of the device. + OperatingSystem *string `min:"1" type:"string"` + + // The operating system version of the device. + OperatingSystemVersion *string `min:"1" type:"string"` + + // The operating system patch level of the device. + PatchLevel *string `min:"1" type:"string"` + + // The current state of the device. + Status *string `type:"string" enum:"DeviceStatus"` + + // The user name associated with the device. + Username *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeDeviceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDeviceOutput) GoString() string { + return s.String() +} + +// SetFirstAccessedTime sets the FirstAccessedTime field's value. +func (s *DescribeDeviceOutput) SetFirstAccessedTime(v time.Time) *DescribeDeviceOutput { + s.FirstAccessedTime = &v + return s +} + +// SetLastAccessedTime sets the LastAccessedTime field's value. +func (s *DescribeDeviceOutput) SetLastAccessedTime(v time.Time) *DescribeDeviceOutput { + s.LastAccessedTime = &v + return s +} + +// SetManufacturer sets the Manufacturer field's value. +func (s *DescribeDeviceOutput) SetManufacturer(v string) *DescribeDeviceOutput { + s.Manufacturer = &v + return s +} + +// SetModel sets the Model field's value. +func (s *DescribeDeviceOutput) SetModel(v string) *DescribeDeviceOutput { + s.Model = &v + return s +} + +// SetOperatingSystem sets the OperatingSystem field's value. +func (s *DescribeDeviceOutput) SetOperatingSystem(v string) *DescribeDeviceOutput { + s.OperatingSystem = &v + return s +} + +// SetOperatingSystemVersion sets the OperatingSystemVersion field's value. +func (s *DescribeDeviceOutput) SetOperatingSystemVersion(v string) *DescribeDeviceOutput { + s.OperatingSystemVersion = &v + return s +} + +// SetPatchLevel sets the PatchLevel field's value. +func (s *DescribeDeviceOutput) SetPatchLevel(v string) *DescribeDeviceOutput { + s.PatchLevel = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeDeviceOutput) SetStatus(v string) *DescribeDeviceOutput { + s.Status = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *DescribeDeviceOutput) SetUsername(v string) *DescribeDeviceOutput { + s.Username = &v + return s +} + +type DescribeDevicePolicyConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeDevicePolicyConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDevicePolicyConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDevicePolicyConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDevicePolicyConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeDevicePolicyConfigurationInput) SetFleetArn(v string) *DescribeDevicePolicyConfigurationInput { + s.FleetArn = &v + return s +} + +type DescribeDevicePolicyConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The certificate chain, including intermediate certificates and the root certificate + // authority certificate used to issue device certificates. + DeviceCaCertificate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeDevicePolicyConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDevicePolicyConfigurationOutput) GoString() string { + return s.String() +} + +// SetDeviceCaCertificate sets the DeviceCaCertificate field's value. +func (s *DescribeDevicePolicyConfigurationOutput) SetDeviceCaCertificate(v string) *DescribeDevicePolicyConfigurationOutput { + s.DeviceCaCertificate = &v + return s +} + +type DescribeFleetMetadataInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeFleetMetadataInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetMetadataInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetMetadataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetMetadataInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeFleetMetadataInput) SetFleetArn(v string) *DescribeFleetMetadataInput { + s.FleetArn = &v + return s +} + +type DescribeFleetMetadataOutput struct { + _ struct{} `type:"structure"` + + // The identifier used by users to sign in to the Amazon WorkLink app. + CompanyCode *string `min:"1" type:"string"` + + // The time that the fleet was created. + CreatedTime *time.Time `type:"timestamp"` + + // The name to display. + DisplayName *string `type:"string"` + + // The name of the fleet. + FleetName *string `min:"1" type:"string"` + + // The current state of the fleet. + FleetStatus *string `type:"string" enum:"FleetStatus"` + + // The time that the fleet was last updated. + LastUpdatedTime *time.Time `type:"timestamp"` + + // The option to optimize for better performance by routing traffic through + // the closest AWS Region to users, which may be outside of your home Region. + OptimizeForEndUserLocation *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeFleetMetadataOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFleetMetadataOutput) GoString() string { + return s.String() +} + +// SetCompanyCode sets the CompanyCode field's value. +func (s *DescribeFleetMetadataOutput) SetCompanyCode(v string) *DescribeFleetMetadataOutput { + s.CompanyCode = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *DescribeFleetMetadataOutput) SetCreatedTime(v time.Time) *DescribeFleetMetadataOutput { + s.CreatedTime = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *DescribeFleetMetadataOutput) SetDisplayName(v string) *DescribeFleetMetadataOutput { + s.DisplayName = &v + return s +} + +// SetFleetName sets the FleetName field's value. +func (s *DescribeFleetMetadataOutput) SetFleetName(v string) *DescribeFleetMetadataOutput { + s.FleetName = &v + return s +} + +// SetFleetStatus sets the FleetStatus field's value. +func (s *DescribeFleetMetadataOutput) SetFleetStatus(v string) *DescribeFleetMetadataOutput { + s.FleetStatus = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *DescribeFleetMetadataOutput) SetLastUpdatedTime(v time.Time) *DescribeFleetMetadataOutput { + s.LastUpdatedTime = &v + return s +} + +// SetOptimizeForEndUserLocation sets the OptimizeForEndUserLocation field's value. +func (s *DescribeFleetMetadataOutput) SetOptimizeForEndUserLocation(v bool) *DescribeFleetMetadataOutput { + s.OptimizeForEndUserLocation = &v + return s +} + +type DescribeIdentityProviderConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeIdentityProviderConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIdentityProviderConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeIdentityProviderConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityProviderConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeIdentityProviderConfigurationInput) SetFleetArn(v string) *DescribeIdentityProviderConfigurationInput { + s.FleetArn = &v + return s +} + +type DescribeIdentityProviderConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The SAML metadata document provided by the user’s identity provider. + IdentityProviderSamlMetadata *string `min:"1" type:"string"` + + // The type of identity provider. + IdentityProviderType *string `type:"string" enum:"IdentityProviderType"` + + // The SAML metadata document uploaded to the user’s identity provider. + ServiceProviderSamlMetadata *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeIdentityProviderConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIdentityProviderConfigurationOutput) GoString() string { + return s.String() +} + +// SetIdentityProviderSamlMetadata sets the IdentityProviderSamlMetadata field's value. +func (s *DescribeIdentityProviderConfigurationOutput) SetIdentityProviderSamlMetadata(v string) *DescribeIdentityProviderConfigurationOutput { + s.IdentityProviderSamlMetadata = &v + return s +} + +// SetIdentityProviderType sets the IdentityProviderType field's value. +func (s *DescribeIdentityProviderConfigurationOutput) SetIdentityProviderType(v string) *DescribeIdentityProviderConfigurationOutput { + s.IdentityProviderType = &v + return s +} + +// SetServiceProviderSamlMetadata sets the ServiceProviderSamlMetadata field's value. +func (s *DescribeIdentityProviderConfigurationOutput) SetServiceProviderSamlMetadata(v string) *DescribeIdentityProviderConfigurationOutput { + s.ServiceProviderSamlMetadata = &v + return s +} + +type DescribeWebsiteCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // A unique identifier for the certificate authority. + // + // WebsiteCaId is a required field + WebsiteCaId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeWebsiteCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWebsiteCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWebsiteCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWebsiteCertificateAuthorityInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.WebsiteCaId == nil { + invalidParams.Add(request.NewErrParamRequired("WebsiteCaId")) + } + if s.WebsiteCaId != nil && len(*s.WebsiteCaId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebsiteCaId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DescribeWebsiteCertificateAuthorityInput) SetFleetArn(v string) *DescribeWebsiteCertificateAuthorityInput { + s.FleetArn = &v + return s +} + +// SetWebsiteCaId sets the WebsiteCaId field's value. +func (s *DescribeWebsiteCertificateAuthorityInput) SetWebsiteCaId(v string) *DescribeWebsiteCertificateAuthorityInput { + s.WebsiteCaId = &v + return s +} + +type DescribeWebsiteCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` + + // The root certificate of the certificate authority. + Certificate *string `min:"1" type:"string"` + + // The time that the certificate authority was added. + CreatedTime *time.Time `type:"timestamp"` + + // The certificate name to display. + DisplayName *string `type:"string"` +} + +// String returns the string representation +func (s DescribeWebsiteCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWebsiteCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// SetCertificate sets the Certificate field's value. +func (s *DescribeWebsiteCertificateAuthorityOutput) SetCertificate(v string) *DescribeWebsiteCertificateAuthorityOutput { + s.Certificate = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *DescribeWebsiteCertificateAuthorityOutput) SetCreatedTime(v time.Time) *DescribeWebsiteCertificateAuthorityOutput { + s.CreatedTime = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *DescribeWebsiteCertificateAuthorityOutput) SetDisplayName(v string) *DescribeWebsiteCertificateAuthorityOutput { + s.DisplayName = &v + return s +} + +// The summary of devices. +type DeviceSummary struct { + _ struct{} `type:"structure"` + + // The ID of the device. + DeviceId *string `min:"1" type:"string"` + + // The status of the device. + DeviceStatus *string `type:"string" enum:"DeviceStatus"` +} + +// String returns the string representation +func (s DeviceSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceSummary) GoString() string { + return s.String() +} + +// SetDeviceId sets the DeviceId field's value. +func (s *DeviceSummary) SetDeviceId(v string) *DeviceSummary { + s.DeviceId = &v + return s +} + +// SetDeviceStatus sets the DeviceStatus field's value. +func (s *DeviceSummary) SetDeviceStatus(v string) *DeviceSummary { + s.DeviceStatus = &v + return s +} + +type DisassociateWebsiteCertificateAuthorityInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // A unique identifier for the CA. + // + // WebsiteCaId is a required field + WebsiteCaId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateWebsiteCertificateAuthorityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateWebsiteCertificateAuthorityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateWebsiteCertificateAuthorityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateWebsiteCertificateAuthorityInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.WebsiteCaId == nil { + invalidParams.Add(request.NewErrParamRequired("WebsiteCaId")) + } + if s.WebsiteCaId != nil && len(*s.WebsiteCaId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebsiteCaId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *DisassociateWebsiteCertificateAuthorityInput) SetFleetArn(v string) *DisassociateWebsiteCertificateAuthorityInput { + s.FleetArn = &v + return s +} + +// SetWebsiteCaId sets the WebsiteCaId field's value. +func (s *DisassociateWebsiteCertificateAuthorityInput) SetWebsiteCaId(v string) *DisassociateWebsiteCertificateAuthorityInput { + s.WebsiteCaId = &v + return s +} + +type DisassociateWebsiteCertificateAuthorityOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateWebsiteCertificateAuthorityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateWebsiteCertificateAuthorityOutput) GoString() string { + return s.String() +} + +// The summary of the fleet. +type FleetSummary struct { + _ struct{} `type:"structure"` + + // The identifier used by users to sign into the Amazon WorkLink app. + CompanyCode *string `min:"1" type:"string"` + + // The time when the fleet was created. + CreatedTime *time.Time `type:"timestamp"` + + // The name to display. + DisplayName *string `type:"string"` + + // The ARN of the fleet. + FleetArn *string `min:"20" type:"string"` + + // The name of the fleet. + FleetName *string `min:"1" type:"string"` + + // The status of the fleet. + FleetStatus *string `type:"string" enum:"FleetStatus"` + + // The time when the fleet was last updated. + LastUpdatedTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s FleetSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FleetSummary) GoString() string { + return s.String() +} + +// SetCompanyCode sets the CompanyCode field's value. +func (s *FleetSummary) SetCompanyCode(v string) *FleetSummary { + s.CompanyCode = &v + return s +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *FleetSummary) SetCreatedTime(v time.Time) *FleetSummary { + s.CreatedTime = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *FleetSummary) SetDisplayName(v string) *FleetSummary { + s.DisplayName = &v + return s +} + +// SetFleetArn sets the FleetArn field's value. +func (s *FleetSummary) SetFleetArn(v string) *FleetSummary { + s.FleetArn = &v + return s +} + +// SetFleetName sets the FleetName field's value. +func (s *FleetSummary) SetFleetName(v string) *FleetSummary { + s.FleetName = &v + return s +} + +// SetFleetStatus sets the FleetStatus field's value. +func (s *FleetSummary) SetFleetStatus(v string) *FleetSummary { + s.FleetStatus = &v + return s +} + +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *FleetSummary) SetLastUpdatedTime(v time.Time) *FleetSummary { + s.LastUpdatedTime = &v + return s +} + +type ListDevicesInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // The maximum number of results to be included in the next page. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token used to retrieve the next page of results for this operation. + // If this value is null, it retrieves the first page. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListDevicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDevicesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListDevicesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListDevicesInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *ListDevicesInput) SetFleetArn(v string) *ListDevicesInput { + s.FleetArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListDevicesInput) SetMaxResults(v int64) *ListDevicesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { + s.NextToken = &v + return s +} + +type ListDevicesOutput struct { + _ struct{} `type:"structure"` + + // Information about the devices. + Devices []*DeviceSummary `type:"list"` + + // The pagination token used to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListDevicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDevicesOutput) GoString() string { + return s.String() +} + +// SetDevices sets the Devices field's value. +func (s *ListDevicesOutput) SetDevices(v []*DeviceSummary) *ListDevicesOutput { + s.Devices = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDevicesOutput) SetNextToken(v string) *ListDevicesOutput { + s.NextToken = &v + return s +} + +type ListFleetsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to be included in the next page. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token used to retrieve the next page of results for this operation. + // If this value is null, it retrieves the first page. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFleetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFleetsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFleetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFleetsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFleetsInput) SetMaxResults(v int64) *ListFleetsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFleetsInput) SetNextToken(v string) *ListFleetsInput { + s.NextToken = &v + return s +} + +type ListFleetsOutput struct { + _ struct{} `type:"structure"` + + // The summary list of the fleets. + FleetSummaryList []*FleetSummary `type:"list"` + + // The pagination token used to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListFleetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFleetsOutput) GoString() string { + return s.String() +} + +// SetFleetSummaryList sets the FleetSummaryList field's value. +func (s *ListFleetsOutput) SetFleetSummaryList(v []*FleetSummary) *ListFleetsOutput { + s.FleetSummaryList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFleetsOutput) SetNextToken(v string) *ListFleetsOutput { + s.NextToken = &v + return s +} + +type ListWebsiteCertificateAuthoritiesInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // The maximum number of results to be included in the next page. + MaxResults *int64 `min:"1" type:"integer"` + + // The pagination token used to retrieve the next page of results for this operation. + // If this value is null, it retrieves the first page. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListWebsiteCertificateAuthoritiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebsiteCertificateAuthoritiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListWebsiteCertificateAuthoritiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListWebsiteCertificateAuthoritiesInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *ListWebsiteCertificateAuthoritiesInput) SetFleetArn(v string) *ListWebsiteCertificateAuthoritiesInput { + s.FleetArn = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListWebsiteCertificateAuthoritiesInput) SetMaxResults(v int64) *ListWebsiteCertificateAuthoritiesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWebsiteCertificateAuthoritiesInput) SetNextToken(v string) *ListWebsiteCertificateAuthoritiesInput { + s.NextToken = &v + return s +} + +type ListWebsiteCertificateAuthoritiesOutput struct { + _ struct{} `type:"structure"` + + // The pagination token used to retrieve the next page of results for this operation. + // If there are no more pages, this value is null. + NextToken *string `min:"1" type:"string"` + + // Information about the certificates. + WebsiteCertificateAuthorities []*WebsiteCaSummary `type:"list"` +} + +// String returns the string representation +func (s ListWebsiteCertificateAuthoritiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListWebsiteCertificateAuthoritiesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListWebsiteCertificateAuthoritiesOutput) SetNextToken(v string) *ListWebsiteCertificateAuthoritiesOutput { + s.NextToken = &v + return s +} + +// SetWebsiteCertificateAuthorities sets the WebsiteCertificateAuthorities field's value. +func (s *ListWebsiteCertificateAuthoritiesOutput) SetWebsiteCertificateAuthorities(v []*WebsiteCaSummary) *ListWebsiteCertificateAuthoritiesOutput { + s.WebsiteCertificateAuthorities = v + return s +} + +type SignOutUserInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // The name of the user. + // + // Username is a required field + Username *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s SignOutUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignOutUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SignOutUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SignOutUserInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.Username == nil { + invalidParams.Add(request.NewErrParamRequired("Username")) + } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *SignOutUserInput) SetFleetArn(v string) *SignOutUserInput { + s.FleetArn = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *SignOutUserInput) SetUsername(v string) *SignOutUserInput { + s.Username = &v + return s +} + +type SignOutUserOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s SignOutUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SignOutUserOutput) GoString() string { + return s.String() +} + +type UpdateAuditStreamConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the Amazon Kinesis data stream that receives the audit events. + AuditStreamArn *string `type:"string"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateAuditStreamConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAuditStreamConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAuditStreamConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAuditStreamConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuditStreamArn sets the AuditStreamArn field's value. +func (s *UpdateAuditStreamConfigurationInput) SetAuditStreamArn(v string) *UpdateAuditStreamConfigurationInput { + s.AuditStreamArn = &v + return s +} + +// SetFleetArn sets the FleetArn field's value. +func (s *UpdateAuditStreamConfigurationInput) SetFleetArn(v string) *UpdateAuditStreamConfigurationInput { + s.FleetArn = &v + return s +} + +type UpdateAuditStreamConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateAuditStreamConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAuditStreamConfigurationOutput) GoString() string { + return s.String() +} + +type UpdateCompanyNetworkConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // The security groups associated with access to the provided subnets. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `type:"list" required:"true"` + + // The subnets used for X-ENI connections from Amazon WorkLink rendering containers. + // + // SubnetIds is a required field + SubnetIds []*string `type:"list" required:"true"` + + // The VPC with connectivity to associated websites. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateCompanyNetworkConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCompanyNetworkConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCompanyNetworkConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCompanyNetworkConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *UpdateCompanyNetworkConfigurationInput) SetFleetArn(v string) *UpdateCompanyNetworkConfigurationInput { + s.FleetArn = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *UpdateCompanyNetworkConfigurationInput) SetSecurityGroupIds(v []*string) *UpdateCompanyNetworkConfigurationInput { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *UpdateCompanyNetworkConfigurationInput) SetSubnetIds(v []*string) *UpdateCompanyNetworkConfigurationInput { + s.SubnetIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *UpdateCompanyNetworkConfigurationInput) SetVpcId(v string) *UpdateCompanyNetworkConfigurationInput { + s.VpcId = &v + return s +} + +type UpdateCompanyNetworkConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateCompanyNetworkConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCompanyNetworkConfigurationOutput) GoString() string { + return s.String() +} + +type UpdateDevicePolicyConfigurationInput struct { + _ struct{} `type:"structure"` + + // The certificate chain, including intermediate certificates and the root certificate + // authority certificate used to issue device certificates. + DeviceCaCertificate *string `min:"1" type:"string"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateDevicePolicyConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDevicePolicyConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDevicePolicyConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDevicePolicyConfigurationInput"} + if s.DeviceCaCertificate != nil && len(*s.DeviceCaCertificate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeviceCaCertificate", 1)) + } + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeviceCaCertificate sets the DeviceCaCertificate field's value. +func (s *UpdateDevicePolicyConfigurationInput) SetDeviceCaCertificate(v string) *UpdateDevicePolicyConfigurationInput { + s.DeviceCaCertificate = &v + return s +} + +// SetFleetArn sets the FleetArn field's value. +func (s *UpdateDevicePolicyConfigurationInput) SetFleetArn(v string) *UpdateDevicePolicyConfigurationInput { + s.FleetArn = &v + return s +} + +type UpdateDevicePolicyConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateDevicePolicyConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDevicePolicyConfigurationOutput) GoString() string { + return s.String() +} + +type UpdateFleetMetadataInput struct { + _ struct{} `type:"structure"` + + // The fleet name to display. The existing DisplayName is unset if null is passed. + DisplayName *string `type:"string"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // The option to optimize for better performance by routing traffic through + // the closest AWS Region to users, which may be outside of your home Region. + OptimizeForEndUserLocation *bool `type:"boolean"` +} + +// String returns the string representation +func (s UpdateFleetMetadataInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFleetMetadataInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFleetMetadataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFleetMetadataInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDisplayName sets the DisplayName field's value. +func (s *UpdateFleetMetadataInput) SetDisplayName(v string) *UpdateFleetMetadataInput { + s.DisplayName = &v + return s +} + +// SetFleetArn sets the FleetArn field's value. +func (s *UpdateFleetMetadataInput) SetFleetArn(v string) *UpdateFleetMetadataInput { + s.FleetArn = &v + return s +} + +// SetOptimizeForEndUserLocation sets the OptimizeForEndUserLocation field's value. +func (s *UpdateFleetMetadataInput) SetOptimizeForEndUserLocation(v bool) *UpdateFleetMetadataInput { + s.OptimizeForEndUserLocation = &v + return s +} + +type UpdateFleetMetadataOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateFleetMetadataOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFleetMetadataOutput) GoString() string { + return s.String() +} + +type UpdateIdentityProviderConfigurationInput struct { + _ struct{} `type:"structure"` + + // The ARN of the fleet. + // + // FleetArn is a required field + FleetArn *string `min:"20" type:"string" required:"true"` + + // The SAML metadata document provided by the customer’s identity provider. + // The existing IdentityProviderSamlMetadata is unset if null is passed. + IdentityProviderSamlMetadata *string `min:"1" type:"string"` + + // The type of identity provider. + // + // IdentityProviderType is a required field + IdentityProviderType *string `type:"string" required:"true" enum:"IdentityProviderType"` +} + +// String returns the string representation +func (s UpdateIdentityProviderConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateIdentityProviderConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateIdentityProviderConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateIdentityProviderConfigurationInput"} + if s.FleetArn == nil { + invalidParams.Add(request.NewErrParamRequired("FleetArn")) + } + if s.FleetArn != nil && len(*s.FleetArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("FleetArn", 20)) + } + if s.IdentityProviderSamlMetadata != nil && len(*s.IdentityProviderSamlMetadata) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdentityProviderSamlMetadata", 1)) + } + if s.IdentityProviderType == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProviderType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFleetArn sets the FleetArn field's value. +func (s *UpdateIdentityProviderConfigurationInput) SetFleetArn(v string) *UpdateIdentityProviderConfigurationInput { + s.FleetArn = &v + return s +} + +// SetIdentityProviderSamlMetadata sets the IdentityProviderSamlMetadata field's value. +func (s *UpdateIdentityProviderConfigurationInput) SetIdentityProviderSamlMetadata(v string) *UpdateIdentityProviderConfigurationInput { + s.IdentityProviderSamlMetadata = &v + return s +} + +// SetIdentityProviderType sets the IdentityProviderType field's value. +func (s *UpdateIdentityProviderConfigurationInput) SetIdentityProviderType(v string) *UpdateIdentityProviderConfigurationInput { + s.IdentityProviderType = &v + return s +} + +type UpdateIdentityProviderConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateIdentityProviderConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateIdentityProviderConfigurationOutput) GoString() string { + return s.String() +} + +// The summary of the certificate authority (CA). +type WebsiteCaSummary struct { + _ struct{} `type:"structure"` + + // The time when the CA was added. + CreatedTime *time.Time `type:"timestamp"` + + // The name to display. + DisplayName *string `type:"string"` + + // A unique identifier for the CA. + WebsiteCaId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s WebsiteCaSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WebsiteCaSummary) GoString() string { + return s.String() +} + +// SetCreatedTime sets the CreatedTime field's value. +func (s *WebsiteCaSummary) SetCreatedTime(v time.Time) *WebsiteCaSummary { + s.CreatedTime = &v + return s +} + +// SetDisplayName sets the DisplayName field's value. +func (s *WebsiteCaSummary) SetDisplayName(v string) *WebsiteCaSummary { + s.DisplayName = &v + return s +} + +// SetWebsiteCaId sets the WebsiteCaId field's value. +func (s *WebsiteCaSummary) SetWebsiteCaId(v string) *WebsiteCaSummary { + s.WebsiteCaId = &v + return s +} + +const ( + // DeviceStatusActive is a DeviceStatus enum value + DeviceStatusActive = "ACTIVE" + + // DeviceStatusSignedOut is a DeviceStatus enum value + DeviceStatusSignedOut = "SIGNED_OUT" +) + +const ( + // FleetStatusCreating is a FleetStatus enum value + FleetStatusCreating = "CREATING" + + // FleetStatusActive is a FleetStatus enum value + FleetStatusActive = "ACTIVE" + + // FleetStatusDeleting is a FleetStatus enum value + FleetStatusDeleting = "DELETING" + + // FleetStatusDeleted is a FleetStatus enum value + FleetStatusDeleted = "DELETED" + + // FleetStatusFailedToCreate is a FleetStatus enum value + FleetStatusFailedToCreate = "FAILED_TO_CREATE" + + // FleetStatusFailedToDelete is a FleetStatus enum value + FleetStatusFailedToDelete = "FAILED_TO_DELETE" +) + +const ( + // IdentityProviderTypeSaml is a IdentityProviderType enum value + IdentityProviderTypeSaml = "SAML" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go new file mode 100644 index 000000000..691b27039 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/worklink/doc.go @@ -0,0 +1,35 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package worklink provides the client and types for making API +// requests to Amazon WorkLink. +// +// Amazon WorkLink is a cloud-based service that provides secure access to internal +// websites and web apps from iOS phones. In a single step, your users, such +// as employees, can access internal websites as efficiently as they access +// any other public website. They enter a URL in their web browser, or choose +// a link to an internal website in an email. Amazon WorkLink authenticates +// the user's access and securely renders authorized internal web content in +// a secure rendering service in the AWS cloud. Amazon WorkLink doesn't download +// or store any internal web content on mobile devices. +// +// See https://docs.aws.amazon.com/goto/WebAPI/worklink-2018-09-25 for more information on this service. +// +// See worklink package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/worklink/ +// +// Using the Client +// +// To contact Amazon WorkLink with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon WorkLink client WorkLink for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/worklink/#New +package worklink diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go new file mode 100644 index 000000000..2d13a2eba --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/worklink/errors.go @@ -0,0 +1,42 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package worklink + +const ( + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // The service is temporarily unavailable. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // The request is not valid. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeResourceAlreadyExistsException for service response error code + // "ResourceAlreadyExistsException". + // + // The resource already exists. + ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The requested resource was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // The number of requests exceeds the limit. + ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeUnauthorizedException for service response error code + // "UnauthorizedException". + // + // You are not authorized to perform this action. + ErrCodeUnauthorizedException = "UnauthorizedException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/worklink/service.go b/vendor/github.com/aws/aws-sdk-go/service/worklink/service.go new file mode 100644 index 000000000..dd9b8be26 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/worklink/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package worklink + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// WorkLink provides the API operation methods for making requests to +// Amazon WorkLink. See this package's package overview docs +// for details on the service. +// +// WorkLink methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type WorkLink struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "WorkLink" // Name of service. + EndpointsID = "worklink" // ID to lookup a service endpoint with. + ServiceID = "WorkLink" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the WorkLink client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// // Create a WorkLink client from just a session. +// svc := worklink.New(mySession) +// +// // Create a WorkLink client with additional configuration +// svc := worklink.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *WorkLink { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "worklink" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *WorkLink { + svc := &WorkLink{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-09-25", + JSONVersion: "1.1", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a WorkLink operation and runs any +// custom request initialization. +func (c *WorkLink) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/beevik/etree/.travis.yml b/vendor/github.com/beevik/etree/.travis.yml index 2e206c61f..c47175eb4 100644 --- a/vendor/github.com/beevik/etree/.travis.yml +++ b/vendor/github.com/beevik/etree/.travis.yml @@ -7,6 +7,7 @@ go: - 1.7.x - 1.8.x - 1.9.x + - 1.10.x - tip matrix: diff --git a/vendor/github.com/beevik/etree/CONTRIBUTORS b/vendor/github.com/beevik/etree/CONTRIBUTORS index 084662c3a..45a539541 100644 --- a/vendor/github.com/beevik/etree/CONTRIBUTORS +++ b/vendor/github.com/beevik/etree/CONTRIBUTORS @@ -6,3 +6,4 @@ Matt Smith (ma314smith) Michal Jemala (michaljemala) Nicolas Piganeau (npiganeau) Chris Brown (ccbrown) +Earncef Sequeira (earncef) \ No newline at end of file diff --git a/vendor/github.com/beevik/etree/RELEASE_NOTES.md b/vendor/github.com/beevik/etree/RELEASE_NOTES.md new file mode 100644 index 000000000..b3a39bd92 --- /dev/null +++ b/vendor/github.com/beevik/etree/RELEASE_NOTES.md @@ -0,0 +1,27 @@ +Release v1.0.1 +============== + +**Changes** + +* Added support for absolute etree Path queries. An absolute path begins with + `/` or `//` and begins its search from the element's document root. +* Added [`GetPath`](https://godoc.org/github.com/beevik/etree#Element.GetPath) + and [`GetRelativePath`](https://godoc.org/github.com/beevik/etree#Element.GetRelativePath) + functions to the [`Element`](https://godoc.org/github.com/beevik/etree#Element) + type. + +**Breaking changes** + +* A path starting with `//` is now interpreted as an absolute path. + Previously, it was interpreted as a relative path starting from the element + whose + [`FindElement`](https://godoc.org/github.com/beevik/etree#Element.FindElement) + method was called. To remain compatible with this release, all paths + prefixed with `//` should be prefixed with `.//` when called from any + element other than the document's root. + + +Release v1.0.0 +============== + +Initial release. diff --git a/vendor/github.com/beevik/etree/etree.go b/vendor/github.com/beevik/etree/etree.go index 36b279f60..461a7aa8a 100644 --- a/vendor/github.com/beevik/etree/etree.go +++ b/vendor/github.com/beevik/etree/etree.go @@ -424,7 +424,8 @@ func (e *Element) readFrom(ri io.Reader, settings ReadSettings) (n int64, err er } // SelectAttr finds an element attribute matching the requested key and -// returns it if found. The key may be prefixed by a namespace and a colon. +// returns it if found. Returns nil if no matching attribute is found. The key +// may be prefixed by a namespace and a colon. func (e *Element) SelectAttr(key string) *Attr { space, skey := spaceDecompose(key) for i, a := range e.Attr { @@ -460,7 +461,8 @@ func (e *Element) ChildElements() []*Element { } // SelectElement returns the first child element with the given tag. The tag -// may be prefixed by a namespace and a colon. +// may be prefixed by a namespace and a colon. Returns nil if no element with +// a matching tag was found. func (e *Element) SelectElement(tag string) *Element { space, stag := spaceDecompose(tag) for _, t := range e.Child { @@ -485,13 +487,14 @@ func (e *Element) SelectElements(tag string) []*Element { } // FindElement returns the first element matched by the XPath-like path -// string. Panics if an invalid path string is supplied. +// string. Returns nil if no element is found using the path. Panics if an +// invalid path string is supplied. func (e *Element) FindElement(path string) *Element { return e.FindElementPath(MustCompilePath(path)) } // FindElementPath returns the first element matched by the XPath-like path -// string. +// string. Returns nil if no element is found using the path. func (e *Element) FindElementPath(path Path) *Element { p := newPather() elements := p.traverse(e, path) @@ -515,6 +518,94 @@ func (e *Element) FindElementsPath(path Path) []*Element { return p.traverse(e, path) } +// GetPath returns the absolute path of the element. +func (e *Element) GetPath() string { + path := []string{} + for seg := e; seg != nil; seg = seg.Parent() { + if seg.Tag != "" { + path = append(path, seg.Tag) + } + } + + // Reverse the path. + for i, j := 0, len(path)-1; i < j; i, j = i+1, j-1 { + path[i], path[j] = path[j], path[i] + } + + return "/" + strings.Join(path, "/") +} + +// GetRelativePath returns the path of the element relative to the source +// element. If the two elements are not part of the same element tree, then +// GetRelativePath returns the empty string. +func (e *Element) GetRelativePath(source *Element) string { + var path []*Element + + if source == nil { + return "" + } + + // Build a reverse path from the element toward the root. Stop if the + // source element is encountered. + var seg *Element + for seg = e; seg != nil && seg != source; seg = seg.Parent() { + path = append(path, seg) + } + + // If we found the source element, reverse the path and compose the + // string. + if seg == source { + if len(path) == 0 { + return "." + } + parts := []string{} + for i := len(path) - 1; i >= 0; i-- { + parts = append(parts, path[i].Tag) + } + return "./" + strings.Join(parts, "/") + } + + // The source wasn't encountered, so climb from the source element toward + // the root of the tree until an element in the reversed path is + // encountered. + + findPathIndex := func(e *Element, path []*Element) int { + for i, ee := range path { + if e == ee { + return i + } + } + return -1 + } + + climb := 0 + for seg = source; seg != nil; seg = seg.Parent() { + i := findPathIndex(seg, path) + if i >= 0 { + path = path[:i] // truncate at found segment + break + } + climb++ + } + + // No element in the reversed path was encountered, so the two elements + // must not be part of the same tree. + if seg == nil { + return "" + } + + // Reverse the (possibly truncated) path and prepend ".." segments to + // climb. + parts := []string{} + for i := 0; i < climb; i++ { + parts = append(parts, "..") + } + for i := len(path) - 1; i >= 0; i-- { + parts = append(parts, path[i].Tag) + } + return strings.Join(parts, "/") +} + // indent recursively inserts proper indentation between an // XML element's child tokens. func (e *Element) indent(depth int, indent indentFunc) { diff --git a/vendor/github.com/beevik/etree/path.go b/vendor/github.com/beevik/etree/path.go index 9cf245eb3..a1a59bdc4 100644 --- a/vendor/github.com/beevik/etree/path.go +++ b/vendor/github.com/beevik/etree/path.go @@ -10,46 +10,54 @@ import ( ) /* -A Path is an object that represents an optimized version of an -XPath-like search string. Although path strings are XPath-like, -only the following limited syntax is supported: +A Path is an object that represents an optimized version of an XPath-like +search string. A path search string is a slash-separated series of "selectors" +allowing traversal through an XML hierarchy. Although etree path strings are +similar to XPath strings, they have a more limited set of selectors and +filtering options. The following selectors and filters are supported by etree +paths: - . Selects the current element - .. Selects the parent of the current element - * Selects all child elements - // Selects all descendants of the current element - tag Selects all child elements with the given tag - [#] Selects the element of the given index (1-based, - negative starts from the end) - [@attrib] Selects all elements with the given attribute - [@attrib='val'] Selects all elements with the given attribute set to val - [tag] Selects all elements with a child element named tag - [tag='val'] Selects all elements with a child element named tag - and text matching val - [text()] Selects all elements with non-empty text - [text()='val'] Selects all elements whose text matches val + . Select the current element. + .. Select the parent of the current element. + * Select all child elements of the current element. + / Select the root element when used at the start of a path. + // Select all descendants of the current element. If used at + the start of a path, select all descendants of the root. + tag Select all child elements with the given tag. + [#] Select the element of the given index (1-based, + negative starts from the end). + [@attrib] Select all elements with the given attribute. + [@attrib='val'] Select all elements with the given attribute set to val. + [tag] Select all elements with a child element named tag. + [tag='val'] Select all elements with a child element named tag + and text matching val. + [text()] Select all elements with non-empty text. + [text()='val'] Select all elements whose text matches val. Examples: -Select the title elements of all descendant book elements having a -'category' attribute of 'WEB': +Select the bookstore child element of the root element: + /bookstore + +Beginning a search from the root element, select the title elements of all +descendant book elements having a 'category' attribute of 'WEB': //book[@category='WEB']/title -Select the first book element with a title child containing the text -'Great Expectations': +Beginning a search from the current element, select the first descendant book +element with a title child containing the text 'Great Expectations': .//book[title='Great Expectations'][1] -Starting from the current element, select all children of book elements -with an attribute 'language' set to 'english': +Beginning a search from the current element, select all children of book +elements with an attribute 'language' set to 'english': ./book/*[@language='english'] -Starting from the current element, select all children of book elements -containing the text 'special': +Beginning a search from the current element, select all children of book +elements containing the text 'special': ./book/*[text()='special'] -Select all descendant book elements whose title element has an attribute -'language' set to 'french': - //book/title[@language='french']/.. +Beginning a search from the current element, select all descendant book +elements whose title element has an attribute 'language' equal to 'french': + .//book/title[@language='french']/.. */ type Path struct { @@ -180,22 +188,20 @@ type compiler struct { // through an element tree and returns a slice of segment // descriptors. func (c *compiler) parsePath(path string) []segment { - // If path starts or ends with //, fix it - if strings.HasPrefix(path, "//") { - path = "." + path - } + // If path ends with //, fix it if strings.HasSuffix(path, "//") { path = path + "*" } - // Paths cannot be absolute + var segments []segment + + // Check for an absolute path if strings.HasPrefix(path, "/") { - c.err = ErrPath("paths cannot be absolute.") - return nil + segments = append(segments, segment{new(selectRoot), []filter{}}) + path = path[1:] } - // Split path into segment objects - var segments []segment + // Split path into segments for _, s := range splitPath(path) { segments = append(segments, c.parseSegment(s)) if c.err != ErrPath("") { @@ -225,7 +231,7 @@ func (c *compiler) parseSegment(path string) segment { pieces := strings.Split(path, "[") seg := segment{ sel: c.parseSelector(pieces[0]), - filters: make([]filter, 0), + filters: []filter{}, } for i := 1; i < len(pieces); i++ { fpath := pieces[i] @@ -305,6 +311,17 @@ func (s *selectSelf) apply(e *Element, p *pather) { p.candidates = append(p.candidates, e) } +// selectRoot selects the element's root node. +type selectRoot struct{} + +func (s *selectRoot) apply(e *Element, p *pather) { + root := e + for root.parent != nil { + root = root.parent + } + p.candidates = append(p.candidates, root) +} + // selectParent selects the element's parent into the candidate list. type selectParent struct{} diff --git a/vendor/github.com/bgentry/speakeasy/LICENSE b/vendor/github.com/bgentry/speakeasy/LICENSE new file mode 100644 index 000000000..37d60fc35 --- /dev/null +++ b/vendor/github.com/bgentry/speakeasy/LICENSE @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2017 Blake Gentry + +This license applies to the non-Windows portions of this library. The Windows +portion maintains its own Apache 2.0 license. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go index 147b5ecc6..081c86fa8 100644 --- a/vendor/github.com/gogo/protobuf/gogoproto/doc.go +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -162,7 +162,7 @@ The most complete way to see examples is to look at github.com/gogo/protobuf/test/thetest.proto Gogoprototest is a seperate project, -because we want to keep gogoprotobuf independant of goprotobuf, +because we want to keep gogoprotobuf independent of goprotobuf, but we still want to test it thoroughly. */ diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go index 97843b244..0057f8e1b 100644 --- a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -343,6 +343,24 @@ var E_MessagenameAll = &proto.ExtensionDesc{ Filename: "gogo.proto", } +var E_GoprotoSizecacheAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63034, + Name: "gogoproto.goproto_sizecache_all", + Tag: "varint,63034,opt,name=goproto_sizecache_all,json=goprotoSizecacheAll", + Filename: "gogo.proto", +} + +var E_GoprotoUnkeyedAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63035, + Name: "gogoproto.goproto_unkeyed_all", + Tag: "varint,63035,opt,name=goproto_unkeyed_all,json=goprotoUnkeyedAll", + Filename: "gogo.proto", +} + var E_GoprotoGetters = &proto.ExtensionDesc{ ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), @@ -559,6 +577,24 @@ var E_Messagename = &proto.ExtensionDesc{ Filename: "gogo.proto", } +var E_GoprotoSizecache = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64034, + Name: "gogoproto.goproto_sizecache", + Tag: "varint,64034,opt,name=goproto_sizecache,json=goprotoSizecache", + Filename: "gogo.proto", +} + +var E_GoprotoUnkeyed = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64035, + Name: "gogoproto.goproto_unkeyed", + Tag: "varint,64035,opt,name=goproto_unkeyed,json=goprotoUnkeyed", + Filename: "gogo.proto", +} + var E_Nullable = &proto.ExtensionDesc{ ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), @@ -658,6 +694,15 @@ var E_Stdduration = &proto.ExtensionDesc{ Filename: "gogo.proto", } +var E_Wktpointer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65012, + Name: "gogoproto.wktpointer", + Tag: "varint,65012,opt,name=wktpointer", + Filename: "gogo.proto", +} + func init() { proto.RegisterExtension(E_GoprotoEnumPrefix) proto.RegisterExtension(E_GoprotoEnumStringer) @@ -695,6 +740,8 @@ func init() { proto.RegisterExtension(E_EnumdeclAll) proto.RegisterExtension(E_GoprotoRegistration) proto.RegisterExtension(E_MessagenameAll) + proto.RegisterExtension(E_GoprotoSizecacheAll) + proto.RegisterExtension(E_GoprotoUnkeyedAll) proto.RegisterExtension(E_GoprotoGetters) proto.RegisterExtension(E_GoprotoStringer) proto.RegisterExtension(E_VerboseEqual) @@ -719,6 +766,8 @@ func init() { proto.RegisterExtension(E_Compare) proto.RegisterExtension(E_Typedecl) proto.RegisterExtension(E_Messagename) + proto.RegisterExtension(E_GoprotoSizecache) + proto.RegisterExtension(E_GoprotoUnkeyed) proto.RegisterExtension(E_Nullable) proto.RegisterExtension(E_Embed) proto.RegisterExtension(E_Customtype) @@ -730,88 +779,94 @@ func init() { proto.RegisterExtension(E_Castvalue) proto.RegisterExtension(E_Stdtime) proto.RegisterExtension(E_Stdduration) + proto.RegisterExtension(E_Wktpointer) } -func init() { proto.RegisterFile("gogo.proto", fileDescriptor_gogo_68790841c0f79064) } +func init() { proto.RegisterFile("gogo.proto", fileDescriptor_gogo_b95f77e237336c7c) } -var fileDescriptor_gogo_68790841c0f79064 = []byte{ - // 1246 bytes of a gzipped FileDescriptorProto +var fileDescriptor_gogo_b95f77e237336c7c = []byte{ + // 1328 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45, - 0x14, 0x80, 0x85, 0x70, 0x64, 0xcf, 0xf3, 0x86, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9, - 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x06, 0x63, 0xe2, 0xb0, 0x1d, 0x46, - 0x3d, 0x33, 0xe5, 0x76, 0x43, 0x77, 0xd7, 0xd0, 0x5d, 0x1d, 0xc5, 0xb9, 0xa1, 0xb0, 0x08, 0x21, - 0x76, 0x24, 0x48, 0x48, 0x02, 0x39, 0xb0, 0xaf, 0x61, 0xe7, 0xc6, 0x85, 0xe5, 0xca, 0x7f, 0xe0, - 0x02, 0x98, 0xdd, 0x37, 0x5f, 0xa2, 0xd7, 0xfd, 0x5e, 0x4f, 0xcd, 0x78, 0xa4, 0xaa, 0xb9, 0xb5, - 0xed, 0xfa, 0x3e, 0x57, 0xbf, 0x57, 0xf5, 0xde, 0x9b, 0x01, 0xf0, 0x95, 0xaf, 0x66, 0x5a, 0x89, - 0xd2, 0xaa, 0x5a, 0xc1, 0xe7, 0xfc, 0xf1, 0xc0, 0x41, 0x5f, 0x29, 0x3f, 0x94, 0xb3, 0xf9, 0x4f, - 0xf5, 0x6c, 0x63, 0xb6, 0x29, 0xd3, 0x46, 0x12, 0xb4, 0xb4, 0x4a, 0x8a, 0xc5, 0xe2, 0x6e, 0x98, - 0xa4, 0xc5, 0x35, 0x19, 0x67, 0x51, 0xad, 0x95, 0xc8, 0x8d, 0xe0, 0x74, 0xf5, 0xa6, 0x99, 0x82, - 0x9c, 0x61, 0x72, 0x66, 0x29, 0xce, 0xa2, 0x7b, 0x5a, 0x3a, 0x50, 0x71, 0xba, 0xff, 0xca, 0xaf, - 0xd7, 0x1e, 0xbc, 0xe6, 0xf6, 0xa1, 0xb5, 0x09, 0x42, 0xf1, 0x6f, 0xab, 0x39, 0x28, 0xd6, 0xe0, - 0xfa, 0x0e, 0x5f, 0xaa, 0x93, 0x20, 0xf6, 0x65, 0x62, 0x31, 0xfe, 0x40, 0xc6, 0x49, 0xc3, 0x78, - 0x1f, 0xa1, 0x62, 0x11, 0x46, 0xfb, 0x71, 0xfd, 0x48, 0xae, 0x11, 0x69, 0x4a, 0x96, 0x61, 0x3c, - 0x97, 0x34, 0xb2, 0x54, 0xab, 0x28, 0xf6, 0x22, 0x69, 0xd1, 0xfc, 0x94, 0x6b, 0x2a, 0x6b, 0x63, - 0x88, 0x2d, 0x96, 0x94, 0x10, 0x30, 0x84, 0xbf, 0x69, 0xca, 0x46, 0x68, 0x31, 0xfc, 0x4c, 0x1b, - 0x29, 0xd7, 0x8b, 0x93, 0x30, 0x85, 0xcf, 0xa7, 0xbc, 0x30, 0x93, 0xe6, 0x4e, 0x6e, 0xed, 0xe9, - 0x39, 0x89, 0xcb, 0x58, 0xf6, 0xcb, 0xd9, 0x81, 0x7c, 0x3b, 0x93, 0xa5, 0xc0, 0xd8, 0x93, 0x91, - 0x45, 0x5f, 0x6a, 0x2d, 0x93, 0xb4, 0xe6, 0x85, 0xbd, 0xb6, 0x77, 0x2c, 0x08, 0x4b, 0xe3, 0xb9, - 0xed, 0xce, 0x2c, 0x2e, 0x17, 0xe4, 0x42, 0x18, 0x8a, 0x75, 0xb8, 0xa1, 0xc7, 0xa9, 0x70, 0x70, - 0x9e, 0x27, 0xe7, 0xd4, 0x9e, 0x93, 0x81, 0xda, 0x55, 0xe0, 0xdf, 0x97, 0xb9, 0x74, 0x70, 0xbe, - 0x41, 0xce, 0x2a, 0xb1, 0x9c, 0x52, 0x34, 0xde, 0x09, 0x13, 0xa7, 0x64, 0x52, 0x57, 0xa9, 0xac, - 0xc9, 0xc7, 0x32, 0x2f, 0x74, 0xd0, 0x5d, 0x20, 0xdd, 0x38, 0x81, 0x4b, 0xc8, 0xa1, 0xeb, 0x30, - 0x0c, 0x6d, 0x78, 0x0d, 0xe9, 0xa0, 0xb8, 0x48, 0x8a, 0x41, 0x5c, 0x8f, 0xe8, 0x02, 0x8c, 0xf8, - 0xaa, 0x78, 0x25, 0x07, 0xfc, 0x12, 0xe1, 0xc3, 0xcc, 0x90, 0xa2, 0xa5, 0x5a, 0x59, 0xe8, 0x69, - 0x97, 0x1d, 0xbc, 0xc9, 0x0a, 0x66, 0x48, 0xd1, 0x47, 0x58, 0xdf, 0x62, 0x45, 0x6a, 0xc4, 0x73, - 0x1e, 0x86, 0x55, 0x1c, 0x6e, 0xa9, 0xd8, 0x65, 0x13, 0x97, 0xc9, 0x00, 0x84, 0xa0, 0x60, 0x0e, - 0x2a, 0xae, 0x89, 0x78, 0x7b, 0x9b, 0xaf, 0x07, 0x67, 0x60, 0x19, 0xc6, 0xb9, 0x40, 0x05, 0x2a, - 0x76, 0x50, 0xbc, 0x43, 0x8a, 0x31, 0x03, 0xa3, 0xd7, 0xd0, 0x32, 0xd5, 0xbe, 0x74, 0x91, 0xbc, - 0xcb, 0xaf, 0x41, 0x08, 0x85, 0xb2, 0x2e, 0xe3, 0xc6, 0xa6, 0x9b, 0xe1, 0x3d, 0x0e, 0x25, 0x33, - 0xa8, 0x58, 0x84, 0xd1, 0xc8, 0x4b, 0xd2, 0x4d, 0x2f, 0x74, 0x4a, 0xc7, 0xfb, 0xe4, 0x18, 0x29, - 0x21, 0x8a, 0x48, 0x16, 0xf7, 0xa3, 0xf9, 0x80, 0x23, 0x62, 0x60, 0x74, 0xf5, 0x52, 0xed, 0xd5, - 0x43, 0x59, 0xeb, 0xc7, 0xf6, 0x21, 0x5f, 0xbd, 0x82, 0x5d, 0x31, 0x8d, 0x73, 0x50, 0x49, 0x83, - 0x33, 0x4e, 0x9a, 0x8f, 0x38, 0xd3, 0x39, 0x80, 0xf0, 0x83, 0x70, 0x63, 0xcf, 0x36, 0xe1, 0x20, - 0xfb, 0x98, 0x64, 0xd3, 0x3d, 0x5a, 0x05, 0x95, 0x84, 0x7e, 0x95, 0x9f, 0x70, 0x49, 0x90, 0x5d, - 0xae, 0x55, 0x98, 0xca, 0xe2, 0xd4, 0xdb, 0xe8, 0x2f, 0x6a, 0x9f, 0x72, 0xd4, 0x0a, 0xb6, 0x23, - 0x6a, 0x27, 0x60, 0x9a, 0x8c, 0xfd, 0xe5, 0xf5, 0x33, 0x2e, 0xac, 0x05, 0xbd, 0xde, 0x99, 0xdd, - 0x87, 0xe1, 0x40, 0x19, 0xce, 0xd3, 0x5a, 0xc6, 0x29, 0x32, 0xb5, 0xc8, 0x6b, 0x39, 0x98, 0xaf, - 0x90, 0x99, 0x2b, 0xfe, 0x52, 0x29, 0x58, 0xf1, 0x5a, 0x28, 0x7f, 0x00, 0xf6, 0xb3, 0x3c, 0x8b, - 0x13, 0xd9, 0x50, 0x7e, 0x1c, 0x9c, 0x91, 0x4d, 0x07, 0xf5, 0xe7, 0x5d, 0xa9, 0x5a, 0x37, 0x70, - 0x34, 0x1f, 0x87, 0xeb, 0xca, 0x59, 0xa5, 0x16, 0x44, 0x2d, 0x95, 0x68, 0x8b, 0xf1, 0x0b, 0xce, - 0x54, 0xc9, 0x1d, 0xcf, 0x31, 0xb1, 0x04, 0x63, 0xf9, 0x8f, 0xae, 0x47, 0xf2, 0x4b, 0x12, 0x8d, - 0xb6, 0x29, 0x2a, 0x1c, 0x0d, 0x15, 0xb5, 0xbc, 0xc4, 0xa5, 0xfe, 0x7d, 0xc5, 0x85, 0x83, 0x10, - 0x2a, 0x1c, 0x7a, 0xab, 0x25, 0xb1, 0xdb, 0x3b, 0x18, 0xbe, 0xe6, 0xc2, 0xc1, 0x0c, 0x29, 0x78, - 0x60, 0x70, 0x50, 0x7c, 0xc3, 0x0a, 0x66, 0x50, 0x71, 0x6f, 0xbb, 0xd1, 0x26, 0xd2, 0x0f, 0x52, - 0x9d, 0x78, 0xb8, 0xda, 0xa2, 0xfa, 0x76, 0xbb, 0x73, 0x08, 0x5b, 0x33, 0x50, 0xac, 0x44, 0x91, - 0x4c, 0x53, 0xcf, 0x97, 0x38, 0x71, 0x38, 0x6c, 0xec, 0x3b, 0xae, 0x44, 0x06, 0x56, 0xdc, 0xcf, - 0xf1, 0xae, 0x59, 0xa5, 0x7a, 0xcb, 0x1e, 0xd1, 0x4a, 0xc1, 0xb0, 0xeb, 0xf1, 0x1d, 0x72, 0x75, - 0x8e, 0x2a, 0xe2, 0x2e, 0x3c, 0x40, 0x9d, 0x03, 0x85, 0x5d, 0x76, 0x76, 0xa7, 0x3c, 0x43, 0x1d, - 0xf3, 0x84, 0x38, 0x06, 0xa3, 0x1d, 0xc3, 0x84, 0x5d, 0xf5, 0x04, 0xa9, 0x46, 0xcc, 0x59, 0x42, - 0x1c, 0x82, 0x01, 0x1c, 0x0c, 0xec, 0xf8, 0x93, 0x84, 0xe7, 0xcb, 0xc5, 0x11, 0x18, 0xe2, 0x81, - 0xc0, 0x8e, 0x3e, 0x45, 0x68, 0x89, 0x20, 0xce, 0xc3, 0x80, 0x1d, 0x7f, 0x9a, 0x71, 0x46, 0x10, - 0x77, 0x0f, 0xe1, 0xf7, 0xcf, 0x0e, 0x50, 0x41, 0xe7, 0xd8, 0xcd, 0xc1, 0x20, 0x4d, 0x01, 0x76, - 0xfa, 0x19, 0xfa, 0xe7, 0x4c, 0x88, 0x3b, 0x60, 0x9f, 0x63, 0xc0, 0x9f, 0x23, 0xb4, 0x58, 0x2f, - 0x16, 0x61, 0xd8, 0xe8, 0xfc, 0x76, 0xfc, 0x79, 0xc2, 0x4d, 0x0a, 0xb7, 0x4e, 0x9d, 0xdf, 0x2e, - 0x78, 0x81, 0xb7, 0x4e, 0x04, 0x86, 0x8d, 0x9b, 0xbe, 0x9d, 0x7e, 0x91, 0xa3, 0xce, 0x88, 0x98, - 0x87, 0x4a, 0x59, 0xc8, 0xed, 0xfc, 0x4b, 0xc4, 0xb7, 0x19, 0x8c, 0x80, 0xd1, 0x48, 0xec, 0x8a, - 0x97, 0x39, 0x02, 0x06, 0x85, 0xd7, 0xa8, 0x7b, 0x38, 0xb0, 0x9b, 0x5e, 0xe1, 0x6b, 0xd4, 0x35, - 0x1b, 0x60, 0x36, 0xf3, 0x7a, 0x6a, 0x57, 0xbc, 0xca, 0xd9, 0xcc, 0xd7, 0xe3, 0x36, 0xba, 0xbb, - 0xad, 0xdd, 0xf1, 0x1a, 0x6f, 0xa3, 0xab, 0xd9, 0x8a, 0x55, 0xa8, 0xee, 0xed, 0xb4, 0x76, 0xdf, - 0xeb, 0xe4, 0x9b, 0xd8, 0xd3, 0x68, 0xc5, 0xfd, 0x30, 0xdd, 0xbb, 0xcb, 0xda, 0xad, 0xe7, 0x76, - 0xba, 0x3e, 0x17, 0x99, 0x4d, 0x56, 0x9c, 0x68, 0x97, 0x6b, 0xb3, 0xc3, 0xda, 0xb5, 0xe7, 0x77, - 0x3a, 0x2b, 0xb6, 0xd9, 0x60, 0xc5, 0x02, 0x40, 0xbb, 0xb9, 0xd9, 0x5d, 0x17, 0xc8, 0x65, 0x40, - 0x78, 0x35, 0xa8, 0xb7, 0xd9, 0xf9, 0x8b, 0x7c, 0x35, 0x88, 0xc0, 0xab, 0xc1, 0x6d, 0xcd, 0x4e, - 0x5f, 0xe2, 0xab, 0xc1, 0x08, 0x9e, 0x6c, 0xa3, 0x73, 0xd8, 0x0d, 0x97, 0xf9, 0x64, 0x1b, 0x94, - 0x98, 0x83, 0xa1, 0x38, 0x0b, 0x43, 0x3c, 0xa0, 0xd5, 0x9b, 0x7b, 0xb4, 0x2b, 0x19, 0x36, 0x99, - 0xff, 0x6d, 0x97, 0x76, 0xc0, 0x80, 0x38, 0x04, 0xfb, 0x64, 0x54, 0x97, 0x4d, 0x1b, 0xf9, 0xfb, - 0x2e, 0x17, 0x25, 0x5c, 0x2d, 0xe6, 0x01, 0x8a, 0x8f, 0xf6, 0xf8, 0x2a, 0x36, 0xf6, 0x8f, 0xdd, - 0xe2, 0x5b, 0x06, 0x03, 0x69, 0x0b, 0xf2, 0x17, 0xb7, 0x08, 0xb6, 0x3b, 0x05, 0xf9, 0x5b, 0x1f, - 0x86, 0xc1, 0x47, 0x52, 0x15, 0x6b, 0xcf, 0xb7, 0xd1, 0x7f, 0x12, 0xcd, 0xeb, 0x31, 0x60, 0x91, - 0x4a, 0xa4, 0xf6, 0xfc, 0xd4, 0xc6, 0xfe, 0x45, 0x6c, 0x09, 0x20, 0xdc, 0xf0, 0x52, 0xed, 0xf2, - 0xde, 0x7f, 0x33, 0xcc, 0x00, 0x6e, 0x1a, 0x9f, 0x1f, 0x95, 0x5b, 0x36, 0xf6, 0x1f, 0xde, 0x34, - 0xad, 0x17, 0x47, 0xa0, 0x82, 0x8f, 0xf9, 0xb7, 0x22, 0x36, 0xf8, 0x5f, 0x82, 0xdb, 0x04, 0xfe, - 0xe7, 0x54, 0x37, 0x75, 0x60, 0x0f, 0xf6, 0x7f, 0x94, 0x69, 0x5e, 0x2f, 0x16, 0x60, 0x38, 0xd5, - 0xcd, 0x66, 0x46, 0xf3, 0x95, 0x05, 0xff, 0x7f, 0xb7, 0xfc, 0xc8, 0x5d, 0x32, 0x47, 0x97, 0x60, - 0xb2, 0xa1, 0xa2, 0x6e, 0xf0, 0x28, 0x2c, 0xab, 0x65, 0xb5, 0x9a, 0x5f, 0xc5, 0x87, 0x6e, 0xf3, - 0x03, 0xbd, 0x99, 0xd5, 0x67, 0x1a, 0x2a, 0x9a, 0xc5, 0xc1, 0xb7, 0xfd, 0x7d, 0x5e, 0x39, 0x06, - 0x5f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x51, 0xf0, 0xa5, 0x95, 0x02, 0x14, 0x00, 0x00, + 0x14, 0x80, 0x85, 0x48, 0x64, 0x4f, 0x79, 0x8b, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9, + 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x0e, 0xc6, 0x89, 0xc3, 0x76, 0x18, + 0xf5, 0xf4, 0x94, 0xdb, 0x8d, 0xbb, 0xbb, 0x9a, 0xee, 0xea, 0x10, 0xe7, 0x86, 0xc2, 0x22, 0x84, + 0xd8, 0x91, 0x20, 0x21, 0x09, 0x04, 0xc4, 0xbe, 0x86, 0x7d, 0xb9, 0x70, 0x61, 0xb9, 0xf2, 0x1f, + 0xb8, 0x00, 0x66, 0xf7, 0xcd, 0x17, 0xf4, 0xba, 0xdf, 0xeb, 0xa9, 0x69, 0x8f, 0x54, 0x35, 0xb7, + 0xf6, 0xb8, 0xbe, 0x6f, 0xaa, 0xdf, 0xeb, 0x7a, 0xef, 0x4d, 0x33, 0xe6, 0x49, 0x4f, 0x4e, 0xc6, + 0x89, 0x54, 0xb2, 0x5e, 0x83, 0xeb, 0xfc, 0x72, 0xdf, 0x7e, 0x4f, 0x4a, 0x2f, 0x10, 0x53, 0xf9, + 0x5f, 0xcd, 0x6c, 0x75, 0xaa, 0x25, 0x52, 0x37, 0xf1, 0x63, 0x25, 0x93, 0x62, 0x31, 0x3f, 0xc6, + 0xc6, 0x70, 0x71, 0x43, 0x44, 0x59, 0xd8, 0x88, 0x13, 0xb1, 0xea, 0x9f, 0xae, 0x5f, 0x3f, 0x59, + 0x90, 0x93, 0x44, 0x4e, 0xce, 0x47, 0x59, 0x78, 0x47, 0xac, 0x7c, 0x19, 0xa5, 0x7b, 0xaf, 0xfc, + 0x72, 0xf5, 0xfe, 0xab, 0x6e, 0xe9, 0x5f, 0x1e, 0x45, 0x14, 0xfe, 0xb7, 0x94, 0x83, 0x7c, 0x99, + 0x5d, 0xd3, 0xe1, 0x4b, 0x55, 0xe2, 0x47, 0x9e, 0x48, 0x0c, 0xc6, 0xef, 0xd1, 0x38, 0xa6, 0x19, + 0x8f, 0x23, 0xca, 0xe7, 0xd8, 0x50, 0x2f, 0xae, 0x1f, 0xd0, 0x35, 0x28, 0x74, 0xc9, 0x02, 0x1b, + 0xc9, 0x25, 0x6e, 0x96, 0x2a, 0x19, 0x46, 0x4e, 0x28, 0x0c, 0x9a, 0x1f, 0x73, 0x4d, 0x6d, 0x79, + 0x18, 0xb0, 0xb9, 0x92, 0xe2, 0x9c, 0xf5, 0xc3, 0x27, 0x2d, 0xe1, 0x06, 0x06, 0xc3, 0x4f, 0xb8, + 0x91, 0x72, 0x3d, 0x3f, 0xc9, 0xc6, 0xe1, 0xfa, 0x94, 0x13, 0x64, 0x42, 0xdf, 0xc9, 0x4d, 0x5d, + 0x3d, 0x27, 0x61, 0x19, 0xc9, 0x7e, 0x3e, 0xbb, 0x2b, 0xdf, 0xce, 0x58, 0x29, 0xd0, 0xf6, 0xa4, + 0x65, 0xd1, 0x13, 0x4a, 0x89, 0x24, 0x6d, 0x38, 0x41, 0xb7, 0xed, 0x1d, 0xf1, 0x83, 0xd2, 0x78, + 0x6e, 0xb3, 0x33, 0x8b, 0x0b, 0x05, 0x39, 0x1b, 0x04, 0x7c, 0x85, 0x5d, 0xdb, 0xe5, 0xa9, 0xb0, + 0x70, 0x9e, 0x47, 0xe7, 0xf8, 0x8e, 0x27, 0x03, 0xb4, 0x4b, 0x8c, 0x3e, 0x2f, 0x73, 0x69, 0xe1, + 0x7c, 0x19, 0x9d, 0x75, 0x64, 0x29, 0xa5, 0x60, 0xbc, 0x8d, 0x8d, 0x9e, 0x12, 0x49, 0x53, 0xa6, + 0xa2, 0x21, 0x1e, 0xc8, 0x9c, 0xc0, 0x42, 0x77, 0x01, 0x75, 0x23, 0x08, 0xce, 0x03, 0x07, 0xae, + 0x83, 0xac, 0x7f, 0xd5, 0x71, 0x85, 0x85, 0xe2, 0x22, 0x2a, 0xfa, 0x60, 0x3d, 0xa0, 0xb3, 0x6c, + 0xd0, 0x93, 0xc5, 0x2d, 0x59, 0xe0, 0x97, 0x10, 0x1f, 0x20, 0x06, 0x15, 0xb1, 0x8c, 0xb3, 0xc0, + 0x51, 0x36, 0x3b, 0x78, 0x85, 0x14, 0xc4, 0xa0, 0xa2, 0x87, 0xb0, 0xbe, 0x4a, 0x8a, 0x54, 0x8b, + 0xe7, 0x0c, 0x1b, 0x90, 0x51, 0xb0, 0x21, 0x23, 0x9b, 0x4d, 0x5c, 0x46, 0x03, 0x43, 0x04, 0x04, + 0xd3, 0xac, 0x66, 0x9b, 0x88, 0x37, 0x36, 0xe9, 0x78, 0x50, 0x06, 0x16, 0xd8, 0x08, 0x15, 0x28, + 0x5f, 0x46, 0x16, 0x8a, 0x37, 0x51, 0x31, 0xac, 0x61, 0x78, 0x1b, 0x4a, 0xa4, 0xca, 0x13, 0x36, + 0x92, 0xb7, 0xe8, 0x36, 0x10, 0xc1, 0x50, 0x36, 0x45, 0xe4, 0xae, 0xd9, 0x19, 0xde, 0xa6, 0x50, + 0x12, 0x03, 0x8a, 0x39, 0x36, 0x14, 0x3a, 0x49, 0xba, 0xe6, 0x04, 0x56, 0xe9, 0x78, 0x07, 0x1d, + 0x83, 0x25, 0x84, 0x11, 0xc9, 0xa2, 0x5e, 0x34, 0xef, 0x52, 0x44, 0x34, 0x0c, 0x8f, 0x5e, 0xaa, + 0x9c, 0x66, 0x20, 0x1a, 0xbd, 0xd8, 0xde, 0xa3, 0xa3, 0x57, 0xb0, 0x8b, 0xba, 0x71, 0x9a, 0xd5, + 0x52, 0xff, 0x8c, 0x95, 0xe6, 0x7d, 0xca, 0x74, 0x0e, 0x00, 0x7c, 0x0f, 0xbb, 0xae, 0x6b, 0x9b, + 0xb0, 0x90, 0x7d, 0x80, 0xb2, 0x89, 0x2e, 0xad, 0x02, 0x4b, 0x42, 0xaf, 0xca, 0x0f, 0xa9, 0x24, + 0x88, 0x8a, 0x6b, 0x89, 0x8d, 0x67, 0x51, 0xea, 0xac, 0xf6, 0x16, 0xb5, 0x8f, 0x28, 0x6a, 0x05, + 0xdb, 0x11, 0xb5, 0x13, 0x6c, 0x02, 0x8d, 0xbd, 0xe5, 0xf5, 0x63, 0x2a, 0xac, 0x05, 0xbd, 0xd2, + 0x99, 0xdd, 0xfb, 0xd8, 0xbe, 0x32, 0x9c, 0xa7, 0x95, 0x88, 0x52, 0x60, 0x1a, 0xa1, 0x13, 0x5b, + 0x98, 0xaf, 0xa0, 0x99, 0x2a, 0xfe, 0x7c, 0x29, 0x58, 0x74, 0x62, 0x90, 0xdf, 0xcd, 0xf6, 0x92, + 0x3c, 0x8b, 0x12, 0xe1, 0x4a, 0x2f, 0xf2, 0xcf, 0x88, 0x96, 0x85, 0xfa, 0x93, 0x4a, 0xaa, 0x56, + 0x34, 0x1c, 0xcc, 0x47, 0xd9, 0x9e, 0x72, 0x56, 0x69, 0xf8, 0x61, 0x2c, 0x13, 0x65, 0x30, 0x7e, + 0x4a, 0x99, 0x2a, 0xb9, 0xa3, 0x39, 0xc6, 0xe7, 0xd9, 0x70, 0xfe, 0xa7, 0xed, 0x23, 0xf9, 0x19, + 0x8a, 0x86, 0xda, 0x14, 0x16, 0x0e, 0x57, 0x86, 0xb1, 0x93, 0xd8, 0xd4, 0xbf, 0xcf, 0xa9, 0x70, + 0x20, 0x82, 0x85, 0x43, 0x6d, 0xc4, 0x02, 0xba, 0xbd, 0x85, 0xe1, 0x0b, 0x2a, 0x1c, 0xc4, 0xa0, + 0x82, 0x06, 0x06, 0x0b, 0xc5, 0x97, 0xa4, 0x20, 0x06, 0x14, 0x77, 0xb6, 0x1b, 0x6d, 0x22, 0x3c, + 0x3f, 0x55, 0x89, 0x03, 0xab, 0x0d, 0xaa, 0xaf, 0x36, 0x3b, 0x87, 0xb0, 0x65, 0x0d, 0x85, 0x4a, + 0x14, 0x8a, 0x34, 0x75, 0x3c, 0x01, 0x13, 0x87, 0xc5, 0xc6, 0xbe, 0xa6, 0x4a, 0xa4, 0x61, 0xb0, + 0x37, 0x6d, 0x42, 0x84, 0xb0, 0xbb, 0x8e, 0xbb, 0x66, 0xa3, 0xfb, 0xa6, 0xb2, 0xb9, 0xe3, 0xc4, + 0x82, 0x53, 0x9b, 0x7f, 0xb2, 0x68, 0x5d, 0x6c, 0x58, 0x3d, 0x9d, 0xdf, 0x56, 0xe6, 0x9f, 0x95, + 0x82, 0x2c, 0x6a, 0xc8, 0x48, 0x65, 0x9e, 0xaa, 0xdf, 0xb8, 0xc3, 0xb5, 0x58, 0xdc, 0x17, 0xe9, + 0x1e, 0xda, 0xc2, 0xfb, 0xed, 0x1c, 0xa7, 0xf8, 0xed, 0xf0, 0x90, 0x77, 0x0e, 0x3d, 0x66, 0xd9, + 0xd9, 0xad, 0xf2, 0x39, 0xef, 0x98, 0x79, 0xf8, 0x11, 0x36, 0xd4, 0x31, 0xf0, 0x98, 0x55, 0x0f, + 0xa3, 0x6a, 0x50, 0x9f, 0x77, 0xf8, 0x01, 0xb6, 0x0b, 0x86, 0x17, 0x33, 0xfe, 0x08, 0xe2, 0xf9, + 0x72, 0x7e, 0x88, 0xf5, 0xd3, 0xd0, 0x62, 0x46, 0x1f, 0x45, 0xb4, 0x44, 0x00, 0xa7, 0x81, 0xc5, + 0x8c, 0x3f, 0x46, 0x38, 0x21, 0x80, 0xdb, 0x87, 0xf0, 0xbb, 0x27, 0x76, 0x61, 0xd3, 0xa1, 0xd8, + 0x4d, 0xb3, 0x3e, 0x9c, 0x54, 0xcc, 0xf4, 0xe3, 0xf8, 0xe5, 0x44, 0xf0, 0x5b, 0xd9, 0x6e, 0xcb, + 0x80, 0x3f, 0x89, 0x68, 0xb1, 0x9e, 0xcf, 0xb1, 0x01, 0x6d, 0x3a, 0x31, 0xe3, 0x4f, 0x21, 0xae, + 0x53, 0xb0, 0x75, 0x9c, 0x4e, 0xcc, 0x82, 0xa7, 0x69, 0xeb, 0x48, 0x40, 0xd8, 0x68, 0x30, 0x31, + 0xd3, 0xcf, 0x50, 0xd4, 0x09, 0xe1, 0x33, 0xac, 0x56, 0x36, 0x1b, 0x33, 0xff, 0x2c, 0xf2, 0x6d, + 0x06, 0x22, 0xa0, 0x35, 0x3b, 0xb3, 0xe2, 0x39, 0x8a, 0x80, 0x46, 0xc1, 0x31, 0xaa, 0x0e, 0x30, + 0x66, 0xd3, 0xf3, 0x74, 0x8c, 0x2a, 0xf3, 0x0b, 0x64, 0x33, 0xaf, 0xf9, 0x66, 0xc5, 0x0b, 0x94, + 0xcd, 0x7c, 0x3d, 0x6c, 0xa3, 0x3a, 0x11, 0x98, 0x1d, 0x2f, 0xd2, 0x36, 0x2a, 0x03, 0x01, 0x5f, + 0x62, 0xf5, 0x9d, 0xd3, 0x80, 0xd9, 0xf7, 0x12, 0xfa, 0x46, 0x77, 0x0c, 0x03, 0xfc, 0x2e, 0x36, + 0xd1, 0x7d, 0x12, 0x30, 0x5b, 0xcf, 0x6d, 0x55, 0x7e, 0xbb, 0xe9, 0x83, 0x00, 0x3f, 0xd1, 0x6e, + 0x29, 0xfa, 0x14, 0x60, 0xd6, 0x9e, 0xdf, 0xea, 0x2c, 0xdc, 0xfa, 0x10, 0xc0, 0x67, 0x19, 0x6b, + 0x37, 0x60, 0xb3, 0xeb, 0x02, 0xba, 0x34, 0x08, 0x8e, 0x06, 0xf6, 0x5f, 0x33, 0x7f, 0x91, 0x8e, + 0x06, 0x12, 0x70, 0x34, 0xa8, 0xf5, 0x9a, 0xe9, 0x4b, 0x74, 0x34, 0x08, 0x81, 0x27, 0x5b, 0xeb, + 0x6e, 0x66, 0xc3, 0x65, 0x7a, 0xb2, 0x35, 0x8a, 0x1f, 0x63, 0xa3, 0x3b, 0x1a, 0xa2, 0x59, 0xf5, + 0x1a, 0xaa, 0xf6, 0x54, 0xfb, 0xa1, 0xde, 0xbc, 0xb0, 0x19, 0x9a, 0x6d, 0xaf, 0x57, 0x9a, 0x17, + 0xf6, 0x42, 0x3e, 0xcd, 0xfa, 0xa3, 0x2c, 0x08, 0xe0, 0xf0, 0xd4, 0x6f, 0xe8, 0xd2, 0x4d, 0x45, + 0xd0, 0x22, 0xc5, 0xaf, 0xdb, 0x18, 0x1d, 0x02, 0xf8, 0x01, 0xb6, 0x5b, 0x84, 0x4d, 0xd1, 0x32, + 0x91, 0xbf, 0x6d, 0x53, 0xc1, 0x84, 0xd5, 0x7c, 0x86, 0xb1, 0xe2, 0xd5, 0x08, 0x84, 0xd9, 0xc4, + 0xfe, 0xbe, 0x5d, 0xbc, 0xa5, 0xd1, 0x90, 0xb6, 0x20, 0x4f, 0x8a, 0x41, 0xb0, 0xd9, 0x29, 0xc8, + 0x33, 0x72, 0x90, 0xf5, 0xdd, 0x9f, 0xca, 0x48, 0x39, 0x9e, 0x89, 0xfe, 0x03, 0x69, 0x5a, 0x0f, + 0x01, 0x0b, 0x65, 0x22, 0x94, 0xe3, 0xa5, 0x26, 0xf6, 0x4f, 0x64, 0x4b, 0x00, 0x60, 0xd7, 0x49, + 0x95, 0xcd, 0x7d, 0xff, 0x45, 0x30, 0x01, 0xb0, 0x69, 0xb8, 0x5e, 0x17, 0x1b, 0x26, 0xf6, 0x6f, + 0xda, 0x34, 0xae, 0xe7, 0x87, 0x58, 0x0d, 0x2e, 0xf3, 0xb7, 0x4a, 0x26, 0xf8, 0x1f, 0x84, 0xdb, + 0x04, 0x7c, 0x73, 0xaa, 0x5a, 0xca, 0x37, 0x07, 0xfb, 0x5f, 0xcc, 0x34, 0xad, 0xe7, 0xb3, 0x6c, + 0x20, 0x55, 0xad, 0x56, 0x86, 0xf3, 0xa9, 0x01, 0xff, 0x6f, 0xbb, 0x7c, 0x65, 0x51, 0x32, 0x90, + 0xed, 0x07, 0xd7, 0x55, 0x2c, 0xfd, 0x48, 0x89, 0xc4, 0x64, 0xd8, 0x42, 0x83, 0x86, 0x1c, 0x9e, + 0x67, 0x63, 0xae, 0x0c, 0xab, 0xdc, 0x61, 0xb6, 0x20, 0x17, 0xe4, 0x52, 0x5e, 0x67, 0xee, 0xbd, + 0xd9, 0xf3, 0xd5, 0x5a, 0xd6, 0x9c, 0x74, 0x65, 0x38, 0x05, 0xbf, 0x3c, 0xda, 0x2f, 0x54, 0xcb, + 0xdf, 0x21, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xaf, 0x70, 0x4e, 0x83, 0x15, 0x00, 0x00, } diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto index bc8d889f1..b80c85653 100644 --- a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -84,6 +84,9 @@ extend google.protobuf.FileOptions { optional bool goproto_registration = 63032; optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; } extend google.protobuf.MessageOptions { @@ -118,6 +121,9 @@ extend google.protobuf.MessageOptions { optional bool typedecl = 64030; optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; } extend google.protobuf.FieldOptions { @@ -133,4 +139,6 @@ extend google.protobuf.FieldOptions { optional bool stdtime = 65010; optional bool stdduration = 65011; + optional bool wktpointer = 65012; + } diff --git a/vendor/github.com/gogo/protobuf/gogoproto/helper.go b/vendor/github.com/gogo/protobuf/gogoproto/helper.go index 22910c6d4..390d4e4be 100644 --- a/vendor/github.com/gogo/protobuf/gogoproto/helper.go +++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go @@ -47,6 +47,55 @@ func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { return proto.GetBoolExtension(field.Options, E_Stdduration, false) } +func IsStdDouble(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.DoubleValue" +} + +func IsStdFloat(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.FloatValue" +} + +func IsStdInt64(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int64Value" +} + +func IsStdUInt64(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt64Value" +} + +func IsStdInt32(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int32Value" +} + +func IsStdUInt32(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt32Value" +} + +func IsStdBool(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BoolValue" +} + +func IsStdString(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.StringValue" +} + +func IsStdBytes(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BytesValue" +} + +func IsStdType(field *google_protobuf.FieldDescriptorProto) bool { + return (IsStdTime(field) || IsStdDuration(field) || + IsStdDouble(field) || IsStdFloat(field) || + IsStdInt64(field) || IsStdUInt64(field) || + IsStdInt32(field) || IsStdUInt32(field) || + IsStdBool(field) || + IsStdString(field) || IsStdBytes(field)) +} + +func IsWktPtr(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) +} + func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { nullable := IsNullable(field) if field.IsMessage() || IsCustomType(field) { @@ -356,3 +405,11 @@ func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) } + +func HasSizecache(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoSizecache, proto.GetBoolExtension(file.Options, E_GoprotoSizecacheAll, true)) +} + +func HasUnkeyed(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoUnkeyed, proto.GetBoolExtension(file.Options, E_GoprotoUnkeyedAll, true)) +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go index 4c35d3373..3abfed2cf 100644 --- a/vendor/github.com/gogo/protobuf/proto/encode.go +++ b/vendor/github.com/gogo/protobuf/proto/encode.go @@ -37,24 +37,9 @@ package proto import ( "errors" - "fmt" "reflect" ) -// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. -// Marshal reports this when a required field is not initialized. -// Unmarshal reports this when a required field is missing from the wire data. -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - if e.field == "" { - return fmt.Sprintf("proto: required field not set") - } - return fmt.Sprintf("proto: required field %q not set", e.field) -} - var ( // errRepeatedHasNil is the error returned if Marshal is called with // a struct with a repeated field containing a nil element. diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go index 37d178132..b2271d0b7 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -265,7 +265,6 @@ package proto import ( "encoding/json" - "errors" "fmt" "log" "reflect" @@ -274,7 +273,66 @@ import ( "sync" ) -var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} // Message is implemented by generated protocol buffer messages. type Message interface { diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go index 7a5e28efe..04dcb8d9e 100644 --- a/vendor/github.com/gogo/protobuf/proto/properties.go +++ b/vendor/github.com/gogo/protobuf/proto/properties.go @@ -144,7 +144,7 @@ type Properties struct { Repeated bool Packed bool // relevant for repeated primitives only Enum string // set for enum types only - proto3 bool // whether this is known to be a proto3 field; set for []byte only + proto3 bool // whether this is known to be a proto3 field oneof bool // whether this is a oneof field Default string // default value @@ -153,14 +153,15 @@ type Properties struct { CastType string StdTime bool StdDuration bool + WktPointer bool stype reflect.Type // set for struct types only ctype reflect.Type // set for custom types only sprop *StructProperties // set for struct types only - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only } // String formats the properties in the protobuf struct field tag style. @@ -274,6 +275,8 @@ outer: p.StdTime = true case f == "stdduration": p.StdDuration = true + case f == "wktptr": + p.WktPointer = true } } } @@ -296,6 +299,10 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc p.setTag(lockGetProp) return } + if p.WktPointer && !isMap { + p.setTag(lockGetProp) + return + } switch t1 := typ; t1.Kind() { case reflect.Struct: p.stype = typ @@ -317,9 +324,9 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc case reflect.Map: p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} vtype := p.mtype.Elem() if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { // The value type is not a message (*T) or bytes ([]byte), @@ -327,10 +334,11 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc vtype = reflect.PtrTo(vtype) } - p.mvalprop.CustomType = p.CustomType - p.mvalprop.StdDuration = p.StdDuration - p.mvalprop.StdTime = p.StdTime - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + p.MapValProp.CustomType = p.CustomType + p.MapValProp.StdDuration = p.StdDuration + p.MapValProp.StdTime = p.StdTime + p.MapValProp.WktPointer = p.WktPointer + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) } p.setTag(lockGetProp) } diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal.go b/vendor/github.com/gogo/protobuf/proto/table_marshal.go index 3d233d191..ba58c49a4 100644 --- a/vendor/github.com/gogo/protobuf/proto/table_marshal.go +++ b/vendor/github.com/gogo/protobuf/proto/table_marshal.go @@ -97,6 +97,8 @@ type marshalElemInfo struct { var ( marshalInfoMap = map[reflect.Type]*marshalInfo{} marshalInfoLock sync.Mutex + + uint8SliceType = reflect.TypeOf(([]uint8)(nil)).Kind() ) // getMarshalInfo returns the information to marshal a given type of message. @@ -246,16 +248,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte // If the message can marshal itself, let it do it, for compatibility. // NOTE: This is not efficient. if u.hasmarshaler { - if deterministic { - return nil, errors.New("proto: deterministic not supported by the Marshal method of " + u.typ.String()) - } m := ptr.asPointerTo(u.typ).Interface().(Marshaler) b1, err := m.Marshal() b = append(b, b1...) return b, err } - var err, errreq error + var err, errLater error // The old marshaler encodes extensions at beginning. if u.extensions.IsValid() { e := ptr.offset(u.extensions).toExtensions() @@ -280,11 +279,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte b = append(b, s...) } for _, f := range u.fields { - if f.required && errreq == nil { + if f.required { if f.isPointer && ptr.offset(f.field).getPointer().isNil() { // Required field is not set. // We record the error but keep going, to give a complete marshaling. - errreq = &RequiredNotSetError{f.name} + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } continue } } @@ -297,14 +298,21 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte if err1, ok := err.(*RequiredNotSetError); ok { // Required field in submessage is not set. // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = &RequiredNotSetError{f.name + "." + err1.field} + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} } continue } if err == errRepeatedHasNil { err = errors.New("proto: repeated field " + f.name + " has nil element") } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return b, err } } @@ -312,7 +320,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte s := *ptr.offset(u.unrecognized).toBytes() b = append(b, s...) } - return b, errreq + return b, errLater } // computeMarshalInfo initializes the marshal info. @@ -577,6 +585,8 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma ctype := false isTime := false isDuration := false + isWktPointer := false + validateUTF8 := true for i := 2; i < len(tags); i++ { if tags[i] == "packed" { packed = true @@ -593,7 +603,11 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma if tags[i] == "stdduration" { isDuration = true } + if tags[i] == "wktptr" { + isWktPointer = true + } } + validateUTF8 = validateUTF8 && proto3 if !proto3 && !pointer && !slice { nozero = false } @@ -638,6 +652,112 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma return makeDurationMarshaler(getMarshalInfo(t)) } + if isWktPointer { + switch t.Kind() { + case reflect.Float64: + if pointer { + if slice { + return makeStdDoubleValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdDoubleValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdDoubleValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdDoubleValueMarshaler(getMarshalInfo(t)) + case reflect.Float32: + if pointer { + if slice { + return makeStdFloatValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdFloatValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdFloatValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdFloatValueMarshaler(getMarshalInfo(t)) + case reflect.Int64: + if pointer { + if slice { + return makeStdInt64ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt64ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdInt64ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt64ValueMarshaler(getMarshalInfo(t)) + case reflect.Uint64: + if pointer { + if slice { + return makeStdUInt64ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt64ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdUInt64ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt64ValueMarshaler(getMarshalInfo(t)) + case reflect.Int32: + if pointer { + if slice { + return makeStdInt32ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt32ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdInt32ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt32ValueMarshaler(getMarshalInfo(t)) + case reflect.Uint32: + if pointer { + if slice { + return makeStdUInt32ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt32ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdUInt32ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt32ValueMarshaler(getMarshalInfo(t)) + case reflect.Bool: + if pointer { + if slice { + return makeStdBoolValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBoolValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdBoolValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBoolValueMarshaler(getMarshalInfo(t)) + case reflect.String: + if pointer { + if slice { + return makeStdStringValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdStringValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdStringValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdStringValueMarshaler(getMarshalInfo(t)) + case uint8SliceType: + if pointer { + if slice { + return makeStdBytesValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBytesValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdBytesValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBytesValueMarshaler(getMarshalInfo(t)) + default: + panic(fmt.Sprintf("unknown wktpointer type %#v", t)) + } + } + switch t.Kind() { case reflect.Bool: if pointer { @@ -834,6 +954,18 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma } return sizeFloat64Value, appendFloat64Value case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } if pointer { return sizeStringPtr, appendStringPtr } @@ -2090,9 +2222,6 @@ func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byt } func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { v := *ptr.toString() - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) @@ -2103,9 +2232,6 @@ func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]b if v == "" { return b, nil } - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) @@ -2117,24 +2243,83 @@ func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, err return b, nil } v := *p - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) return b, nil } func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool s := *ptr.toStringSlice() for _, v := range s { if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) } + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { @@ -2213,7 +2398,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2221,22 +2407,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, wiretag) // start group b, err = u.marshal(b, v, deterministic) b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2280,7 +2458,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2289,22 +2468,15 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { siz := u.cachedsize(v) b = appendVarint(b, uint64(siz)) b, err = u.marshal(b, v, deterministic) - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2318,15 +2490,21 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { tags := strings.Split(f.Tag.Get("protobuf"), ",") keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + stdOptions := false for _, t := range tags { if strings.HasPrefix(t, "customtype=") { valTags = append(valTags, t) } if t == "stdtime" { valTags = append(valTags, t) + stdOptions = true } if t == "stdduration" { valTags = append(valTags, t) + stdOptions = true + } + if t == "wktptr" { + valTags = append(valTags, t) } } keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map @@ -2340,6 +2518,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { // value. // Key cannot be pointer-typed. valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && !stdOptions && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } return func(ptr pointer, tagsize int) int { m := ptr.asPointerTo(t).Elem() // the map n := 0 @@ -2360,24 +2557,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { if len(keys) > 1 && deterministic { sort.Sort(mapKeys(keys)) } + + var nerr nonFatal for _, k := range keys { ki := k.Interface() vi := m.MapIndex(k).Interface() kaddr := toAddrPointer(&ki, false) // pointer to key vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value b = appendVarint(b, tag) - siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) b = appendVarint(b, uint64(siz)) b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b, err = valMarshaler(b, vaddr, valWireTag, deterministic) - if err != nil && err != ErrNil { // allow nil value in map + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map return b, err } } - return b, nil + return b, nerr.E } } @@ -2450,6 +2649,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2469,11 +2669,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2500,11 +2700,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // message set format is: @@ -2561,6 +2761,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2587,12 +2788,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b = append(b, 1<<3|WireEndGroup) } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2626,11 +2827,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) b = append(b, 1<<3|WireEndGroup) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // sizeV1Extensions computes the size of encoded data for a V1-API extension field. @@ -2673,6 +2874,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ sort.Ints(keys) var err error + var nerr nonFatal for _, k := range keys { e := m[int32(k)] if e.value == nil || e.desc == nil { @@ -2689,11 +2891,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // newMarshaler is the interface representing objects that can marshal themselves. @@ -2758,6 +2960,11 @@ func Marshal(pb Message) ([]byte, error) { // a Buffer for most applications. func (p *Buffer) Marshal(pb Message) error { var err error + if p.deterministic { + if _, ok := pb.(Marshaler); ok { + return fmt.Errorf("proto: deterministic not supported by the Marshal method of %T", pb) + } + } if m, ok := pb.(newMarshaler); ok { siz := m.XXX_Size() p.grow(siz) // make sure buf has enough capacity diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go index 910e2dd6a..e6b15c76c 100644 --- a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -99,6 +99,8 @@ type unmarshalFieldInfo struct { // if a required field, contains a single set bit at this field's index in the required field list. reqMask uint64 + + name string // name of the field, for error reporting } var ( @@ -138,8 +140,8 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if u.isMessageSet { return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) } - var reqMask uint64 // bitmask of required fields we've seen. - var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage. + var reqMask uint64 // bitmask of required fields we've seen. + var errLater error for len(b) > 0 { // Read tag and wire type. // Special case 1 and 2 byte varints. @@ -178,11 +180,20 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if r, ok := err.(*RequiredNotSetError); ok { // Remember this error, but keep parsing. We need to produce // a full parse even if a required field is missing. - rnse = r + if errLater == nil { + errLater = r + } reqMask |= f.reqMask continue } if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } return err } // Fragments with bad wire type are treated as unknown fields. @@ -244,20 +255,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { emap[int32(tag)] = e } } - if rnse != nil { - // A required field of a submessage/group is missing. Return that error. - return rnse - } - if reqMask != u.reqMask { + if reqMask != u.reqMask && errLater == nil { // A required field of this message is missing. for _, n := range u.reqFields { if reqMask&1 == 0 { - return &RequiredNotSetError{n} + errLater = &RequiredNotSetError{n} } reqMask >>= 1 } } - return nil + return errLater } // computeUnmarshalInfo fills in u with information for use @@ -360,7 +367,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { } // Store the info in the correct slot in the message. - u.setTag(tag, toField(&f), unmarshal, reqMask) + u.setTag(tag, toField(&f), unmarshal, reqMask, name) } // Find any types associated with oneof fields. @@ -376,10 +383,17 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { f := typ.Field(0) // oneof implementers have one field baseUnmarshal := fieldUnmarshaler(&f) - tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1] - tag, err := strconv.Atoi(tagstr) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) if err != nil { - panic("protobuf tag field not an integer: " + tagstr) + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } } // Find the oneof field that this struct implements. @@ -390,7 +404,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // That lets us know where this struct should be stored // when we encounter it during unmarshaling. unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) - u.setTag(tag, of.field, unmarshal, 0) + u.setTag(fieldNum, of.field, unmarshal, 0, name) } } } @@ -411,7 +425,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() { // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) - }, 0) + }, 0, "") // Set mask for required field check. u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? for len(u.dense) <= tag { @@ -455,10 +470,16 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { ctype := false isTime := false isDuration := false + isWktPointer := false + proto3 := false + validateUTF8 := true for _, tag := range tagArray[3:] { if strings.HasPrefix(tag, "name=") { name = tag[5:] } + if tag == "proto3" { + proto3 = true + } if strings.HasPrefix(tag, "customtype=") { ctype = true } @@ -468,7 +489,11 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { if tag == "stdduration" { isDuration = true } + if tag == "wktptr" { + isWktPointer = true + } } + validateUTF8 = validateUTF8 && proto3 // Figure out packaging (pointer, slice, or both) slice := false @@ -522,6 +547,112 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { return makeUnmarshalDuration(getUnmarshalInfo(t), name) } + if isWktPointer { + switch t.Kind() { + case reflect.Float64: + if pointer { + if slice { + return makeStdDoubleValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdDoubleValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdDoubleValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdDoubleValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Float32: + if pointer { + if slice { + return makeStdFloatValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdFloatValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdFloatValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdFloatValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Int64: + if pointer { + if slice { + return makeStdInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt64ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Uint64: + if pointer { + if slice { + return makeStdUInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdUInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt64ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Int32: + if pointer { + if slice { + return makeStdInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt32ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Uint32: + if pointer { + if slice { + return makeStdUInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdUInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt32ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Bool: + if pointer { + if slice { + return makeStdBoolValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBoolValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdBoolValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBoolValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.String: + if pointer { + if slice { + return makeStdStringValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdStringValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdStringValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdStringValueUnmarshaler(getUnmarshalInfo(t), name) + case uint8SliceType: + if pointer { + if slice { + return makeStdBytesValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBytesValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdBytesValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBytesValueUnmarshaler(getUnmarshalInfo(t), name) + default: + panic(fmt.Sprintf("unknown wktpointer type %#v", t)) + } + } + // We'll never have both pointer and slice for basic types. if pointer && slice && t.Kind() != reflect.Struct { panic("both pointer and slice for basic type in " + t.Name()) @@ -656,6 +787,15 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { } return unmarshalBytesValue case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } if pointer { return unmarshalStringPtr } @@ -1516,9 +1656,6 @@ func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toString() = v return b[x:], nil } @@ -1536,9 +1673,6 @@ func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } *f.toStringPtr() = &v return b[x:], nil } @@ -1556,14 +1690,72 @@ func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } s := f.toStringSlice() *s = append(*s, v) return b[x:], nil } +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + var emptyBuf [0]byte func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { @@ -1731,6 +1923,9 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { if t == "stdduration" { valTags = append(valTags, t) } + if t == "wktptr" { + valTags = append(valTags, t) + } } unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) unmarshalVal := typeUnmarshaler(vt, strings.Join(valTags, ",")) @@ -1755,6 +1950,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Maps will be somewhat slow. Oh well. // Read key and value from data. + var nerr nonFatal k := reflect.New(kt) v := reflect.New(vt) for len(b) > 0 { @@ -1775,7 +1971,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { err = errInternalBadWireType // skip unknown tag } - if err == nil { + if nerr.Merge(err) { continue } if err != errInternalBadWireType { @@ -1798,7 +1994,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Insert into map. m.SetMapIndex(k.Elem(), v.Elem()) - return r, nil + return r, nerr.E } } @@ -1824,15 +2020,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal // Unmarshal data into holder. // We unmarshal into the first field of the holder object. var err error + var nerr nonFatal b, err = unmarshal(b, valToPointer(v).offset(field0), w) - if err != nil { + if !nerr.Merge(err) { return nil, err } // Write pointer to holder into target field. f.asPointerTo(ityp).Elem().Set(v) - return b, nil + return b, nerr.E } } diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go index 4f5706dc5..0407ba85d 100644 --- a/vendor/github.com/gogo/protobuf/proto/text.go +++ b/vendor/github.com/gogo/protobuf/proto/text.go @@ -364,7 +364,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -381,7 +381,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.MapValProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go index fbb000d37..1ce0be2fa 100644 --- a/vendor/github.com/gogo/protobuf/proto/text_parser.go +++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -636,17 +636,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { if err := p.consumeToken(":"); err != nil { return err } - if err := p.readAny(key, props.mkeyprop); err != nil { + if err := p.readAny(key, props.MapKeyProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { return err } case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { return err } - if err := p.readAny(val, props.mvalprop); err != nil { + if err := p.readAny(val, props.MapValProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { @@ -923,6 +923,16 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { fv.SetFloat(f) return nil } + case reflect.Int8: + if x, err := strconv.ParseInt(tok.value, 0, 8); err == nil { + fv.SetInt(x) + return nil + } + case reflect.Int16: + if x, err := strconv.ParseInt(tok.value, 0, 16); err == nil { + fv.SetInt(x) + return nil + } case reflect.Int32: if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { fv.SetInt(x) @@ -970,6 +980,16 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { } // TODO: Handle nested messages which implement encoding.TextUnmarshaler. return p.readStruct(fv, terminator) + case reflect.Uint8: + if x, err := strconv.ParseUint(tok.value, 0, 8); err == nil { + fv.SetUint(x) + return nil + } + case reflect.Uint16: + if x, err := strconv.ParseUint(tok.value, 0, 16); err == nil { + fv.SetUint(x) + return nil + } case reflect.Uint32: if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { fv.SetUint(uint64(x)) diff --git a/vendor/github.com/gogo/protobuf/proto/wrappers.go b/vendor/github.com/gogo/protobuf/proto/wrappers.go new file mode 100644 index 000000000..b175d1b64 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/wrappers.go @@ -0,0 +1,1888 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "io" + "reflect" +) + +func makeStdDoubleValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*float64) + v := &float64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdDoubleValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64) + v := &float64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdDoubleValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float64) + v := &float64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float64) + v := &float64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdDoubleValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdDoubleValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdDoubleValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdDoubleValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdDoubleValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdFloatValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*float32) + v := &float32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdFloatValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32) + v := &float32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdFloatValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float32) + v := &float32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float32) + v := &float32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdFloatValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdFloatValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdFloatValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdFloatValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdFloatValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*int64) + v := &int64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64) + v := &int64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int64) + v := &int64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int64) + v := &int64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*uint64) + v := &uint64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64) + v := &uint64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint64) + v := &uint64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint64) + v := &uint64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdUInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdUInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*int32) + v := &int32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32) + v := &int32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int32) + v := &int32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int32) + v := &int32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*uint32) + v := &uint32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32) + v := &uint32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint32) + v := &uint32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint32) + v := &uint32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdUInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdUInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBoolValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*bool) + v := &boolValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBoolValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool) + v := &boolValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBoolValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(bool) + v := &boolValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(bool) + v := &boolValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBoolValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBoolValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdBoolValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdBoolValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBoolValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdStringValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*string) + v := &stringValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdStringValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string) + v := &stringValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdStringValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(string) + v := &stringValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(string) + v := &stringValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdStringValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdStringValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdStringValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdStringValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdStringValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBytesValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*[]byte) + v := &bytesValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBytesValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte) + v := &bytesValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBytesValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().([]byte) + v := &bytesValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().([]byte) + v := &bytesValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBytesValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBytesValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdBytesValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdBytesValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBytesValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go new file mode 100644 index 000000000..c1cf7bf85 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go @@ -0,0 +1,113 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +type float64Value struct { + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *float64Value) Reset() { *m = float64Value{} } +func (*float64Value) ProtoMessage() {} +func (*float64Value) String() string { return "float64" } + +type float32Value struct { + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *float32Value) Reset() { *m = float32Value{} } +func (*float32Value) ProtoMessage() {} +func (*float32Value) String() string { return "float32" } + +type int64Value struct { + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *int64Value) Reset() { *m = int64Value{} } +func (*int64Value) ProtoMessage() {} +func (*int64Value) String() string { return "int64" } + +type uint64Value struct { + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *uint64Value) Reset() { *m = uint64Value{} } +func (*uint64Value) ProtoMessage() {} +func (*uint64Value) String() string { return "uint64" } + +type int32Value struct { + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *int32Value) Reset() { *m = int32Value{} } +func (*int32Value) ProtoMessage() {} +func (*int32Value) String() string { return "int32" } + +type uint32Value struct { + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *uint32Value) Reset() { *m = uint32Value{} } +func (*uint32Value) ProtoMessage() {} +func (*uint32Value) String() string { return "uint32" } + +type boolValue struct { + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *boolValue) Reset() { *m = boolValue{} } +func (*boolValue) ProtoMessage() {} +func (*boolValue) String() string { return "bool" } + +type stringValue struct { + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *stringValue) Reset() { *m = stringValue{} } +func (*stringValue) ProtoMessage() {} +func (*stringValue) String() string { return "string" } + +type bytesValue struct { + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *bytesValue) Reset() { *m = bytesValue{} } +func (*bytesValue) ProtoMessage() {} +func (*bytesValue) String() string { return "[]byte" } + +func init() { + RegisterType((*float64Value)(nil), "gogo.protobuf.proto.DoubleValue") + RegisterType((*float32Value)(nil), "gogo.protobuf.proto.FloatValue") + RegisterType((*int64Value)(nil), "gogo.protobuf.proto.Int64Value") + RegisterType((*uint64Value)(nil), "gogo.protobuf.proto.UInt64Value") + RegisterType((*int32Value)(nil), "gogo.protobuf.proto.Int32Value") + RegisterType((*uint32Value)(nil), "gogo.protobuf.proto.UInt32Value") + RegisterType((*boolValue)(nil), "gogo.protobuf.proto.BoolValue") + RegisterType((*stringValue)(nil), "gogo.protobuf.proto.StringValue") + RegisterType((*bytesValue)(nil), "gogo.protobuf.proto.BytesValue") +} diff --git a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go new file mode 100644 index 000000000..ceadde6a5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go @@ -0,0 +1,101 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package sortkeys + +import ( + "sort" +) + +func Strings(l []string) { + sort.Strings(l) +} + +func Float64s(l []float64) { + sort.Float64s(l) +} + +func Float32s(l []float32) { + sort.Sort(Float32Slice(l)) +} + +func Int64s(l []int64) { + sort.Sort(Int64Slice(l)) +} + +func Int32s(l []int32) { + sort.Sort(Int32Slice(l)) +} + +func Uint64s(l []uint64) { + sort.Sort(Uint64Slice(l)) +} + +func Uint32s(l []uint32) { + sort.Sort(Uint32Slice(l)) +} + +func Bools(l []bool) { + sort.Sort(BoolSlice(l)) +} + +type BoolSlice []bool + +func (p BoolSlice) Len() int { return len(p) } +func (p BoolSlice) Less(i, j int) bool { return p[j] } +func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int64Slice []int64 + +func (p Int64Slice) Len() int { return len(p) } +func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int32Slice []int32 + +func (p Int32Slice) Len() int { return len(p) } +func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint64Slice []uint64 + +func (p Uint64Slice) Len() int { return len(p) } +func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint32Slice []uint32 + +func (p Uint32Slice) Len() int { return len(p) } +func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Float32Slice []float32 + +func (p Float32Slice) Len() int { return len(p) } +func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/github.com/golang/snappy/.gitignore b/vendor/github.com/golang/snappy/.gitignore new file mode 100644 index 000000000..042091d9b --- /dev/null +++ b/vendor/github.com/golang/snappy/.gitignore @@ -0,0 +1,16 @@ +cmd/snappytool/snappytool +testdata/bench + +# These explicitly listed benchmark data files are for an obsolete version of +# snappy_test.go. +testdata/alice29.txt +testdata/asyoulik.txt +testdata/fireworks.jpeg +testdata/geo.protodata +testdata/html +testdata/html_x_4 +testdata/kppkn.gtb +testdata/lcet10.txt +testdata/paper-100k.pdf +testdata/plrabn12.txt +testdata/urls.10K diff --git a/vendor/github.com/golang/snappy/AUTHORS b/vendor/github.com/golang/snappy/AUTHORS new file mode 100644 index 000000000..bcfa19520 --- /dev/null +++ b/vendor/github.com/golang/snappy/AUTHORS @@ -0,0 +1,15 @@ +# This is the official list of Snappy-Go authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Damian Gryski +Google Inc. +Jan Mercl <0xjnml@gmail.com> +Rodolfo Carvalho +Sebastien Binet diff --git a/vendor/github.com/golang/snappy/CONTRIBUTORS b/vendor/github.com/golang/snappy/CONTRIBUTORS new file mode 100644 index 000000000..931ae3160 --- /dev/null +++ b/vendor/github.com/golang/snappy/CONTRIBUTORS @@ -0,0 +1,37 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the Snappy-Go repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name + +# Please keep the list sorted. + +Damian Gryski +Jan Mercl <0xjnml@gmail.com> +Kai Backman +Marc-Antoine Ruel +Nigel Tao +Rob Pike +Rodolfo Carvalho +Russ Cox +Sebastien Binet diff --git a/vendor/github.com/golang/snappy/LICENSE b/vendor/github.com/golang/snappy/LICENSE new file mode 100644 index 000000000..6050c10f4 --- /dev/null +++ b/vendor/github.com/golang/snappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/golang/snappy/README b/vendor/github.com/golang/snappy/README new file mode 100644 index 000000000..cea12879a --- /dev/null +++ b/vendor/github.com/golang/snappy/README @@ -0,0 +1,107 @@ +The Snappy compression format in the Go programming language. + +To download and install from source: +$ go get github.com/golang/snappy + +Unless otherwise noted, the Snappy-Go source files are distributed +under the BSD-style license found in the LICENSE file. + + + +Benchmarks. + +The golang/snappy benchmarks include compressing (Z) and decompressing (U) ten +or so files, the same set used by the C++ Snappy code (github.com/google/snappy +and note the "google", not "golang"). On an "Intel(R) Core(TM) i7-3770 CPU @ +3.40GHz", Go's GOARCH=amd64 numbers as of 2016-05-29: + +"go test -test.bench=." + +_UFlat0-8 2.19GB/s ± 0% html +_UFlat1-8 1.41GB/s ± 0% urls +_UFlat2-8 23.5GB/s ± 2% jpg +_UFlat3-8 1.91GB/s ± 0% jpg_200 +_UFlat4-8 14.0GB/s ± 1% pdf +_UFlat5-8 1.97GB/s ± 0% html4 +_UFlat6-8 814MB/s ± 0% txt1 +_UFlat7-8 785MB/s ± 0% txt2 +_UFlat8-8 857MB/s ± 0% txt3 +_UFlat9-8 719MB/s ± 1% txt4 +_UFlat10-8 2.84GB/s ± 0% pb +_UFlat11-8 1.05GB/s ± 0% gaviota + +_ZFlat0-8 1.04GB/s ± 0% html +_ZFlat1-8 534MB/s ± 0% urls +_ZFlat2-8 15.7GB/s ± 1% jpg +_ZFlat3-8 740MB/s ± 3% jpg_200 +_ZFlat4-8 9.20GB/s ± 1% pdf +_ZFlat5-8 991MB/s ± 0% html4 +_ZFlat6-8 379MB/s ± 0% txt1 +_ZFlat7-8 352MB/s ± 0% txt2 +_ZFlat8-8 396MB/s ± 1% txt3 +_ZFlat9-8 327MB/s ± 1% txt4 +_ZFlat10-8 1.33GB/s ± 1% pb +_ZFlat11-8 605MB/s ± 1% gaviota + + + +"go test -test.bench=. -tags=noasm" + +_UFlat0-8 621MB/s ± 2% html +_UFlat1-8 494MB/s ± 1% urls +_UFlat2-8 23.2GB/s ± 1% jpg +_UFlat3-8 1.12GB/s ± 1% jpg_200 +_UFlat4-8 4.35GB/s ± 1% pdf +_UFlat5-8 609MB/s ± 0% html4 +_UFlat6-8 296MB/s ± 0% txt1 +_UFlat7-8 288MB/s ± 0% txt2 +_UFlat8-8 309MB/s ± 1% txt3 +_UFlat9-8 280MB/s ± 1% txt4 +_UFlat10-8 753MB/s ± 0% pb +_UFlat11-8 400MB/s ± 0% gaviota + +_ZFlat0-8 409MB/s ± 1% html +_ZFlat1-8 250MB/s ± 1% urls +_ZFlat2-8 12.3GB/s ± 1% jpg +_ZFlat3-8 132MB/s ± 0% jpg_200 +_ZFlat4-8 2.92GB/s ± 0% pdf +_ZFlat5-8 405MB/s ± 1% html4 +_ZFlat6-8 179MB/s ± 1% txt1 +_ZFlat7-8 170MB/s ± 1% txt2 +_ZFlat8-8 189MB/s ± 1% txt3 +_ZFlat9-8 164MB/s ± 1% txt4 +_ZFlat10-8 479MB/s ± 1% pb +_ZFlat11-8 270MB/s ± 1% gaviota + + + +For comparison (Go's encoded output is byte-for-byte identical to C++'s), here +are the numbers from C++ Snappy's + +make CXXFLAGS="-O2 -DNDEBUG -g" clean snappy_unittest.log && cat snappy_unittest.log + +BM_UFlat/0 2.4GB/s html +BM_UFlat/1 1.4GB/s urls +BM_UFlat/2 21.8GB/s jpg +BM_UFlat/3 1.5GB/s jpg_200 +BM_UFlat/4 13.3GB/s pdf +BM_UFlat/5 2.1GB/s html4 +BM_UFlat/6 1.0GB/s txt1 +BM_UFlat/7 959.4MB/s txt2 +BM_UFlat/8 1.0GB/s txt3 +BM_UFlat/9 864.5MB/s txt4 +BM_UFlat/10 2.9GB/s pb +BM_UFlat/11 1.2GB/s gaviota + +BM_ZFlat/0 944.3MB/s html (22.31 %) +BM_ZFlat/1 501.6MB/s urls (47.78 %) +BM_ZFlat/2 14.3GB/s jpg (99.95 %) +BM_ZFlat/3 538.3MB/s jpg_200 (73.00 %) +BM_ZFlat/4 8.3GB/s pdf (83.30 %) +BM_ZFlat/5 903.5MB/s html4 (22.52 %) +BM_ZFlat/6 336.0MB/s txt1 (57.88 %) +BM_ZFlat/7 312.3MB/s txt2 (61.91 %) +BM_ZFlat/8 353.1MB/s txt3 (54.99 %) +BM_ZFlat/9 289.9MB/s txt4 (66.26 %) +BM_ZFlat/10 1.2GB/s pb (19.68 %) +BM_ZFlat/11 527.4MB/s gaviota (37.72 %) diff --git a/vendor/github.com/golang/snappy/decode.go b/vendor/github.com/golang/snappy/decode.go new file mode 100644 index 000000000..72efb0353 --- /dev/null +++ b/vendor/github.com/golang/snappy/decode.go @@ -0,0 +1,237 @@ +// Copyright 2011 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package snappy + +import ( + "encoding/binary" + "errors" + "io" +) + +var ( + // ErrCorrupt reports that the input is invalid. + ErrCorrupt = errors.New("snappy: corrupt input") + // ErrTooLarge reports that the uncompressed length is too large. + ErrTooLarge = errors.New("snappy: decoded block is too large") + // ErrUnsupported reports that the input isn't supported. + ErrUnsupported = errors.New("snappy: unsupported input") + + errUnsupportedLiteralLength = errors.New("snappy: unsupported literal length") +) + +// DecodedLen returns the length of the decoded block. +func DecodedLen(src []byte) (int, error) { + v, _, err := decodedLen(src) + return v, err +} + +// decodedLen returns the length of the decoded block and the number of bytes +// that the length header occupied. +func decodedLen(src []byte) (blockLen, headerLen int, err error) { + v, n := binary.Uvarint(src) + if n <= 0 || v > 0xffffffff { + return 0, 0, ErrCorrupt + } + + const wordSize = 32 << (^uint(0) >> 32 & 1) + if wordSize == 32 && v > 0x7fffffff { + return 0, 0, ErrTooLarge + } + return int(v), n, nil +} + +const ( + decodeErrCodeCorrupt = 1 + decodeErrCodeUnsupportedLiteralLength = 2 +) + +// Decode returns the decoded form of src. The returned slice may be a sub- +// slice of dst if dst was large enough to hold the entire decoded block. +// Otherwise, a newly allocated slice will be returned. +// +// The dst and src must not overlap. It is valid to pass a nil dst. +func Decode(dst, src []byte) ([]byte, error) { + dLen, s, err := decodedLen(src) + if err != nil { + return nil, err + } + if dLen <= len(dst) { + dst = dst[:dLen] + } else { + dst = make([]byte, dLen) + } + switch decode(dst, src[s:]) { + case 0: + return dst, nil + case decodeErrCodeUnsupportedLiteralLength: + return nil, errUnsupportedLiteralLength + } + return nil, ErrCorrupt +} + +// NewReader returns a new Reader that decompresses from r, using the framing +// format described at +// https://github.com/google/snappy/blob/master/framing_format.txt +func NewReader(r io.Reader) *Reader { + return &Reader{ + r: r, + decoded: make([]byte, maxBlockSize), + buf: make([]byte, maxEncodedLenOfMaxBlockSize+checksumSize), + } +} + +// Reader is an io.Reader that can read Snappy-compressed bytes. +type Reader struct { + r io.Reader + err error + decoded []byte + buf []byte + // decoded[i:j] contains decoded bytes that have not yet been passed on. + i, j int + readHeader bool +} + +// Reset discards any buffered data, resets all state, and switches the Snappy +// reader to read from r. This permits reusing a Reader rather than allocating +// a new one. +func (r *Reader) Reset(reader io.Reader) { + r.r = reader + r.err = nil + r.i = 0 + r.j = 0 + r.readHeader = false +} + +func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) { + if _, r.err = io.ReadFull(r.r, p); r.err != nil { + if r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) { + r.err = ErrCorrupt + } + return false + } + return true +} + +// Read satisfies the io.Reader interface. +func (r *Reader) Read(p []byte) (int, error) { + if r.err != nil { + return 0, r.err + } + for { + if r.i < r.j { + n := copy(p, r.decoded[r.i:r.j]) + r.i += n + return n, nil + } + if !r.readFull(r.buf[:4], true) { + return 0, r.err + } + chunkType := r.buf[0] + if !r.readHeader { + if chunkType != chunkTypeStreamIdentifier { + r.err = ErrCorrupt + return 0, r.err + } + r.readHeader = true + } + chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16 + if chunkLen > len(r.buf) { + r.err = ErrUnsupported + return 0, r.err + } + + // The chunk types are specified at + // https://github.com/google/snappy/blob/master/framing_format.txt + switch chunkType { + case chunkTypeCompressedData: + // Section 4.2. Compressed data (chunk type 0x00). + if chunkLen < checksumSize { + r.err = ErrCorrupt + return 0, r.err + } + buf := r.buf[:chunkLen] + if !r.readFull(buf, false) { + return 0, r.err + } + checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 + buf = buf[checksumSize:] + + n, err := DecodedLen(buf) + if err != nil { + r.err = err + return 0, r.err + } + if n > len(r.decoded) { + r.err = ErrCorrupt + return 0, r.err + } + if _, err := Decode(r.decoded, buf); err != nil { + r.err = err + return 0, r.err + } + if crc(r.decoded[:n]) != checksum { + r.err = ErrCorrupt + return 0, r.err + } + r.i, r.j = 0, n + continue + + case chunkTypeUncompressedData: + // Section 4.3. Uncompressed data (chunk type 0x01). + if chunkLen < checksumSize { + r.err = ErrCorrupt + return 0, r.err + } + buf := r.buf[:checksumSize] + if !r.readFull(buf, false) { + return 0, r.err + } + checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 + // Read directly into r.decoded instead of via r.buf. + n := chunkLen - checksumSize + if n > len(r.decoded) { + r.err = ErrCorrupt + return 0, r.err + } + if !r.readFull(r.decoded[:n], false) { + return 0, r.err + } + if crc(r.decoded[:n]) != checksum { + r.err = ErrCorrupt + return 0, r.err + } + r.i, r.j = 0, n + continue + + case chunkTypeStreamIdentifier: + // Section 4.1. Stream identifier (chunk type 0xff). + if chunkLen != len(magicBody) { + r.err = ErrCorrupt + return 0, r.err + } + if !r.readFull(r.buf[:len(magicBody)], false) { + return 0, r.err + } + for i := 0; i < len(magicBody); i++ { + if r.buf[i] != magicBody[i] { + r.err = ErrCorrupt + return 0, r.err + } + } + continue + } + + if chunkType <= 0x7f { + // Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f). + r.err = ErrUnsupported + return 0, r.err + } + // Section 4.4 Padding (chunk type 0xfe). + // Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd). + if !r.readFull(r.buf[:chunkLen], false) { + return 0, r.err + } + } +} diff --git a/vendor/github.com/golang/snappy/decode_amd64.go b/vendor/github.com/golang/snappy/decode_amd64.go new file mode 100644 index 000000000..fcd192b84 --- /dev/null +++ b/vendor/github.com/golang/snappy/decode_amd64.go @@ -0,0 +1,14 @@ +// Copyright 2016 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !appengine +// +build gc +// +build !noasm + +package snappy + +// decode has the same semantics as in decode_other.go. +// +//go:noescape +func decode(dst, src []byte) int diff --git a/vendor/github.com/golang/snappy/decode_amd64.s b/vendor/github.com/golang/snappy/decode_amd64.s new file mode 100644 index 000000000..e6179f65e --- /dev/null +++ b/vendor/github.com/golang/snappy/decode_amd64.s @@ -0,0 +1,490 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !appengine +// +build gc +// +build !noasm + +#include "textflag.h" + +// The asm code generally follows the pure Go code in decode_other.go, except +// where marked with a "!!!". + +// func decode(dst, src []byte) int +// +// All local variables fit into registers. The non-zero stack size is only to +// spill registers and push args when issuing a CALL. The register allocation: +// - AX scratch +// - BX scratch +// - CX length or x +// - DX offset +// - SI &src[s] +// - DI &dst[d] +// + R8 dst_base +// + R9 dst_len +// + R10 dst_base + dst_len +// + R11 src_base +// + R12 src_len +// + R13 src_base + src_len +// - R14 used by doCopy +// - R15 used by doCopy +// +// The registers R8-R13 (marked with a "+") are set at the start of the +// function, and after a CALL returns, and are not otherwise modified. +// +// The d variable is implicitly DI - R8, and len(dst)-d is R10 - DI. +// The s variable is implicitly SI - R11, and len(src)-s is R13 - SI. +TEXT ·decode(SB), NOSPLIT, $48-56 + // Initialize SI, DI and R8-R13. + MOVQ dst_base+0(FP), R8 + MOVQ dst_len+8(FP), R9 + MOVQ R8, DI + MOVQ R8, R10 + ADDQ R9, R10 + MOVQ src_base+24(FP), R11 + MOVQ src_len+32(FP), R12 + MOVQ R11, SI + MOVQ R11, R13 + ADDQ R12, R13 + +loop: + // for s < len(src) + CMPQ SI, R13 + JEQ end + + // CX = uint32(src[s]) + // + // switch src[s] & 0x03 + MOVBLZX (SI), CX + MOVL CX, BX + ANDL $3, BX + CMPL BX, $1 + JAE tagCopy + + // ---------------------------------------- + // The code below handles literal tags. + + // case tagLiteral: + // x := uint32(src[s] >> 2) + // switch + SHRL $2, CX + CMPL CX, $60 + JAE tagLit60Plus + + // case x < 60: + // s++ + INCQ SI + +doLit: + // This is the end of the inner "switch", when we have a literal tag. + // + // We assume that CX == x and x fits in a uint32, where x is the variable + // used in the pure Go decode_other.go code. + + // length = int(x) + 1 + // + // Unlike the pure Go code, we don't need to check if length <= 0 because + // CX can hold 64 bits, so the increment cannot overflow. + INCQ CX + + // Prepare to check if copying length bytes will run past the end of dst or + // src. + // + // AX = len(dst) - d + // BX = len(src) - s + MOVQ R10, AX + SUBQ DI, AX + MOVQ R13, BX + SUBQ SI, BX + + // !!! Try a faster technique for short (16 or fewer bytes) copies. + // + // if length > 16 || len(dst)-d < 16 || len(src)-s < 16 { + // goto callMemmove // Fall back on calling runtime·memmove. + // } + // + // The C++ snappy code calls this TryFastAppend. It also checks len(src)-s + // against 21 instead of 16, because it cannot assume that all of its input + // is contiguous in memory and so it needs to leave enough source bytes to + // read the next tag without refilling buffers, but Go's Decode assumes + // contiguousness (the src argument is a []byte). + CMPQ CX, $16 + JGT callMemmove + CMPQ AX, $16 + JLT callMemmove + CMPQ BX, $16 + JLT callMemmove + + // !!! Implement the copy from src to dst as a 16-byte load and store. + // (Decode's documentation says that dst and src must not overlap.) + // + // This always copies 16 bytes, instead of only length bytes, but that's + // OK. If the input is a valid Snappy encoding then subsequent iterations + // will fix up the overrun. Otherwise, Decode returns a nil []byte (and a + // non-nil error), so the overrun will be ignored. + // + // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or + // 16-byte loads and stores. This technique probably wouldn't be as + // effective on architectures that are fussier about alignment. + MOVOU 0(SI), X0 + MOVOU X0, 0(DI) + + // d += length + // s += length + ADDQ CX, DI + ADDQ CX, SI + JMP loop + +callMemmove: + // if length > len(dst)-d || length > len(src)-s { etc } + CMPQ CX, AX + JGT errCorrupt + CMPQ CX, BX + JGT errCorrupt + + // copy(dst[d:], src[s:s+length]) + // + // This means calling runtime·memmove(&dst[d], &src[s], length), so we push + // DI, SI and CX as arguments. Coincidentally, we also need to spill those + // three registers to the stack, to save local variables across the CALL. + MOVQ DI, 0(SP) + MOVQ SI, 8(SP) + MOVQ CX, 16(SP) + MOVQ DI, 24(SP) + MOVQ SI, 32(SP) + MOVQ CX, 40(SP) + CALL runtime·memmove(SB) + + // Restore local variables: unspill registers from the stack and + // re-calculate R8-R13. + MOVQ 24(SP), DI + MOVQ 32(SP), SI + MOVQ 40(SP), CX + MOVQ dst_base+0(FP), R8 + MOVQ dst_len+8(FP), R9 + MOVQ R8, R10 + ADDQ R9, R10 + MOVQ src_base+24(FP), R11 + MOVQ src_len+32(FP), R12 + MOVQ R11, R13 + ADDQ R12, R13 + + // d += length + // s += length + ADDQ CX, DI + ADDQ CX, SI + JMP loop + +tagLit60Plus: + // !!! This fragment does the + // + // s += x - 58; if uint(s) > uint(len(src)) { etc } + // + // checks. In the asm version, we code it once instead of once per switch case. + ADDQ CX, SI + SUBQ $58, SI + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // case x == 60: + CMPL CX, $61 + JEQ tagLit61 + JA tagLit62Plus + + // x = uint32(src[s-1]) + MOVBLZX -1(SI), CX + JMP doLit + +tagLit61: + // case x == 61: + // x = uint32(src[s-2]) | uint32(src[s-1])<<8 + MOVWLZX -2(SI), CX + JMP doLit + +tagLit62Plus: + CMPL CX, $62 + JA tagLit63 + + // case x == 62: + // x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16 + MOVWLZX -3(SI), CX + MOVBLZX -1(SI), BX + SHLL $16, BX + ORL BX, CX + JMP doLit + +tagLit63: + // case x == 63: + // x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 + MOVL -4(SI), CX + JMP doLit + +// The code above handles literal tags. +// ---------------------------------------- +// The code below handles copy tags. + +tagCopy4: + // case tagCopy4: + // s += 5 + ADDQ $5, SI + + // if uint(s) > uint(len(src)) { etc } + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // length = 1 + int(src[s-5])>>2 + SHRQ $2, CX + INCQ CX + + // offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24) + MOVLQZX -4(SI), DX + JMP doCopy + +tagCopy2: + // case tagCopy2: + // s += 3 + ADDQ $3, SI + + // if uint(s) > uint(len(src)) { etc } + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // length = 1 + int(src[s-3])>>2 + SHRQ $2, CX + INCQ CX + + // offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8) + MOVWQZX -2(SI), DX + JMP doCopy + +tagCopy: + // We have a copy tag. We assume that: + // - BX == src[s] & 0x03 + // - CX == src[s] + CMPQ BX, $2 + JEQ tagCopy2 + JA tagCopy4 + + // case tagCopy1: + // s += 2 + ADDQ $2, SI + + // if uint(s) > uint(len(src)) { etc } + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1])) + MOVQ CX, DX + ANDQ $0xe0, DX + SHLQ $3, DX + MOVBQZX -1(SI), BX + ORQ BX, DX + + // length = 4 + int(src[s-2])>>2&0x7 + SHRQ $2, CX + ANDQ $7, CX + ADDQ $4, CX + +doCopy: + // This is the end of the outer "switch", when we have a copy tag. + // + // We assume that: + // - CX == length && CX > 0 + // - DX == offset + + // if offset <= 0 { etc } + CMPQ DX, $0 + JLE errCorrupt + + // if d < offset { etc } + MOVQ DI, BX + SUBQ R8, BX + CMPQ BX, DX + JLT errCorrupt + + // if length > len(dst)-d { etc } + MOVQ R10, BX + SUBQ DI, BX + CMPQ CX, BX + JGT errCorrupt + + // forwardCopy(dst[d:d+length], dst[d-offset:]); d += length + // + // Set: + // - R14 = len(dst)-d + // - R15 = &dst[d-offset] + MOVQ R10, R14 + SUBQ DI, R14 + MOVQ DI, R15 + SUBQ DX, R15 + + // !!! Try a faster technique for short (16 or fewer bytes) forward copies. + // + // First, try using two 8-byte load/stores, similar to the doLit technique + // above. Even if dst[d:d+length] and dst[d-offset:] can overlap, this is + // still OK if offset >= 8. Note that this has to be two 8-byte load/stores + // and not one 16-byte load/store, and the first store has to be before the + // second load, due to the overlap if offset is in the range [8, 16). + // + // if length > 16 || offset < 8 || len(dst)-d < 16 { + // goto slowForwardCopy + // } + // copy 16 bytes + // d += length + CMPQ CX, $16 + JGT slowForwardCopy + CMPQ DX, $8 + JLT slowForwardCopy + CMPQ R14, $16 + JLT slowForwardCopy + MOVQ 0(R15), AX + MOVQ AX, 0(DI) + MOVQ 8(R15), BX + MOVQ BX, 8(DI) + ADDQ CX, DI + JMP loop + +slowForwardCopy: + // !!! If the forward copy is longer than 16 bytes, or if offset < 8, we + // can still try 8-byte load stores, provided we can overrun up to 10 extra + // bytes. As above, the overrun will be fixed up by subsequent iterations + // of the outermost loop. + // + // The C++ snappy code calls this technique IncrementalCopyFastPath. Its + // commentary says: + // + // ---- + // + // The main part of this loop is a simple copy of eight bytes at a time + // until we've copied (at least) the requested amount of bytes. However, + // if d and d-offset are less than eight bytes apart (indicating a + // repeating pattern of length < 8), we first need to expand the pattern in + // order to get the correct results. For instance, if the buffer looks like + // this, with the eight-byte and patterns marked as + // intervals: + // + // abxxxxxxxxxxxx + // [------] d-offset + // [------] d + // + // a single eight-byte copy from to will repeat the pattern + // once, after which we can move two bytes without moving : + // + // ababxxxxxxxxxx + // [------] d-offset + // [------] d + // + // and repeat the exercise until the two no longer overlap. + // + // This allows us to do very well in the special case of one single byte + // repeated many times, without taking a big hit for more general cases. + // + // The worst case of extra writing past the end of the match occurs when + // offset == 1 and length == 1; the last copy will read from byte positions + // [0..7] and write to [4..11], whereas it was only supposed to write to + // position 1. Thus, ten excess bytes. + // + // ---- + // + // That "10 byte overrun" worst case is confirmed by Go's + // TestSlowForwardCopyOverrun, which also tests the fixUpSlowForwardCopy + // and finishSlowForwardCopy algorithm. + // + // if length > len(dst)-d-10 { + // goto verySlowForwardCopy + // } + SUBQ $10, R14 + CMPQ CX, R14 + JGT verySlowForwardCopy + +makeOffsetAtLeast8: + // !!! As above, expand the pattern so that offset >= 8 and we can use + // 8-byte load/stores. + // + // for offset < 8 { + // copy 8 bytes from dst[d-offset:] to dst[d:] + // length -= offset + // d += offset + // offset += offset + // // The two previous lines together means that d-offset, and therefore + // // R15, is unchanged. + // } + CMPQ DX, $8 + JGE fixUpSlowForwardCopy + MOVQ (R15), BX + MOVQ BX, (DI) + SUBQ DX, CX + ADDQ DX, DI + ADDQ DX, DX + JMP makeOffsetAtLeast8 + +fixUpSlowForwardCopy: + // !!! Add length (which might be negative now) to d (implied by DI being + // &dst[d]) so that d ends up at the right place when we jump back to the + // top of the loop. Before we do that, though, we save DI to AX so that, if + // length is positive, copying the remaining length bytes will write to the + // right place. + MOVQ DI, AX + ADDQ CX, DI + +finishSlowForwardCopy: + // !!! Repeat 8-byte load/stores until length <= 0. Ending with a negative + // length means that we overrun, but as above, that will be fixed up by + // subsequent iterations of the outermost loop. + CMPQ CX, $0 + JLE loop + MOVQ (R15), BX + MOVQ BX, (AX) + ADDQ $8, R15 + ADDQ $8, AX + SUBQ $8, CX + JMP finishSlowForwardCopy + +verySlowForwardCopy: + // verySlowForwardCopy is a simple implementation of forward copy. In C + // parlance, this is a do/while loop instead of a while loop, since we know + // that length > 0. In Go syntax: + // + // for { + // dst[d] = dst[d - offset] + // d++ + // length-- + // if length == 0 { + // break + // } + // } + MOVB (R15), BX + MOVB BX, (DI) + INCQ R15 + INCQ DI + DECQ CX + JNZ verySlowForwardCopy + JMP loop + +// The code above handles copy tags. +// ---------------------------------------- + +end: + // This is the end of the "for s < len(src)". + // + // if d != len(dst) { etc } + CMPQ DI, R10 + JNE errCorrupt + + // return 0 + MOVQ $0, ret+48(FP) + RET + +errCorrupt: + // return decodeErrCodeCorrupt + MOVQ $1, ret+48(FP) + RET diff --git a/vendor/github.com/golang/snappy/decode_other.go b/vendor/github.com/golang/snappy/decode_other.go new file mode 100644 index 000000000..8c9f2049b --- /dev/null +++ b/vendor/github.com/golang/snappy/decode_other.go @@ -0,0 +1,101 @@ +// Copyright 2016 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !amd64 appengine !gc noasm + +package snappy + +// decode writes the decoding of src to dst. It assumes that the varint-encoded +// length of the decompressed bytes has already been read, and that len(dst) +// equals that length. +// +// It returns 0 on success or a decodeErrCodeXxx error code on failure. +func decode(dst, src []byte) int { + var d, s, offset, length int + for s < len(src) { + switch src[s] & 0x03 { + case tagLiteral: + x := uint32(src[s] >> 2) + switch { + case x < 60: + s++ + case x == 60: + s += 2 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-1]) + case x == 61: + s += 3 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-2]) | uint32(src[s-1])<<8 + case x == 62: + s += 4 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16 + case x == 63: + s += 5 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 + } + length = int(x) + 1 + if length <= 0 { + return decodeErrCodeUnsupportedLiteralLength + } + if length > len(dst)-d || length > len(src)-s { + return decodeErrCodeCorrupt + } + copy(dst[d:], src[s:s+length]) + d += length + s += length + continue + + case tagCopy1: + s += 2 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + length = 4 + int(src[s-2])>>2&0x7 + offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1])) + + case tagCopy2: + s += 3 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + length = 1 + int(src[s-3])>>2 + offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8) + + case tagCopy4: + s += 5 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + length = 1 + int(src[s-5])>>2 + offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24) + } + + if offset <= 0 || d < offset || length > len(dst)-d { + return decodeErrCodeCorrupt + } + // Copy from an earlier sub-slice of dst to a later sub-slice. Unlike + // the built-in copy function, this byte-by-byte copy always runs + // forwards, even if the slices overlap. Conceptually, this is: + // + // d += forwardCopy(dst[d:d+length], dst[d-offset:]) + for end := d + length; d != end; d++ { + dst[d] = dst[d-offset] + } + } + if d != len(dst) { + return decodeErrCodeCorrupt + } + return 0 +} diff --git a/vendor/github.com/golang/snappy/encode.go b/vendor/github.com/golang/snappy/encode.go new file mode 100644 index 000000000..8d393e904 --- /dev/null +++ b/vendor/github.com/golang/snappy/encode.go @@ -0,0 +1,285 @@ +// Copyright 2011 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package snappy + +import ( + "encoding/binary" + "errors" + "io" +) + +// Encode returns the encoded form of src. The returned slice may be a sub- +// slice of dst if dst was large enough to hold the entire encoded block. +// Otherwise, a newly allocated slice will be returned. +// +// The dst and src must not overlap. It is valid to pass a nil dst. +func Encode(dst, src []byte) []byte { + if n := MaxEncodedLen(len(src)); n < 0 { + panic(ErrTooLarge) + } else if len(dst) < n { + dst = make([]byte, n) + } + + // The block starts with the varint-encoded length of the decompressed bytes. + d := binary.PutUvarint(dst, uint64(len(src))) + + for len(src) > 0 { + p := src + src = nil + if len(p) > maxBlockSize { + p, src = p[:maxBlockSize], p[maxBlockSize:] + } + if len(p) < minNonLiteralBlockSize { + d += emitLiteral(dst[d:], p) + } else { + d += encodeBlock(dst[d:], p) + } + } + return dst[:d] +} + +// inputMargin is the minimum number of extra input bytes to keep, inside +// encodeBlock's inner loop. On some architectures, this margin lets us +// implement a fast path for emitLiteral, where the copy of short (<= 16 byte) +// literals can be implemented as a single load to and store from a 16-byte +// register. That literal's actual length can be as short as 1 byte, so this +// can copy up to 15 bytes too much, but that's OK as subsequent iterations of +// the encoding loop will fix up the copy overrun, and this inputMargin ensures +// that we don't overrun the dst and src buffers. +const inputMargin = 16 - 1 + +// minNonLiteralBlockSize is the minimum size of the input to encodeBlock that +// could be encoded with a copy tag. This is the minimum with respect to the +// algorithm used by encodeBlock, not a minimum enforced by the file format. +// +// The encoded output must start with at least a 1 byte literal, as there are +// no previous bytes to copy. A minimal (1 byte) copy after that, generated +// from an emitCopy call in encodeBlock's main loop, would require at least +// another inputMargin bytes, for the reason above: we want any emitLiteral +// calls inside encodeBlock's main loop to use the fast path if possible, which +// requires being able to overrun by inputMargin bytes. Thus, +// minNonLiteralBlockSize equals 1 + 1 + inputMargin. +// +// The C++ code doesn't use this exact threshold, but it could, as discussed at +// https://groups.google.com/d/topic/snappy-compression/oGbhsdIJSJ8/discussion +// The difference between Go (2+inputMargin) and C++ (inputMargin) is purely an +// optimization. It should not affect the encoded form. This is tested by +// TestSameEncodingAsCppShortCopies. +const minNonLiteralBlockSize = 1 + 1 + inputMargin + +// MaxEncodedLen returns the maximum length of a snappy block, given its +// uncompressed length. +// +// It will return a negative value if srcLen is too large to encode. +func MaxEncodedLen(srcLen int) int { + n := uint64(srcLen) + if n > 0xffffffff { + return -1 + } + // Compressed data can be defined as: + // compressed := item* literal* + // item := literal* copy + // + // The trailing literal sequence has a space blowup of at most 62/60 + // since a literal of length 60 needs one tag byte + one extra byte + // for length information. + // + // Item blowup is trickier to measure. Suppose the "copy" op copies + // 4 bytes of data. Because of a special check in the encoding code, + // we produce a 4-byte copy only if the offset is < 65536. Therefore + // the copy op takes 3 bytes to encode, and this type of item leads + // to at most the 62/60 blowup for representing literals. + // + // Suppose the "copy" op copies 5 bytes of data. If the offset is big + // enough, it will take 5 bytes to encode the copy op. Therefore the + // worst case here is a one-byte literal followed by a five-byte copy. + // That is, 6 bytes of input turn into 7 bytes of "compressed" data. + // + // This last factor dominates the blowup, so the final estimate is: + n = 32 + n + n/6 + if n > 0xffffffff { + return -1 + } + return int(n) +} + +var errClosed = errors.New("snappy: Writer is closed") + +// NewWriter returns a new Writer that compresses to w. +// +// The Writer returned does not buffer writes. There is no need to Flush or +// Close such a Writer. +// +// Deprecated: the Writer returned is not suitable for many small writes, only +// for few large writes. Use NewBufferedWriter instead, which is efficient +// regardless of the frequency and shape of the writes, and remember to Close +// that Writer when done. +func NewWriter(w io.Writer) *Writer { + return &Writer{ + w: w, + obuf: make([]byte, obufLen), + } +} + +// NewBufferedWriter returns a new Writer that compresses to w, using the +// framing format described at +// https://github.com/google/snappy/blob/master/framing_format.txt +// +// The Writer returned buffers writes. Users must call Close to guarantee all +// data has been forwarded to the underlying io.Writer. They may also call +// Flush zero or more times before calling Close. +func NewBufferedWriter(w io.Writer) *Writer { + return &Writer{ + w: w, + ibuf: make([]byte, 0, maxBlockSize), + obuf: make([]byte, obufLen), + } +} + +// Writer is an io.Writer that can write Snappy-compressed bytes. +type Writer struct { + w io.Writer + err error + + // ibuf is a buffer for the incoming (uncompressed) bytes. + // + // Its use is optional. For backwards compatibility, Writers created by the + // NewWriter function have ibuf == nil, do not buffer incoming bytes, and + // therefore do not need to be Flush'ed or Close'd. + ibuf []byte + + // obuf is a buffer for the outgoing (compressed) bytes. + obuf []byte + + // wroteStreamHeader is whether we have written the stream header. + wroteStreamHeader bool +} + +// Reset discards the writer's state and switches the Snappy writer to write to +// w. This permits reusing a Writer rather than allocating a new one. +func (w *Writer) Reset(writer io.Writer) { + w.w = writer + w.err = nil + if w.ibuf != nil { + w.ibuf = w.ibuf[:0] + } + w.wroteStreamHeader = false +} + +// Write satisfies the io.Writer interface. +func (w *Writer) Write(p []byte) (nRet int, errRet error) { + if w.ibuf == nil { + // Do not buffer incoming bytes. This does not perform or compress well + // if the caller of Writer.Write writes many small slices. This + // behavior is therefore deprecated, but still supported for backwards + // compatibility with code that doesn't explicitly Flush or Close. + return w.write(p) + } + + // The remainder of this method is based on bufio.Writer.Write from the + // standard library. + + for len(p) > (cap(w.ibuf)-len(w.ibuf)) && w.err == nil { + var n int + if len(w.ibuf) == 0 { + // Large write, empty buffer. + // Write directly from p to avoid copy. + n, _ = w.write(p) + } else { + n = copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p) + w.ibuf = w.ibuf[:len(w.ibuf)+n] + w.Flush() + } + nRet += n + p = p[n:] + } + if w.err != nil { + return nRet, w.err + } + n := copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p) + w.ibuf = w.ibuf[:len(w.ibuf)+n] + nRet += n + return nRet, nil +} + +func (w *Writer) write(p []byte) (nRet int, errRet error) { + if w.err != nil { + return 0, w.err + } + for len(p) > 0 { + obufStart := len(magicChunk) + if !w.wroteStreamHeader { + w.wroteStreamHeader = true + copy(w.obuf, magicChunk) + obufStart = 0 + } + + var uncompressed []byte + if len(p) > maxBlockSize { + uncompressed, p = p[:maxBlockSize], p[maxBlockSize:] + } else { + uncompressed, p = p, nil + } + checksum := crc(uncompressed) + + // Compress the buffer, discarding the result if the improvement + // isn't at least 12.5%. + compressed := Encode(w.obuf[obufHeaderLen:], uncompressed) + chunkType := uint8(chunkTypeCompressedData) + chunkLen := 4 + len(compressed) + obufEnd := obufHeaderLen + len(compressed) + if len(compressed) >= len(uncompressed)-len(uncompressed)/8 { + chunkType = chunkTypeUncompressedData + chunkLen = 4 + len(uncompressed) + obufEnd = obufHeaderLen + } + + // Fill in the per-chunk header that comes before the body. + w.obuf[len(magicChunk)+0] = chunkType + w.obuf[len(magicChunk)+1] = uint8(chunkLen >> 0) + w.obuf[len(magicChunk)+2] = uint8(chunkLen >> 8) + w.obuf[len(magicChunk)+3] = uint8(chunkLen >> 16) + w.obuf[len(magicChunk)+4] = uint8(checksum >> 0) + w.obuf[len(magicChunk)+5] = uint8(checksum >> 8) + w.obuf[len(magicChunk)+6] = uint8(checksum >> 16) + w.obuf[len(magicChunk)+7] = uint8(checksum >> 24) + + if _, err := w.w.Write(w.obuf[obufStart:obufEnd]); err != nil { + w.err = err + return nRet, err + } + if chunkType == chunkTypeUncompressedData { + if _, err := w.w.Write(uncompressed); err != nil { + w.err = err + return nRet, err + } + } + nRet += len(uncompressed) + } + return nRet, nil +} + +// Flush flushes the Writer to its underlying io.Writer. +func (w *Writer) Flush() error { + if w.err != nil { + return w.err + } + if len(w.ibuf) == 0 { + return nil + } + w.write(w.ibuf) + w.ibuf = w.ibuf[:0] + return w.err +} + +// Close calls Flush and then closes the Writer. +func (w *Writer) Close() error { + w.Flush() + ret := w.err + if w.err == nil { + w.err = errClosed + } + return ret +} diff --git a/vendor/github.com/golang/snappy/encode_amd64.go b/vendor/github.com/golang/snappy/encode_amd64.go new file mode 100644 index 000000000..150d91bc8 --- /dev/null +++ b/vendor/github.com/golang/snappy/encode_amd64.go @@ -0,0 +1,29 @@ +// Copyright 2016 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !appengine +// +build gc +// +build !noasm + +package snappy + +// emitLiteral has the same semantics as in encode_other.go. +// +//go:noescape +func emitLiteral(dst, lit []byte) int + +// emitCopy has the same semantics as in encode_other.go. +// +//go:noescape +func emitCopy(dst []byte, offset, length int) int + +// extendMatch has the same semantics as in encode_other.go. +// +//go:noescape +func extendMatch(src []byte, i, j int) int + +// encodeBlock has the same semantics as in encode_other.go. +// +//go:noescape +func encodeBlock(dst, src []byte) (d int) diff --git a/vendor/github.com/golang/snappy/encode_amd64.s b/vendor/github.com/golang/snappy/encode_amd64.s new file mode 100644 index 000000000..adfd979fe --- /dev/null +++ b/vendor/github.com/golang/snappy/encode_amd64.s @@ -0,0 +1,730 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !appengine +// +build gc +// +build !noasm + +#include "textflag.h" + +// The XXX lines assemble on Go 1.4, 1.5 and 1.7, but not 1.6, due to a +// Go toolchain regression. See https://github.com/golang/go/issues/15426 and +// https://github.com/golang/snappy/issues/29 +// +// As a workaround, the package was built with a known good assembler, and +// those instructions were disassembled by "objdump -d" to yield the +// 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15 +// style comments, in AT&T asm syntax. Note that rsp here is a physical +// register, not Go/asm's SP pseudo-register (see https://golang.org/doc/asm). +// The instructions were then encoded as "BYTE $0x.." sequences, which assemble +// fine on Go 1.6. + +// The asm code generally follows the pure Go code in encode_other.go, except +// where marked with a "!!!". + +// ---------------------------------------------------------------------------- + +// func emitLiteral(dst, lit []byte) int +// +// All local variables fit into registers. The register allocation: +// - AX len(lit) +// - BX n +// - DX return value +// - DI &dst[i] +// - R10 &lit[0] +// +// The 24 bytes of stack space is to call runtime·memmove. +// +// The unusual register allocation of local variables, such as R10 for the +// source pointer, matches the allocation used at the call site in encodeBlock, +// which makes it easier to manually inline this function. +TEXT ·emitLiteral(SB), NOSPLIT, $24-56 + MOVQ dst_base+0(FP), DI + MOVQ lit_base+24(FP), R10 + MOVQ lit_len+32(FP), AX + MOVQ AX, DX + MOVL AX, BX + SUBL $1, BX + + CMPL BX, $60 + JLT oneByte + CMPL BX, $256 + JLT twoBytes + +threeBytes: + MOVB $0xf4, 0(DI) + MOVW BX, 1(DI) + ADDQ $3, DI + ADDQ $3, DX + JMP memmove + +twoBytes: + MOVB $0xf0, 0(DI) + MOVB BX, 1(DI) + ADDQ $2, DI + ADDQ $2, DX + JMP memmove + +oneByte: + SHLB $2, BX + MOVB BX, 0(DI) + ADDQ $1, DI + ADDQ $1, DX + +memmove: + MOVQ DX, ret+48(FP) + + // copy(dst[i:], lit) + // + // This means calling runtime·memmove(&dst[i], &lit[0], len(lit)), so we push + // DI, R10 and AX as arguments. + MOVQ DI, 0(SP) + MOVQ R10, 8(SP) + MOVQ AX, 16(SP) + CALL runtime·memmove(SB) + RET + +// ---------------------------------------------------------------------------- + +// func emitCopy(dst []byte, offset, length int) int +// +// All local variables fit into registers. The register allocation: +// - AX length +// - SI &dst[0] +// - DI &dst[i] +// - R11 offset +// +// The unusual register allocation of local variables, such as R11 for the +// offset, matches the allocation used at the call site in encodeBlock, which +// makes it easier to manually inline this function. +TEXT ·emitCopy(SB), NOSPLIT, $0-48 + MOVQ dst_base+0(FP), DI + MOVQ DI, SI + MOVQ offset+24(FP), R11 + MOVQ length+32(FP), AX + +loop0: + // for length >= 68 { etc } + CMPL AX, $68 + JLT step1 + + // Emit a length 64 copy, encoded as 3 bytes. + MOVB $0xfe, 0(DI) + MOVW R11, 1(DI) + ADDQ $3, DI + SUBL $64, AX + JMP loop0 + +step1: + // if length > 64 { etc } + CMPL AX, $64 + JLE step2 + + // Emit a length 60 copy, encoded as 3 bytes. + MOVB $0xee, 0(DI) + MOVW R11, 1(DI) + ADDQ $3, DI + SUBL $60, AX + +step2: + // if length >= 12 || offset >= 2048 { goto step3 } + CMPL AX, $12 + JGE step3 + CMPL R11, $2048 + JGE step3 + + // Emit the remaining copy, encoded as 2 bytes. + MOVB R11, 1(DI) + SHRL $8, R11 + SHLB $5, R11 + SUBB $4, AX + SHLB $2, AX + ORB AX, R11 + ORB $1, R11 + MOVB R11, 0(DI) + ADDQ $2, DI + + // Return the number of bytes written. + SUBQ SI, DI + MOVQ DI, ret+40(FP) + RET + +step3: + // Emit the remaining copy, encoded as 3 bytes. + SUBL $1, AX + SHLB $2, AX + ORB $2, AX + MOVB AX, 0(DI) + MOVW R11, 1(DI) + ADDQ $3, DI + + // Return the number of bytes written. + SUBQ SI, DI + MOVQ DI, ret+40(FP) + RET + +// ---------------------------------------------------------------------------- + +// func extendMatch(src []byte, i, j int) int +// +// All local variables fit into registers. The register allocation: +// - DX &src[0] +// - SI &src[j] +// - R13 &src[len(src) - 8] +// - R14 &src[len(src)] +// - R15 &src[i] +// +// The unusual register allocation of local variables, such as R15 for a source +// pointer, matches the allocation used at the call site in encodeBlock, which +// makes it easier to manually inline this function. +TEXT ·extendMatch(SB), NOSPLIT, $0-48 + MOVQ src_base+0(FP), DX + MOVQ src_len+8(FP), R14 + MOVQ i+24(FP), R15 + MOVQ j+32(FP), SI + ADDQ DX, R14 + ADDQ DX, R15 + ADDQ DX, SI + MOVQ R14, R13 + SUBQ $8, R13 + +cmp8: + // As long as we are 8 or more bytes before the end of src, we can load and + // compare 8 bytes at a time. If those 8 bytes are equal, repeat. + CMPQ SI, R13 + JA cmp1 + MOVQ (R15), AX + MOVQ (SI), BX + CMPQ AX, BX + JNE bsf + ADDQ $8, R15 + ADDQ $8, SI + JMP cmp8 + +bsf: + // If those 8 bytes were not equal, XOR the two 8 byte values, and return + // the index of the first byte that differs. The BSF instruction finds the + // least significant 1 bit, the amd64 architecture is little-endian, and + // the shift by 3 converts a bit index to a byte index. + XORQ AX, BX + BSFQ BX, BX + SHRQ $3, BX + ADDQ BX, SI + + // Convert from &src[ret] to ret. + SUBQ DX, SI + MOVQ SI, ret+40(FP) + RET + +cmp1: + // In src's tail, compare 1 byte at a time. + CMPQ SI, R14 + JAE extendMatchEnd + MOVB (R15), AX + MOVB (SI), BX + CMPB AX, BX + JNE extendMatchEnd + ADDQ $1, R15 + ADDQ $1, SI + JMP cmp1 + +extendMatchEnd: + // Convert from &src[ret] to ret. + SUBQ DX, SI + MOVQ SI, ret+40(FP) + RET + +// ---------------------------------------------------------------------------- + +// func encodeBlock(dst, src []byte) (d int) +// +// All local variables fit into registers, other than "var table". The register +// allocation: +// - AX . . +// - BX . . +// - CX 56 shift (note that amd64 shifts by non-immediates must use CX). +// - DX 64 &src[0], tableSize +// - SI 72 &src[s] +// - DI 80 &dst[d] +// - R9 88 sLimit +// - R10 . &src[nextEmit] +// - R11 96 prevHash, currHash, nextHash, offset +// - R12 104 &src[base], skip +// - R13 . &src[nextS], &src[len(src) - 8] +// - R14 . len(src), bytesBetweenHashLookups, &src[len(src)], x +// - R15 112 candidate +// +// The second column (56, 64, etc) is the stack offset to spill the registers +// when calling other functions. We could pack this slightly tighter, but it's +// simpler to have a dedicated spill map independent of the function called. +// +// "var table [maxTableSize]uint16" takes up 32768 bytes of stack space. An +// extra 56 bytes, to call other functions, and an extra 64 bytes, to spill +// local variables (registers) during calls gives 32768 + 56 + 64 = 32888. +TEXT ·encodeBlock(SB), 0, $32888-56 + MOVQ dst_base+0(FP), DI + MOVQ src_base+24(FP), SI + MOVQ src_len+32(FP), R14 + + // shift, tableSize := uint32(32-8), 1<<8 + MOVQ $24, CX + MOVQ $256, DX + +calcShift: + // for ; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 { + // shift-- + // } + CMPQ DX, $16384 + JGE varTable + CMPQ DX, R14 + JGE varTable + SUBQ $1, CX + SHLQ $1, DX + JMP calcShift + +varTable: + // var table [maxTableSize]uint16 + // + // In the asm code, unlike the Go code, we can zero-initialize only the + // first tableSize elements. Each uint16 element is 2 bytes and each MOVOU + // writes 16 bytes, so we can do only tableSize/8 writes instead of the + // 2048 writes that would zero-initialize all of table's 32768 bytes. + SHRQ $3, DX + LEAQ table-32768(SP), BX + PXOR X0, X0 + +memclr: + MOVOU X0, 0(BX) + ADDQ $16, BX + SUBQ $1, DX + JNZ memclr + + // !!! DX = &src[0] + MOVQ SI, DX + + // sLimit := len(src) - inputMargin + MOVQ R14, R9 + SUBQ $15, R9 + + // !!! Pre-emptively spill CX, DX and R9 to the stack. Their values don't + // change for the rest of the function. + MOVQ CX, 56(SP) + MOVQ DX, 64(SP) + MOVQ R9, 88(SP) + + // nextEmit := 0 + MOVQ DX, R10 + + // s := 1 + ADDQ $1, SI + + // nextHash := hash(load32(src, s), shift) + MOVL 0(SI), R11 + IMULL $0x1e35a7bd, R11 + SHRL CX, R11 + +outer: + // for { etc } + + // skip := 32 + MOVQ $32, R12 + + // nextS := s + MOVQ SI, R13 + + // candidate := 0 + MOVQ $0, R15 + +inner0: + // for { etc } + + // s := nextS + MOVQ R13, SI + + // bytesBetweenHashLookups := skip >> 5 + MOVQ R12, R14 + SHRQ $5, R14 + + // nextS = s + bytesBetweenHashLookups + ADDQ R14, R13 + + // skip += bytesBetweenHashLookups + ADDQ R14, R12 + + // if nextS > sLimit { goto emitRemainder } + MOVQ R13, AX + SUBQ DX, AX + CMPQ AX, R9 + JA emitRemainder + + // candidate = int(table[nextHash]) + // XXX: MOVWQZX table-32768(SP)(R11*2), R15 + // XXX: 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15 + BYTE $0x4e + BYTE $0x0f + BYTE $0xb7 + BYTE $0x7c + BYTE $0x5c + BYTE $0x78 + + // table[nextHash] = uint16(s) + MOVQ SI, AX + SUBQ DX, AX + + // XXX: MOVW AX, table-32768(SP)(R11*2) + // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2) + BYTE $0x66 + BYTE $0x42 + BYTE $0x89 + BYTE $0x44 + BYTE $0x5c + BYTE $0x78 + + // nextHash = hash(load32(src, nextS), shift) + MOVL 0(R13), R11 + IMULL $0x1e35a7bd, R11 + SHRL CX, R11 + + // if load32(src, s) != load32(src, candidate) { continue } break + MOVL 0(SI), AX + MOVL (DX)(R15*1), BX + CMPL AX, BX + JNE inner0 + +fourByteMatch: + // As per the encode_other.go code: + // + // A 4-byte match has been found. We'll later see etc. + + // !!! Jump to a fast path for short (<= 16 byte) literals. See the comment + // on inputMargin in encode.go. + MOVQ SI, AX + SUBQ R10, AX + CMPQ AX, $16 + JLE emitLiteralFastPath + + // ---------------------------------------- + // Begin inline of the emitLiteral call. + // + // d += emitLiteral(dst[d:], src[nextEmit:s]) + + MOVL AX, BX + SUBL $1, BX + + CMPL BX, $60 + JLT inlineEmitLiteralOneByte + CMPL BX, $256 + JLT inlineEmitLiteralTwoBytes + +inlineEmitLiteralThreeBytes: + MOVB $0xf4, 0(DI) + MOVW BX, 1(DI) + ADDQ $3, DI + JMP inlineEmitLiteralMemmove + +inlineEmitLiteralTwoBytes: + MOVB $0xf0, 0(DI) + MOVB BX, 1(DI) + ADDQ $2, DI + JMP inlineEmitLiteralMemmove + +inlineEmitLiteralOneByte: + SHLB $2, BX + MOVB BX, 0(DI) + ADDQ $1, DI + +inlineEmitLiteralMemmove: + // Spill local variables (registers) onto the stack; call; unspill. + // + // copy(dst[i:], lit) + // + // This means calling runtime·memmove(&dst[i], &lit[0], len(lit)), so we push + // DI, R10 and AX as arguments. + MOVQ DI, 0(SP) + MOVQ R10, 8(SP) + MOVQ AX, 16(SP) + ADDQ AX, DI // Finish the "d +=" part of "d += emitLiteral(etc)". + MOVQ SI, 72(SP) + MOVQ DI, 80(SP) + MOVQ R15, 112(SP) + CALL runtime·memmove(SB) + MOVQ 56(SP), CX + MOVQ 64(SP), DX + MOVQ 72(SP), SI + MOVQ 80(SP), DI + MOVQ 88(SP), R9 + MOVQ 112(SP), R15 + JMP inner1 + +inlineEmitLiteralEnd: + // End inline of the emitLiteral call. + // ---------------------------------------- + +emitLiteralFastPath: + // !!! Emit the 1-byte encoding "uint8(len(lit)-1)<<2". + MOVB AX, BX + SUBB $1, BX + SHLB $2, BX + MOVB BX, (DI) + ADDQ $1, DI + + // !!! Implement the copy from lit to dst as a 16-byte load and store. + // (Encode's documentation says that dst and src must not overlap.) + // + // This always copies 16 bytes, instead of only len(lit) bytes, but that's + // OK. Subsequent iterations will fix up the overrun. + // + // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or + // 16-byte loads and stores. This technique probably wouldn't be as + // effective on architectures that are fussier about alignment. + MOVOU 0(R10), X0 + MOVOU X0, 0(DI) + ADDQ AX, DI + +inner1: + // for { etc } + + // base := s + MOVQ SI, R12 + + // !!! offset := base - candidate + MOVQ R12, R11 + SUBQ R15, R11 + SUBQ DX, R11 + + // ---------------------------------------- + // Begin inline of the extendMatch call. + // + // s = extendMatch(src, candidate+4, s+4) + + // !!! R14 = &src[len(src)] + MOVQ src_len+32(FP), R14 + ADDQ DX, R14 + + // !!! R13 = &src[len(src) - 8] + MOVQ R14, R13 + SUBQ $8, R13 + + // !!! R15 = &src[candidate + 4] + ADDQ $4, R15 + ADDQ DX, R15 + + // !!! s += 4 + ADDQ $4, SI + +inlineExtendMatchCmp8: + // As long as we are 8 or more bytes before the end of src, we can load and + // compare 8 bytes at a time. If those 8 bytes are equal, repeat. + CMPQ SI, R13 + JA inlineExtendMatchCmp1 + MOVQ (R15), AX + MOVQ (SI), BX + CMPQ AX, BX + JNE inlineExtendMatchBSF + ADDQ $8, R15 + ADDQ $8, SI + JMP inlineExtendMatchCmp8 + +inlineExtendMatchBSF: + // If those 8 bytes were not equal, XOR the two 8 byte values, and return + // the index of the first byte that differs. The BSF instruction finds the + // least significant 1 bit, the amd64 architecture is little-endian, and + // the shift by 3 converts a bit index to a byte index. + XORQ AX, BX + BSFQ BX, BX + SHRQ $3, BX + ADDQ BX, SI + JMP inlineExtendMatchEnd + +inlineExtendMatchCmp1: + // In src's tail, compare 1 byte at a time. + CMPQ SI, R14 + JAE inlineExtendMatchEnd + MOVB (R15), AX + MOVB (SI), BX + CMPB AX, BX + JNE inlineExtendMatchEnd + ADDQ $1, R15 + ADDQ $1, SI + JMP inlineExtendMatchCmp1 + +inlineExtendMatchEnd: + // End inline of the extendMatch call. + // ---------------------------------------- + + // ---------------------------------------- + // Begin inline of the emitCopy call. + // + // d += emitCopy(dst[d:], base-candidate, s-base) + + // !!! length := s - base + MOVQ SI, AX + SUBQ R12, AX + +inlineEmitCopyLoop0: + // for length >= 68 { etc } + CMPL AX, $68 + JLT inlineEmitCopyStep1 + + // Emit a length 64 copy, encoded as 3 bytes. + MOVB $0xfe, 0(DI) + MOVW R11, 1(DI) + ADDQ $3, DI + SUBL $64, AX + JMP inlineEmitCopyLoop0 + +inlineEmitCopyStep1: + // if length > 64 { etc } + CMPL AX, $64 + JLE inlineEmitCopyStep2 + + // Emit a length 60 copy, encoded as 3 bytes. + MOVB $0xee, 0(DI) + MOVW R11, 1(DI) + ADDQ $3, DI + SUBL $60, AX + +inlineEmitCopyStep2: + // if length >= 12 || offset >= 2048 { goto inlineEmitCopyStep3 } + CMPL AX, $12 + JGE inlineEmitCopyStep3 + CMPL R11, $2048 + JGE inlineEmitCopyStep3 + + // Emit the remaining copy, encoded as 2 bytes. + MOVB R11, 1(DI) + SHRL $8, R11 + SHLB $5, R11 + SUBB $4, AX + SHLB $2, AX + ORB AX, R11 + ORB $1, R11 + MOVB R11, 0(DI) + ADDQ $2, DI + JMP inlineEmitCopyEnd + +inlineEmitCopyStep3: + // Emit the remaining copy, encoded as 3 bytes. + SUBL $1, AX + SHLB $2, AX + ORB $2, AX + MOVB AX, 0(DI) + MOVW R11, 1(DI) + ADDQ $3, DI + +inlineEmitCopyEnd: + // End inline of the emitCopy call. + // ---------------------------------------- + + // nextEmit = s + MOVQ SI, R10 + + // if s >= sLimit { goto emitRemainder } + MOVQ SI, AX + SUBQ DX, AX + CMPQ AX, R9 + JAE emitRemainder + + // As per the encode_other.go code: + // + // We could immediately etc. + + // x := load64(src, s-1) + MOVQ -1(SI), R14 + + // prevHash := hash(uint32(x>>0), shift) + MOVL R14, R11 + IMULL $0x1e35a7bd, R11 + SHRL CX, R11 + + // table[prevHash] = uint16(s-1) + MOVQ SI, AX + SUBQ DX, AX + SUBQ $1, AX + + // XXX: MOVW AX, table-32768(SP)(R11*2) + // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2) + BYTE $0x66 + BYTE $0x42 + BYTE $0x89 + BYTE $0x44 + BYTE $0x5c + BYTE $0x78 + + // currHash := hash(uint32(x>>8), shift) + SHRQ $8, R14 + MOVL R14, R11 + IMULL $0x1e35a7bd, R11 + SHRL CX, R11 + + // candidate = int(table[currHash]) + // XXX: MOVWQZX table-32768(SP)(R11*2), R15 + // XXX: 4e 0f b7 7c 5c 78 movzwq 0x78(%rsp,%r11,2),%r15 + BYTE $0x4e + BYTE $0x0f + BYTE $0xb7 + BYTE $0x7c + BYTE $0x5c + BYTE $0x78 + + // table[currHash] = uint16(s) + ADDQ $1, AX + + // XXX: MOVW AX, table-32768(SP)(R11*2) + // XXX: 66 42 89 44 5c 78 mov %ax,0x78(%rsp,%r11,2) + BYTE $0x66 + BYTE $0x42 + BYTE $0x89 + BYTE $0x44 + BYTE $0x5c + BYTE $0x78 + + // if uint32(x>>8) == load32(src, candidate) { continue } + MOVL (DX)(R15*1), BX + CMPL R14, BX + JEQ inner1 + + // nextHash = hash(uint32(x>>16), shift) + SHRQ $8, R14 + MOVL R14, R11 + IMULL $0x1e35a7bd, R11 + SHRL CX, R11 + + // s++ + ADDQ $1, SI + + // break out of the inner1 for loop, i.e. continue the outer loop. + JMP outer + +emitRemainder: + // if nextEmit < len(src) { etc } + MOVQ src_len+32(FP), AX + ADDQ DX, AX + CMPQ R10, AX + JEQ encodeBlockEnd + + // d += emitLiteral(dst[d:], src[nextEmit:]) + // + // Push args. + MOVQ DI, 0(SP) + MOVQ $0, 8(SP) // Unnecessary, as the callee ignores it, but conservative. + MOVQ $0, 16(SP) // Unnecessary, as the callee ignores it, but conservative. + MOVQ R10, 24(SP) + SUBQ R10, AX + MOVQ AX, 32(SP) + MOVQ AX, 40(SP) // Unnecessary, as the callee ignores it, but conservative. + + // Spill local variables (registers) onto the stack; call; unspill. + MOVQ DI, 80(SP) + CALL ·emitLiteral(SB) + MOVQ 80(SP), DI + + // Finish the "d +=" part of "d += emitLiteral(etc)". + ADDQ 48(SP), DI + +encodeBlockEnd: + MOVQ dst_base+0(FP), AX + SUBQ AX, DI + MOVQ DI, d+48(FP) + RET diff --git a/vendor/github.com/golang/snappy/encode_other.go b/vendor/github.com/golang/snappy/encode_other.go new file mode 100644 index 000000000..dbcae905e --- /dev/null +++ b/vendor/github.com/golang/snappy/encode_other.go @@ -0,0 +1,238 @@ +// Copyright 2016 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !amd64 appengine !gc noasm + +package snappy + +func load32(b []byte, i int) uint32 { + b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line. + return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 +} + +func load64(b []byte, i int) uint64 { + b = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line. + return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | + uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 +} + +// emitLiteral writes a literal chunk and returns the number of bytes written. +// +// It assumes that: +// dst is long enough to hold the encoded bytes +// 1 <= len(lit) && len(lit) <= 65536 +func emitLiteral(dst, lit []byte) int { + i, n := 0, uint(len(lit)-1) + switch { + case n < 60: + dst[0] = uint8(n)<<2 | tagLiteral + i = 1 + case n < 1<<8: + dst[0] = 60<<2 | tagLiteral + dst[1] = uint8(n) + i = 2 + default: + dst[0] = 61<<2 | tagLiteral + dst[1] = uint8(n) + dst[2] = uint8(n >> 8) + i = 3 + } + return i + copy(dst[i:], lit) +} + +// emitCopy writes a copy chunk and returns the number of bytes written. +// +// It assumes that: +// dst is long enough to hold the encoded bytes +// 1 <= offset && offset <= 65535 +// 4 <= length && length <= 65535 +func emitCopy(dst []byte, offset, length int) int { + i := 0 + // The maximum length for a single tagCopy1 or tagCopy2 op is 64 bytes. The + // threshold for this loop is a little higher (at 68 = 64 + 4), and the + // length emitted down below is is a little lower (at 60 = 64 - 4), because + // it's shorter to encode a length 67 copy as a length 60 tagCopy2 followed + // by a length 7 tagCopy1 (which encodes as 3+2 bytes) than to encode it as + // a length 64 tagCopy2 followed by a length 3 tagCopy2 (which encodes as + // 3+3 bytes). The magic 4 in the 64±4 is because the minimum length for a + // tagCopy1 op is 4 bytes, which is why a length 3 copy has to be an + // encodes-as-3-bytes tagCopy2 instead of an encodes-as-2-bytes tagCopy1. + for length >= 68 { + // Emit a length 64 copy, encoded as 3 bytes. + dst[i+0] = 63<<2 | tagCopy2 + dst[i+1] = uint8(offset) + dst[i+2] = uint8(offset >> 8) + i += 3 + length -= 64 + } + if length > 64 { + // Emit a length 60 copy, encoded as 3 bytes. + dst[i+0] = 59<<2 | tagCopy2 + dst[i+1] = uint8(offset) + dst[i+2] = uint8(offset >> 8) + i += 3 + length -= 60 + } + if length >= 12 || offset >= 2048 { + // Emit the remaining copy, encoded as 3 bytes. + dst[i+0] = uint8(length-1)<<2 | tagCopy2 + dst[i+1] = uint8(offset) + dst[i+2] = uint8(offset >> 8) + return i + 3 + } + // Emit the remaining copy, encoded as 2 bytes. + dst[i+0] = uint8(offset>>8)<<5 | uint8(length-4)<<2 | tagCopy1 + dst[i+1] = uint8(offset) + return i + 2 +} + +// extendMatch returns the largest k such that k <= len(src) and that +// src[i:i+k-j] and src[j:k] have the same contents. +// +// It assumes that: +// 0 <= i && i < j && j <= len(src) +func extendMatch(src []byte, i, j int) int { + for ; j < len(src) && src[i] == src[j]; i, j = i+1, j+1 { + } + return j +} + +func hash(u, shift uint32) uint32 { + return (u * 0x1e35a7bd) >> shift +} + +// encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It +// assumes that the varint-encoded length of the decompressed bytes has already +// been written. +// +// It also assumes that: +// len(dst) >= MaxEncodedLen(len(src)) && +// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize +func encodeBlock(dst, src []byte) (d int) { + // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive. + // The table element type is uint16, as s < sLimit and sLimit < len(src) + // and len(src) <= maxBlockSize and maxBlockSize == 65536. + const ( + maxTableSize = 1 << 14 + // tableMask is redundant, but helps the compiler eliminate bounds + // checks. + tableMask = maxTableSize - 1 + ) + shift := uint32(32 - 8) + for tableSize := 1 << 8; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 { + shift-- + } + // In Go, all array elements are zero-initialized, so there is no advantage + // to a smaller tableSize per se. However, it matches the C++ algorithm, + // and in the asm versions of this code, we can get away with zeroing only + // the first tableSize elements. + var table [maxTableSize]uint16 + + // sLimit is when to stop looking for offset/length copies. The inputMargin + // lets us use a fast path for emitLiteral in the main loop, while we are + // looking for copies. + sLimit := len(src) - inputMargin + + // nextEmit is where in src the next emitLiteral should start from. + nextEmit := 0 + + // The encoded form must start with a literal, as there are no previous + // bytes to copy, so we start looking for hash matches at s == 1. + s := 1 + nextHash := hash(load32(src, s), shift) + + for { + // Copied from the C++ snappy implementation: + // + // Heuristic match skipping: If 32 bytes are scanned with no matches + // found, start looking only at every other byte. If 32 more bytes are + // scanned (or skipped), look at every third byte, etc.. When a match + // is found, immediately go back to looking at every byte. This is a + // small loss (~5% performance, ~0.1% density) for compressible data + // due to more bookkeeping, but for non-compressible data (such as + // JPEG) it's a huge win since the compressor quickly "realizes" the + // data is incompressible and doesn't bother looking for matches + // everywhere. + // + // The "skip" variable keeps track of how many bytes there are since + // the last match; dividing it by 32 (ie. right-shifting by five) gives + // the number of bytes to move ahead for each iteration. + skip := 32 + + nextS := s + candidate := 0 + for { + s = nextS + bytesBetweenHashLookups := skip >> 5 + nextS = s + bytesBetweenHashLookups + skip += bytesBetweenHashLookups + if nextS > sLimit { + goto emitRemainder + } + candidate = int(table[nextHash&tableMask]) + table[nextHash&tableMask] = uint16(s) + nextHash = hash(load32(src, nextS), shift) + if load32(src, s) == load32(src, candidate) { + break + } + } + + // A 4-byte match has been found. We'll later see if more than 4 bytes + // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit + // them as literal bytes. + d += emitLiteral(dst[d:], src[nextEmit:s]) + + // Call emitCopy, and then see if another emitCopy could be our next + // move. Repeat until we find no match for the input immediately after + // what was consumed by the last emitCopy call. + // + // If we exit this loop normally then we need to call emitLiteral next, + // though we don't yet know how big the literal will be. We handle that + // by proceeding to the next iteration of the main loop. We also can + // exit this loop via goto if we get close to exhausting the input. + for { + // Invariant: we have a 4-byte match at s, and no need to emit any + // literal bytes prior to s. + base := s + + // Extend the 4-byte match as long as possible. + // + // This is an inlined version of: + // s = extendMatch(src, candidate+4, s+4) + s += 4 + for i := candidate + 4; s < len(src) && src[i] == src[s]; i, s = i+1, s+1 { + } + + d += emitCopy(dst[d:], base-candidate, s-base) + nextEmit = s + if s >= sLimit { + goto emitRemainder + } + + // We could immediately start working at s now, but to improve + // compression we first update the hash table at s-1 and at s. If + // another emitCopy is not our next move, also calculate nextHash + // at s+1. At least on GOARCH=amd64, these three hash calculations + // are faster as one load64 call (with some shifts) instead of + // three load32 calls. + x := load64(src, s-1) + prevHash := hash(uint32(x>>0), shift) + table[prevHash&tableMask] = uint16(s - 1) + currHash := hash(uint32(x>>8), shift) + candidate = int(table[currHash&tableMask]) + table[currHash&tableMask] = uint16(s) + if uint32(x>>8) != load32(src, candidate) { + nextHash = hash(uint32(x>>16), shift) + s++ + break + } + } + } + +emitRemainder: + if nextEmit < len(src) { + d += emitLiteral(dst[d:], src[nextEmit:]) + } + return d +} diff --git a/vendor/github.com/golang/snappy/snappy.go b/vendor/github.com/golang/snappy/snappy.go new file mode 100644 index 000000000..ece692ea4 --- /dev/null +++ b/vendor/github.com/golang/snappy/snappy.go @@ -0,0 +1,98 @@ +// Copyright 2011 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package snappy implements the Snappy compression format. It aims for very +// high speeds and reasonable compression. +// +// There are actually two Snappy formats: block and stream. They are related, +// but different: trying to decompress block-compressed data as a Snappy stream +// will fail, and vice versa. The block format is the Decode and Encode +// functions and the stream format is the Reader and Writer types. +// +// The block format, the more common case, is used when the complete size (the +// number of bytes) of the original data is known upfront, at the time +// compression starts. The stream format, also known as the framing format, is +// for when that isn't always true. +// +// The canonical, C++ implementation is at https://github.com/google/snappy and +// it only implements the block format. +package snappy // import "github.com/golang/snappy" + +import ( + "hash/crc32" +) + +/* +Each encoded block begins with the varint-encoded length of the decoded data, +followed by a sequence of chunks. Chunks begin and end on byte boundaries. The +first byte of each chunk is broken into its 2 least and 6 most significant bits +called l and m: l ranges in [0, 4) and m ranges in [0, 64). l is the chunk tag. +Zero means a literal tag. All other values mean a copy tag. + +For literal tags: + - If m < 60, the next 1 + m bytes are literal bytes. + - Otherwise, let n be the little-endian unsigned integer denoted by the next + m - 59 bytes. The next 1 + n bytes after that are literal bytes. + +For copy tags, length bytes are copied from offset bytes ago, in the style of +Lempel-Ziv compression algorithms. In particular: + - For l == 1, the offset ranges in [0, 1<<11) and the length in [4, 12). + The length is 4 + the low 3 bits of m. The high 3 bits of m form bits 8-10 + of the offset. The next byte is bits 0-7 of the offset. + - For l == 2, the offset ranges in [0, 1<<16) and the length in [1, 65). + The length is 1 + m. The offset is the little-endian unsigned integer + denoted by the next 2 bytes. + - For l == 3, this tag is a legacy format that is no longer issued by most + encoders. Nonetheless, the offset ranges in [0, 1<<32) and the length in + [1, 65). The length is 1 + m. The offset is the little-endian unsigned + integer denoted by the next 4 bytes. +*/ +const ( + tagLiteral = 0x00 + tagCopy1 = 0x01 + tagCopy2 = 0x02 + tagCopy4 = 0x03 +) + +const ( + checksumSize = 4 + chunkHeaderSize = 4 + magicChunk = "\xff\x06\x00\x00" + magicBody + magicBody = "sNaPpY" + + // maxBlockSize is the maximum size of the input to encodeBlock. It is not + // part of the wire format per se, but some parts of the encoder assume + // that an offset fits into a uint16. + // + // Also, for the framing format (Writer type instead of Encode function), + // https://github.com/google/snappy/blob/master/framing_format.txt says + // that "the uncompressed data in a chunk must be no longer than 65536 + // bytes". + maxBlockSize = 65536 + + // maxEncodedLenOfMaxBlockSize equals MaxEncodedLen(maxBlockSize), but is + // hard coded to be a const instead of a variable, so that obufLen can also + // be a const. Their equivalence is confirmed by + // TestMaxEncodedLenOfMaxBlockSize. + maxEncodedLenOfMaxBlockSize = 76490 + + obufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize + obufLen = obufHeaderLen + maxEncodedLenOfMaxBlockSize +) + +const ( + chunkTypeCompressedData = 0x00 + chunkTypeUncompressedData = 0x01 + chunkTypePadding = 0xfe + chunkTypeStreamIdentifier = 0xff +) + +var crcTable = crc32.MakeTable(crc32.Castagnoli) + +// crc implements the checksum specified in section 3 of +// https://github.com/google/snappy/blob/master/framing_format.txt +func crc(b []byte) uint32 { + c := crc32.Update(0, crcTable, b) + return uint32(c>>15|c<<17) + 0xa282ead8 +} diff --git a/vendor/github.com/google/gofuzz/.travis.yml b/vendor/github.com/google/gofuzz/.travis.yml new file mode 100644 index 000000000..f8684d99f --- /dev/null +++ b/vendor/github.com/google/gofuzz/.travis.yml @@ -0,0 +1,13 @@ +language: go + +go: + - 1.4 + - 1.3 + - 1.2 + - tip + +install: + - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi + +script: + - go test -cover diff --git a/vendor/github.com/google/gofuzz/CONTRIBUTING.md b/vendor/github.com/google/gofuzz/CONTRIBUTING.md new file mode 100644 index 000000000..51cf5cd1a --- /dev/null +++ b/vendor/github.com/google/gofuzz/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# How to contribute # + +We'd love to accept your patches and contributions to this project. There are +a just a few small guidelines you need to follow. + + +## Contributor License Agreement ## + +Contributions to any Google project must be accompanied by a Contributor +License Agreement. This is not a copyright **assignment**, it simply gives +Google permission to use and redistribute your contributions as part of the +project. + + * If you are an individual writing original source code and you're sure you + own the intellectual property, then you'll need to sign an [individual + CLA][]. + + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA][]. + +You generally only need to submit a CLA once, so if you've already submitted +one (even if it was for a different project), you probably don't need to do it +again. + +[individual CLA]: https://developers.google.com/open-source/cla/individual +[corporate CLA]: https://developers.google.com/open-source/cla/corporate + + +## Submitting a patch ## + + 1. It's generally best to start by opening a new issue describing the bug or + feature you're intending to fix. Even if you think it's relatively minor, + it's helpful to know what people are working on. Mention in the initial + issue that you are planning to work on that bug or feature so that it can + be assigned to you. + + 1. Follow the normal process of [forking][] the project, and setup a new + branch to work in. It's important that each group of changes be done in + separate branches in order to ensure that a pull request only includes the + commits related to that bug or feature. + + 1. Go makes it very simple to ensure properly formatted code, so always run + `go fmt` on your code before committing it. You should also run + [golint][] over your code. As noted in the [golint readme][], it's not + strictly necessary that your code be completely "lint-free", but this will + help you find common style issues. + + 1. Any significant changes should almost always be accompanied by tests. The + project already has good test coverage, so look at some of the existing + tests if you're unsure how to go about it. [gocov][] and [gocov-html][] + are invaluable tools for seeing which parts of your code aren't being + exercised by your tests. + + 1. Do your best to have [well-formed commit messages][] for each change. + This provides consistency throughout the project, and ensures that commit + messages are able to be formatted properly by various git tools. + + 1. Finally, push the commits to your fork and submit a [pull request][]. + +[forking]: https://help.github.com/articles/fork-a-repo +[golint]: https://github.com/golang/lint +[golint readme]: https://github.com/golang/lint/blob/master/README +[gocov]: https://github.com/axw/gocov +[gocov-html]: https://github.com/matm/gocov-html +[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits +[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/vendor/github.com/google/gofuzz/LICENSE b/vendor/github.com/google/gofuzz/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/google/gofuzz/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/google/gofuzz/README.md b/vendor/github.com/google/gofuzz/README.md new file mode 100644 index 000000000..64869af34 --- /dev/null +++ b/vendor/github.com/google/gofuzz/README.md @@ -0,0 +1,71 @@ +gofuzz +====== + +gofuzz is a library for populating go objects with random values. + +[![GoDoc](https://godoc.org/github.com/google/gofuzz?status.png)](https://godoc.org/github.com/google/gofuzz) +[![Travis](https://travis-ci.org/google/gofuzz.svg?branch=master)](https://travis-ci.org/google/gofuzz) + +This is useful for testing: + +* Do your project's objects really serialize/unserialize correctly in all cases? +* Is there an incorrectly formatted object that will cause your project to panic? + +Import with ```import "github.com/google/gofuzz"``` + +You can use it on single variables: +```go +f := fuzz.New() +var myInt int +f.Fuzz(&myInt) // myInt gets a random value. +``` + +You can use it on maps: +```go +f := fuzz.New().NilChance(0).NumElements(1, 1) +var myMap map[ComplexKeyType]string +f.Fuzz(&myMap) // myMap will have exactly one element. +``` + +Customize the chance of getting a nil pointer: +```go +f := fuzz.New().NilChance(.5) +var fancyStruct struct { + A, B, C, D *string +} +f.Fuzz(&fancyStruct) // About half the pointers should be set. +``` + +You can even customize the randomization completely if needed: +```go +type MyEnum string +const ( + A MyEnum = "A" + B MyEnum = "B" +) +type MyInfo struct { + Type MyEnum + AInfo *string + BInfo *string +} + +f := fuzz.New().NilChance(0).Funcs( + func(e *MyInfo, c fuzz.Continue) { + switch c.Intn(2) { + case 0: + e.Type = A + c.Fuzz(&e.AInfo) + case 1: + e.Type = B + c.Fuzz(&e.BInfo) + } + }, +) + +var myObject MyInfo +f.Fuzz(&myObject) // Type will correspond to whether A or B info is set. +``` + +See more examples in ```example_test.go```. + +Happy testing! diff --git a/vendor/github.com/google/gofuzz/doc.go b/vendor/github.com/google/gofuzz/doc.go new file mode 100644 index 000000000..9f9956d4a --- /dev/null +++ b/vendor/github.com/google/gofuzz/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fuzz is a library for populating go objects with random values. +package fuzz diff --git a/vendor/github.com/google/gofuzz/fuzz.go b/vendor/github.com/google/gofuzz/fuzz.go new file mode 100644 index 000000000..1dfa80a6f --- /dev/null +++ b/vendor/github.com/google/gofuzz/fuzz.go @@ -0,0 +1,487 @@ +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fuzz + +import ( + "fmt" + "math/rand" + "reflect" + "time" +) + +// fuzzFuncMap is a map from a type to a fuzzFunc that handles that type. +type fuzzFuncMap map[reflect.Type]reflect.Value + +// Fuzzer knows how to fill any object with random fields. +type Fuzzer struct { + fuzzFuncs fuzzFuncMap + defaultFuzzFuncs fuzzFuncMap + r *rand.Rand + nilChance float64 + minElements int + maxElements int + maxDepth int +} + +// New returns a new Fuzzer. Customize your Fuzzer further by calling Funcs, +// RandSource, NilChance, or NumElements in any order. +func New() *Fuzzer { + return NewWithSeed(time.Now().UnixNano()) +} + +func NewWithSeed(seed int64) *Fuzzer { + f := &Fuzzer{ + defaultFuzzFuncs: fuzzFuncMap{ + reflect.TypeOf(&time.Time{}): reflect.ValueOf(fuzzTime), + }, + + fuzzFuncs: fuzzFuncMap{}, + r: rand.New(rand.NewSource(seed)), + nilChance: .2, + minElements: 1, + maxElements: 10, + maxDepth: 100, + } + return f +} + +// Funcs adds each entry in fuzzFuncs as a custom fuzzing function. +// +// Each entry in fuzzFuncs must be a function taking two parameters. +// The first parameter must be a pointer or map. It is the variable that +// function will fill with random data. The second parameter must be a +// fuzz.Continue, which will provide a source of randomness and a way +// to automatically continue fuzzing smaller pieces of the first parameter. +// +// These functions are called sensibly, e.g., if you wanted custom string +// fuzzing, the function `func(s *string, c fuzz.Continue)` would get +// called and passed the address of strings. Maps and pointers will always +// be made/new'd for you, ignoring the NilChange option. For slices, it +// doesn't make much sense to pre-create them--Fuzzer doesn't know how +// long you want your slice--so take a pointer to a slice, and make it +// yourself. (If you don't want your map/pointer type pre-made, take a +// pointer to it, and make it yourself.) See the examples for a range of +// custom functions. +func (f *Fuzzer) Funcs(fuzzFuncs ...interface{}) *Fuzzer { + for i := range fuzzFuncs { + v := reflect.ValueOf(fuzzFuncs[i]) + if v.Kind() != reflect.Func { + panic("Need only funcs!") + } + t := v.Type() + if t.NumIn() != 2 || t.NumOut() != 0 { + panic("Need 2 in and 0 out params!") + } + argT := t.In(0) + switch argT.Kind() { + case reflect.Ptr, reflect.Map: + default: + panic("fuzzFunc must take pointer or map type") + } + if t.In(1) != reflect.TypeOf(Continue{}) { + panic("fuzzFunc's second parameter must be type fuzz.Continue") + } + f.fuzzFuncs[argT] = v + } + return f +} + +// RandSource causes f to get values from the given source of randomness. +// Use if you want deterministic fuzzing. +func (f *Fuzzer) RandSource(s rand.Source) *Fuzzer { + f.r = rand.New(s) + return f +} + +// NilChance sets the probability of creating a nil pointer, map, or slice to +// 'p'. 'p' should be between 0 (no nils) and 1 (all nils), inclusive. +func (f *Fuzzer) NilChance(p float64) *Fuzzer { + if p < 0 || p > 1 { + panic("p should be between 0 and 1, inclusive.") + } + f.nilChance = p + return f +} + +// NumElements sets the minimum and maximum number of elements that will be +// added to a non-nil map or slice. +func (f *Fuzzer) NumElements(atLeast, atMost int) *Fuzzer { + if atLeast > atMost { + panic("atLeast must be <= atMost") + } + if atLeast < 0 { + panic("atLeast must be >= 0") + } + f.minElements = atLeast + f.maxElements = atMost + return f +} + +func (f *Fuzzer) genElementCount() int { + if f.minElements == f.maxElements { + return f.minElements + } + return f.minElements + f.r.Intn(f.maxElements-f.minElements+1) +} + +func (f *Fuzzer) genShouldFill() bool { + return f.r.Float64() > f.nilChance +} + +// MaxDepth sets the maximum number of recursive fuzz calls that will be made +// before stopping. This includes struct members, pointers, and map and slice +// elements. +func (f *Fuzzer) MaxDepth(d int) *Fuzzer { + f.maxDepth = d + return f +} + +// Fuzz recursively fills all of obj's fields with something random. First +// this tries to find a custom fuzz function (see Funcs). If there is no +// custom function this tests whether the object implements fuzz.Interface and, +// if so, calls Fuzz on it to fuzz itself. If that fails, this will see if +// there is a default fuzz function provided by this package. If all of that +// fails, this will generate random values for all primitive fields and then +// recurse for all non-primitives. +// +// This is safe for cyclic or tree-like structs, up to a limit. Use the +// MaxDepth method to adjust how deep you need it to recurse. +// +// obj must be a pointer. Only exported (public) fields can be set (thanks, +// golang :/ ) Intended for tests, so will panic on bad input or unimplemented +// fields. +func (f *Fuzzer) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.fuzzWithContext(v, 0) +} + +// FuzzNoCustom is just like Fuzz, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +// Not safe for cyclic or tree-like structs! +// obj must be a pointer. Only exported (public) fields can be set (thanks, golang :/ ) +// Intended for tests, so will panic on bad input or unimplemented fields. +func (f *Fuzzer) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.fuzzWithContext(v, flagNoCustomFuzz) +} + +const ( + // Do not try to find a custom fuzz function. Does not apply recursively. + flagNoCustomFuzz uint64 = 1 << iota +) + +func (f *Fuzzer) fuzzWithContext(v reflect.Value, flags uint64) { + fc := &fuzzerContext{fuzzer: f} + fc.doFuzz(v, flags) +} + +// fuzzerContext carries context about a single fuzzing run, which lets Fuzzer +// be thread-safe. +type fuzzerContext struct { + fuzzer *Fuzzer + curDepth int +} + +func (fc *fuzzerContext) doFuzz(v reflect.Value, flags uint64) { + if fc.curDepth >= fc.fuzzer.maxDepth { + return + } + fc.curDepth++ + defer func() { fc.curDepth-- }() + + if !v.CanSet() { + return + } + + if flags&flagNoCustomFuzz == 0 { + // Check for both pointer and non-pointer custom functions. + if v.CanAddr() && fc.tryCustom(v.Addr()) { + return + } + if fc.tryCustom(v) { + return + } + } + + if fn, ok := fillFuncMap[v.Kind()]; ok { + fn(v, fc.fuzzer.r) + return + } + switch v.Kind() { + case reflect.Map: + if fc.fuzzer.genShouldFill() { + v.Set(reflect.MakeMap(v.Type())) + n := fc.fuzzer.genElementCount() + for i := 0; i < n; i++ { + key := reflect.New(v.Type().Key()).Elem() + fc.doFuzz(key, 0) + val := reflect.New(v.Type().Elem()).Elem() + fc.doFuzz(val, 0) + v.SetMapIndex(key, val) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Ptr: + if fc.fuzzer.genShouldFill() { + v.Set(reflect.New(v.Type().Elem())) + fc.doFuzz(v.Elem(), 0) + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Slice: + if fc.fuzzer.genShouldFill() { + n := fc.fuzzer.genElementCount() + v.Set(reflect.MakeSlice(v.Type(), n, n)) + for i := 0; i < n; i++ { + fc.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Array: + if fc.fuzzer.genShouldFill() { + n := v.Len() + for i := 0; i < n; i++ { + fc.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + fc.doFuzz(v.Field(i), 0) + } + case reflect.Chan: + fallthrough + case reflect.Func: + fallthrough + case reflect.Interface: + fallthrough + default: + panic(fmt.Sprintf("Can't handle %#v", v.Interface())) + } +} + +// tryCustom searches for custom handlers, and returns true iff it finds a match +// and successfully randomizes v. +func (fc *fuzzerContext) tryCustom(v reflect.Value) bool { + // First: see if we have a fuzz function for it. + doCustom, ok := fc.fuzzer.fuzzFuncs[v.Type()] + if !ok { + // Second: see if it can fuzz itself. + if v.CanInterface() { + intf := v.Interface() + if fuzzable, ok := intf.(Interface); ok { + fuzzable.Fuzz(Continue{fc: fc, Rand: fc.fuzzer.r}) + return true + } + } + // Finally: see if there is a default fuzz function. + doCustom, ok = fc.fuzzer.defaultFuzzFuncs[v.Type()] + if !ok { + return false + } + } + + switch v.Kind() { + case reflect.Ptr: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.New(v.Type().Elem())) + } + case reflect.Map: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.MakeMap(v.Type())) + } + default: + return false + } + + doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ + fc: fc, + Rand: fc.fuzzer.r, + })}) + return true +} + +// Interface represents an object that knows how to fuzz itself. Any time we +// find a type that implements this interface we will delegate the act of +// fuzzing itself. +type Interface interface { + Fuzz(c Continue) +} + +// Continue can be passed to custom fuzzing functions to allow them to use +// the correct source of randomness and to continue fuzzing their members. +type Continue struct { + fc *fuzzerContext + + // For convenience, Continue implements rand.Rand via embedding. + // Use this for generating any randomness if you want your fuzzing + // to be repeatable for a given seed. + *rand.Rand +} + +// Fuzz continues fuzzing obj. obj must be a pointer. +func (c Continue) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.fc.doFuzz(v, 0) +} + +// FuzzNoCustom continues fuzzing obj, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +func (c Continue) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.fc.doFuzz(v, flagNoCustomFuzz) +} + +// RandString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func (c Continue) RandString() string { + return randString(c.Rand) +} + +// RandUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func (c Continue) RandUint64() uint64 { + return randUint64(c.Rand) +} + +// RandBool returns true or false randomly. +func (c Continue) RandBool() bool { + return randBool(c.Rand) +} + +func fuzzInt(v reflect.Value, r *rand.Rand) { + v.SetInt(int64(randUint64(r))) +} + +func fuzzUint(v reflect.Value, r *rand.Rand) { + v.SetUint(randUint64(r)) +} + +func fuzzTime(t *time.Time, c Continue) { + var sec, nsec int64 + // Allow for about 1000 years of random time values, which keeps things + // like JSON parsing reasonably happy. + sec = c.Rand.Int63n(1000 * 365 * 24 * 60 * 60) + c.Fuzz(&nsec) + *t = time.Unix(sec, nsec) +} + +var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){ + reflect.Bool: func(v reflect.Value, r *rand.Rand) { + v.SetBool(randBool(r)) + }, + reflect.Int: fuzzInt, + reflect.Int8: fuzzInt, + reflect.Int16: fuzzInt, + reflect.Int32: fuzzInt, + reflect.Int64: fuzzInt, + reflect.Uint: fuzzUint, + reflect.Uint8: fuzzUint, + reflect.Uint16: fuzzUint, + reflect.Uint32: fuzzUint, + reflect.Uint64: fuzzUint, + reflect.Uintptr: fuzzUint, + reflect.Float32: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(float64(r.Float32())) + }, + reflect.Float64: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(r.Float64()) + }, + reflect.Complex64: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, + reflect.Complex128: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, + reflect.String: func(v reflect.Value, r *rand.Rand) { + v.SetString(randString(r)) + }, + reflect.UnsafePointer: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, +} + +// randBool returns true or false randomly. +func randBool(r *rand.Rand) bool { + if r.Int()&1 == 1 { + return true + } + return false +} + +type charRange struct { + first, last rune +} + +// choose returns a random unicode character from the given range, using the +// given randomness source. +func (r *charRange) choose(rand *rand.Rand) rune { + count := int64(r.last - r.first) + return r.first + rune(rand.Int63n(count)) +} + +var unicodeRanges = []charRange{ + {' ', '~'}, // ASCII characters + {'\u00a0', '\u02af'}, // Multi-byte encoded characters + {'\u4e00', '\u9fff'}, // Common CJK (even longer encodings) +} + +// randString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func randString(r *rand.Rand) string { + n := r.Intn(20) + runes := make([]rune, n) + for i := range runes { + runes[i] = unicodeRanges[r.Intn(len(unicodeRanges))].choose(r) + } + return string(runes) +} + +// randUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func randUint64(r *rand.Rand) uint64 { + return uint64(r.Uint32())<<32 | uint64(r.Uint32()) +} diff --git a/vendor/github.com/hashicorp/go-safetemp/go.mod b/vendor/github.com/hashicorp/go-safetemp/go.mod new file mode 100644 index 000000000..02bc5f5bb --- /dev/null +++ b/vendor/github.com/hashicorp/go-safetemp/go.mod @@ -0,0 +1 @@ +module github.com/hashicorp/go-safetemp diff --git a/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go b/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go index e485f2f22..a7fb87bcf 100644 --- a/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go +++ b/vendor/github.com/hashicorp/vault/helper/compressutil/compress.go @@ -6,6 +6,9 @@ import ( "compress/lzw" "fmt" "io" + + "github.com/golang/snappy" + "github.com/hashicorp/errwrap" ) const ( @@ -20,16 +23,35 @@ const ( // Byte value used as canary when using Lzw format CompressionCanaryLzw byte = 'L' + // Byte value used as canary when using Snappy format + CompressionCanarySnappy byte = 'S' + CompressionTypeLzw = "lzw" CompressionTypeGzip = "gzip" + + CompressionTypeSnappy = "snappy" ) +// SnappyReadCloser embeds the snappy reader which implements the io.Reader +// interface. The decompress procedure in this utility expects an +// io.ReadCloser. This type implements the io.Closer interface to retain the +// generic way of decompression. +type SnappyReadCloser struct { + *snappy.Reader +} + +// Close is a noop method implemented only to satisfy the io.Closer interface +func (s *SnappyReadCloser) Close() error { + return nil +} + // CompressionConfig is used to select a compression type to be performed by // Compress and Decompress utilities. // Supported types are: // * CompressionTypeLzw // * CompressionTypeGzip +// * CompressionTypeSnappy // // When using CompressionTypeGzip, the compression levels can also be chosen: // * gzip.DefaultCompression @@ -78,11 +100,15 @@ func Compress(data []byte, config *CompressionConfig) ([]byte, error) { config.GzipCompressionLevel = gzip.DefaultCompression } writer, err = gzip.NewWriterLevel(&buf, config.GzipCompressionLevel) + case CompressionTypeSnappy: + buf.Write([]byte{CompressionCanarySnappy}) + writer = snappy.NewBufferedWriter(&buf) default: return nil, fmt.Errorf("unsupported compression type") } + if err != nil { - return nil, fmt.Errorf("failed to create a compression writer; err: %v", err) + return nil, errwrap.Wrapf("failed to create a compression writer: {{err}}", err) } if writer == nil { @@ -92,7 +118,7 @@ func Compress(data []byte, config *CompressionConfig) ([]byte, error) { // Compress the input and place it in the same buffer containing the // canary byte. if _, err = writer.Write(data); err != nil { - return nil, fmt.Errorf("failed to compress input data; err: %v", err) + return nil, errwrap.Wrapf("failed to compress input data: err: {{err}}", err) } // Close the io.WriteCloser @@ -117,22 +143,29 @@ func Decompress(data []byte) ([]byte, bool, error) { } switch { + // If the first byte matches the canary byte, remove the canary + // byte and try to decompress the data that is after the canary. case data[0] == CompressionCanaryGzip: - // If the first byte matches the canary byte, remove the canary - // byte and try to decompress the data that is after the canary. if len(data) < 2 { return nil, false, fmt.Errorf("invalid 'data' after the canary") } data = data[1:] reader, err = gzip.NewReader(bytes.NewReader(data)) case data[0] == CompressionCanaryLzw: - // If the first byte matches the canary byte, remove the canary - // byte and try to decompress the data that is after the canary. if len(data) < 2 { return nil, false, fmt.Errorf("invalid 'data' after the canary") } data = data[1:] reader = lzw.NewReader(bytes.NewReader(data), lzw.LSB, 8) + + case data[0] == CompressionCanarySnappy: + if len(data) < 2 { + return nil, false, fmt.Errorf("invalid 'data' after the canary") + } + data = data[1:] + reader = &SnappyReadCloser{ + Reader: snappy.NewReader(bytes.NewReader(data)), + } default: // If the first byte doesn't match the canary byte, it means // that the content was not compressed at all. Indicate the @@ -140,7 +173,7 @@ func Decompress(data []byte) ([]byte, bool, error) { return nil, true, nil } if err != nil { - return nil, false, fmt.Errorf("failed to create a compression reader; err: %v", err) + return nil, false, errwrap.Wrapf("failed to create a compression reader: {{err}}", err) } if reader == nil { return nil, false, fmt.Errorf("failed to create a compression reader") diff --git a/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go b/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go index a96745be8..d03ddef5f 100644 --- a/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go +++ b/vendor/github.com/hashicorp/vault/helper/jsonutil/json.go @@ -7,6 +7,7 @@ import ( "fmt" "io" + "github.com/hashicorp/errwrap" "github.com/hashicorp/vault/helper/compressutil" ) @@ -64,7 +65,7 @@ func DecodeJSON(data []byte, out interface{}) error { // Decompress the data if it was compressed in the first place decompressedBytes, uncompressed, err := compressutil.Decompress(data) if err != nil { - return fmt.Errorf("failed to decompress JSON: err: %v", err) + return errwrap.Wrapf("failed to decompress JSON: {{err}}", err) } if !uncompressed && (decompressedBytes == nil || len(decompressedBytes) == 0) { return fmt.Errorf("decompressed data being decoded is invalid") @@ -91,7 +92,7 @@ func DecodeJSONFromReader(r io.Reader, out interface{}) error { dec := json.NewDecoder(r) - // While decoding JSON values, intepret the integer values as `json.Number`s instead of `float64`. + // While decoding JSON values, interpret the integer values as `json.Number`s instead of `float64`. dec.UseNumber() // Since 'out' is an interface representing a pointer, pass it to the decoder without an '&' diff --git a/vendor/github.com/hashicorp/vault/helper/pgpkeys/encrypt_decrypt.go b/vendor/github.com/hashicorp/vault/helper/pgpkeys/encrypt_decrypt.go index d8b7f605c..eef4c5ed0 100644 --- a/vendor/github.com/hashicorp/vault/helper/pgpkeys/encrypt_decrypt.go +++ b/vendor/github.com/hashicorp/vault/helper/pgpkeys/encrypt_decrypt.go @@ -5,6 +5,7 @@ import ( "encoding/base64" "fmt" + "github.com/hashicorp/errwrap" "github.com/keybase/go-crypto/openpgp" "github.com/keybase/go-crypto/openpgp/packet" ) @@ -17,7 +18,7 @@ import ( // thoroughly tested in the init and rekey command unit tests func EncryptShares(input [][]byte, pgpKeys []string) ([]string, [][]byte, error) { if len(input) != len(pgpKeys) { - return nil, nil, fmt.Errorf("Mismatch between number items to encrypt and number of PGP keys") + return nil, nil, fmt.Errorf("mismatch between number items to encrypt and number of PGP keys") } encryptedShares := make([][]byte, 0, len(pgpKeys)) entities, err := GetEntities(pgpKeys) @@ -28,11 +29,11 @@ func EncryptShares(input [][]byte, pgpKeys []string) ([]string, [][]byte, error) ctBuf := bytes.NewBuffer(nil) pt, err := openpgp.Encrypt(ctBuf, []*openpgp.Entity{entity}, nil, nil, nil) if err != nil { - return nil, nil, fmt.Errorf("Error setting up encryption for PGP message: %s", err) + return nil, nil, errwrap.Wrapf("error setting up encryption for PGP message: {{err}}", err) } _, err = pt.Write(input[i]) if err != nil { - return nil, nil, fmt.Errorf("Error encrypting PGP message: %s", err) + return nil, nil, errwrap.Wrapf("error encrypting PGP message: {{err}}", err) } pt.Close() encryptedShares = append(encryptedShares, ctBuf.Bytes()) @@ -72,11 +73,11 @@ func GetEntities(pgpKeys []string) ([]*openpgp.Entity, error) { for _, keystring := range pgpKeys { data, err := base64.StdEncoding.DecodeString(keystring) if err != nil { - return nil, fmt.Errorf("Error decoding given PGP key: %s", err) + return nil, errwrap.Wrapf("error decoding given PGP key: {{err}}", err) } entity, err := openpgp.ReadEntity(packet.NewReader(bytes.NewBuffer(data))) if err != nil { - return nil, fmt.Errorf("Error parsing given PGP key: %s", err) + return nil, errwrap.Wrapf("error parsing given PGP key: {{err}}", err) } ret = append(ret, entity) } @@ -91,23 +92,23 @@ func GetEntities(pgpKeys []string) ([]*openpgp.Entity, error) { func DecryptBytes(encodedCrypt, privKey string) (*bytes.Buffer, error) { privKeyBytes, err := base64.StdEncoding.DecodeString(privKey) if err != nil { - return nil, fmt.Errorf("Error decoding base64 private key: %s", err) + return nil, errwrap.Wrapf("error decoding base64 private key: {{err}}", err) } cryptBytes, err := base64.StdEncoding.DecodeString(encodedCrypt) if err != nil { - return nil, fmt.Errorf("Error decoding base64 crypted bytes: %s", err) + return nil, errwrap.Wrapf("error decoding base64 crypted bytes: {{err}}", err) } entity, err := openpgp.ReadEntity(packet.NewReader(bytes.NewBuffer(privKeyBytes))) if err != nil { - return nil, fmt.Errorf("Error parsing private key: %s", err) + return nil, errwrap.Wrapf("error parsing private key: {{err}}", err) } entityList := &openpgp.EntityList{entity} md, err := openpgp.ReadMessage(bytes.NewBuffer(cryptBytes), entityList, nil, nil) if err != nil { - return nil, fmt.Errorf("Error decrypting the messages: %s", err) + return nil, errwrap.Wrapf("error decrypting the messages: {{err}}", err) } ptBuf := bytes.NewBuffer(nil) diff --git a/vendor/github.com/hashicorp/vault/helper/pgpkeys/flag.go b/vendor/github.com/hashicorp/vault/helper/pgpkeys/flag.go index ccfc64b80..bb0f367d6 100644 --- a/vendor/github.com/hashicorp/vault/helper/pgpkeys/flag.go +++ b/vendor/github.com/hashicorp/vault/helper/pgpkeys/flag.go @@ -8,51 +8,94 @@ import ( "os" "strings" + "github.com/hashicorp/errwrap" "github.com/keybase/go-crypto/openpgp" ) -// PGPPubKeyFiles implements the flag.Value interface and allows -// parsing and reading a list of pgp public key files +// PubKeyFileFlag implements flag.Value and command.Example to receive exactly +// one PGP or keybase key via a flag. +type PubKeyFileFlag string + +func (p *PubKeyFileFlag) String() string { return string(*p) } + +func (p *PubKeyFileFlag) Set(val string) error { + if p != nil && *p != "" { + return errors.New("can only be specified once") + } + + keys, err := ParsePGPKeys(strings.Split(val, ",")) + if err != nil { + return err + } + + if len(keys) > 1 { + return errors.New("can only specify one pgp key") + } + + *p = PubKeyFileFlag(keys[0]) + return nil +} + +func (p *PubKeyFileFlag) Example() string { return "keybase:user" } + +// PGPPubKeyFiles implements the flag.Value interface and allows parsing and +// reading a list of PGP public key files. type PubKeyFilesFlag []string func (p *PubKeyFilesFlag) String() string { return fmt.Sprint(*p) } -func (p *PubKeyFilesFlag) Set(value string) error { +func (p *PubKeyFilesFlag) Set(val string) error { if len(*p) > 0 { - return errors.New("pgp-keys can only be specified once") + return errors.New("can only be specified once") } - splitValues := strings.Split(value, ",") - - keybaseMap, err := FetchKeybasePubkeys(splitValues) + keys, err := ParsePGPKeys(strings.Split(val, ",")) if err != nil { return err } - // Now go through the actual flag, and substitute in resolved keybase - // entries where appropriate - for _, keyfile := range splitValues { + *p = PubKeyFilesFlag(keys) + return nil +} + +func (p *PubKeyFilesFlag) Example() string { return "keybase:user1, keybase:user2, ..." } + +// ParsePGPKeys takes a list of PGP keys and parses them either using keybase +// or reading them from disk and returns the "expanded" list of pgp keys in +// the same order. +func ParsePGPKeys(keyfiles []string) ([]string, error) { + keys := make([]string, len(keyfiles)) + + keybaseMap, err := FetchKeybasePubkeys(keyfiles) + if err != nil { + return nil, err + } + + for i, keyfile := range keyfiles { + keyfile = strings.TrimSpace(keyfile) + if strings.HasPrefix(keyfile, kbPrefix) { - key := keybaseMap[keyfile] - if key == "" { - return fmt.Errorf("key for keybase user %s was not found in the map", strings.TrimPrefix(keyfile, kbPrefix)) + key, ok := keybaseMap[keyfile] + if !ok || key == "" { + return nil, fmt.Errorf("keybase user %q not found", strings.TrimPrefix(keyfile, kbPrefix)) } - *p = append(*p, key) + keys[i] = key continue } pgpStr, err := ReadPGPFile(keyfile) if err != nil { - return err + return nil, err } - - *p = append(*p, pgpStr) + keys[i] = pgpStr } - return nil + + return keys, nil } +// ReadPGPFile reads the given PGP file from disk. func ReadPGPFile(path string) (string, error) { if path[0] == '@' { path = path[1:] @@ -73,16 +116,16 @@ func ReadPGPFile(path string) (string, error) { entityList, err := openpgp.ReadArmoredKeyRing(keyReader) if err == nil { if len(entityList) != 1 { - return "", fmt.Errorf("more than one key found in file %s", path) + return "", fmt.Errorf("more than one key found in file %q", path) } if entityList[0] == nil { - return "", fmt.Errorf("primary key was nil for file %s", path) + return "", fmt.Errorf("primary key was nil for file %q", path) } serializedEntity := bytes.NewBuffer(nil) err = entityList[0].Serialize(serializedEntity) if err != nil { - return "", fmt.Errorf("error serializing entity for file %s: %s", path, err) + return "", errwrap.Wrapf(fmt.Sprintf("error serializing entity for file %q: {{err}}", path), err) } return base64.StdEncoding.EncodeToString(serializedEntity.Bytes()), nil diff --git a/vendor/github.com/hashicorp/vault/helper/pgpkeys/keybase.go b/vendor/github.com/hashicorp/vault/helper/pgpkeys/keybase.go index 5c14cbced..eba067762 100644 --- a/vendor/github.com/hashicorp/vault/helper/pgpkeys/keybase.go +++ b/vendor/github.com/hashicorp/vault/helper/pgpkeys/keybase.go @@ -6,6 +6,7 @@ import ( "fmt" "strings" + "github.com/hashicorp/errwrap" "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/vault/helper/jsonutil" "github.com/keybase/go-crypto/openpgp" @@ -49,25 +50,25 @@ func FetchKeybasePubkeys(input []string) (map[string]string, error) { } defer resp.Body.Close() - type publicKeys struct { + type PublicKeys struct { Primary struct { Bundle string } } - type them struct { - publicKeys `json:"public_keys"` + type LThem struct { + PublicKeys `json:"public_keys"` } - type kbResp struct { + type KbResp struct { Status struct { Name string } - Them []them + Them []LThem } - out := &kbResp{ - Them: []them{}, + out := &KbResp{ + Them: []LThem{}, } if err := jsonutil.DecodeJSONFromReader(resp.Body, out); err != nil { @@ -75,7 +76,7 @@ func FetchKeybasePubkeys(input []string) (map[string]string, error) { } if out.Status.Name != "OK" { - return nil, fmt.Errorf("got non-OK response: %s", out.Status.Name) + return nil, fmt.Errorf("got non-OK response: %q", out.Status.Name) } missingNames := make([]string, 0, len(usernames)) @@ -92,16 +93,16 @@ func FetchKeybasePubkeys(input []string) (map[string]string, error) { return nil, err } if len(entityList) != 1 { - return nil, fmt.Errorf("primary key could not be parsed for user %s", usernames[i]) + return nil, fmt.Errorf("primary key could not be parsed for user %q", usernames[i]) } if entityList[0] == nil { - return nil, fmt.Errorf("primary key was nil for user %s", usernames[i]) + return nil, fmt.Errorf("primary key was nil for user %q", usernames[i]) } serializedEntity.Reset() err = entityList[0].Serialize(serializedEntity) if err != nil { - return nil, fmt.Errorf("error serializing entity for user %s: %s", usernames[i], err) + return nil, errwrap.Wrapf(fmt.Sprintf("error serializing entity for user %q: {{err}}", usernames[i]), err) } // The API returns values in the same ordering requested, so this should properly match @@ -109,7 +110,7 @@ func FetchKeybasePubkeys(input []string) (map[string]string, error) { } if len(missingNames) > 0 { - return nil, fmt.Errorf("unable to fetch keys for user(s) %s from keybase", strings.Join(missingNames, ",")) + return nil, fmt.Errorf("unable to fetch keys for user(s) %q from keybase", strings.Join(missingNames, ",")) } return ret, nil diff --git a/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go b/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go index 14652da99..adf38ba59 100644 --- a/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go +++ b/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go @@ -9,10 +9,11 @@ package awspolicy import ( "encoding/json" "errors" + "fmt" "reflect" + "regexp" "strings" - "github.com/hashicorp/errwrap" "github.com/mitchellh/mapstructure" ) @@ -29,21 +30,21 @@ import ( func PoliciesAreEquivalent(policy1, policy2 string) (bool, error) { policy1intermediate := &intermediateAwsPolicyDocument{} if err := json.Unmarshal([]byte(policy1), policy1intermediate); err != nil { - return false, errwrap.Wrapf("Error unmarshaling policy: {{err}}", err) + return false, fmt.Errorf("Error unmarshaling policy: %s", err) } policy2intermediate := &intermediateAwsPolicyDocument{} if err := json.Unmarshal([]byte(policy2), policy2intermediate); err != nil { - return false, errwrap.Wrapf("Error unmarshaling policy: {{err}}", err) + return false, fmt.Errorf("Error unmarshaling policy: %s", err) } policy1Doc, err := policy1intermediate.document() if err != nil { - return false, errwrap.Wrapf("Error parsing policy: {{err}}", err) + return false, fmt.Errorf("Error parsing policy: %s", err) } policy2Doc, err := policy2intermediate.document() if err != nil { - return false, errwrap.Wrapf("Error parsing policy: {{err}}", err) + return false, fmt.Errorf("Error parsing policy: %s", err) } return policy1Doc.equals(policy2Doc), nil @@ -61,12 +62,12 @@ func (intermediate *intermediateAwsPolicyDocument) document() (*awsPolicyDocumen switch s := intermediate.Statements.(type) { case []interface{}: if err := mapstructure.Decode(s, &statements); err != nil { - return nil, errwrap.Wrapf("Error parsing statement: {{err}}", err) + return nil, fmt.Errorf("Error parsing statement: %s", err) } case map[string]interface{}: var singleStatement *awsPolicyStatement if err := mapstructure.Decode(s, &singleStatement); err != nil { - return nil, errwrap.Wrapf("Error parsing statement: {{err}}", err) + return nil, fmt.Errorf("Error parsing statement: %s", err) } statements = append(statements, singleStatement) default: @@ -209,24 +210,27 @@ func (statement *awsPolicyStatement) equals(other *awsPolicyStatement) bool { } func mapPrincipalsEqual(ours, theirs interface{}) bool { - ourPrincipalMap, ok := ours.(map[string]interface{}) - if !ok { - return false + ourPrincipalMap, oursOk := ours.(map[string]interface{}) + theirPrincipalMap, theirsOk := theirs.(map[string]interface{}) + + oursNormalized := make(map[string]awsPrincipalStringSet) + if oursOk { + for key, val := range ourPrincipalMap { + var tmp = newAWSPrincipalStringSet(val) + if len(tmp) > 0 { + oursNormalized[key] = tmp + } + } } - theirPrincipalMap, ok := theirs.(map[string]interface{}) - if !ok { - return false - } - - oursNormalized := make(map[string]awsStringSet) - for key, val := range ourPrincipalMap { - oursNormalized[key] = newAWSStringSet(val) - } - - theirsNormalized := make(map[string]awsStringSet) - for key, val := range theirPrincipalMap { - theirsNormalized[key] = newAWSStringSet(val) + theirsNormalized := make(map[string]awsPrincipalStringSet) + if theirsOk { + for key, val := range theirPrincipalMap { + var tmp = newAWSPrincipalStringSet(val) + if len(tmp) > 0 { + theirsNormalized[key] = newAWSPrincipalStringSet(val) + } + } } for key, ours := range oursNormalized { @@ -266,6 +270,26 @@ func stringPrincipalsEqual(ours, theirs interface{}) bool { return true } + // Handle AWS converting account ID principal to root IAM user ARN + // ACCOUNTID == arn:PARTITION:iam::ACCOUNTID:root + awsAccountIDRegex := regexp.MustCompile(`^[0-9]{12}$`) + + if awsAccountIDRegex.MatchString(ourPrincipal) { + if theirArn, err := parseAwsArnString(theirPrincipal); err == nil { + if theirArn.service == "iam" && theirArn.resource == "root" && theirArn.account == ourPrincipal { + return true + } + } + } + + if awsAccountIDRegex.MatchString(theirPrincipal) { + if ourArn, err := parseAwsArnString(ourPrincipal); err == nil { + if ourArn.service == "iam" && ourArn.resource == "root" && ourArn.account == theirPrincipal { + return true + } + } + } + return false } @@ -338,6 +362,7 @@ func (conditions awsConditionsBlock) Equals(other awsConditionsBlock) bool { } type awsStringSet []string +type awsPrincipalStringSet awsStringSet // newAWSStringSet constructs an awsStringSet from an interface{} - which // may be nil, a single string, or []interface{} (each of which is a string). @@ -353,6 +378,9 @@ func newAWSStringSet(members interface{}) awsStringSet { } if multiple, ok := members.([]interface{}); ok { + if len(multiple) == 0 { + return awsStringSet{} + } actions := make([]string, len(multiple)) for i, action := range multiple { actions[i] = action.(string) @@ -363,6 +391,10 @@ func newAWSStringSet(members interface{}) awsStringSet { return nil } +func newAWSPrincipalStringSet(members interface{}) awsPrincipalStringSet { + return awsPrincipalStringSet(newAWSStringSet(members)) +} + func (actions awsStringSet) equals(other awsStringSet) bool { if len(actions) != len(other) { return false @@ -381,3 +413,53 @@ func (actions awsStringSet) equals(other awsStringSet) bool { return reflect.DeepEqual(ourMap, theirMap) } + +func (ours awsPrincipalStringSet) equals(theirs awsPrincipalStringSet) bool { + if len(ours) != len(theirs) { + return false + } + + for _, ourPrincipal := range ours { + matches := false + for _, theirPrincipal := range theirs { + if stringPrincipalsEqual(ourPrincipal, theirPrincipal) { + matches = true + break + } + } + if !matches { + return false + } + } + + return true +} + +// awsArn describes an Amazon Resource Name +// More information: http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html +type awsArn struct { + account string + partition string + region string + resource string + service string +} + +// parseAwsArnString converts a string into an awsArn +// Expects string in form of: arn:PARTITION:SERVICE:REGION:ACCOUNT:RESOURCE +func parseAwsArnString(arn string) (awsArn, error) { + if !strings.HasPrefix(arn, "arn:") { + return awsArn{}, fmt.Errorf("expected arn: prefix, received: %s", arn) + } + arnParts := strings.SplitN(arn, ":", 6) + if len(arnParts) != 6 { + return awsArn{}, fmt.Errorf("expected 6 colon delimited sections, received: %s", arn) + } + return awsArn{ + account: arnParts[4], + partition: arnParts[1], + region: arnParts[3], + resource: arnParts[5], + service: arnParts[2], + }, nil +} diff --git a/vendor/github.com/jen20/awspolicyequivalence/go.mod b/vendor/github.com/jen20/awspolicyequivalence/go.mod new file mode 100644 index 000000000..35e1621e8 --- /dev/null +++ b/vendor/github.com/jen20/awspolicyequivalence/go.mod @@ -0,0 +1,3 @@ +module github.com/jen20/awspolicyequivalence + +require github.com/mitchellh/mapstructure v1.0.0 diff --git a/vendor/github.com/jen20/awspolicyequivalence/go.sum b/vendor/github.com/jen20/awspolicyequivalence/go.sum new file mode 100644 index 000000000..8f6af4f39 --- /dev/null +++ b/vendor/github.com/jen20/awspolicyequivalence/go.sum @@ -0,0 +1,2 @@ +github.com/mitchellh/mapstructure v1.0.0 h1:vVpGvMXJPqSDh2VYHF7gsfQj8Ncx+Xw5Y1KHeTRY+7I= +github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= diff --git a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go new file mode 100644 index 000000000..35efede93 --- /dev/null +++ b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn/arn.go @@ -0,0 +1,69 @@ +package arn + +import ( + "fmt" + "strings" + + awsarn "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/aws/endpoints" +) + +// Canonicalize validates IAM resources are appropriate for the authenticator +// and converts STS assumed roles into the IAM role resource. +// +// Supported IAM resources are: +// * AWS account: arn:aws:iam::123456789012:root +// * IAM user: arn:aws:iam::123456789012:user/Bob +// * IAM role: arn:aws:iam::123456789012:role/S3Access +// * IAM Assumed role: arn:aws:sts::123456789012:assumed-role/Accounting-Role/Mary (converted to IAM role) +// * Federated user: arn:aws:sts::123456789012:federated-user/Bob +func Canonicalize(arn string) (string, error) { + parsed, err := awsarn.Parse(arn) + if err != nil { + return "", fmt.Errorf("arn '%s' is invalid: '%v'", arn, err) + } + + if err := checkPartition(parsed.Partition); err != nil { + return "", fmt.Errorf("arn '%s' does not have a recognized partition", arn) + } + + parts := strings.Split(parsed.Resource, "/") + resource := parts[0] + + switch parsed.Service { + case "sts": + switch resource { + case "federated-user": + return arn, nil + case "assumed-role": + if len(parts) < 3 { + return "", fmt.Errorf("assumed-role arn '%s' does not have a role", arn) + } + // IAM ARNs can contain paths, part[0] is resource, parts[len(parts)] is the SessionName. + role := strings.Join(parts[1:len(parts)-1], "/") + return fmt.Sprintf("arn:%s:iam::%s:role/%s", parsed.Partition, parsed.AccountID, role), nil + default: + return "", fmt.Errorf("unrecognized resource %s for service sts", parsed.Resource) + } + case "iam": + switch resource { + case "role", "user", "root": + return arn, nil + default: + return "", fmt.Errorf("unrecognized resource %s for service iam", parsed.Resource) + } + } + + return "", fmt.Errorf("service %s in arn %s is not a valid service for identities", parsed.Service, arn) +} + +func checkPartition(partition string) error { + switch partition { + case endpoints.AwsPartitionID: + case endpoints.AwsCnPartitionID: + case endpoints.AwsUsGovPartitionID: + default: + return fmt.Errorf("partion %s is not recognized", partition) + } + return nil +} diff --git a/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go new file mode 100644 index 000000000..14901f120 --- /dev/null +++ b/vendor/github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token/token.go @@ -0,0 +1,432 @@ +/* +Copyright 2017 by the contributors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package token + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "os" + "strconv" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/credentials/stscreds" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/sts" + "github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + clientauthv1alpha1 "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" +) + +// Identity is returned on successful Verify() results. It contains a parsed +// version of the AWS identity used to create the token. +type Identity struct { + // ARN is the raw Amazon Resource Name returned by sts:GetCallerIdentity + ARN string + + // CanonicalARN is the Amazon Resource Name converted to a more canonical + // representation. In particular, STS assumed role ARNs like + // "arn:aws:sts::ACCOUNTID:assumed-role/ROLENAME/SESSIONNAME" are converted + // to their IAM ARN equivalent "arn:aws:iam::ACCOUNTID:role/NAME" + CanonicalARN string + + // AccountID is the 12 digit AWS account number. + AccountID string + + // UserID is the unique user/role ID (e.g., "AROAAAAAAAAAAAAAAAAAA"). + UserID string + + // SessionName is the STS session name (or "" if this is not a + // session-based identity). For EC2 instance roles, this will be the EC2 + // instance ID (e.g., "i-0123456789abcdef0"). You should only rely on it + // if you trust that _only_ EC2 is allowed to assume the IAM Role. If IAM + // users or other roles are allowed to assume the role, they can provide + // (nearly) arbitrary strings here. + SessionName string +} + +const ( + // The sts GetCallerIdentity request is valid for 15 minutes regardless of this parameters value after it has been + // signed, but we set this unused parameter to 60 for legacy reasons (we check for a value between 0 and 60 on the + // server side in 0.3.0 or earlier). IT IS IGNORED. If we can get STS to support x-amz-expires, then we should + // set this parameter to the actual expiration, and make it configurable. + requestPresignParam = 60 + // The actual token expiration (presigned STS urls are valid for 15 minutes after timestamp in x-amz-date). + presignedURLExpiration = 15 * time.Minute + v1Prefix = "k8s-aws-v1." + maxTokenLenBytes = 1024 * 4 + clusterIDHeader = "x-k8s-aws-id" + // Format of the X-Amz-Date header used for expiration + // https://golang.org/pkg/time/#pkg-constants + dateHeaderFormat = "20060102T150405Z" +) + +// Token is generated and used by Kubernetes client-go to authenticate with a Kubernetes cluster. +type Token struct { + Token string + Expiration time.Time +} + +// FormatError is returned when there is a problem with token that is +// an encoded sts request. This can include the url, data, action or anything +// else that prevents the sts call from being made. +type FormatError struct { + message string +} + +func (e FormatError) Error() string { + return "input token was not properly formatted: " + e.message +} + +// STSError is returned when there was either an error calling STS or a problem +// processing the data returned from STS. +type STSError struct { + message string +} + +func (e STSError) Error() string { + return "sts getCallerIdentity failed: " + e.message +} + +// NewSTSError creates a error of type STS. +func NewSTSError(m string) STSError { + return STSError{message: m} +} + +var parameterWhitelist = map[string]bool{ + "action": true, + "version": true, + "x-amz-algorithm": true, + "x-amz-credential": true, + "x-amz-date": true, + "x-amz-expires": true, + "x-amz-security-token": true, + "x-amz-signature": true, + "x-amz-signedheaders": true, +} + +// this is the result type from the GetCallerIdentity endpoint +type getCallerIdentityWrapper struct { + GetCallerIdentityResponse struct { + GetCallerIdentityResult struct { + Account string `json:"Account"` + Arn string `json:"Arn"` + UserID string `json:"UserId"` + } `json:"GetCallerIdentityResult"` + ResponseMetadata struct { + RequestID string `json:"RequestId"` + } `json:"ResponseMetadata"` + } `json:"GetCallerIdentityResponse"` +} + +// Generator provides new tokens for the heptio authenticator. +type Generator interface { + // Get a token using credentials in the default credentials chain. + Get(string) (Token, error) + // GetWithRole creates a token by assuming the provided role, using the credentials in the default chain. + GetWithRole(clusterID, roleARN string) (Token, error) + // GetWithRoleForSession creates a token by assuming the provided role, using the provided session. + GetWithRoleForSession(clusterID string, roleARN string, sess *session.Session) (Token, error) + // GetWithSTS returns a token valid for clusterID using the given STS client. + GetWithSTS(clusterID string, stsAPI *sts.STS) (Token, error) + // FormatJSON returns the client auth formatted json for the ExecCredential auth + FormatJSON(Token) string +} + +type generator struct { + forwardSessionName bool +} + +// NewGenerator creates a Generator and returns it. +func NewGenerator(forwardSessionName bool) (Generator, error) { + return generator{ + forwardSessionName: forwardSessionName, + }, nil +} + +// Get uses the directly available AWS credentials to return a token valid for +// clusterID. It follows the default AWS credential handling behavior. +func (g generator) Get(clusterID string) (Token, error) { + return g.GetWithRole(clusterID, "") +} + +func StdinStderrTokenProvider() (string, error) { + var v string + fmt.Fprint(os.Stderr, "Assume Role MFA token code: ") + _, err := fmt.Scanln(&v) + return v, err +} + +// GetWithRole assumes the given AWS IAM role and returns a token valid for +// clusterID. If roleARN is empty, behaves like Get (does not assume a role). +func (g generator) GetWithRole(clusterID string, roleARN string) (Token, error) { + // create a session with the "base" credentials available + // (from environment variable, profile files, EC2 metadata, etc) + sess, err := session.NewSessionWithOptions(session.Options{ + AssumeRoleTokenProvider: StdinStderrTokenProvider, + SharedConfigState: session.SharedConfigEnable, + }) + if err != nil { + return Token{}, fmt.Errorf("could not create session: %v", err) + } + + return g.GetWithRoleForSession(clusterID, roleARN, sess) +} + +// GetWithRole assumes the given AWS IAM role for the given session and behaves +// like GetWithRole. +func (g generator) GetWithRoleForSession(clusterID string, roleARN string, sess *session.Session) (Token, error) { + // use an STS client based on the direct credentials + stsAPI := sts.New(sess) + + // if a roleARN was specified, replace the STS client with one that uses + // temporary credentials from that role. + if roleARN != "" { + sessionSetter := func(provider *stscreds.AssumeRoleProvider) {} + if g.forwardSessionName { + // If the current session is already a federated identity, carry through + // this session name onto the new session to provide better debugging + // capabilities + resp, err := stsAPI.GetCallerIdentity(&sts.GetCallerIdentityInput{}) + if err != nil { + return Token{}, err + } + + userIDParts := strings.Split(*resp.UserId, ":") + sessionSetter = func(provider *stscreds.AssumeRoleProvider) { + if len(userIDParts) == 2 { + provider.RoleSessionName = userIDParts[1] + } + } + } + + // create STS-based credentials that will assume the given role + creds := stscreds.NewCredentials(sess, roleARN, sessionSetter) + + // create an STS API interface that uses the assumed role's temporary credentials + stsAPI = sts.New(sess, &aws.Config{Credentials: creds}) + } + + return g.GetWithSTS(clusterID, stsAPI) +} + +// GetWithSTS returns a token valid for clusterID using the given STS client. +func (g generator) GetWithSTS(clusterID string, stsAPI *sts.STS) (Token, error) { + // generate an sts:GetCallerIdentity request and add our custom cluster ID header + request, _ := stsAPI.GetCallerIdentityRequest(&sts.GetCallerIdentityInput{}) + request.HTTPRequest.Header.Add(clusterIDHeader, clusterID) + + // Sign the request. The expires parameter (sets the x-amz-expires header) is + // currently ignored by STS, and the token expires 15 minutes after the x-amz-date + // timestamp regardless. We set it to 60 seconds for backwards compatibility (the + // parameter is a required argument to Presign(), and authenticators 0.3.0 and older are expecting a value between + // 0 and 60 on the server side). + // https://github.com/aws/aws-sdk-go/issues/2167 + presignedURLString, err := request.Presign(requestPresignParam) + if err != nil { + return Token{}, err + } + + // Set token expiration to 1 minute before the presigned URL expires for some cushion + tokenExpiration := time.Now().Local().Add(presignedURLExpiration - 1*time.Minute) + // TODO: this may need to be a constant-time base64 encoding + return Token{v1Prefix + base64.RawURLEncoding.EncodeToString([]byte(presignedURLString)), tokenExpiration}, nil +} + +// FormatJSON formats the json to support ExecCredential authentication +func (g generator) FormatJSON(token Token) string { + expirationTimestamp := metav1.NewTime(token.Expiration) + execInput := &clientauthv1alpha1.ExecCredential{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + Kind: "ExecCredential", + }, + Status: &clientauthv1alpha1.ExecCredentialStatus{ + ExpirationTimestamp: &expirationTimestamp, + Token: token.Token, + }, + } + enc, _ := json.Marshal(execInput) + return string(enc) +} + +// Verifier validates tokens by calling STS and returning the associated identity. +type Verifier interface { + Verify(token string) (*Identity, error) +} + +type tokenVerifier struct { + client *http.Client + clusterID string +} + +// NewVerifier creates a Verifier that is bound to the clusterID and uses the default http client. +func NewVerifier(clusterID string) Verifier { + return tokenVerifier{ + client: http.DefaultClient, + clusterID: clusterID, + } +} + +// Verify a token is valid for the specified clusterID. On success, returns an +// Identity that contains information about the AWS principal that created the +// token. On failure, returns nil and a non-nil error. +func (v tokenVerifier) Verify(token string) (*Identity, error) { + if len(token) > maxTokenLenBytes { + return nil, FormatError{"token is too large"} + } + + if !strings.HasPrefix(token, v1Prefix) { + return nil, FormatError{fmt.Sprintf("token is missing expected %q prefix", v1Prefix)} + } + + // TODO: this may need to be a constant-time base64 decoding + tokenBytes, err := base64.RawURLEncoding.DecodeString(strings.TrimPrefix(token, v1Prefix)) + if err != nil { + return nil, FormatError{err.Error()} + } + + parsedURL, err := url.Parse(string(tokenBytes)) + if err != nil { + return nil, FormatError{err.Error()} + } + + if parsedURL.Scheme != "https" { + return nil, FormatError{fmt.Sprintf("unexpected scheme %q in pre-signed URL", parsedURL.Scheme)} + } + + if parsedURL.Host != "sts.amazonaws.com" { + return nil, FormatError{"unexpected hostname in pre-signed URL"} + } + + if parsedURL.Path != "/" { + return nil, FormatError{"unexpected path in pre-signed URL"} + } + + queryParamsLower := make(url.Values) + queryParams := parsedURL.Query() + for key, values := range queryParams { + if !parameterWhitelist[strings.ToLower(key)] { + return nil, FormatError{fmt.Sprintf("non-whitelisted query parameter %q", key)} + } + if len(values) != 1 { + return nil, FormatError{"query parameter with multiple values not supported"} + } + queryParamsLower.Set(strings.ToLower(key), values[0]) + } + + if queryParamsLower.Get("action") != "GetCallerIdentity" { + return nil, FormatError{"unexpected action parameter in pre-signed URL"} + } + + if !hasSignedClusterIDHeader(&queryParamsLower) { + return nil, FormatError{fmt.Sprintf("client did not sign the %s header in the pre-signed URL", clusterIDHeader)} + } + + // We validate x-amz-expires is between 0 and 15 minutes (900 seconds) although currently pre-signed STS URLs, and + // therefore tokens, expire exactly 15 minutes after the x-amz-date header, regardless of x-amz-expires. + expires, err := strconv.Atoi(queryParamsLower.Get("x-amz-expires")) + if err != nil || expires < 0 || expires > 900 { + return nil, FormatError{fmt.Sprintf("invalid X-Amz-Expires parameter in pre-signed URL: %d", expires)} + } + + date := queryParamsLower.Get("x-amz-date") + if date == "" { + return nil, FormatError{"X-Amz-Date parameter must be present in pre-signed URL"} + } + + dateParam, err := time.Parse(dateHeaderFormat, date) + if err != nil { + return nil, FormatError{fmt.Sprintf("error parsing X-Amz-Date parameter %s into format %s: %s", date, dateHeaderFormat, err.Error())} + } + + now := time.Now() + expiration := dateParam.Add(presignedURLExpiration) + if now.After(expiration) { + return nil, FormatError{fmt.Sprintf("X-Amz-Date parameter is expired (%.f minute expiration) %s", presignedURLExpiration.Minutes(), dateParam)} + } + + req, err := http.NewRequest("GET", parsedURL.String(), nil) + req.Header.Set(clusterIDHeader, v.clusterID) + req.Header.Set("accept", "application/json") + + response, err := v.client.Do(req) + if err != nil { + // special case to avoid printing the full URL if possible + if urlErr, ok := err.(*url.Error); ok { + return nil, NewSTSError(fmt.Sprintf("error during GET: %v", urlErr.Err)) + } + return nil, NewSTSError(fmt.Sprintf("error during GET: %v", err)) + } + defer response.Body.Close() + + if response.StatusCode != 200 { + return nil, NewSTSError(fmt.Sprintf("error from AWS (expected 200, got %d)", response.StatusCode)) + } + + responseBody, err := ioutil.ReadAll(response.Body) + if err != nil { + return nil, NewSTSError(fmt.Sprintf("error reading HTTP result: %v", err)) + } + + var callerIdentity getCallerIdentityWrapper + err = json.Unmarshal(responseBody, &callerIdentity) + if err != nil { + return nil, NewSTSError(err.Error()) + } + + // parse the response into an Identity + id := &Identity{ + ARN: callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.Arn, + AccountID: callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.Account, + } + id.CanonicalARN, err = arn.Canonicalize(id.ARN) + if err != nil { + return nil, NewSTSError(err.Error()) + } + + // The user ID is either UserID:SessionName (for assumed roles) or just + // UserID (for IAM User principals). + userIDParts := strings.Split(callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.UserID, ":") + if len(userIDParts) == 2 { + id.UserID = userIDParts[0] + id.SessionName = userIDParts[1] + } else if len(userIDParts) == 1 { + id.UserID = userIDParts[0] + } else { + return nil, STSError{fmt.Sprintf( + "malformed UserID %q", + callerIdentity.GetCallerIdentityResponse.GetCallerIdentityResult.UserID)} + } + + return id, nil +} + +func hasSignedClusterIDHeader(paramsLower *url.Values) bool { + signedHeaders := strings.Split(paramsLower.Get("x-amz-signedheaders"), ";") + for _, hdr := range signedHeaders { + if strings.ToLower(hdr) == strings.ToLower(clusterIDHeader) { + return true + } + } + return false +} diff --git a/vendor/github.com/mattn/go-isatty/.travis.yml b/vendor/github.com/mattn/go-isatty/.travis.yml new file mode 100644 index 000000000..5597e026d --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/.travis.yml @@ -0,0 +1,13 @@ +language: go +go: + - tip + +os: + - linux + - osx + +before_install: + - go get github.com/mattn/goveralls + - go get golang.org/x/tools/cmd/cover +script: + - $HOME/gopath/bin/goveralls -repotoken 3gHdORO5k5ziZcWMBxnd9LrMZaJs8m9x5 diff --git a/vendor/github.com/mattn/go-isatty/README.md b/vendor/github.com/mattn/go-isatty/README.md index 74845de4a..1e69004bb 100644 --- a/vendor/github.com/mattn/go-isatty/README.md +++ b/vendor/github.com/mattn/go-isatty/README.md @@ -1,5 +1,10 @@ # go-isatty +[![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) +[![Build Status](https://travis-ci.org/mattn/go-isatty.svg?branch=master)](https://travis-ci.org/mattn/go-isatty) +[![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) +[![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) + isatty for golang ## Usage @@ -16,6 +21,8 @@ import ( func main() { if isatty.IsTerminal(os.Stdout.Fd()) { fmt.Println("Is Terminal") + } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { + fmt.Println("Is Cygwin/MSYS2 Terminal") } else { fmt.Println("Is Not Terminal") } @@ -28,10 +35,16 @@ func main() { $ go get github.com/mattn/go-isatty ``` -# License +## License MIT -# Author +## Author Yasuhiro Matsumoto (a.k.a mattn) + +## Thanks + +* k-takata: base idea for IsCygwinTerminal + + https://github.com/k-takata/go-iscygpty diff --git a/vendor/github.com/mattn/go-isatty/isatty_appengine.go b/vendor/github.com/mattn/go-isatty/isatty_appengine.go index 83c588773..9584a9884 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_appengine.go +++ b/vendor/github.com/mattn/go-isatty/isatty_appengine.go @@ -7,3 +7,9 @@ package isatty func IsTerminal(fd uintptr) bool { return false } + +// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_linux.go b/vendor/github.com/mattn/go-isatty/isatty_linux.go index 9d24bac1d..7384cf991 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_linux.go +++ b/vendor/github.com/mattn/go-isatty/isatty_linux.go @@ -1,5 +1,5 @@ // +build linux -// +build !appengine +// +build !appengine,!ppc64,!ppc64le package isatty diff --git a/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go b/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go new file mode 100644 index 000000000..44e5d2130 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_linux_ppc64x.go @@ -0,0 +1,19 @@ +// +build linux +// +build ppc64 ppc64le + +package isatty + +import ( + "unsafe" + + syscall "golang.org/x/sys/unix" +) + +const ioctlReadTermios = syscall.TCGETS + +// IsTerminal return true if the file descriptor is terminal. +func IsTerminal(fd uintptr) bool { + var termios syscall.Termios + _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) + return err == 0 +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_others.go b/vendor/github.com/mattn/go-isatty/isatty_others.go new file mode 100644 index 000000000..9d8b4a599 --- /dev/null +++ b/vendor/github.com/mattn/go-isatty/isatty_others.go @@ -0,0 +1,10 @@ +// +build !windows +// +build !appengine + +package isatty + +// IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 +// terminal. This is also always false on this environment. +func IsCygwinTerminal(fd uintptr) bool { + return false +} diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go index 83c398b16..af51cbcaa 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_windows.go +++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go @@ -4,12 +4,30 @@ package isatty import ( + "strings" "syscall" + "unicode/utf16" "unsafe" ) -var kernel32 = syscall.NewLazyDLL("kernel32.dll") -var procGetConsoleMode = kernel32.NewProc("GetConsoleMode") +const ( + fileNameInfo uintptr = 2 + fileTypePipe = 3 +) + +var ( + kernel32 = syscall.NewLazyDLL("kernel32.dll") + procGetConsoleMode = kernel32.NewProc("GetConsoleMode") + procGetFileInformationByHandleEx = kernel32.NewProc("GetFileInformationByHandleEx") + procGetFileType = kernel32.NewProc("GetFileType") +) + +func init() { + // Check if GetFileInformationByHandleEx is available. + if procGetFileInformationByHandleEx.Find() != nil { + procGetFileInformationByHandleEx = nil + } +} // IsTerminal return true if the file descriptor is terminal. func IsTerminal(fd uintptr) bool { @@ -17,3 +35,60 @@ func IsTerminal(fd uintptr) bool { r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) return r != 0 && e == 0 } + +// Check pipe name is used for cygwin/msys2 pty. +// Cygwin/MSYS2 PTY has a name like: +// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master +func isCygwinPipeName(name string) bool { + token := strings.Split(name, "-") + if len(token) < 5 { + return false + } + + if token[0] != `\msys` && token[0] != `\cygwin` { + return false + } + + if token[1] == "" { + return false + } + + if !strings.HasPrefix(token[2], "pty") { + return false + } + + if token[3] != `from` && token[3] != `to` { + return false + } + + if token[4] != "master" { + return false + } + + return true +} + +// IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 +// terminal. +func IsCygwinTerminal(fd uintptr) bool { + if procGetFileInformationByHandleEx == nil { + return false + } + + // Cygwin/msys's pty is a pipe. + ft, _, e := syscall.Syscall(procGetFileType.Addr(), 1, fd, 0, 0) + if ft != fileTypePipe || e != 0 { + return false + } + + var buf [2 + syscall.MAX_PATH]uint16 + r, _, e := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), + 4, fd, fileNameInfo, uintptr(unsafe.Pointer(&buf)), + uintptr(len(buf)*2), 0, 0) + if r == 0 || e != 0 { + return false + } + + l := *(*uint32)(unsafe.Pointer(&buf)) + return isCygwinPipeName(string(utf16.Decode(buf[2 : 2+l/2]))) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go index d94eb4a94..c63d1623f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go @@ -278,7 +278,8 @@ func tagIgnoredAutoscaling(t *autoscaling.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go index fa9b8354c..6fafda43c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go @@ -18,17 +18,20 @@ import ( "github.com/aws/aws-sdk-go/service/acm" "github.com/aws/aws-sdk-go/service/acmpca" "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/aws/aws-sdk-go/service/apigatewayv2" "github.com/aws/aws-sdk-go/service/applicationautoscaling" "github.com/aws/aws-sdk-go/service/appmesh" "github.com/aws/aws-sdk-go/service/appsync" "github.com/aws/aws-sdk-go/service/athena" "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/aws/aws-sdk-go/service/backup" "github.com/aws/aws-sdk-go/service/batch" "github.com/aws/aws-sdk-go/service/budgets" "github.com/aws/aws-sdk-go/service/cloud9" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudfront" "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/aws/aws-sdk-go/service/cloudsearch" "github.com/aws/aws-sdk-go/service/cloudtrail" "github.com/aws/aws-sdk-go/service/cloudwatch" "github.com/aws/aws-sdk-go/service/cloudwatchevents" @@ -40,13 +43,16 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentity" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" + "github.com/aws/aws-sdk-go/service/costandusagereportservice" "github.com/aws/aws-sdk-go/service/databasemigrationservice" + "github.com/aws/aws-sdk-go/service/datapipeline" "github.com/aws/aws-sdk-go/service/datasync" "github.com/aws/aws-sdk-go/service/dax" "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" "github.com/aws/aws-sdk-go/service/dlm" + "github.com/aws/aws-sdk-go/service/docdb" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecr" @@ -62,33 +68,48 @@ import ( "github.com/aws/aws-sdk-go/service/emr" "github.com/aws/aws-sdk-go/service/firehose" "github.com/aws/aws-sdk-go/service/fms" + "github.com/aws/aws-sdk-go/service/fsx" "github.com/aws/aws-sdk-go/service/gamelift" "github.com/aws/aws-sdk-go/service/glacier" + "github.com/aws/aws-sdk-go/service/globalaccelerator" "github.com/aws/aws-sdk-go/service/glue" "github.com/aws/aws-sdk-go/service/guardduty" "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/inspector" "github.com/aws/aws-sdk-go/service/iot" + "github.com/aws/aws-sdk-go/service/kafka" "github.com/aws/aws-sdk-go/service/kinesis" "github.com/aws/aws-sdk-go/service/kinesisanalytics" "github.com/aws/aws-sdk-go/service/kms" "github.com/aws/aws-sdk-go/service/lambda" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" + "github.com/aws/aws-sdk-go/service/licensemanager" "github.com/aws/aws-sdk-go/service/lightsail" "github.com/aws/aws-sdk-go/service/macie" + "github.com/aws/aws-sdk-go/service/mediaconnect" + "github.com/aws/aws-sdk-go/service/mediaconvert" + "github.com/aws/aws-sdk-go/service/medialive" + "github.com/aws/aws-sdk-go/service/mediapackage" "github.com/aws/aws-sdk-go/service/mediastore" + "github.com/aws/aws-sdk-go/service/mediastoredata" "github.com/aws/aws-sdk-go/service/mq" "github.com/aws/aws-sdk-go/service/neptune" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" "github.com/aws/aws-sdk-go/service/pinpoint" "github.com/aws/aws-sdk-go/service/pricing" + "github.com/aws/aws-sdk-go/service/ram" "github.com/aws/aws-sdk-go/service/rds" "github.com/aws/aws-sdk-go/service/redshift" + "github.com/aws/aws-sdk-go/service/resourcegroups" "github.com/aws/aws-sdk-go/service/route53" + "github.com/aws/aws-sdk-go/service/route53resolver" "github.com/aws/aws-sdk-go/service/s3" + "github.com/aws/aws-sdk-go/service/s3control" + "github.com/aws/aws-sdk-go/service/sagemaker" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/aws/aws-sdk-go/service/serverlessapplicationrepository" "github.com/aws/aws-sdk-go/service/servicecatalog" "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/aws/aws-sdk-go/service/ses" @@ -103,9 +124,10 @@ import ( "github.com/aws/aws-sdk-go/service/transfer" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/aws/aws-sdk-go/service/worklink" "github.com/aws/aws-sdk-go/service/workspaces" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/go-cleanhttp" + cleanhttp "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/terraform/helper/logging" "github.com/hashicorp/terraform/terraform" ) @@ -150,6 +172,7 @@ type Config struct { RdsEndpoint string R53Endpoint string S3Endpoint string + S3ControlEndpoint string SnsEndpoint string SqsEndpoint string StsEndpoint string @@ -165,99 +188,121 @@ type Config struct { } type AWSClient struct { - cfconn *cloudformation.CloudFormation - cloud9conn *cloud9.Cloud9 - cloudfrontconn *cloudfront.CloudFront - cloudhsmv2conn *cloudhsmv2.CloudHSMV2 - cloudtrailconn *cloudtrail.CloudTrail - cloudwatchconn *cloudwatch.CloudWatch - cloudwatchlogsconn *cloudwatchlogs.CloudWatchLogs - cloudwatcheventsconn *cloudwatchevents.CloudWatchEvents - cognitoconn *cognitoidentity.CognitoIdentity - cognitoidpconn *cognitoidentityprovider.CognitoIdentityProvider - configconn *configservice.ConfigService - datasyncconn *datasync.DataSync - daxconn *dax.DAX - devicefarmconn *devicefarm.DeviceFarm - dlmconn *dlm.DLM - dmsconn *databasemigrationservice.DatabaseMigrationService - dsconn *directoryservice.DirectoryService - dynamodbconn *dynamodb.DynamoDB - ec2conn *ec2.EC2 - ecrconn *ecr.ECR - ecsconn *ecs.ECS - efsconn *efs.EFS - eksconn *eks.EKS - elbconn *elb.ELB - elbv2conn *elbv2.ELBV2 - emrconn *emr.EMR - esconn *elasticsearch.ElasticsearchService - acmconn *acm.ACM - acmpcaconn *acmpca.ACMPCA - apigateway *apigateway.APIGateway - appautoscalingconn *applicationautoscaling.ApplicationAutoScaling - autoscalingconn *autoscaling.AutoScaling - s3conn *s3.S3 - secretsmanagerconn *secretsmanager.SecretsManager - securityhubconn *securityhub.SecurityHub - scconn *servicecatalog.ServiceCatalog - sesConn *ses.SES - simpledbconn *simpledb.SimpleDB - sqsconn *sqs.SQS - snsconn *sns.SNS - stsconn *sts.STS - redshiftconn *redshift.Redshift - r53conn *route53.Route53 - partition string - accountid string - supportedplatforms []string - region string - rdsconn *rds.RDS - iamconn *iam.IAM - kinesisconn *kinesis.Kinesis - kinesisanalyticsconn *kinesisanalytics.KinesisAnalytics - kmsconn *kms.KMS - gameliftconn *gamelift.GameLift - firehoseconn *firehose.Firehose - fmsconn *fms.FMS - inspectorconn *inspector.Inspector - elasticacheconn *elasticache.ElastiCache - elasticbeanstalkconn *elasticbeanstalk.ElasticBeanstalk - elastictranscoderconn *elastictranscoder.ElasticTranscoder - lambdaconn *lambda.Lambda - lightsailconn *lightsail.Lightsail - macieconn *macie.Macie - mqconn *mq.MQ - opsworksconn *opsworks.OpsWorks - organizationsconn *organizations.Organizations - glacierconn *glacier.Glacier - guarddutyconn *guardduty.GuardDuty - codebuildconn *codebuild.CodeBuild - codedeployconn *codedeploy.CodeDeploy - codecommitconn *codecommit.CodeCommit - codepipelineconn *codepipeline.CodePipeline - sdconn *servicediscovery.ServiceDiscovery - sfnconn *sfn.SFN - ssmconn *ssm.SSM - storagegatewayconn *storagegateway.StorageGateway - swfconn *swf.SWF - wafconn *waf.WAF - wafregionalconn *wafregional.WAFRegional - iotconn *iot.IoT - batchconn *batch.Batch - glueconn *glue.Glue - athenaconn *athena.Athena - dxconn *directconnect.DirectConnect - mediastoreconn *mediastore.MediaStore - appsyncconn *appsync.AppSync - lexmodelconn *lexmodelbuildingservice.LexModelBuildingService - budgetconn *budgets.Budgets - neptuneconn *neptune.Neptune - pricingconn *pricing.Pricing - pinpointconn *pinpoint.Pinpoint - workspacesconn *workspaces.WorkSpaces - appmeshconn *appmesh.AppMesh - transferconn *transfer.Transfer + accountid string + acmconn *acm.ACM + acmpcaconn *acmpca.ACMPCA + apigateway *apigateway.APIGateway + apigatewayv2conn *apigatewayv2.ApiGatewayV2 + appautoscalingconn *applicationautoscaling.ApplicationAutoScaling + appmeshconn *appmesh.AppMesh + appsyncconn *appsync.AppSync + athenaconn *athena.Athena + autoscalingconn *autoscaling.AutoScaling + backupconn *backup.Backup + batchconn *batch.Batch + budgetconn *budgets.Budgets + cfconn *cloudformation.CloudFormation + cloud9conn *cloud9.Cloud9 + cloudfrontconn *cloudfront.CloudFront + cloudhsmv2conn *cloudhsmv2.CloudHSMV2 + cloudsearchconn *cloudsearch.CloudSearch + cloudtrailconn *cloudtrail.CloudTrail + cloudwatchconn *cloudwatch.CloudWatch + cloudwatcheventsconn *cloudwatchevents.CloudWatchEvents + cloudwatchlogsconn *cloudwatchlogs.CloudWatchLogs + codebuildconn *codebuild.CodeBuild + codecommitconn *codecommit.CodeCommit + codedeployconn *codedeploy.CodeDeploy + codepipelineconn *codepipeline.CodePipeline + cognitoconn *cognitoidentity.CognitoIdentity + cognitoidpconn *cognitoidentityprovider.CognitoIdentityProvider + configconn *configservice.ConfigService + costandusagereportconn *costandusagereportservice.CostandUsageReportService + datapipelineconn *datapipeline.DataPipeline + datasyncconn *datasync.DataSync + daxconn *dax.DAX + devicefarmconn *devicefarm.DeviceFarm + dlmconn *dlm.DLM + dmsconn *databasemigrationservice.DatabaseMigrationService + docdbconn *docdb.DocDB + dsconn *directoryservice.DirectoryService + dxconn *directconnect.DirectConnect + dynamodbconn *dynamodb.DynamoDB + ec2conn *ec2.EC2 + ecrconn *ecr.ECR + ecsconn *ecs.ECS + efsconn *efs.EFS + eksconn *eks.EKS + elasticacheconn *elasticache.ElastiCache + elasticbeanstalkconn *elasticbeanstalk.ElasticBeanstalk + elastictranscoderconn *elastictranscoder.ElasticTranscoder + elbconn *elb.ELB + elbv2conn *elbv2.ELBV2 + emrconn *emr.EMR + esconn *elasticsearch.ElasticsearchService + firehoseconn *firehose.Firehose + fmsconn *fms.FMS + fsxconn *fsx.FSx + gameliftconn *gamelift.GameLift + glacierconn *glacier.Glacier + globalacceleratorconn *globalaccelerator.GlobalAccelerator + glueconn *glue.Glue + guarddutyconn *guardduty.GuardDuty + iamconn *iam.IAM + inspectorconn *inspector.Inspector + iotconn *iot.IoT + kafkaconn *kafka.Kafka + kinesisanalyticsconn *kinesisanalytics.KinesisAnalytics + kinesisconn *kinesis.Kinesis + kmsconn *kms.KMS + lambdaconn *lambda.Lambda + lexmodelconn *lexmodelbuildingservice.LexModelBuildingService + licensemanagerconn *licensemanager.LicenseManager + lightsailconn *lightsail.Lightsail + macieconn *macie.Macie + mediaconnectconn *mediaconnect.MediaConnect + mediaconvertconn *mediaconvert.MediaConvert + medialiveconn *medialive.MediaLive + mediapackageconn *mediapackage.MediaPackage + mediastoreconn *mediastore.MediaStore + mediastoredataconn *mediastoredata.MediaStoreData + mqconn *mq.MQ + neptuneconn *neptune.Neptune + opsworksconn *opsworks.OpsWorks + organizationsconn *organizations.Organizations + partition string + pinpointconn *pinpoint.Pinpoint + pricingconn *pricing.Pricing + r53conn *route53.Route53 + ramconn *ram.RAM + rdsconn *rds.RDS + redshiftconn *redshift.Redshift + region string + resourcegroupsconn *resourcegroups.ResourceGroups + route53resolverconn *route53resolver.Route53Resolver + s3conn *s3.S3 + s3controlconn *s3control.S3Control + sagemakerconn *sagemaker.SageMaker + scconn *servicecatalog.ServiceCatalog + sdconn *servicediscovery.ServiceDiscovery + secretsmanagerconn *secretsmanager.SecretsManager + securityhubconn *securityhub.SecurityHub + serverlessapplicationrepositoryconn *serverlessapplicationrepository.ServerlessApplicationRepository + sesConn *ses.SES + sfnconn *sfn.SFN + simpledbconn *simpledb.SimpleDB + snsconn *sns.SNS + sqsconn *sqs.SQS + ssmconn *ssm.SSM + storagegatewayconn *storagegateway.StorageGateway + stsconn *sts.STS + supportedplatforms []string + swfconn *swf.SWF + transferconn *transfer.Transfer + wafconn *waf.WAF + wafregionalconn *wafregional.WAFRegional + worklinkconn *worklink.WorkLink + workspacesconn *workspaces.WorkSpaces } func (c *AWSClient) S3() *s3.S3 { @@ -433,6 +478,7 @@ func (c *Config) Client() (interface{}, error) { awsKmsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KmsEndpoint)}) awsRdsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.RdsEndpoint)}) awsS3Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.S3Endpoint)}) + awsS3ControlSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.S3ControlEndpoint)}) awsSnsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SnsEndpoint)}) awsSqsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.SqsEndpoint)}) awsStsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.StsEndpoint)}) @@ -506,32 +552,43 @@ func (c *Config) Client() (interface{}, error) { } } - client.budgetconn = budgets.New(sess) client.acmconn = acm.New(awsAcmSess) client.acmpcaconn = acmpca.New(sess) client.apigateway = apigateway.New(awsApigatewaySess) + client.apigatewayv2conn = apigatewayv2.New(sess) client.appautoscalingconn = applicationautoscaling.New(sess) + client.appmeshconn = appmesh.New(sess) + client.appsyncconn = appsync.New(sess) + client.athenaconn = athena.New(sess) client.autoscalingconn = autoscaling.New(awsAutoscalingSess) - client.cloud9conn = cloud9.New(sess) + client.backupconn = backup.New(sess) + client.batchconn = batch.New(sess) + client.budgetconn = budgets.New(sess) client.cfconn = cloudformation.New(awsCfSess) + client.cloud9conn = cloud9.New(sess) client.cloudfrontconn = cloudfront.New(sess) client.cloudhsmv2conn = cloudhsmv2.New(sess) + client.cloudsearchconn = cloudsearch.New(sess) client.cloudtrailconn = cloudtrail.New(sess) client.cloudwatchconn = cloudwatch.New(awsCwSess) client.cloudwatcheventsconn = cloudwatchevents.New(awsCweSess) client.cloudwatchlogsconn = cloudwatchlogs.New(awsCwlSess) - client.codecommitconn = codecommit.New(sess) client.codebuildconn = codebuild.New(sess) + client.codecommitconn = codecommit.New(sess) client.codedeployconn = codedeploy.New(sess) - client.configconn = configservice.New(sess) + client.codepipelineconn = codepipeline.New(sess) client.cognitoconn = cognitoidentity.New(sess) client.cognitoidpconn = cognitoidentityprovider.New(sess) - client.codepipelineconn = codepipeline.New(sess) + client.configconn = configservice.New(sess) + client.costandusagereportconn = costandusagereportservice.New(sess) + client.datapipelineconn = datapipeline.New(sess) client.datasyncconn = datasync.New(sess) client.daxconn = dax.New(awsDynamoSess) client.dlmconn = dlm.New(sess) client.dmsconn = databasemigrationservice.New(sess) + client.docdbconn = docdb.New(sess) client.dsconn = directoryservice.New(sess) + client.dxconn = directconnect.New(sess) client.dynamodbconn = dynamodb.New(awsDynamoSess) client.ecrconn = ecr.New(awsEcrSess) client.ecsconn = ecs.New(awsEcsSess) @@ -546,52 +603,63 @@ func (c *Config) Client() (interface{}, error) { client.esconn = elasticsearch.New(awsEsSess) client.firehoseconn = firehose.New(sess) client.fmsconn = fms.New(sess) - client.inspectorconn = inspector.New(sess) + client.fsxconn = fsx.New(sess) client.gameliftconn = gamelift.New(sess) client.glacierconn = glacier.New(sess) + client.globalacceleratorconn = globalaccelerator.New(sess) + client.glueconn = glue.New(sess) client.guarddutyconn = guardduty.New(sess) + client.inspectorconn = inspector.New(sess) client.iotconn = iot.New(sess) - client.kinesisconn = kinesis.New(awsKinesisSess) + client.kafkaconn = kafka.New(sess) client.kinesisanalyticsconn = kinesisanalytics.New(awsKinesisAnalyticsSess) + client.kinesisconn = kinesis.New(awsKinesisSess) client.kmsconn = kms.New(awsKmsSess) client.lambdaconn = lambda.New(awsLambdaSess) client.lexmodelconn = lexmodelbuildingservice.New(sess) + client.licensemanagerconn = licensemanager.New(sess) client.lightsailconn = lightsail.New(sess) client.macieconn = macie.New(sess) + client.mediaconnectconn = mediaconnect.New(sess) + client.mediaconvertconn = mediaconvert.New(sess) + client.medialiveconn = medialive.New(sess) + client.mediapackageconn = mediapackage.New(sess) + client.mediastoreconn = mediastore.New(sess) + client.mediastoredataconn = mediastoredata.New(sess) client.mqconn = mq.New(sess) client.neptuneconn = neptune.New(sess) + client.neptuneconn = neptune.New(sess) client.opsworksconn = opsworks.New(sess) client.organizationsconn = organizations.New(sess) + client.pinpointconn = pinpoint.New(sess) + client.pricingconn = pricing.New(sess) client.r53conn = route53.New(r53Sess) + client.ramconn = ram.New(sess) client.rdsconn = rds.New(awsRdsSess) client.redshiftconn = redshift.New(sess) - client.simpledbconn = simpledb.New(sess) + client.resourcegroupsconn = resourcegroups.New(sess) + client.route53resolverconn = route53resolver.New(sess) client.s3conn = s3.New(awsS3Sess) + client.s3controlconn = s3control.New(awsS3ControlSess) + client.sagemakerconn = sagemaker.New(sess) client.scconn = servicecatalog.New(sess) client.sdconn = servicediscovery.New(sess) - client.sesConn = ses.New(sess) client.secretsmanagerconn = secretsmanager.New(sess) client.securityhubconn = securityhub.New(sess) + client.serverlessapplicationrepositoryconn = serverlessapplicationrepository.New(sess) + client.sesConn = ses.New(sess) client.sfnconn = sfn.New(sess) + client.simpledbconn = simpledb.New(sess) client.snsconn = sns.New(awsSnsSess) client.sqsconn = sqs.New(awsSqsSess) client.ssmconn = ssm.New(awsSsmSess) client.storagegatewayconn = storagegateway.New(sess) client.swfconn = swf.New(sess) + client.transferconn = transfer.New(sess) client.wafconn = waf.New(sess) client.wafregionalconn = wafregional.New(sess) - client.batchconn = batch.New(sess) - client.glueconn = glue.New(sess) - client.athenaconn = athena.New(sess) - client.dxconn = directconnect.New(sess) - client.mediastoreconn = mediastore.New(sess) - client.appsyncconn = appsync.New(sess) - client.neptuneconn = neptune.New(sess) - client.pricingconn = pricing.New(sess) - client.pinpointconn = pinpoint.New(sess) + client.worklinkconn = worklink.New(sess) client.workspacesconn = workspaces.New(sess) - client.appmeshconn = appmesh.New(sess) - client.transferconn = transfer.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go index e75df9c73..7c932fa6c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go @@ -61,7 +61,7 @@ func dataSourceAwsAmiIdsRead(d *schema.ResourceData, meta interface{}) error { owners, ownersOk := d.GetOk("owners") sortAscending := d.Get("sort_ascending").(bool) - if executableUsersOk == false && filtersOk == false && nameRegexOk == false && ownersOk == false { + if !executableUsersOk && !filtersOk && !nameRegexOk && !ownersOk { return fmt.Errorf("One of executable_users, filters, name_regex, or owners must be assigned") } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go new file mode 100644 index 000000000..291af71ef --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_group.go @@ -0,0 +1,181 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/autoscaling" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsAutoscalingGroup() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsAutoscalingGroupRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "availability_zones": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "default_cooldown": { + Type: schema.TypeInt, + Computed: true, + }, + "desired_capacity": { + Type: schema.TypeInt, + Computed: true, + }, + "health_check_grace_period": { + Type: schema.TypeInt, + Computed: true, + }, + "health_check_type": { + Type: schema.TypeString, + Computed: true, + }, + "launch_configuration": { + Type: schema.TypeString, + Computed: true, + }, + "load_balancers": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "new_instances_protected_from_scale_in": { + Type: schema.TypeBool, + Computed: true, + }, + "max_size": { + Type: schema.TypeInt, + Computed: true, + }, + "min_size": { + Type: schema.TypeInt, + Computed: true, + }, + "placement_group": { + Type: schema.TypeString, + Computed: true, + }, + "service_linked_role_arn": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "target_group_arns": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "termination_policies": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + "vpc_zone_identifier": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).autoscalingconn + d.SetId(time.Now().UTC().String()) + + groupName := d.Get("name").(string) + + input := &autoscaling.DescribeAutoScalingGroupsInput{ + AutoScalingGroupNames: []*string{ + aws.String(groupName), + }, + } + + log.Printf("[DEBUG] Reading Autoscaling Group: %s", input) + + result, err := conn.DescribeAutoScalingGroups(input) + + log.Printf("[DEBUG] Checking for error: %s", err) + + if err != nil { + return fmt.Errorf("error describing AutoScaling Groups: %s", err) + } + + log.Printf("[DEBUG] Found Autoscaling Group: %s", result) + + if len(result.AutoScalingGroups) < 1 { + return fmt.Errorf("Your query did not return any results. Please try a different search criteria.") + } + + if len(result.AutoScalingGroups) > 1 { + return fmt.Errorf("Your query returned more than one result. Please try a more " + + "specific search criteria.") + } + + // If execution made it to this point, we have exactly one 1 group returned + // and this is a safe operation + group := result.AutoScalingGroups[0] + + log.Printf("[DEBUG] aws_autoscaling_group - Single Auto Scaling Group found: %s", *group.AutoScalingGroupName) + + err1 := groupDescriptionAttributes(d, group) + return err1 +} + +// Populate group attribute fields with the returned group +func groupDescriptionAttributes(d *schema.ResourceData, group *autoscaling.Group) error { + log.Printf("[DEBUG] Setting attributes: %s", group) + d.Set("name", group.AutoScalingGroupName) + d.Set("arn", group.AutoScalingGroupARN) + if err := d.Set("availability_zones", aws.StringValueSlice(group.AvailabilityZones)); err != nil { + return err + } + d.Set("default_cooldown", group.DefaultCooldown) + d.Set("desired_capacity", group.DesiredCapacity) + d.Set("health_check_grace_period", group.HealthCheckGracePeriod) + d.Set("health_check_type", group.HealthCheckType) + d.Set("launch_configuration", group.LaunchConfigurationName) + if err := d.Set("load_balancers", aws.StringValueSlice(group.LoadBalancerNames)); err != nil { + return err + } + d.Set("new_instances_protected_from_scale_in", group.NewInstancesProtectedFromScaleIn) + d.Set("max_size", group.MaxSize) + d.Set("min_size", group.MinSize) + d.Set("placement_group", group.PlacementGroup) + d.Set("service_linked_role_arn", group.ServiceLinkedRoleARN) + d.Set("status", group.Status) + if err := d.Set("target_group_arns", aws.StringValueSlice(group.TargetGroupARNs)); err != nil { + return err + } + if err := d.Set("termination_policies", aws.StringValueSlice(group.TerminationPolicies)); err != nil { + return err + } + d.Set("vpc_zone_identifier", group.VPCZoneIdentifier) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go index a3b8bb709..3498cc7e0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go @@ -119,7 +119,7 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} } func expandAsgTagFilters(in []interface{}) []*autoscaling.Filter { - out := make([]*autoscaling.Filter, len(in), len(in)) + out := make([]*autoscaling.Filter, len(in)) for i, filter := range in { m := filter.(map[string]interface{}) values := expandStringList(m["values"].(*schema.Set).List()) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go index 95c65d983..493d28aab 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_export.go @@ -51,7 +51,7 @@ func dataSourceAwsCloudFormationExportRead(d *schema.ResourceData, meta interfac if err != nil { return fmt.Errorf("Failed listing CloudFormation exports: %s", err) } - if "" == value { + if value == "" { return fmt.Errorf("%s was not found in CloudFormation Exports for region %s", name, region) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go index cbc6e6daf..cf2949b2a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudtrail_service_account.go @@ -8,6 +8,8 @@ import ( ) // See http://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-regions.html +// See https://docs.aws.amazon.com/govcloud-us/latest/ug-east/verifying-cloudtrail.html +// See https://docs.aws.amazon.com/govcloud-us/latest/ug-west/verifying-cloudtrail.html var cloudTrailServiceAccountPerRegionMap = map[string]string{ "ap-northeast-1": "216624486486", "ap-northeast-2": "492519147666", @@ -25,6 +27,8 @@ var cloudTrailServiceAccountPerRegionMap = map[string]string{ "sa-east-1": "814480443879", "us-east-1": "086441151436", "us-east-2": "475085895292", + "us-gov-east-1": "608710470296", + "us-gov-west-1": "608710470296", "us-west-1": "388731089494", "us-west-2": "113285607260", } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go index cbcd941ec..e277085dc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go @@ -150,9 +150,6 @@ func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapsho d.Set("owner_id", snapshot.OwnerId) d.Set("owner_alias", snapshot.OwnerAlias) - if err := d.Set("tags", tagsToMap(snapshot.Tags)); err != nil { - return err - } - - return nil + err := d.Set("tags", tagsToMap(snapshot.Tags)) + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go index 5041e25b3..a8fbb6377 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go @@ -45,7 +45,7 @@ func dataSourceAwsEbsSnapshotIdsRead(d *schema.ResourceData, meta interface{}) e filters, filtersOk := d.GetOk("filter") owners, ownersOk := d.GetOk("owners") - if restorableUsers == false && filtersOk == false && ownersOk == false { + if restorableUsers == false && !filtersOk && !ownersOk { return fmt.Errorf("One of filters, restorable_by_user_ids, or owners must be assigned") } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go index f931e3a55..7795335d8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_volume.go @@ -144,9 +144,6 @@ func volumeDescriptionAttributes(d *schema.ResourceData, client *AWSClient, volu d.Set("snapshot_id", volume.SnapshotId) d.Set("volume_type", volume.VolumeType) - if err := d.Set("tags", tagsToMap(volume.Tags)); err != nil { - return err - } - - return nil + err := d.Set("tags", tagsToMap(volume.Tags)) + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go index e2d25a586..8b93434ac 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ecr_repository.go @@ -1,10 +1,10 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ecr" "github.com/hashicorp/terraform/helper/schema" ) @@ -31,6 +31,7 @@ func dataSourceAwsEcrRepository() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "tags": tagsSchemaComputed(), }, } } @@ -38,30 +39,33 @@ func dataSourceAwsEcrRepository() *schema.Resource { func dataSourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecrconn - repositoryName := d.Get("name").(string) params := &ecr.DescribeRepositoriesInput{ - RepositoryNames: []*string{aws.String(repositoryName)}, + RepositoryNames: aws.StringSlice([]string{d.Get("name").(string)}), } log.Printf("[DEBUG] Reading ECR repository: %s", params) out, err := conn.DescribeRepositories(params) if err != nil { - if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { + if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { log.Printf("[WARN] ECR Repository %s not found, removing from state", d.Id()) d.SetId("") return nil } - return err + return fmt.Errorf("error reading ECR repository: %s", err) } repository := out.Repositories[0] log.Printf("[DEBUG] Received ECR repository %s", out) - d.SetId(*repository.RepositoryName) + d.SetId(aws.StringValue(repository.RepositoryName)) d.Set("arn", repository.RepositoryArn) d.Set("registry_id", repository.RegistryId) d.Set("name", repository.RepositoryName) d.Set("repository_url", repository.RepositoryUri) + if err := getTagsECR(conn, d); err != nil { + return fmt.Errorf("error getting ECR repository tags: %s", err) + } + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go index 9f35dab93..539a86788 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go @@ -94,9 +94,10 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er d.Id(), err.Error()) } - for _, tag := range tagsResp.Tags { - tags = append(tags, tag) - } + tags = append(tags, tagsResp.Tags...) + //for _, tag := range tagsResp.Tags { + // tags = append(tags, tag) + //} if tagsResp.NextMarker != nil { marker = *tagsResp.NextMarker @@ -141,9 +142,5 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er region := meta.(*AWSClient).region err = d.Set("dns_name", resourceAwsEfsDnsName(*fs.FileSystemId, region)) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go new file mode 100644 index 000000000..4ace7b051 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eks_cluster_auth.go @@ -0,0 +1,48 @@ +package aws + +import ( + "fmt" + "time" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + "github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token" +) + +func dataSourceAwsEksClusterAuth() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsEksClusterAuthRead, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + + "token": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + }, + } +} + +func dataSourceAwsEksClusterAuthRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).stsconn + name := d.Get("name").(string) + generator, err := token.NewGenerator(false) + if err != nil { + return fmt.Errorf("error getting token generator: %v", err) + } + token, err := generator.GetWithSTS(name, conn) + if err != nil { + return fmt.Errorf("error getting token: %v", err) + } + + d.SetId(time.Now().UTC().String()) + d.Set("token", token.Token) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go new file mode 100644 index 000000000..5ec320d7a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elastic_beanstalk_application.go @@ -0,0 +1,87 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/elasticbeanstalk" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsElasticBeanstalkApplication() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsElasticBeanstalkApplicationRead, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "appversion_lifecycle": { + Type: schema.TypeList, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "service_role": { + Type: schema.TypeString, + Computed: true, + }, + "max_age_in_days": { + Type: schema.TypeInt, + Computed: true, + }, + "max_count": { + Type: schema.TypeInt, + Computed: true, + }, + "delete_source_from_s3": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsElasticBeanstalkApplicationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).elasticbeanstalkconn + + // Get the name and description + name := d.Get("name").(string) + + resp, err := conn.DescribeApplications(&elasticbeanstalk.DescribeApplicationsInput{ + ApplicationNames: []*string{aws.String(name)}, + }) + if err != nil { + return fmt.Errorf("Error describing Applications (%s): %s", name, err) + } + + if len(resp.Applications) > 1 || len(resp.Applications) < 1 { + return fmt.Errorf("Error %d Applications matched, expected 1", len(resp.Applications)) + } + + app := resp.Applications[0] + + d.SetId(name) + d.Set("arn", app.ApplicationArn) + d.Set("name", app.ApplicationName) + d.Set("description", app.Description) + + if app.ResourceLifecycleConfig != nil { + d.Set("appversion_lifecycle", flattenResourceLifecycleConfig(app.ResourceLifecycleConfig)) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go index 217530767..4456aef75 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_elasticache_cluster.go @@ -206,7 +206,7 @@ func dataSourceAwsElastiCacheClusterRead(d *schema.ResourceData, meta interface{ if cluster.ConfigurationEndpoint != nil { d.Set("port", cluster.ConfigurationEndpoint.Port) d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *cluster.ConfigurationEndpoint.Address, *cluster.ConfigurationEndpoint.Port))) - d.Set("cluster_address", aws.String(fmt.Sprintf("%s", *cluster.ConfigurationEndpoint.Address))) + d.Set("cluster_address", aws.String(*cluster.ConfigurationEndpoint.Address)) } if err := setCacheNodeData(d, cluster); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go index 080211b98..e07fa1867 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instance.go @@ -259,7 +259,7 @@ func dataSourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error { instanceID, instanceIDOk := d.GetOk("instance_id") tags, tagsOk := d.GetOk("instance_tags") - if filtersOk == false && instanceIDOk == false && tagsOk == false { + if !filtersOk && !instanceIDOk && !tagsOk { return fmt.Errorf("One of filters, instance_tags, or instance_id must be assigned") } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go index 83def2a8f..5fd837383 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_instances.go @@ -125,9 +125,5 @@ func dataSourceAwsInstancesRead(d *schema.ResourceData, meta interface{}) error } err = d.Set("public_ips", publicIps) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go index 541c6e380..5535fb7a3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_internet_gateway.go @@ -83,11 +83,10 @@ func dataSourceAwsInternetGatewayRead(d *schema.ResourceData, meta interface{}) d.Set("tags", tagsToMap(igw.Tags)) d.Set("owner_id", igw.OwnerId) d.Set("internet_gateway_id", igw.InternetGatewayId) - if err := d.Set("attachments", dataSourceAttachmentsRead(igw.Attachments)); err != nil { - return err - } - return nil + err1 := d.Set("attachments", dataSourceAttachmentsRead(igw.Attachments)) + return err1 + } func dataSourceAttachmentsRead(igwAttachments []*ec2.InternetGatewayAttachment) []map[string]interface{} { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go index 392a0e444..0f5e47750 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_function.go @@ -40,6 +40,14 @@ func dataSourceAwsLambdaFunction() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "layers": { + Type: schema.TypeList, + Computed: true, + MaxItems: 5, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, "memory_size": { Type: schema.TypeInt, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go index 0fe5ca6b6..eb65ee3e1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go @@ -147,6 +147,7 @@ func dataSourceAwsMqBroker() *schema.Resource { Elem: &schema.Schema{Type: schema.TypeString}, Computed: true, }, + "tags": tagsSchemaComputed(), "user": { Type: schema.TypeSet, Computed: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go index 117fefc00..4cd4f08d2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go @@ -50,12 +50,6 @@ func dataSourceAwsDelegationSetRead(d *schema.ResourceData, meta interface{}) er d.SetId(dSetID) d.Set("caller_reference", resp.DelegationSet.CallerReference) - servers := []string{} - for _, server := range resp.DelegationSet.NameServers { - if server != nil { - servers = append(servers, *server) - } - } if err := d.Set("name_servers", expandNameServers(resp.DelegationSet.NameServers)); err != nil { return fmt.Errorf("error setting name_servers: %s", err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go index 34104295a..e5ee30103 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_zone.go @@ -96,7 +96,7 @@ func dataSourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) erro hostedZoneFound = hostedZone break // we check if the name is the same as requested and if private zone field is the same as requested or if there is a vpc_id - } else if *hostedZone.Name == name && (*hostedZone.Config.PrivateZone == d.Get("private_zone").(bool) || (*hostedZone.Config.PrivateZone == true && vpcIdExists)) { + } else if *hostedZone.Name == name && (*hostedZone.Config.PrivateZone == d.Get("private_zone").(bool) || (*hostedZone.Config.PrivateZone && vpcIdExists)) { matchingVPC := false if vpcIdExists { reqHostedZone := &route53.GetHostedZoneInput{} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go index 6a678a75b..2e3e25a40 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket.go @@ -72,11 +72,8 @@ func dataSourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { d.Set("arn", arn) d.Set("bucket_domain_name", bucketDomainName(bucket)) - if err := bucketLocation(d, bucket, conn); err != nil { - return err - } - - return nil + err = bucketLocation(d, bucket, conn) + return err } func bucketLocation(d *schema.ResourceData, bucket string, conn *s3.S3) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go index b501443a7..5be6586d0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_s3_bucket_object.go @@ -134,7 +134,7 @@ func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) e if err != nil { return fmt.Errorf("Failed getting S3 object: %s Bucket: %q Object: %q", err, bucket, key) } - if out.DeleteMarker != nil && *out.DeleteMarker == true { + if out.DeleteMarker != nil && *out.DeleteMarker { return fmt.Errorf("Requested S3 object %q%s has been deleted", bucket+key, versionText) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go index 411504e53..d5b1ac121 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_security_groups.go @@ -86,9 +86,5 @@ func dataSourceAwsSecurityGroupsRead(d *schema.ResourceData, meta interface{}) e } err = d.Set("vpc_ids", vpc_ids) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go index 72791b76d..c67707dfc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go @@ -45,7 +45,7 @@ func EcsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (boo return false, err } - equal := bytes.Compare(canonicalJson1, canonicalJson2) == 0 + equal := bytes.Equal(canonicalJson1, canonicalJson2) if !equal { log.Printf("[DEBUG] Canonical definitions are not equal.\nFirst: %s\nSecond: %s\n", canonicalJson1, canonicalJson2) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go index 08ea5c78e..4bb627955 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/iam_policy_model.go @@ -38,34 +38,34 @@ type IAMPolicyStatementCondition struct { type IAMPolicyStatementPrincipalSet []IAMPolicyStatementPrincipal type IAMPolicyStatementConditionSet []IAMPolicyStatementCondition -func (self *IAMPolicyDoc) Merge(newDoc *IAMPolicyDoc) { +func (s *IAMPolicyDoc) Merge(newDoc *IAMPolicyDoc) { // adopt newDoc's Id if len(newDoc.Id) > 0 { - self.Id = newDoc.Id + s.Id = newDoc.Id } // let newDoc upgrade our Version - if newDoc.Version > self.Version { - self.Version = newDoc.Version + if newDoc.Version > s.Version { + s.Version = newDoc.Version } // merge in newDoc's statements, overwriting any existing Sids var seen bool for _, newStatement := range newDoc.Statements { if len(newStatement.Sid) == 0 { - self.Statements = append(self.Statements, newStatement) + s.Statements = append(s.Statements, newStatement) continue } seen = false - for i, existingStatement := range self.Statements { + for i, existingStatement := range s.Statements { if existingStatement.Sid == newStatement.Sid { - self.Statements[i] = newStatement + s.Statements[i] = newStatement seen = true break } } if !seen { - self.Statements = append(self.Statements, newStatement) + s.Statements = append(s.Statements, newStatement) } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go index 82e5317ea..40b1d26f0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_db_event_subscription.go @@ -10,7 +10,7 @@ func resourceAwsDbEventSubscriptionImport( // in order to populate the necessary values. This takes the "id" from the supplied StateFunc // and sets it as the "name" attribute, as described in the import documentation. This allows // the Read function to actually succeed and set the ID of the resource - results := make([]*schema.ResourceData, 1, 1) + results := make([]*schema.ResourceData, 1) d.Set("name", d.Id()) results[0] = d return results, nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go index d8d051b8b..44262623e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go @@ -13,7 +13,7 @@ func resourceAwsS3BucketImportState( d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { - results := make([]*schema.ResourceData, 1, 1) + results := make([]*schema.ResourceData, 1) results[0] = d conn := meta.(*AWSClient).s3conn diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go index 7d107c649..8c2c5e3b0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go @@ -169,6 +169,7 @@ func Provider() terraform.ResourceProvider { "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), "aws_api_gateway_vpc_link": dataSourceAwsApiGatewayVpcLink(), "aws_arn": dataSourceAwsArn(), + "aws_autoscaling_group": dataSourceAwsAutoscalingGroup(), "aws_autoscaling_groups": dataSourceAwsAutoscalingGroups(), "aws_availability_zone": dataSourceAwsAvailabilityZone(), "aws_availability_zones": dataSourceAwsAvailabilityZones(), @@ -205,6 +206,8 @@ func Provider() terraform.ResourceProvider { "aws_efs_mount_target": dataSourceAwsEfsMountTarget(), "aws_eip": dataSourceAwsEip(), "aws_eks_cluster": dataSourceAwsEksCluster(), + "aws_eks_cluster_auth": dataSourceAwsEksClusterAuth(), + "aws_elastic_beanstalk_application": dataSourceAwsElasticBeanstalkApplication(), "aws_elastic_beanstalk_hosted_zone": dataSourceAwsElasticBeanstalkHostedZone(), "aws_elastic_beanstalk_solution_stack": dataSourceAwsElasticBeanstalkSolutionStack(), "aws_elasticache_cluster": dataSourceAwsElastiCacheCluster(), @@ -335,6 +338,7 @@ func Provider() terraform.ResourceProvider { "aws_autoscaling_notification": resourceAwsAutoscalingNotification(), "aws_autoscaling_policy": resourceAwsAutoscalingPolicy(), "aws_autoscaling_schedule": resourceAwsAutoscalingSchedule(), + "aws_backup_vault": resourceAwsBackupVault(), "aws_budgets_budget": resourceAwsBudgetsBudget(), "aws_cloud9_environment_ec2": resourceAwsCloud9EnvironmentEc2(), "aws_cloudformation_stack": resourceAwsCloudFormationStack(), @@ -405,6 +409,10 @@ func Provider() terraform.ResourceProvider { "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), "aws_dms_replication_task": resourceAwsDmsReplicationTask(), + "aws_docdb_cluster_parameter_group": resourceAwsDocDBClusterParameterGroup(), + "aws_docdb_cluster_snapshot": resourceAwsDocDBClusterSnapshot(), + "aws_docdb_subnet_group": resourceAwsDocDBSubnetGroup(), + "aws_docdb_cluster": resourceAwsDocDBCluster(), "aws_dx_bgp_peer": resourceAwsDxBgpPeer(), "aws_dx_connection": resourceAwsDxConnection(), "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), @@ -424,6 +432,8 @@ func Provider() terraform.ResourceProvider { "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), "aws_ebs_volume": resourceAwsEbsVolume(), "aws_ec2_capacity_reservation": resourceAwsEc2CapacityReservation(), + "aws_ec2_client_vpn_endpoint": resourceAwsEc2ClientVpnEndpoint(), + "aws_ec2_client_vpn_network_association": resourceAwsEc2ClientVpnNetworkAssociation(), "aws_ec2_fleet": resourceAwsEc2Fleet(), "aws_ec2_transit_gateway": resourceAwsEc2TransitGateway(), "aws_ec2_transit_gateway_route": resourceAwsEc2TransitGatewayRoute(), @@ -468,6 +478,7 @@ func Provider() terraform.ResourceProvider { "aws_gamelift_game_session_queue": resourceAwsGameliftGameSessionQueue(), "aws_glacier_vault": resourceAwsGlacierVault(), "aws_glacier_vault_lock": resourceAwsGlacierVaultLock(), + "aws_globalaccelerator_accelerator": resourceAwsGlobalAcceleratorAccelerator(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), "aws_glue_classifier": resourceAwsGlueClassifier(), @@ -526,8 +537,11 @@ func Provider() terraform.ResourceProvider { "aws_lambda_event_source_mapping": resourceAwsLambdaEventSourceMapping(), "aws_lambda_alias": resourceAwsLambdaAlias(), "aws_lambda_permission": resourceAwsLambdaPermission(), + "aws_lambda_layer_version": resourceAwsLambdaLayerVersion(), "aws_launch_configuration": resourceAwsLaunchConfiguration(), "aws_launch_template": resourceAwsLaunchTemplate(), + "aws_licensemanager_association": resourceAwsLicenseManagerAssociation(), + "aws_licensemanager_license_configuration": resourceAwsLicenseManagerLicenseConfiguration(), "aws_lightsail_domain": resourceAwsLightsailDomain(), "aws_lightsail_instance": resourceAwsLightsailInstance(), "aws_lightsail_key_pair": resourceAwsLightsailKeyPair(), @@ -543,6 +557,7 @@ func Provider() terraform.ResourceProvider { "aws_main_route_table_association": resourceAwsMainRouteTableAssociation(), "aws_mq_broker": resourceAwsMqBroker(), "aws_mq_configuration": resourceAwsMqConfiguration(), + "aws_media_package_channel": resourceAwsMediaPackageChannel(), "aws_media_store_container": resourceAwsMediaStoreContainer(), "aws_media_store_container_policy": resourceAwsMediaStoreContainerPolicy(), "aws_nat_gateway": resourceAwsNatGateway(), @@ -580,16 +595,19 @@ func Provider() terraform.ResourceProvider { "aws_organizations_policy_attachment": resourceAwsOrganizationsPolicyAttachment(), "aws_placement_group": resourceAwsPlacementGroup(), "aws_proxy_protocol_policy": resourceAwsProxyProtocolPolicy(), + "aws_ram_resource_share": resourceAwsRamResourceShare(), "aws_rds_cluster": resourceAwsRDSCluster(), "aws_rds_cluster_endpoint": resourceAwsRDSClusterEndpoint(), "aws_rds_cluster_instance": resourceAwsRDSClusterInstance(), "aws_rds_cluster_parameter_group": resourceAwsRDSClusterParameterGroup(), + "aws_rds_global_cluster": resourceAwsRDSGlobalCluster(), "aws_redshift_cluster": resourceAwsRedshiftCluster(), "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), + "aws_resourcegroups_group": resourceAwsResourceGroupsGroup(), "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), "aws_route53_query_log": resourceAwsRoute53QueryLog(), "aws_route53_record": resourceAwsRoute53Record(), @@ -600,6 +618,7 @@ func Provider() terraform.ResourceProvider { "aws_route_table": resourceAwsRouteTable(), "aws_default_route_table": resourceAwsDefaultRouteTable(), "aws_route_table_association": resourceAwsRouteTableAssociation(), + "aws_sagemaker_model": resourceAwsSagemakerModel(), "aws_secretsmanager_secret": resourceAwsSecretsManagerSecret(), "aws_secretsmanager_secret_version": resourceAwsSecretsManagerSecretVersion(), "aws_ses_active_receipt_rule_set": resourceAwsSesActiveReceiptRuleSet(), @@ -614,18 +633,24 @@ func Provider() terraform.ResourceProvider { "aws_ses_event_destination": resourceAwsSesEventDestination(), "aws_ses_identity_notification_topic": resourceAwsSesNotificationTopic(), "aws_ses_template": resourceAwsSesTemplate(), + "aws_s3_account_public_access_block": resourceAwsS3AccountPublicAccessBlock(), "aws_s3_bucket": resourceAwsS3Bucket(), "aws_s3_bucket_policy": resourceAwsS3BucketPolicy(), + "aws_s3_bucket_public_access_block": resourceAwsS3BucketPublicAccessBlock(), "aws_s3_bucket_object": resourceAwsS3BucketObject(), "aws_s3_bucket_notification": resourceAwsS3BucketNotification(), "aws_s3_bucket_metric": resourceAwsS3BucketMetric(), "aws_s3_bucket_inventory": resourceAwsS3BucketInventory(), + "aws_sagemaker_notebook_instance": resourceAwsSagemakerNotebookInstance(), "aws_security_group": resourceAwsSecurityGroup(), "aws_network_interface_sg_attachment": resourceAwsNetworkInterfaceSGAttachment(), "aws_default_security_group": resourceAwsDefaultSecurityGroup(), "aws_security_group_rule": resourceAwsSecurityGroupRule(), "aws_securityhub_account": resourceAwsSecurityHubAccount(), + "aws_securityhub_product_subscription": resourceAwsSecurityHubProductSubscription(), + "aws_securityhub_standards_subscription": resourceAwsSecurityHubStandardsSubscription(), "aws_servicecatalog_portfolio": resourceAwsServiceCatalogPortfolio(), + "aws_service_discovery_http_namespace": resourceAwsServiceDiscoveryHttpNamespace(), "aws_service_discovery_private_dns_namespace": resourceAwsServiceDiscoveryPrivateDnsNamespace(), "aws_service_discovery_public_dns_namespace": resourceAwsServiceDiscoveryPublicDnsNamespace(), "aws_service_discovery_service": resourceAwsServiceDiscoveryService(), @@ -664,6 +689,8 @@ func Provider() terraform.ResourceProvider { "aws_subnet": resourceAwsSubnet(), "aws_swf_domain": resourceAwsSwfDomain(), "aws_transfer_server": resourceAwsTransferServer(), + "aws_transfer_ssh_key": resourceAwsTransferSshKey(), + "aws_transfer_user": resourceAwsTransferUser(), "aws_volume_attachment": resourceAwsVolumeAttachment(), "aws_vpc_dhcp_options_association": resourceAwsVpcDhcpOptionsAssociation(), "aws_default_vpc_dhcp_options": resourceAwsDefaultVpcDhcpOptions(), @@ -710,6 +737,7 @@ func Provider() terraform.ResourceProvider { "aws_wafregional_xss_match_set": resourceAwsWafRegionalXssMatchSet(), "aws_wafregional_web_acl": resourceAwsWafRegionalWebAcl(), "aws_wafregional_web_acl_association": resourceAwsWafRegionalWebAclAssociation(), + "aws_worklink_fleet": resourceAwsWorkLinkFleet(), "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), "aws_batch_job_definition": resourceAwsBatchJobDefinition(), "aws_batch_job_queue": resourceAwsBatchJobQueue(), @@ -812,6 +840,8 @@ func init() { "s3_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "s3control_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "sns_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "sqs_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", @@ -923,6 +953,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.R53Endpoint = endpoints["r53"].(string) config.RdsEndpoint = endpoints["rds"].(string) config.S3Endpoint = endpoints["s3"].(string) + config.S3ControlEndpoint = endpoints["s3control"].(string) config.SnsEndpoint = endpoints["sns"].(string) config.SqsEndpoint = endpoints["sqs"].(string) config.StsEndpoint = endpoints["sts"].(string) @@ -1128,6 +1159,12 @@ func endpointsSchema() *schema.Schema { Default: "", Description: descriptions["s3_endpoint"], }, + "s3control": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["s3control_endpoint"], + }, "sns": { Type: schema.TypeString, Optional: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go index 7a3e0b3e2..09002b225 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "strings" @@ -23,10 +24,29 @@ func resourceAwsAcmCertificate() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "certificate_body": { + Type: schema.TypeString, + Optional: true, + StateFunc: normalizeCert, + }, + + "certificate_chain": { + Type: schema.TypeString, + Optional: true, + StateFunc: normalizeCert, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + StateFunc: normalizeCert, + Sensitive: true, + }, "domain_name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"private_key", "certificate_body", "certificate_chain"}, StateFunc: func(v interface{}) string { // AWS Provider 1.42.0+ aws_route53_zone references may contain a // trailing period, which generates an ACM API error @@ -34,9 +54,11 @@ func resourceAwsAcmCertificate() *schema.Resource { }, }, "subject_alternative_names": { - Type: schema.TypeList, - Optional: true, - ForceNew: true, + Type: schema.TypeList, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"private_key", "certificate_body", "certificate_chain"}, Elem: &schema.Schema{ Type: schema.TypeString, StateFunc: func(v interface{}) string { @@ -47,9 +69,11 @@ func resourceAwsAcmCertificate() *schema.Resource { }, }, "validation_method": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"private_key", "certificate_body", "certificate_chain"}, }, "arn": { Type: schema.TypeString, @@ -90,6 +114,44 @@ func resourceAwsAcmCertificate() *schema.Resource { } func resourceAwsAcmCertificateCreate(d *schema.ResourceData, meta interface{}) error { + if _, ok := d.GetOk("domain_name"); ok { + if _, ok := d.GetOk("validation_method"); !ok { + return errors.New("validation_method must be set when creating a certificate") + } + return resourceAwsAcmCertificateCreateRequested(d, meta) + } else if _, ok := d.GetOk("private_key"); ok { + if _, ok := d.GetOk("certificate_body"); !ok { + return errors.New("certificate_body must be set when importing a certificate with private_key") + } + return resourceAwsAcmCertificateCreateImported(d, meta) + } + return errors.New("certificate must be imported (private_key) or created (domain_name)") +} + +func resourceAwsAcmCertificateCreateImported(d *schema.ResourceData, meta interface{}) error { + acmconn := meta.(*AWSClient).acmconn + resp, err := resourceAwsAcmCertificateImport(acmconn, d, false) + if err != nil { + return fmt.Errorf("Error importing certificate: %s", err) + } + + d.SetId(*resp.CertificateArn) + if v, ok := d.GetOk("tags"); ok { + params := &acm.AddTagsToCertificateInput{ + CertificateArn: resp.CertificateArn, + Tags: tagsFromMapACM(v.(map[string]interface{})), + } + _, err := acmconn.AddTagsToCertificate(params) + + if err != nil { + return fmt.Errorf("Error requesting certificate: %s", err) + } + } + + return resourceAwsAcmCertificateRead(d, meta) +} + +func resourceAwsAcmCertificateCreateRequested(d *schema.ResourceData, meta interface{}) error { acmconn := meta.(*AWSClient).acmconn params := &acm.RequestCertificateInput{ DomainName: aws.String(strings.TrimSuffix(d.Get("domain_name").(string), ".")), @@ -164,6 +226,7 @@ func resourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) err if err := d.Set("validation_emails", emailValidationOptions); err != nil { return resource.NonRetryableError(err) } + d.Set("validation_method", resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions, emailValidationOptions)) params := &acm.ListTagsForCertificateInput{ @@ -194,22 +257,30 @@ func resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions []ma } func resourceAwsAcmCertificateUpdate(d *schema.ResourceData, meta interface{}) error { + acmconn := meta.(*AWSClient).acmconn + + if d.HasChange("private_key") || d.HasChange("certificate_body") || d.HasChange("certificate_chain") { + _, err := resourceAwsAcmCertificateImport(acmconn, d, true) + if err != nil { + return fmt.Errorf("Error updating certificate: %s", err) + } + } + if d.HasChange("tags") { - acmconn := meta.(*AWSClient).acmconn err := setTagsACM(acmconn, d) if err != nil { return err } } - return nil + return resourceAwsAcmCertificateRead(d, meta) } func cleanUpSubjectAlternativeNames(cert *acm.CertificateDetail) []string { sans := cert.SubjectAlternativeNames - vs := make([]string, 0, len(sans)-1) + vs := make([]string, 0) for _, v := range sans { - if *v != *cert.DomainName { - vs = append(vs, *v) + if aws.StringValue(v) != aws.StringValue(cert.DomainName) { + vs = append(vs, aws.StringValue(v)) } } return vs @@ -234,7 +305,7 @@ func convertValidationOptions(certificate *acm.CertificateDetail) ([]map[string] for _, validationEmail := range o.ValidationEmails { emailValidationResult = append(emailValidationResult, *validationEmail) } - } else { + } else if o.ValidationStatus == nil || aws.StringValue(o.ValidationStatus) == acm.DomainStatusPendingValidation { log.Printf("[DEBUG] No validation options need to retry: %#v", o) return nil, nil, fmt.Errorf("No validation options need to retry: %#v", o) } @@ -271,3 +342,19 @@ func resourceAwsAcmCertificateDelete(d *schema.ResourceData, meta interface{}) e return nil } + +func resourceAwsAcmCertificateImport(conn *acm.ACM, d *schema.ResourceData, update bool) (*acm.ImportCertificateOutput, error) { + params := &acm.ImportCertificateInput{ + PrivateKey: []byte(d.Get("private_key").(string)), + Certificate: []byte(d.Get("certificate_body").(string)), + } + if chain, ok := d.GetOk("certificate_chain"); ok { + params.CertificateChain = []byte(chain.(string)) + } + if update { + params.CertificateArn = aws.String(d.Get("arn").(string)) + } + + log.Printf("[DEBUG] ACM Certificate Import: %#v", params) + return conn.ImportCertificate(params) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go index 75bbc1460..0ec7436fe 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go @@ -702,9 +702,7 @@ func listAcmpcaTags(conn *acmpca.ACMPCA, certificateAuthorityArn string) ([]*acm if err != nil { return tags, err } - for _, tag := range output.Tags { - tags = append(tags, tag) - } + tags = append(tags, output.Tags...) if output.NextToken == nil { break } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go index 537b81e45..95d4f9924 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_documentation_part.go @@ -168,11 +168,7 @@ func resourceAwsApiGatewayDocumentationPartDelete(d *schema.ResourceData, meta i DocumentationPartId: aws.String(id), RestApiId: aws.String(apiId), }) - if err != nil { - return err - } - - return nil + return err } func expandApiGatewayDocumentationPartLocation(l []interface{}) *apigateway.DocumentationPartLocation { @@ -203,7 +199,7 @@ func flattenApiGatewayDocumentationPartLocation(l *apigateway.DocumentationPartL return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) m["type"] = *l.Type if l.Method != nil { m["method"] = *l.Method diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go index cb9c828a7..daa2ea15b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_method_settings.go @@ -188,7 +188,7 @@ func resourceAwsApiGatewayMethodSettingsUpdate(d *schema.ResourceData, meta inte ops = append(ops, &apigateway.PatchOperation{ Op: aws.String("replace"), Path: aws.String(prefix + "caching/dataEncrypted"), - Value: aws.String(fmt.Sprintf("%d", d.Get("settings.0.cache_data_encrypted").(int))), + Value: aws.String(fmt.Sprintf("%t", d.Get("settings.0.cache_data_encrypted").(bool))), }) } if d.HasChange("settings.0.require_authorization_for_cache_control") { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go index a2c8e1347..b3b1275db 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go @@ -142,7 +142,7 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) input.DocumentationVersion = aws.String(v.(string)) } if vars, ok := d.GetOk("variables"); ok { - variables := make(map[string]string, 0) + variables := make(map[string]string) for k, v := range vars.(map[string]interface{}) { variables[k] = v.(string) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go index 3d4f2676b..d892d7588 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go @@ -187,11 +187,8 @@ func resourceAwsApiGatewayVpcLinkDelete(d *schema.ResourceData, meta interface{} }, } - if _, err := stateConf.WaitForState(); err != nil { - return err - } - - return nil + _, err = stateConf.WaitForState() + return err } func apigatewayVpcLinkRefreshStatusFunc(conn *apigateway.APIGateway, vl string) resource.StateRefreshFunc { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go index 7f0f5d048..a44bd364e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_app_cookie_stickiness_policy.go @@ -20,6 +20,9 @@ func resourceAwsAppCookieStickinessPolicy() *schema.Resource { Create: resourceAwsAppCookieStickinessPolicyCreate, Read: resourceAwsAppCookieStickinessPolicyRead, Delete: resourceAwsAppCookieStickinessPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -136,7 +139,9 @@ func resourceAwsAppCookieStickinessPolicyRead(d *schema.ResourceData, meta inter d.Set("cookie_name", cookieAttr.AttributeValue) d.Set("name", policyName) d.Set("load_balancer", lbName) - d.Set("lb_port", lbPort) + + lbPortInt, _ := strconv.Atoi(lbPort) + d.Set("lb_port", lbPortInt) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go index 324223b12..102c54062 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go @@ -455,7 +455,7 @@ func expandAppautoscalingCustomizedMetricSpecification(configured []interface{}) } if s, ok := data["dimensions"].(*schema.Set); ok && s.Len() > 0 { - dimensions := make([]*applicationautoscaling.MetricDimension, s.Len(), s.Len()) + dimensions := make([]*applicationautoscaling.MetricDimension, s.Len()) for i, d := range s.List() { dimension := d.(map[string]interface{}) dimensions[i] = &applicationautoscaling.MetricDimension{ @@ -635,7 +635,7 @@ func flattenStepScalingPolicyConfiguration(cfg *applicationautoscaling.StepScali return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if cfg.AdjustmentType != nil { m["adjustment_type"] = *cfg.AdjustmentType @@ -657,10 +657,10 @@ func flattenStepScalingPolicyConfiguration(cfg *applicationautoscaling.StepScali } func flattenAppautoscalingStepAdjustments(adjs []*applicationautoscaling.StepAdjustment) []interface{} { - out := make([]interface{}, len(adjs), len(adjs)) + out := make([]interface{}, len(adjs)) for i, adj := range adjs { - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) m["scaling_adjustment"] = *adj.ScalingAdjustment @@ -682,7 +682,7 @@ func flattenTargetTrackingScalingPolicyConfiguration(cfg *applicationautoscaling return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) m["target_value"] = *cfg.TargetValue if cfg.DisableScaleIn != nil { @@ -726,7 +726,7 @@ func flattenCustomizedMetricSpecification(cfg *applicationautoscaling.Customized } func flattenMetricDimensions(ds []*applicationautoscaling.MetricDimension) []interface{} { - l := make([]interface{}, len(ds), len(ds)) + l := make([]interface{}, len(ds)) for i, d := range ds { l[i] = map[string]interface{}{ "name": *d.Name, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go index b0972edb6..820ac41ca 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_route.go @@ -177,11 +177,8 @@ func resourceAwsAppmeshRouteRead(d *schema.ResourceData, meta interface{}) error d.Set("arn", resp.Route.Metadata.Arn) d.Set("created_date", resp.Route.Metadata.CreatedAt.Format(time.RFC3339)) d.Set("last_updated_date", resp.Route.Metadata.LastUpdatedAt.Format(time.RFC3339)) - if err := d.Set("spec", flattenAppmeshRouteSpec(resp.Route.Spec)); err != nil { - return err - } - - return nil + err1 := d.Set("spec", flattenAppmeshRouteSpec(resp.Route.Spec)) + return err1 } func resourceAwsAppmeshRouteUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go index 072cdac7c..4b79272e7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_node.go @@ -178,11 +178,8 @@ func resourceAwsAppmeshVirtualNodeRead(d *schema.ResourceData, meta interface{}) d.Set("arn", resp.VirtualNode.Metadata.Arn) d.Set("created_date", resp.VirtualNode.Metadata.CreatedAt.Format(time.RFC3339)) d.Set("last_updated_date", resp.VirtualNode.Metadata.LastUpdatedAt.Format(time.RFC3339)) - if err := d.Set("spec", flattenAppmeshVirtualNodeSpec(resp.VirtualNode.Spec)); err != nil { - return err - } - - return nil + err1 := d.Set("spec", flattenAppmeshVirtualNodeSpec(resp.VirtualNode.Spec)) + return err1 } func resourceAwsAppmeshVirtualNodeUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go index dde7f39b7..07245fcb8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appmesh_virtual_router.go @@ -137,11 +137,8 @@ func resourceAwsAppmeshVirtualRouterRead(d *schema.ResourceData, meta interface{ d.Set("arn", resp.VirtualRouter.Metadata.Arn) d.Set("created_date", resp.VirtualRouter.Metadata.CreatedAt.Format(time.RFC3339)) d.Set("last_updated_date", resp.VirtualRouter.Metadata.LastUpdatedAt.Format(time.RFC3339)) - if err := d.Set("spec", flattenAppmeshVirtualRouterSpec(resp.VirtualRouter.Spec)); err != nil { - return err - } - - return nil + err1 := d.Set("spec", flattenAppmeshVirtualRouterSpec(resp.VirtualRouter.Spec)) + return err1 } func resourceAwsAppmeshVirtualRouterDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go index bfbd197c4..e5bd43f28 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_named_query.go @@ -95,9 +95,5 @@ func resourceAwsAthenaNamedQueryDelete(d *schema.ResourceData, meta interface{}) } _, err := conn.DeleteNamedQuery(input) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go index 2871ef4fc..0755f13ed 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go @@ -512,7 +512,7 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) } } - // Availability Zones are optional if VPC Zone Identifer(s) are specified + // Availability Zones are optional if VPC Zone Identifier(s) are specified if v, ok := d.GetOk("availability_zones"); ok && v.(*schema.Set).Len() > 0 { createOpts.AvailabilityZones = expandStringList(v.(*schema.Set).List()) } @@ -1080,11 +1080,7 @@ func enableASGSuspendedProcesses(d *schema.ResourceData, conn *autoscaling.AutoS } _, err := conn.SuspendProcesses(props) - if err != nil { - return err - } - - return nil + return err } func enableASGMetricsCollection(d *schema.ResourceData, conn *autoscaling.AutoScaling) error { @@ -1096,11 +1092,8 @@ func enableASGMetricsCollection(d *schema.ResourceData, conn *autoscaling.AutoSc log.Printf("[INFO] Enabling metrics collection for the ASG: %s", d.Id()) _, metricsErr := conn.EnableMetricsCollection(props) - if metricsErr != nil { - return metricsErr - } + return metricsErr - return nil } func updateASGSuspendedProcesses(d *schema.ResourceData, conn *autoscaling.AutoScaling) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go index 8bde39bab..404d845fe 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go @@ -115,7 +115,7 @@ func waitForASGCapacity( }) if aErr == nil { if len(resp.Activities) > 0 { - recentStatus = fmt.Sprintf("%s", resp.Activities[0]) + recentStatus = (resp.Activities[0].String()) } else { recentStatus = "(0 activities found)" } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go index 77fb744fe..7b2108254 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go @@ -194,11 +194,8 @@ func resourceAwsAutoscalingNotificationDelete(d *schema.ResourceData, meta inter gl := convertSetToList(d.Get("group_names").(*schema.Set)) topic := d.Get("topic_arn").(string) - if err := removeNotificationConfigToGroupsWithTopic(conn, gl, topic); err != nil { - return err - } - - return nil + err := removeNotificationConfigToGroupsWithTopic(conn, gl, topic) + return err } func convertSetToList(s *schema.Set) (nl []*string) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go index aafccced1..2eabb90a7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_policy.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "log" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -19,6 +20,9 @@ func resourceAwsAutoscalingPolicy() *schema.Resource { Read: resourceAwsAutoscalingPolicyRead, Update: resourceAwsAutoscalingPolicyUpdate, Delete: resourceAwsAutoscalingPolicyDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsAutoscalingPolicyImport, + }, Schema: map[string]*schema.Schema{ "arn": { @@ -231,8 +235,12 @@ func resourceAwsAutoscalingPolicyRead(d *schema.ResourceData, meta interface{}) d.Set("arn", p.PolicyARN) d.Set("name", p.PolicyName) d.Set("scaling_adjustment", p.ScalingAdjustment) - d.Set("step_adjustment", flattenStepAdjustments(p.StepAdjustments)) - d.Set("target_tracking_configuration", flattenTargetTrackingConfiguration(p.TargetTrackingConfiguration)) + if err := d.Set("step_adjustment", flattenStepAdjustments(p.StepAdjustments)); err != nil { + return fmt.Errorf("error setting step_adjustment: %s", err) + } + if err := d.Set("target_tracking_configuration", flattenTargetTrackingConfiguration(p.TargetTrackingConfiguration)); err != nil { + return fmt.Errorf("error setting target_tracking_configuration: %s", err) + } return nil } @@ -276,6 +284,22 @@ func resourceAwsAutoscalingPolicyDelete(d *schema.ResourceData, meta interface{} return nil } +func resourceAwsAutoscalingPolicyImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.SplitN(d.Id(), "/", 2) + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("unexpected format (%q), expected /", d.Id()) + } + + asgName := idParts[0] + policyName := idParts[1] + + d.Set("name", policyName) + d.Set("autoscaling_group_name", asgName) + d.SetId(policyName) + + return []*schema.ResourceData{d}, nil +} + // PutScalingPolicy can safely resend all parameters without destroying the // resource, so create and update can share this common function. It will error // if certain mutually exclusive values are set. diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go new file mode 100644 index 000000000..814273fbc --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_backup_vault.go @@ -0,0 +1,121 @@ +package aws + +import ( + "fmt" + "regexp" + + "github.com/hashicorp/terraform/helper/validation" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/backup" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsBackupVault() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsBackupVaultCreate, + Read: resourceAwsBackupVaultRead, + Delete: resourceAwsBackupVaultDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9\-\_\.]{1,50}$`), "must consist of lowercase letters, numbers, and hyphens."), + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "recovery_points": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func resourceAwsBackupVaultCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).backupconn + + input := &backup.CreateBackupVaultInput{ + BackupVaultName: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("tags"); ok { + input.BackupVaultTags = tagsFromMapGeneric(v.(map[string]interface{})) + } + + if v, ok := d.GetOk("kms_key_arn"); ok { + input.EncryptionKeyArn = aws.String(v.(string)) + } + + _, err := conn.CreateBackupVault(input) + if err != nil { + return fmt.Errorf("error creating Backup Vault (%s): %s", d.Id(), err) + } + + d.SetId(d.Get("name").(string)) + + return resourceAwsBackupVaultRead(d, meta) +} + +func resourceAwsBackupVaultRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).backupconn + + input := &backup.DescribeBackupVaultInput{ + BackupVaultName: aws.String(d.Id()), + } + + resp, err := conn.DescribeBackupVault(input) + if err != nil { + return fmt.Errorf("error reading Backup Vault (%s): %s", d.Id(), err) + } + + d.Set("kms_key_arn", resp.EncryptionKeyArn) + d.Set("arn", resp.BackupVaultArn) + d.Set("recovery_points", resp.NumberOfRecoveryPoints) + + tresp, err := conn.ListTags(&backup.ListTagsInput{ + ResourceArn: aws.String(*resp.BackupVaultArn), + }) + + if err != nil { + return fmt.Errorf("error retrieving Backup Vault (%s) tags: %s", aws.StringValue(resp.BackupVaultArn), err) + } + + if err := d.Set("tags", tagsToMapGeneric(tresp.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsBackupVaultDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).backupconn + + input := &backup.DeleteBackupVaultInput{ + BackupVaultName: aws.String(d.Get("name").(string)), + } + + _, err := conn.DeleteBackupVault(input) + if err != nil { + return fmt.Errorf("error deleting Backup Vault (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go index 74eb37d74..e4787c769 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go @@ -95,11 +95,21 @@ func resourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) erro d.SetId("") return nil } + d.Set("arn", jq.JobQueueArn) - d.Set("compute_environments", jq.ComputeEnvironmentOrder) + + computeEnvironments := make([]string, len(jq.ComputeEnvironmentOrder)) + for _, computeEnvironmentOrder := range jq.ComputeEnvironmentOrder { + computeEnvironments[aws.Int64Value(computeEnvironmentOrder.Order)] = aws.StringValue(computeEnvironmentOrder.ComputeEnvironment) + } + if err := d.Set("compute_environments", computeEnvironments); err != nil { + return fmt.Errorf("error setting compute_environments: %s", err) + } + d.Set("name", jq.JobQueueName) d.Set("priority", jq.Priority) d.Set("state", jq.State) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go index df08d221b..9c4bdb24b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloud9_environment_ec2.go @@ -223,9 +223,6 @@ func resourceAwsCloud9EnvironmentEc2Delete(d *schema.ResourceData, meta interfac } return resource.RetryableError(fmt.Errorf("Cloud9 EC2 Environment %q still exists", d.Id())) }) - if err != nil { - return err - } return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go index 16977cb1f..2c5dcfd6e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go @@ -100,7 +100,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface err = resource.Retry(30*time.Second, func() *resource.RetryError { var err error out, err = conn.PutRule(input) - pattern := regexp.MustCompile("cannot be assumed by principal '[a-z]+\\.amazonaws\\.com'\\.$") + pattern := regexp.MustCompile(`cannot be assumed by principal '[a-z]+\.amazonaws\.com'\.$`) if err != nil { if awsErr, ok := err.(awserr.Error); ok { if awsErr.Code() == "ValidationException" && pattern.MatchString(awsErr.Message()) { @@ -190,7 +190,7 @@ func resourceAwsCloudWatchEventRuleUpdate(d *schema.ResourceData, meta interface // IAM Roles take some time to propagate err = resource.Retry(30*time.Second, func() *resource.RetryError { _, err := conn.PutRule(input) - pattern := regexp.MustCompile("cannot be assumed by principal '[a-z]+\\.amazonaws\\.com'\\.$") + pattern := regexp.MustCompile(`cannot be assumed by principal '[a-z]+\.amazonaws\.com'\.$`) if err != nil { if awsErr, ok := err.(awserr.Error); ok { if awsErr.Code() == "ValidationException" && pattern.MatchString(awsErr.Message()) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go index 999134bd1..f8a7c8631 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_group.go @@ -117,7 +117,7 @@ func resourceAwsCloudWatchLogGroupRead(d *schema.ResourceData, meta interface{}) d.Set("kms_key_id", lg.KmsKeyId) d.Set("retention_in_days", lg.RetentionInDays) - tags := make(map[string]string, 0) + tags := make(map[string]string) tagsOutput, err := conn.ListTagsLogGroup(&cloudwatchlogs.ListTagsLogGroupInput{ LogGroupName: aws.String(d.Id()), }) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go index 48b409967..666f7ad58 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go @@ -58,9 +58,16 @@ func resourceAwsCloudWatchLogStreamCreate(d *schema.ResourceData, meta interface func resourceAwsCloudWatchLogStreamRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).cloudwatchlogsconn - ls, exists, err := lookupCloudWatchLogStream(conn, d.Id(), d.Get("log_group_name").(string), nil) + group := d.Get("log_group_name").(string) + + ls, exists, err := lookupCloudWatchLogStream(conn, d.Id(), group, nil) if err != nil { - return err + if !isAWSErr(err, cloudwatchlogs.ErrCodeResourceNotFoundException, "") { + return err + } + + log.Printf("[DEBUG] container CloudWatch group %q Not Found.", group) + exists = false } if !exists { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go index bf68e62dd..6dd1110d6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go @@ -727,9 +727,9 @@ func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSourc projectSource.Location = aws.String(data["location"].(string)) } - // Only valid for BITBUCKET and GITHUB source type, e.g. - // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus - if sourceType == codebuild.SourceTypeBitbucket || sourceType == codebuild.SourceTypeGithub { + // Only valid for BITBUCKET, GITHUB, and GITHUB_ENTERPRISE source types, e.g. + // InvalidInputException: Source type NO_SOURCE does not support ReportBuildStatus + if sourceType == codebuild.SourceTypeBitbucket || sourceType == codebuild.SourceTypeGithub || sourceType == codebuild.SourceTypeGithubEnterprise { projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) } @@ -922,12 +922,7 @@ func resourceAwsCodeBuildProjectDelete(d *schema.ResourceData, meta interface{}) _, err := conn.DeleteProject(&codebuild.DeleteProjectInput{ Name: aws.String(d.Id()), }) - - if err != nil { - return err - } - - return nil + return err } func flattenAwsCodeBuildProjectSecondaryArtifacts(artifactsList []*codebuild.ProjectArtifacts) *schema.Set { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go index bbb77ed25..2435bb16e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go @@ -124,11 +124,7 @@ func resourceAwsCodeCommitTriggerDelete(d *schema.ResourceData, meta interface{} _, err := conn.PutRepositoryTriggers(input) - if err != nil { - return err - } - - return nil + return err } func expandAwsCodeCommitTriggers(configured []interface{}) []*codecommit.RepositoryTrigger { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go index 50aab97c0..96e4fbe08 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go @@ -168,7 +168,7 @@ func resourceAwsCodeDeployDeploymentConfigRead(d *schema.ResourceData, meta inte resp, err := conn.GetDeploymentConfig(input) if err != nil { if awsErr, ok := err.(awserr.Error); ok { - if "DeploymentConfigDoesNotExistException" == awsErr.Code() { + if awsErr.Code() == "DeploymentConfigDoesNotExistException" { log.Printf("[DEBUG] CodeDeploy Deployment Config (%s) not found", d.Id()) d.SetId("") return nil @@ -204,11 +204,7 @@ func resourceAwsCodeDeployDeploymentConfigDelete(d *schema.ResourceData, meta in } _, err := conn.DeleteDeploymentConfig(input) - if err != nil { - return err - } - - return nil + return err } func expandAwsCodeDeployConfigMinimumHealthHosts(d *schema.ResourceData) *codedeploy.MinimumHealthyHosts { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go index 28d934de2..b4af8e082 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go @@ -748,11 +748,7 @@ func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta int DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)), }) - if err != nil { - return err - } - - return nil + return err } func handleCreateError(err error) *resource.RetryError { @@ -1193,7 +1189,7 @@ func autoRollbackConfigToMap(config *codedeploy.AutoRollbackConfiguration) []map // only create configurations that are enabled or temporarily disabled (retaining events) // otherwise empty configurations will be created - if config != nil && (*config.Enabled == true || len(config.Events) > 0) { + if config != nil && (*config.Enabled || len(config.Events) > 0) { item := make(map[string]interface{}) item["enabled"] = *config.Enabled item["events"] = schema.NewSet(schema.HashString, flattenStringList(config.Events)) @@ -1210,7 +1206,7 @@ func alarmConfigToMap(config *codedeploy.AlarmConfiguration) []map[string]interf // only create configurations that are enabled or temporarily disabled (retaining alarms) // otherwise empty configurations will be created - if config != nil && (*config.Enabled == true || len(config.Alarms) > 0) { + if config != nil && (*config.Enabled || len(config.Alarms) > 0) { names := make([]*string, 0, len(config.Alarms)) for _, alarm := range config.Alarms { names = append(names, alarm.Name) @@ -1426,8 +1422,7 @@ func resourceAwsCodeDeployTagSetHash(v interface{}) int { filterSet := tagSetMap["ec2_tag_filter"] filterSetSlice := filterSet.(*schema.Set).List() - var x uint64 - x = 1 + var x uint64 = 1 for i, filter := range filterSetSlice { x = ((x << 7) | (x >> (64 - 7))) ^ uint64(i) ^ uint64(resourceAwsCodeDeployTagFilterHash(filter)) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go index 654ef12c4..9bd8a0d46 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go @@ -475,9 +475,5 @@ func resourceAwsCodePipelineDelete(d *schema.ResourceData, meta interface{}) err Name: aws.String(d.Id()), }) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go index 99357ca1b..9a8275fac 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go @@ -118,10 +118,8 @@ func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string switch authType { case codepipeline.WebhookAuthenticationTypeIp: conf.AllowedIPRange = aws.String(authConfig["allowed_ip_range"].(string)) - break case codepipeline.WebhookAuthenticationTypeGithubHmac: conf.SecretToken = aws.String(authConfig["secret_token"].(string)) - break } return &conf diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go index 5870d9984..165695a11 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_resource_server.go @@ -146,7 +146,9 @@ func resourceAwsCognitoResourceServerRead(d *schema.ResourceData, meta interface scopeIdentifier := fmt.Sprintf("%s/%s", aws.StringValue(resp.ResourceServer.Identifier), elem["scope_name"].(string)) scopeIdentifiers = append(scopeIdentifiers, scopeIdentifier) } - d.Set("scope_identifiers", scopeIdentifiers) + if err := d.Set("scope_identifiers", scopeIdentifiers); err != nil { + return fmt.Errorf("error setting scope_identifiers: %s", err) + } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go index 88738864e..47094e47b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_aggregate_authorization.go @@ -120,9 +120,7 @@ func describeConfigAggregateAuthorizations(conn *configservice.ConfigService) ([ if err != nil { return aggregationAuthorizations, err } - for _, aggregationAuthorization := range output.AggregationAuthorizations { - aggregationAuthorizations = append(aggregationAuthorizations, aggregationAuthorization) - } + aggregationAuthorizations = append(aggregationAuthorizations, output.AggregationAuthorizations...) if output.NextToken == nil { break } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go index 8c54bd892..122b4c30d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go @@ -274,9 +274,5 @@ func resourceAwsCustomerGatewayDelete(d *schema.ResourceData, meta interface{}) } }) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go index 87ce086c1..8612a38fd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go @@ -290,9 +290,9 @@ func resourceAwsDaxClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("replication_factor", c.TotalNodes) if c.ClusterDiscoveryEndpoint != nil { - d.Set("port", c.ClusterDiscoveryEndpoint.Port) - d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ClusterDiscoveryEndpoint.Address, *c.ClusterDiscoveryEndpoint.Port))) - d.Set("cluster_address", aws.String(fmt.Sprintf("%s", *c.ClusterDiscoveryEndpoint.Address))) + d.Set("port", aws.Int64Value(c.ClusterDiscoveryEndpoint.Port)) + d.Set("configuration_endpoint", fmt.Sprintf("%s:%d", aws.StringValue(c.ClusterDiscoveryEndpoint.Address), aws.Int64Value(c.ClusterDiscoveryEndpoint.Port))) + d.Set("cluster_address", aws.StringValue(c.ClusterDiscoveryEndpoint.Address)) } d.Set("subnet_group_name", c.SubnetGroup) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go index 2ae0ee2b4..60d2d1e3f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go @@ -1260,7 +1260,7 @@ func resourceAwsDbInstanceDelete(d *schema.ResourceData, meta interface{}) error skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) opts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - if skipFinalSnapshot == false { + if !skipFinalSnapshot { if name, present := d.GetOk("final_snapshot_identifier"); present { opts.FinalDBSnapshotIdentifier = aws.String(name.(string)) } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go index cc535f5a0..af9605475 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_option_group.go @@ -166,12 +166,14 @@ func resourceAwsDbOptionGroupRead(d *schema.ResourceData, meta interface{}) erro log.Printf("[DEBUG] Describe DB Option Group: %#v", params) options, err := rdsconn.DescribeOptionGroups(params) + + if isAWSErr(err, rds.ErrCodeOptionGroupNotFoundFault, "") { + log.Printf("[WARN] RDS Option Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if isAWSErr(err, rds.ErrCodeOptionGroupNotFoundFault, "") { - d.SetId("") - log.Printf("[DEBUG] DB Option Group (%s) not found", d.Get("name").(string)) - return nil - } return fmt.Errorf("Error Describing DB Option Group: %s", err) } @@ -184,32 +186,32 @@ func resourceAwsDbOptionGroupRead(d *schema.ResourceData, meta interface{}) erro } if option == nil { - return fmt.Errorf("Unable to find Option Group: %#v", options.OptionGroupsList) + log.Printf("[WARN] RDS Option Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } + d.Set("arn", option.OptionGroupArn) d.Set("name", option.OptionGroupName) d.Set("major_engine_version", option.MajorEngineVersion) d.Set("engine_name", option.EngineName) d.Set("option_group_description", option.OptionGroupDescription) - if len(option.Options) != 0 { - d.Set("option", flattenOptions(option.Options)) + + if err := d.Set("option", flattenOptions(option.Options, expandOptionConfiguration(d.Get("option").(*schema.Set).List()))); err != nil { + return fmt.Errorf("error setting option: %s", err) } - arn := aws.StringValue(option.OptionGroupArn) - d.Set("arn", arn) resp, err := rdsconn.ListTagsForResource(&rds.ListTagsForResourceInput{ - ResourceName: aws.String(arn), + ResourceName: option.OptionGroupArn, }) if err != nil { - log.Printf("[DEBUG] Error retrieving tags for ARN: %s", arn) + return fmt.Errorf("error listing tags for RDS Option Group (%s): %s", d.Id(), err) } - var dt []*rds.Tag - if len(resp.TagList) > 0 { - dt = resp.TagList + if err := d.Set("tags", tagsToMapRDS(resp.TagList)); err != nil { + return fmt.Errorf("error setting tags: %s", err) } - d.Set("tags", tagsToMapRDS(dt)) return nil } @@ -236,62 +238,55 @@ func resourceAwsDbOptionGroupUpdate(d *schema.ResourceData, meta interface{}) er os := o.(*schema.Set) ns := n.(*schema.Set) - addOptions, addErr := expandOptionConfiguration(ns.Difference(os).List()) - if addErr != nil { - return addErr - } + optionsToInclude := expandOptionConfiguration(ns.Difference(os).List()) + optionsToIncludeNames := flattenOptionNames(ns.Difference(os).List()) + optionsToRemove := []*string{} + optionsToRemoveNames := flattenOptionNames(os.Difference(ns).List()) - addingOptionNames, err := flattenOptionNames(ns.Difference(os).List()) - if err != nil { - return err - } - - removeOptions := []*string{} - opts, err := flattenOptionNames(os.Difference(ns).List()) - if err != nil { - return err - } - - for _, optionName := range opts { - if optionInList(*optionName, addingOptionNames) { + for _, optionToRemoveName := range optionsToRemoveNames { + if optionInList(*optionToRemoveName, optionsToIncludeNames) { continue } - removeOptions = append(removeOptions, optionName) + optionsToRemove = append(optionsToRemove, optionToRemoveName) } - modifyOpts := &rds.ModifyOptionGroupInput{ - OptionGroupName: aws.String(d.Id()), - ApplyImmediately: aws.Bool(true), - } - - if len(addOptions) > 0 { - modifyOpts.OptionsToInclude = addOptions - } - - if len(removeOptions) > 0 { - modifyOpts.OptionsToRemove = removeOptions - } - - log.Printf("[DEBUG] Modify DB Option Group: %s", modifyOpts) - - err = resource.Retry(2*time.Minute, func() *resource.RetryError { - var err error - - _, err = rdsconn.ModifyOptionGroup(modifyOpts) - if err != nil { - // InvalidParameterValue: IAM role ARN value is invalid or does not include the required permissions for: SQLSERVER_BACKUP_RESTORE - if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) + // Ensure there is actually something to update + // InvalidParameterValue: At least one option must be added, modified, or removed. + if len(optionsToInclude) > 0 || len(optionsToRemove) > 0 { + modifyOpts := &rds.ModifyOptionGroupInput{ + OptionGroupName: aws.String(d.Id()), + ApplyImmediately: aws.Bool(true), } - return nil - }) - if err != nil { - return fmt.Errorf("Error modifying DB Option Group: %s", err) + if len(optionsToInclude) > 0 { + modifyOpts.OptionsToInclude = optionsToInclude + } + + if len(optionsToRemove) > 0 { + modifyOpts.OptionsToRemove = optionsToRemove + } + + log.Printf("[DEBUG] Modify DB Option Group: %s", modifyOpts) + + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + var err error + + _, err = rdsconn.ModifyOptionGroup(modifyOpts) + if err != nil { + // InvalidParameterValue: IAM role ARN value is invalid or does not include the required permissions for: SQLSERVER_BACKUP_RESTORE + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("Error modifying DB Option Group: %s", err) + } + d.SetPartial("option") } - d.SetPartial("option") } if err := setTagsRDS(rdsconn, d, d.Get("arn").(string)); err != nil { @@ -328,14 +323,14 @@ func resourceAwsDbOptionGroupDelete(d *schema.ResourceData, meta interface{}) er return nil } -func flattenOptionNames(configured []interface{}) ([]*string, error) { +func flattenOptionNames(configured []interface{}) []*string { var optionNames []*string for _, pRaw := range configured { data := pRaw.(map[string]interface{}) optionNames = append(optionNames, aws.String(data["option_name"].(string))) } - return optionNames, nil + return optionNames } func resourceAwsDbOptionHash(v interface{}) int { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go index 92001bdec..5bf584451 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_snapshot.go @@ -16,6 +16,7 @@ func resourceAwsDbSnapshot() *schema.Resource { return &schema.Resource{ Create: resourceAwsDbSnapshotCreate, Read: resourceAwsDbSnapshotRead, + Update: resourceAwsDbSnapshotUpdate, Delete: resourceAwsDbSnapshotDelete, Timeouts: &schema.ResourceTimeout{ @@ -102,16 +103,19 @@ func resourceAwsDbSnapshot() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "tags": tagsSchema(), }, } } func resourceAwsDbSnapshotCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).rdsconn + tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) params := &rds.CreateDBSnapshotInput{ DBInstanceIdentifier: aws.String(d.Get("db_instance_identifier").(string)), DBSnapshotIdentifier: aws.String(d.Get("db_snapshot_identifier").(string)), + Tags: tags, } _, err := conn.CreateDBSnapshot(params) @@ -167,6 +171,9 @@ func resourceAwsDbSnapshotRead(d *schema.ResourceData, meta interface{}) error { d.Set("snapshot_type", snapshot.SnapshotType) d.Set("status", snapshot.Status) d.Set("vpc_id", snapshot.VpcId) + if err := saveTagsRDS(conn, d, aws.StringValue(snapshot.DBSnapshotArn)); err != nil { + log.Printf("[WARN] Failed to save tags for RDS Snapshot (%s): %s", d.Id(), err) + } return nil } @@ -178,8 +185,46 @@ func resourceAwsDbSnapshotDelete(d *schema.ResourceData, meta interface{}) error DBSnapshotIdentifier: aws.String(d.Id()), } _, err := conn.DeleteDBSnapshot(params) - if err != nil { - return err + return err +} + +func resourceAwsDbSnapshotUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + arn := d.Get("db_snapshot_arn").(string) + if d.HasChange("tags") { + oldTagsRaw, newTagsRaw := d.GetChange("tags") + oldTagsMap := oldTagsRaw.(map[string]interface{}) + newTagsMap := newTagsRaw.(map[string]interface{}) + createTags, removeTags := diffTagsRDS(tagsFromMapRDS(oldTagsMap), tagsFromMapRDS(newTagsMap)) + + if len(removeTags) > 0 { + removeTagKeys := make([]*string, len(removeTags)) + for i, removeTag := range removeTags { + removeTagKeys[i] = removeTag.Key + } + + input := &rds.RemoveTagsFromResourceInput{ + ResourceName: aws.String(arn), + TagKeys: removeTagKeys, + } + + log.Printf("[DEBUG] Untagging RDS Cluster: %s", input) + if _, err := conn.RemoveTagsFromResource(input); err != nil { + return fmt.Errorf("error untagging RDS Cluster (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &rds.AddTagsToResourceInput{ + ResourceName: aws.String(arn), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging RDS Cluster: %s", input) + if _, err := conn.AddTagsToResource(input); err != nil { + return fmt.Errorf("error tagging RDS Cluster (%s): %s", d.Id(), err) + } + } } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go index c329dfae0..fef3518e9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_subnet_group.go @@ -128,7 +128,7 @@ func resourceAwsDbSubnetGroupRead(d *schema.ResourceData, meta interface{}) erro // AWS is down casing the name provided, so we compare lower case versions // of the names. We lower case both our name and their name in the check, // incase they change that someday. - if strings.ToLower(d.Id()) == strings.ToLower(*s.DBSubnetGroupName) { + if strings.EqualFold(d.Id(), *s.DBSubnetGroupName) { subnetGroup = describeResp.DBSubnetGroups[0] } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go index 3ec1e20a7..e0a143ebd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go @@ -280,7 +280,7 @@ func revokeAllNetworkACLEntries(netaclId string, meta interface{}) error { // track if this is an egress or ingress rule, for logging purposes rt := "ingress" - if *e.Egress == true { + if *e.Egress { rt = "egress" } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go index 8927fc9bd..b04e82ba8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_conditional_forwarder.go @@ -44,7 +44,7 @@ func resourceAwsDirectoryServiceConditionalForwarder() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+[.]?$"), "invalid value, see the RemoteDomainName attribute documentation: https://docs.aws.amazon.com/directoryservice/latest/devguide/API_ConditionalForwarder.html"), + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^([a-zA-Z0-9]+[\.-])+([a-zA-Z0-9])+[.]?$`), "invalid value, see the RemoteDomainName attribute documentation: https://docs.aws.amazon.com/directoryservice/latest/devguide/API_ConditionalForwarder.html"), }, }, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go index 7211e3bfd..210310cb5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go @@ -250,7 +250,7 @@ func expandDlmPolicyDetails(cfg []interface{}) *dlm.PolicyDetails { } func flattenDlmPolicyDetails(policyDetails *dlm.PolicyDetails) []map[string]interface{} { - result := make(map[string]interface{}, 0) + result := make(map[string]interface{}) result["resource_types"] = flattenStringList(policyDetails.ResourceTypes) result["schedule"] = flattenDlmSchedules(policyDetails.Schedules) result["target_tags"] = flattenDlmTags(policyDetails.TargetTags) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go index 8fd3f9f88..a7835a742 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_certificate.go @@ -114,11 +114,7 @@ func resourceAwsDmsCertificateDelete(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] DMS delete certificate: %#v", request) _, err := conn.DeleteCertificate(request) - if err != nil { - return err - } - - return nil + return err } func resourceAwsDmsCertificateSetState(d *schema.ResourceData, cert *dms.Certificate) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go index a74ce4474..65dd8b7fb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_subnet_group.go @@ -163,11 +163,7 @@ func resourceAwsDmsReplicationSubnetGroupDelete(d *schema.ResourceData, meta int log.Printf("[DEBUG] DMS delete replication subnet group: %#v", request) _, err := conn.DeleteReplicationSubnetGroup(request) - if err != nil { - return err - } - - return nil + return err } func resourceAwsDmsReplicationSubnetGroupSetState(d *schema.ResourceData, group *dms.ReplicationSubnetGroup) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go index 8b7574f04..8a0455961 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go @@ -274,11 +274,8 @@ func resourceAwsDmsReplicationTaskDelete(d *schema.ResourceData, meta interface{ // Wait, catching any errors _, err = stateConf.WaitForState() - if err != nil { - return err - } - return nil + return err } func resourceAwsDmsReplicationTaskSetState(d *schema.ResourceData, task *dms.ReplicationTask) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go new file mode 100644 index 000000000..b4d09f7ee --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster.go @@ -0,0 +1,799 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/docdb" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDocDBCluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDocDBClusterCreate, + Read: resourceAwsDocDBClusterRead, + Update: resourceAwsDocDBClusterUpdate, + Delete: resourceAwsDocDBClusterDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsDocDBClusterImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(120 * time.Minute), + Update: schema.DefaultTimeout(120 * time.Minute), + Delete: schema.DefaultTimeout(120 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "availability_zones": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + ForceNew: true, + Computed: true, + Set: schema.HashString, + }, + + "cluster_identifier": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"cluster_identifier_prefix"}, + ValidateFunc: validateDocDBIdentifier, + }, + "cluster_identifier_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"cluster_identifier"}, + ValidateFunc: validateDocDBIdentifierPrefix, + }, + + "cluster_members": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Optional: true, + Computed: true, + Set: schema.HashString, + }, + + "db_subnet_group_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + + "db_cluster_parameter_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "reader_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + + "hosted_zone_id": { + Type: schema.TypeString, + Computed: true, + }, + + "engine": { + Type: schema.TypeString, + Optional: true, + Default: "docdb", + ForceNew: true, + ValidateFunc: validateDocDBEngine(), + }, + + "engine_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "storage_encrypted": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + + "final_snapshot_identifier": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: func(v interface{}, k string) (ws []string, es []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + es = append(es, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + es = append(es, fmt.Errorf("%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + es = append(es, fmt.Errorf("%q cannot end in a hyphen", k)) + } + return + }, + }, + + "skip_final_snapshot": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "master_username": { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + }, + + "master_password": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + + "snapshot_identifier": { + Type: schema.TypeString, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + + "port": { + Type: schema.TypeInt, + Optional: true, + Default: 27017, + ForceNew: true, + ValidateFunc: validation.IntBetween(1150, 65535), + }, + + "apply_immediately": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + + "vpc_security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "preferred_backup_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateOnceADayWindowFormat, + }, + + "preferred_maintenance_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + StateFunc: func(val interface{}) string { + if val == nil { + return "" + } + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateOnceAWeekWindowFormat, + }, + + "backup_retention_period": { + Type: schema.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntAtMost(35), + }, + + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + + "cluster_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + + "enabled_cloudwatch_logs_exports": { + Type: schema.TypeList, + Computed: false, + Optional: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice([]string{ + "audit", + }, false), + }, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsDocDBClusterImport( + d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + // Neither skip_final_snapshot nor final_snapshot_identifier can be fetched + // from any API call, so we need to default skip_final_snapshot to true so + // that final_snapshot_identifier is not required + d.Set("skip_final_snapshot", true) + return []*schema.ResourceData{d}, nil +} + +func resourceAwsDocDBClusterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + tags := tagsFromMapDocDB(d.Get("tags").(map[string]interface{})) + + // Some API calls (e.g. RestoreDBClusterFromSnapshot do not support all + // parameters to correctly apply all settings in one pass. For missing + // parameters or unsupported configurations, we may need to call + // ModifyDBInstance afterwadocdb to prevent Terraform operators from API + // errors or needing to double apply. + var requiresModifyDbCluster bool + modifyDbClusterInput := &docdb.ModifyDBClusterInput{ + ApplyImmediately: aws.Bool(true), + } + + var identifier string + if v, ok := d.GetOk("cluster_identifier"); ok { + identifier = v.(string) + } else if v, ok := d.GetOk("cluster_identifier_prefix"); ok { + identifier = resource.PrefixedUniqueId(v.(string)) + } else { + identifier = resource.PrefixedUniqueId("tf-") + } + + if _, ok := d.GetOk("snapshot_identifier"); ok { + opts := docdb.RestoreDBClusterFromSnapshotInput{ + DBClusterIdentifier: aws.String(identifier), + Engine: aws.String(d.Get("engine").(string)), + SnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), + Tags: tags, + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + opts.AvailabilityZones = expandStringList(attr.List()) + } + + if attr, ok := d.GetOk("backup_retention_period"); ok { + modifyDbClusterInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) + requiresModifyDbCluster = true + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + opts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + modifyDbClusterInput.DBClusterParameterGroupName = aws.String(attr.(string)) + requiresModifyDbCluster = true + } + + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + + if attr, ok := d.GetOk("engine_version"); ok { + opts.EngineVersion = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("kms_key_id"); ok { + opts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("port"); ok { + opts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("preferred_backup_window"); ok { + modifyDbClusterInput.PreferredBackupWindow = aws.String(attr.(string)) + requiresModifyDbCluster = true + } + + if attr, ok := d.GetOk("preferred_maintenance_window"); ok { + modifyDbClusterInput.PreferredMaintenanceWindow = aws.String(attr.(string)) + requiresModifyDbCluster = true + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + opts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + log.Printf("[DEBUG] DocDB Cluster restore from snapshot configuration: %s", opts) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.RestoreDBClusterFromSnapshot(&opts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error creating DocDB Cluster: %s", err) + } + } else { + if _, ok := d.GetOk("master_password"); !ok { + return fmt.Errorf(`provider.aws: aws_docdb_cluster: %s: "master_password": required field is not set`, identifier) + } + + if _, ok := d.GetOk("master_username"); !ok { + return fmt.Errorf(`provider.aws: aws_docdb_cluster: %s: "master_username": required field is not set`, identifier) + } + + createOpts := &docdb.CreateDBClusterInput{ + DBClusterIdentifier: aws.String(identifier), + Engine: aws.String(d.Get("engine").(string)), + MasterUserPassword: aws.String(d.Get("master_password").(string)), + MasterUsername: aws.String(d.Get("master_username").(string)), + Tags: tags, + } + + if attr, ok := d.GetOk("port"); ok { + createOpts.Port = aws.Int64(int64(attr.(int))) + } + + if attr, ok := d.GetOk("db_subnet_group_name"); ok { + createOpts.DBSubnetGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + createOpts.DBClusterParameterGroupName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("engine_version"); ok { + createOpts.EngineVersion = aws.String(attr.(string)) + } + + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) + } + + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + createOpts.AvailabilityZones = expandStringList(attr.List()) + } + + if v, ok := d.GetOk("backup_retention_period"); ok { + createOpts.BackupRetentionPeriod = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("preferred_backup_window"); ok { + createOpts.PreferredBackupWindow = aws.String(v.(string)) + } + + if v, ok := d.GetOk("preferred_maintenance_window"); ok { + createOpts.PreferredMaintenanceWindow = aws.String(v.(string)) + } + + if attr, ok := d.GetOk("kms_key_id"); ok { + createOpts.KmsKeyId = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + createOpts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + + if attr, ok := d.GetOkExists("storage_encrypted"); ok { + createOpts.StorageEncrypted = aws.Bool(attr.(bool)) + } + + log.Printf("[DEBUG] DocDB Cluster create options: %s", createOpts) + var resp *docdb.CreateDBClusterOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateDBCluster(createOpts) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("error creating DocDB cluster: %s", err) + } + + log.Printf("[DEBUG]: DocDB Cluster create response: %s", resp) + } + + d.SetId(identifier) + + log.Printf("[INFO] DocDB Cluster ID: %s", d.Id()) + + log.Println( + "[INFO] Waiting for DocDB Cluster to be available") + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsDocDBClusterCreatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsDocDBClusterStateRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for DocDB Cluster state to be \"available\": %s", err) + } + + if requiresModifyDbCluster { + modifyDbClusterInput.DBClusterIdentifier = aws.String(d.Id()) + + log.Printf("[INFO] DocDB Cluster (%s) configuration requires ModifyDBCluster: %s", d.Id(), modifyDbClusterInput) + _, err := conn.ModifyDBCluster(modifyDbClusterInput) + if err != nil { + return fmt.Errorf("error modifying DocDB Cluster (%s): %s", d.Id(), err) + } + + log.Printf("[INFO] Waiting for DocDB Cluster (%s) to be available", d.Id()) + err = waitForDocDBClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) + if err != nil { + return fmt.Errorf("error waiting for DocDB Cluster (%s) to be available: %s", d.Id(), err) + } + } + + return resourceAwsDocDBClusterRead(d, meta) +} + +func resourceAwsDocDBClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + input := &docdb.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Describing DocDB Cluster: %s", input) + resp, err := conn.DescribeDBClusters(input) + + if isAWSErr(err, docdb.ErrCodeDBClusterNotFoundFault, "") { + log.Printf("[WARN] DocDB Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error describing DocDB Cluster (%s): %s", d.Id(), err) + } + + if resp == nil { + return fmt.Errorf("Error retrieving DocDB cluster: empty response for: %s", input) + } + + var dbc *docdb.DBCluster + for _, c := range resp.DBClusters { + if aws.StringValue(c.DBClusterIdentifier) == d.Id() { + dbc = c + break + } + } + + if dbc == nil { + log.Printf("[WARN] DocDB Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("availability_zones", aws.StringValueSlice(dbc.AvailabilityZones)); err != nil { + return fmt.Errorf("error setting availability_zones: %s", err) + } + + d.Set("arn", dbc.DBClusterArn) + d.Set("backup_retention_period", dbc.BackupRetentionPeriod) + d.Set("cluster_identifier", dbc.DBClusterIdentifier) + + var cm []string + for _, m := range dbc.DBClusterMembers { + cm = append(cm, aws.StringValue(m.DBInstanceIdentifier)) + } + if err := d.Set("cluster_members", cm); err != nil { + return fmt.Errorf("error setting cluster_members: %s", err) + } + + d.Set("cluster_resource_id", dbc.DbClusterResourceId) + + d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) + d.Set("db_subnet_group_name", dbc.DBSubnetGroup) + + if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbc.EnabledCloudwatchLogsExports)); err != nil { + return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) + } + + d.Set("endpoint", dbc.Endpoint) + d.Set("engine_version", dbc.EngineVersion) + d.Set("engine", dbc.Engine) + d.Set("hosted_zone_id", dbc.HostedZoneId) + + d.Set("kms_key_id", dbc.KmsKeyId) + d.Set("master_username", dbc.MasterUsername) + d.Set("port", dbc.Port) + d.Set("preferred_backup_window", dbc.PreferredBackupWindow) + d.Set("preferred_maintenance_window", dbc.PreferredMaintenanceWindow) + d.Set("reader_endpoint", dbc.ReaderEndpoint) + d.Set("storage_encrypted", dbc.StorageEncrypted) + + var vpcg []string + for _, g := range dbc.VpcSecurityGroups { + vpcg = append(vpcg, aws.StringValue(g.VpcSecurityGroupId)) + } + if err := d.Set("vpc_security_group_ids", vpcg); err != nil { + return fmt.Errorf("error setting vpc_security_group_ids: %s", err) + } + + // Fetch and save tags + if err := saveTagsDocDB(conn, d, aws.StringValue(dbc.DBClusterArn)); err != nil { + log.Printf("[WARN] Failed to save tags for DocDB Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) + } + + return nil +} + +func resourceAwsDocDBClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + requestUpdate := false + + req := &docdb.ModifyDBClusterInput{ + ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), + DBClusterIdentifier: aws.String(d.Id()), + } + + if d.HasChange("master_password") { + req.MasterUserPassword = aws.String(d.Get("master_password").(string)) + requestUpdate = true + } + + if d.HasChange("engine_version") { + req.EngineVersion = aws.String(d.Get("engine_version").(string)) + requestUpdate = true + } + + if d.HasChange("vpc_security_group_ids") { + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + req.VpcSecurityGroupIds = expandStringList(attr.List()) + } else { + req.VpcSecurityGroupIds = []*string{} + } + requestUpdate = true + } + + if d.HasChange("preferred_backup_window") { + req.PreferredBackupWindow = aws.String(d.Get("preferred_backup_window").(string)) + requestUpdate = true + } + + if d.HasChange("preferred_maintenance_window") { + req.PreferredMaintenanceWindow = aws.String(d.Get("preferred_maintenance_window").(string)) + requestUpdate = true + } + + if d.HasChange("backup_retention_period") { + req.BackupRetentionPeriod = aws.Int64(int64(d.Get("backup_retention_period").(int))) + requestUpdate = true + } + + if d.HasChange("db_cluster_parameter_group_name") { + d.SetPartial("db_cluster_parameter_group_name") + req.DBClusterParameterGroupName = aws.String(d.Get("db_cluster_parameter_group_name").(string)) + requestUpdate = true + } + + if d.HasChange("enabled_cloudwatch_logs_exports") { + d.SetPartial("enabled_cloudwatch_logs_exports") + req.CloudwatchLogsExportConfiguration = buildDocDBCloudwatchLogsExportConfiguration(d) + requestUpdate = true + } + + if requestUpdate { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.ModifyDBCluster(req) + if err != nil { + if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { + return resource.RetryableError(err) + } + + if isAWSErr(err, docdb.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { + return resource.RetryableError(err) + } + + if isAWSErr(err, docdb.ErrCodeInvalidDBClusterStateFault, "DB cluster is not available for modification") { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Failed to modify DocDB Cluster (%s): %s", d.Id(), err) + } + + log.Printf("[INFO] Waiting for DocDB Cluster (%s) to be available", d.Id()) + err = waitForDocDBClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) + if err != nil { + return fmt.Errorf("error waiting for DocDB Cluster (%s) to be available: %s", d.Id(), err) + } + } + + if d.HasChange("tags") { + if err := setTagsDocDB(conn, d); err != nil { + return err + } + + d.SetPartial("tags") + } + + return resourceAwsDocDBClusterRead(d, meta) +} + +func resourceAwsDocDBClusterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + log.Printf("[DEBUG] Destroying DocDB Cluster (%s)", d.Id()) + + deleteOpts := docdb.DeleteDBClusterInput{ + DBClusterIdentifier: aws.String(d.Id()), + } + + skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) + deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) + + if !skipFinalSnapshot { + if name, present := d.GetOk("final_snapshot_identifier"); present { + deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) + } else { + return fmt.Errorf("DocDB Cluster FinalSnapshotIdentifier is required when a final snapshot is required") + } + } + + log.Printf("[DEBUG] DocDB Cluster delete options: %s", deleteOpts) + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteDBCluster(&deleteOpts) + if err != nil { + if isAWSErr(err, docdb.ErrCodeInvalidDBClusterStateFault, "is not currently in the available state") { + return resource.RetryableError(err) + } + if isAWSErr(err, docdb.ErrCodeDBClusterNotFoundFault, "") { + return nil + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("DocDB Cluster cannot be deleted: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsDocDBClusterDeletePendingStates, + Target: []string{"destroyed"}, + Refresh: resourceAwsDocDBClusterStateRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error deleting DocDB Cluster (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsDocDBClusterStateRefreshFunc(conn *docdb.DocDB, dbClusterIdentifier string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeDBClusters(&docdb.DescribeDBClustersInput{ + DBClusterIdentifier: aws.String(dbClusterIdentifier), + }) + + if isAWSErr(err, docdb.ErrCodeDBClusterNotFoundFault, "") { + return 42, "destroyed", nil + } + + if err != nil { + return nil, "", err + } + + var dbc *docdb.DBCluster + + for _, c := range resp.DBClusters { + if *c.DBClusterIdentifier == dbClusterIdentifier { + dbc = c + } + } + + if dbc == nil { + return 42, "destroyed", nil + } + + if dbc.Status != nil { + log.Printf("[DEBUG] DB Cluster status (%s): %s", dbClusterIdentifier, *dbc.Status) + } + + return dbc, aws.StringValue(dbc.Status), nil + } +} + +var resourceAwsDocDBClusterCreatePendingStates = []string{ + "creating", + "backing-up", + "modifying", + "preparing-data-migration", + "migrating", + "resetting-master-credentials", +} + +var resourceAwsDocDBClusterDeletePendingStates = []string{ + "available", + "deleting", + "backing-up", + "modifying", +} + +var resourceAwsDocDBClusterUpdatePendingStates = []string{ + "backing-up", + "modifying", + "resetting-master-credentials", + "upgrading", +} + +func waitForDocDBClusterUpdate(conn *docdb.DocDB, id string, timeout time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsDocDBClusterUpdatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsDocDBClusterStateRefreshFunc(conn, id), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // Wait 30 secs before starting + } + _, err := stateConf.WaitForState() + return err +} + +func buildDocDBCloudwatchLogsExportConfiguration(d *schema.ResourceData) *docdb.CloudwatchLogsExportConfiguration { + + oraw, nraw := d.GetChange("enabled_cloudwatch_logs_exports") + o := oraw.([]interface{}) + n := nraw.([]interface{}) + + create, disable := diffCloudwatchLogsExportConfiguration(o, n) + + return &docdb.CloudwatchLogsExportConfiguration{ + EnableLogTypes: expandStringList(create), + DisableLogTypes: expandStringList(disable), + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go new file mode 100644 index 000000000..2d1fce488 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_parameter_group.go @@ -0,0 +1,282 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/docdb" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +const docdbClusterParameterGroupMaxParamsBulkEdit = 20 + +func resourceAwsDocDBClusterParameterGroup() *schema.Resource { + + return &schema.Resource{ + Create: resourceAwsDocDBClusterParameterGroupCreate, + Read: resourceAwsDocDBClusterParameterGroupRead, + Update: resourceAwsDocDBClusterParameterGroupUpdate, + Delete: resourceAwsDocDBClusterParameterGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateDocDBParamGroupName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDocDBParamGroupNamePrefix, + }, + "family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "Managed by Terraform", + }, + "parameter": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + "apply_method": { + Type: schema.TypeString, + Optional: true, + Default: docdb.ApplyMethodPendingReboot, + ValidateFunc: validation.StringInSlice([]string{ + docdb.ApplyMethodImmediate, + docdb.ApplyMethodPendingReboot, + }, false), + }, + }, + }, + }, + + "tags": tagsSchema(), + }, + } + +} + +func resourceAwsDocDBClusterParameterGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + tags := tagsFromMapDocDB(d.Get("tags").(map[string]interface{})) + + var groupName string + if v, ok := d.GetOk("name"); ok { + groupName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + groupName = resource.PrefixedUniqueId(v.(string)) + } else { + groupName = resource.UniqueId() + } + + createOpts := docdb.CreateDBClusterParameterGroupInput{ + DBClusterParameterGroupName: aws.String(groupName), + DBParameterGroupFamily: aws.String(d.Get("family").(string)), + Description: aws.String(d.Get("description").(string)), + Tags: tags, + } + + log.Printf("[DEBUG] Create DocDB Cluster Parameter Group: %#v", createOpts) + + resp, err := conn.CreateDBClusterParameterGroup(&createOpts) + if err != nil { + return fmt.Errorf("Error creating DocDB Cluster Parameter Group: %s", err) + } + + d.SetId(aws.StringValue(createOpts.DBClusterParameterGroupName)) + + d.Set("arn", resp.DBClusterParameterGroup.DBClusterParameterGroupArn) + + return resourceAwsDocDBClusterParameterGroupUpdate(d, meta) +} + +func resourceAwsDocDBClusterParameterGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + describeOpts := &docdb.DescribeDBClusterParameterGroupsInput{ + DBClusterParameterGroupName: aws.String(d.Id()), + } + + describeResp, err := conn.DescribeDBClusterParameterGroups(describeOpts) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { + log.Printf("[WARN] DocDB Cluster Parameter Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading DocDB Cluster Parameter Group (%s): %s", d.Id(), err) + } + + if len(describeResp.DBClusterParameterGroups) != 1 || + *describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName != d.Id() { + return fmt.Errorf("Unable to find Cluster Parameter Group: %#v", describeResp.DBClusterParameterGroups) + } + + arn := aws.StringValue(describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupArn) + d.Set("arn", arn) + d.Set("description", describeResp.DBClusterParameterGroups[0].Description) + d.Set("family", describeResp.DBClusterParameterGroups[0].DBParameterGroupFamily) + d.Set("name", describeResp.DBClusterParameterGroups[0].DBClusterParameterGroupName) + + describeParametersOpts := &docdb.DescribeDBClusterParametersInput{ + DBClusterParameterGroupName: aws.String(d.Id()), + Source: aws.String("user"), + } + + describeParametersResp, err := conn.DescribeDBClusterParameters(describeParametersOpts) + if err != nil { + return fmt.Errorf("error reading DocDB Cluster Parameter Group (%s) parameters: %s", d.Id(), err) + } + + if err := d.Set("parameter", flattenDocDBParameters(describeParametersResp.Parameters)); err != nil { + return fmt.Errorf("error setting docdb cluster parameter: %s", err) + } + + resp, err := conn.ListTagsForResource(&docdb.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) + + if err != nil { + return fmt.Errorf("error listing tags for DocDB Cluster Parameter Group (%s): %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapDocDB(resp.TagList)); err != nil { + return fmt.Errorf("Error setting docdb parameter group tags: %s", err) + } + + return nil +} + +func resourceAwsDocDBClusterParameterGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + d.Partial(true) + + if d.HasChange("parameter") { + o, n := d.GetChange("parameter") + if o == nil { + o = new(schema.Set) + } + if n == nil { + n = new(schema.Set) + } + + os := o.(*schema.Set) + ns := n.(*schema.Set) + + parameters, err := expandDocDBParameters(ns.Difference(os).List()) + if err != nil { + return err + } + if len(parameters) > 0 { + // We can only modify 20 parameters at a time, so walk them until + // we've got them all. + for parameters != nil { + var paramsToModify []*docdb.Parameter + if len(parameters) <= docdbClusterParameterGroupMaxParamsBulkEdit { + paramsToModify, parameters = parameters[:], nil + } else { + paramsToModify, parameters = parameters[:docdbClusterParameterGroupMaxParamsBulkEdit], parameters[docdbClusterParameterGroupMaxParamsBulkEdit:] + } + parameterGroupName := d.Id() + modifyOpts := docdb.ModifyDBClusterParameterGroupInput{ + DBClusterParameterGroupName: aws.String(parameterGroupName), + Parameters: paramsToModify, + } + + log.Printf("[DEBUG] Modify DocDB Cluster Parameter Group: %#v", modifyOpts) + _, err := conn.ModifyDBClusterParameterGroup(&modifyOpts) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { + log.Printf("[WARN] DocDB Cluster Parameter Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error modifying DocDB Cluster Parameter Group: %s", err) + } + } + d.SetPartial("parameter") + } + } + + if err := setTagsDocDB(conn, d); err != nil { + return err + } + d.SetPartial("tags") + + d.Partial(false) + + return resourceAwsDocDBClusterParameterGroupRead(d, meta) +} + +func resourceAwsDocDBClusterParameterGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + deleteOpts := &docdb.DeleteDBClusterParameterGroupInput{ + DBClusterParameterGroupName: aws.String(d.Id()), + } + + _, err := conn.DeleteDBClusterParameterGroup(deleteOpts) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { + return nil + } + return err + } + + return waitForDocDBClusterParameterGroupDeletion(conn, d.Id()) +} + +func waitForDocDBClusterParameterGroupDeletion(conn *docdb.DocDB, name string) error { + params := &docdb.DescribeDBClusterParameterGroupsInput{ + DBClusterParameterGroupName: aws.String(name), + } + + return resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := conn.DescribeDBClusterParameterGroups(params) + + if isAWSErr(err, docdb.ErrCodeDBParameterGroupNotFoundFault, "") { + return nil + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return resource.RetryableError(fmt.Errorf("DocDB Parameter Group (%s) still exists", name)) + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go new file mode 100644 index 000000000..ff94c0f36 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_cluster_snapshot.go @@ -0,0 +1,206 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/docdb" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDocDBClusterSnapshot() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDocDBClusterSnapshotCreate, + Read: resourceAwsDocDBClusterSnapshotRead, + Delete: resourceAwsDocDBClusterSnapshotDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(20 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "db_cluster_snapshot_identifier": { + Type: schema.TypeString, + ValidateFunc: validateDocDBClusterSnapshotIdentifier, + Required: true, + ForceNew: true, + }, + "db_cluster_identifier": { + Type: schema.TypeString, + ValidateFunc: validateDocDBClusterIdentifier, + Required: true, + ForceNew: true, + }, + + "availability_zones": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "db_cluster_snapshot_arn": { + Type: schema.TypeString, + Computed: true, + }, + "storage_encrypted": { + Type: schema.TypeBool, + Computed: true, + }, + "engine": { + Type: schema.TypeString, + Computed: true, + }, + "engine_version": { + Type: schema.TypeString, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "source_db_cluster_snapshot_arn": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_type": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsDocDBClusterSnapshotCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + params := &docdb.CreateDBClusterSnapshotInput{ + DBClusterIdentifier: aws.String(d.Get("db_cluster_identifier").(string)), + DBClusterSnapshotIdentifier: aws.String(d.Get("db_cluster_snapshot_identifier").(string)), + } + + _, err := conn.CreateDBClusterSnapshot(params) + if err != nil { + return fmt.Errorf("error creating DocDB Cluster Snapshot: %s", err) + } + d.SetId(d.Get("db_cluster_snapshot_identifier").(string)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating"}, + Target: []string{"available"}, + Refresh: resourceAwsDocDBClusterSnapshotStateRefreshFunc(d.Id(), conn), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 10 * time.Second, + Delay: 5 * time.Second, + } + + // Wait, catching any errors + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for DocDB Cluster Snapshot %q to create: %s", d.Id(), err) + } + + return resourceAwsDocDBClusterSnapshotRead(d, meta) +} + +func resourceAwsDocDBClusterSnapshotRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + params := &docdb.DescribeDBClusterSnapshotsInput{ + DBClusterSnapshotIdentifier: aws.String(d.Id()), + } + resp, err := conn.DescribeDBClusterSnapshots(params) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBClusterSnapshotNotFoundFault, "") { + log.Printf("[WARN] DocDB Cluster Snapshot %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading DocDB Cluster Snapshot %q: %s", d.Id(), err) + } + + if resp == nil || len(resp.DBClusterSnapshots) == 0 || resp.DBClusterSnapshots[0] == nil || aws.StringValue(resp.DBClusterSnapshots[0].DBClusterSnapshotIdentifier) != d.Id() { + log.Printf("[WARN] DocDB Cluster Snapshot %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + snapshot := resp.DBClusterSnapshots[0] + + if err := d.Set("availability_zones", flattenStringList(snapshot.AvailabilityZones)); err != nil { + return fmt.Errorf("error setting availability_zones: %s", err) + } + d.Set("db_cluster_identifier", snapshot.DBClusterIdentifier) + d.Set("db_cluster_snapshot_arn", snapshot.DBClusterSnapshotArn) + d.Set("db_cluster_snapshot_identifier", snapshot.DBClusterSnapshotIdentifier) + d.Set("engine_version", snapshot.EngineVersion) + d.Set("engine", snapshot.Engine) + d.Set("kms_key_id", snapshot.KmsKeyId) + d.Set("port", snapshot.Port) + d.Set("snapshot_type", snapshot.SnapshotType) + d.Set("source_db_cluster_snapshot_arn", snapshot.SourceDBClusterSnapshotArn) + d.Set("status", snapshot.Status) + d.Set("storage_encrypted", snapshot.StorageEncrypted) + d.Set("vpc_id", snapshot.VpcId) + + return nil +} + +func resourceAwsDocDBClusterSnapshotDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + params := &docdb.DeleteDBClusterSnapshotInput{ + DBClusterSnapshotIdentifier: aws.String(d.Id()), + } + _, err := conn.DeleteDBClusterSnapshot(params) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBClusterSnapshotNotFoundFault, "") { + return nil + } + return fmt.Errorf("error deleting DocDB Cluster Snapshot %q: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsDocDBClusterSnapshotStateRefreshFunc(dbClusterSnapshotIdentifier string, conn *docdb.DocDB) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + opts := &docdb.DescribeDBClusterSnapshotsInput{ + DBClusterSnapshotIdentifier: aws.String(dbClusterSnapshotIdentifier), + } + + log.Printf("[DEBUG] DocDB Cluster Snapshot describe configuration: %#v", opts) + + resp, err := conn.DescribeDBClusterSnapshots(opts) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBClusterSnapshotNotFoundFault, "") { + return nil, "", nil + } + return nil, "", fmt.Errorf("Error retrieving DocDB Cluster Snapshots: %s", err) + } + + if resp == nil || len(resp.DBClusterSnapshots) == 0 || resp.DBClusterSnapshots[0] == nil { + return nil, "", fmt.Errorf("No snapshots returned for %s", dbClusterSnapshotIdentifier) + } + + snapshot := resp.DBClusterSnapshots[0] + + return resp, aws.StringValue(snapshot.Status), nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go new file mode 100644 index 000000000..4f34f9aa2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_docdb_subnet_group.go @@ -0,0 +1,219 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/docdb" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsDocDBSubnetGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDocDBSubnetGroupCreate, + Read: resourceAwsDocDBSubnetGroupRead, + Update: resourceAwsDocDBSubnetGroupUpdate, + Delete: resourceAwsDocDBSubnetGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateDocDBSubnetGroupName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateDocDBSubnetGroupNamePrefix, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + Default: "Managed by Terraform", + }, + + "subnet_ids": { + Type: schema.TypeSet, + Required: true, + MinItems: 1, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsDocDBSubnetGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + tags := tagsFromMapDocDB(d.Get("tags").(map[string]interface{})) + + subnetIds := expandStringSet(d.Get("subnet_ids").(*schema.Set)) + + var groupName string + if v, ok := d.GetOk("name"); ok { + groupName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + groupName = resource.PrefixedUniqueId(v.(string)) + } else { + groupName = resource.UniqueId() + } + + createOpts := docdb.CreateDBSubnetGroupInput{ + DBSubnetGroupName: aws.String(groupName), + DBSubnetGroupDescription: aws.String(d.Get("description").(string)), + SubnetIds: subnetIds, + Tags: tags, + } + + log.Printf("[DEBUG] Create DocDB Subnet Group: %#v", createOpts) + _, err := conn.CreateDBSubnetGroup(&createOpts) + if err != nil { + return fmt.Errorf("error creating DocDB Subnet Group: %s", err) + } + + d.SetId(groupName) + + return resourceAwsDocDBSubnetGroupRead(d, meta) +} + +func resourceAwsDocDBSubnetGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + describeOpts := docdb.DescribeDBSubnetGroupsInput{ + DBSubnetGroupName: aws.String(d.Id()), + } + + var subnetGroups []*docdb.DBSubnetGroup + if err := conn.DescribeDBSubnetGroupsPages(&describeOpts, func(resp *docdb.DescribeDBSubnetGroupsOutput, lastPage bool) bool { + subnetGroups = append(subnetGroups, resp.DBSubnetGroups...) + return !lastPage + }); err != nil { + if isAWSErr(err, docdb.ErrCodeDBSubnetGroupNotFoundFault, "") { + log.Printf("[WARN] DocDB Subnet Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading DocDB Subnet Group (%s) parameters: %s", d.Id(), err) + } + + if len(subnetGroups) != 1 || + *subnetGroups[0].DBSubnetGroupName != d.Id() { + return fmt.Errorf("unable to find DocDB Subnet Group: %s, removing from state", d.Id()) + } + + subnetGroup := subnetGroups[0] + d.Set("name", subnetGroup.DBSubnetGroupName) + d.Set("description", subnetGroup.DBSubnetGroupDescription) + d.Set("arn", subnetGroup.DBSubnetGroupArn) + + subnets := make([]string, 0, len(subnetGroup.Subnets)) + for _, s := range subnetGroup.Subnets { + subnets = append(subnets, aws.StringValue(s.SubnetIdentifier)) + } + if err := d.Set("subnet_ids", subnets); err != nil { + return fmt.Errorf("error setting subnet_ids: %s", err) + } + + resp, err := conn.ListTagsForResource(&docdb.ListTagsForResourceInput{ + ResourceName: subnetGroup.DBSubnetGroupArn, + }) + + if err != nil { + return fmt.Errorf("error retrieving tags for ARN: %s", aws.StringValue(subnetGroup.DBSubnetGroupArn)) + } + + if err := d.Set("tags", tagsToMapDocDB(resp.TagList)); err != nil { + return fmt.Errorf("error setting DocDB Subnet Group tags: %s", err) + } + return nil +} + +func resourceAwsDocDBSubnetGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + if d.HasChange("subnet_ids") || d.HasChange("description") { + _, n := d.GetChange("subnet_ids") + if n == nil { + n = new(schema.Set) + } + sIds := expandStringSet(n.(*schema.Set)) + + _, err := conn.ModifyDBSubnetGroup(&docdb.ModifyDBSubnetGroupInput{ + DBSubnetGroupName: aws.String(d.Id()), + DBSubnetGroupDescription: aws.String(d.Get("description").(string)), + SubnetIds: sIds, + }) + + if err != nil { + return fmt.Errorf("error modify DocDB Subnet Group (%s) parameters: %s", d.Id(), err) + } + } + + if err := setTagsDocDB(conn, d); err != nil { + return fmt.Errorf("error setting DocDB Subnet Group (%s) tags: %s", d.Id(), err) + } + d.SetPartial("tags") + + return resourceAwsDocDBSubnetGroupRead(d, meta) +} + +func resourceAwsDocDBSubnetGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).docdbconn + + delOpts := docdb.DeleteDBSubnetGroupInput{ + DBSubnetGroupName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting DocDB Subnet Group: %s", d.Id()) + + _, err := conn.DeleteDBSubnetGroup(&delOpts) + if err != nil { + if isAWSErr(err, docdb.ErrCodeDBSubnetGroupNotFoundFault, "") { + return nil + } + return fmt.Errorf("error deleting DocDB Subnet Group (%s): %s", d.Id(), err) + } + + return waitForDocDBSubnetGroupDeletion(conn, d.Id()) +} + +func waitForDocDBSubnetGroupDeletion(conn *docdb.DocDB, name string) error { + params := &docdb.DescribeDBSubnetGroupsInput{ + DBSubnetGroupName: aws.String(name), + } + + return resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := conn.DescribeDBSubnetGroups(params) + + if isAWSErr(err, docdb.ErrCodeDBSubnetGroupNotFoundFault, "") { + return nil + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return resource.RetryableError(fmt.Errorf("DocDB Subnet Group (%s) still exists", name)) + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go index f2d9d6988..add11c529 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go @@ -117,11 +117,8 @@ func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error d.Set("location", connection.Location) d.Set("jumbo_frame_capable", connection.JumboFrameCapable) - if err := getTagsDX(conn, d, arn); err != nil { - return err - } - - return nil + err1 := getTagsDX(conn, d, arn) + return err1 } func resourceAwsDxConnectionUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go index aa33602be..c98a3bbb6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go @@ -113,16 +113,7 @@ func resourceAwsDxGatewayDelete(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error deleting Direct Connect gateway: %s", err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.GatewayStatePending, directconnect.GatewayStateAvailable, directconnect.GatewayStateDeleting}, - Target: []string{directconnect.GatewayStateDeleted}, - Refresh: dxGatewayStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { + if err := waitForDirectConnectGatewayDeletion(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { return fmt.Errorf("Error waiting for Direct Connect gateway (%s) to be deleted: %s", d.Id(), err) } @@ -152,3 +143,18 @@ func dxGatewayStateRefresh(conn *directconnect.DirectConnect, dxgwId string) res } } } + +func waitForDirectConnectGatewayDeletion(conn *directconnect.DirectConnect, gatewayID string, timeout time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.GatewayStatePending, directconnect.GatewayStateAvailable, directconnect.GatewayStateDeleting}, + Target: []string{directconnect.GatewayStateDeleted}, + Refresh: dxGatewayStateRefresh(conn, gatewayID), + Timeout: timeout, + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + + _, err := stateConf.WaitForState() + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go index e8694ce99..615aca392 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway_association.go @@ -112,16 +112,7 @@ func resourceAwsDxGatewayAssociationDelete(d *schema.ResourceData, meta interfac return fmt.Errorf("Error deleting Direct Connect gateway association: %s", err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{directconnect.GatewayAssociationStateDisassociating}, - Target: []string{directconnect.GatewayAssociationStateDisassociated, GatewayAssociationStateDeleted}, - Refresh: dxGatewayAssociationStateRefresh(conn, dxgwId, vgwId), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 10 * time.Second, - MinTimeout: 5 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { + if err := waitForDirectConnectGatewayAssociationDeletion(conn, dxgwId, vgwId, d.Timeout(schema.TimeoutDelete)); err != nil { return fmt.Errorf("Error waiting for Direct Connect gateway association (%s) to be deleted: %s", d.Id(), err.Error()) } @@ -156,3 +147,18 @@ func dxGatewayAssociationStateRefresh(conn *directconnect.DirectConnect, dxgwId, func dxGatewayAssociationId(dxgwId, vgwId string) string { return fmt.Sprintf("ga-%s%s", dxgwId, vgwId) } + +func waitForDirectConnectGatewayAssociationDeletion(conn *directconnect.DirectConnect, directConnectGatewayID, virtualGatewayID string, timeout time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{directconnect.GatewayAssociationStateDisassociating}, + Target: []string{directconnect.GatewayAssociationStateDisassociated, GatewayAssociationStateDeleted}, + Refresh: dxGatewayAssociationStateRefresh(conn, directConnectGatewayID, virtualGatewayID), + Timeout: timeout, + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + + _, err := stateConf.WaitForState() + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index 87ed7673b..7f7f62141 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -120,11 +120,8 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterRead(d *schema.ResourceDa d.Set("virtual_interface_id", vif.VirtualInterfaceId) d.Set("vpn_gateway_id", vif.VirtualGatewayId) d.Set("dx_gateway_id", vif.DirectConnectGatewayId) - if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return nil + err1 := getTagsDX(conn, d, d.Get("arn").(string)) + return err1 } func resourceAwsDxHostedPrivateVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index b3cfc6963..87b127b96 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -94,11 +94,8 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterRead(d *schema.ResourceDat } d.Set("virtual_interface_id", vif.VirtualInterfaceId) - if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return nil + err1 := getTagsDX(conn, d, d.Get("arn").(string)) + return err1 } func resourceAwsDxHostedPublicVirtualInterfaceAccepterUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go index 14e3b9a38..ad844e961 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go @@ -136,11 +136,8 @@ func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { d.Set("connections_bandwidth", lag.ConnectionsBandwidth) d.Set("location", lag.Location) - if err := getTagsDX(conn, d, arn); err != nil { - return err - } - - return nil + err1 := getTagsDX(conn, d, arn) + return err1 } func resourceAwsDxLagUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go index f5851bd9d..affaf0ad3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go @@ -189,11 +189,8 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter d.Set("dx_gateway_id", vif.DirectConnectGatewayId) d.Set("mtu", vif.Mtu) d.Set("jumbo_frame_capable", vif.JumboFrameCapable) - if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return nil + err1 := getTagsDX(conn, d, d.Get("arn").(string)) + return err1 } func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go index 26d3cb3a1..592dba927 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go @@ -160,11 +160,8 @@ func resourceAwsDxPublicVirtualInterfaceRead(d *schema.ResourceData, meta interf d.Set("customer_address", vif.CustomerAddress) d.Set("amazon_address", vif.AmazonAddress) d.Set("route_filter_prefixes", flattenDxRouteFilterPrefixes(vif.RouteFilterPrefixes)) - if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { - return err - } - - return nil + err1 := getTagsDX(conn, d, d.Get("arn").(string)) + return err1 } func resourceAwsDxPublicVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go index b8dfd03c0..bcc5b7c61 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_global_table.go @@ -129,12 +129,8 @@ func resourceAwsDynamoDbGlobalTableUpdate(d *schema.ResourceData, meta interface replicaUpdateDeleteReplicas := expandAwsDynamoDbReplicaUpdateDeleteReplicas(os.Difference(ns).List()) replicaUpdates := make([]*dynamodb.ReplicaUpdate, 0, (len(replicaUpdateCreateReplicas) + len(replicaUpdateDeleteReplicas))) - for _, replicaUpdate := range replicaUpdateCreateReplicas { - replicaUpdates = append(replicaUpdates, replicaUpdate) - } - for _, replicaUpdate := range replicaUpdateDeleteReplicas { - replicaUpdates = append(replicaUpdates, replicaUpdate) - } + replicaUpdates = append(replicaUpdates, replicaUpdateCreateReplicas...) + replicaUpdates = append(replicaUpdates, replicaUpdateDeleteReplicas...) input := &dynamodb.UpdateGlobalTableInput{ GlobalTableName: aws.String(d.Id()), @@ -247,11 +243,7 @@ func flattenAwsDynamoDbGlobalTable(d *schema.ResourceData, globalTableDescriptio d.Set("name", globalTableDescription.GlobalTableName) err = d.Set("replica", flattenAwsDynamoDbReplicas(globalTableDescription.ReplicationGroup)) - if err != nil { - return err - } - - return nil + return err } func expandAwsDynamoDbReplicaUpdateCreateReplicas(configuredReplicas []interface{}) []*dynamodb.ReplicaUpdate { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go index c4d7eab40..7cb0f72cc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go @@ -362,13 +362,19 @@ func resourceAwsDynamoDbTableCreate(d *schema.ResourceData, meta interface{}) er if isAWSErr(err, dynamodb.ErrCodeLimitExceededException, "indexed tables that can be created simultaneously") { return resource.RetryableError(err) } + // AWS GovCloud (US) and others may reply with the following until their API is updated: + // ValidationException: One or more parameter values were invalid: Unsupported input parameter BillingMode + if isAWSErr(err, "ValidationException", "Unsupported input parameter BillingMode") { + req.BillingMode = nil + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } return nil }) if err != nil { - return err + return fmt.Errorf("error creating DynamoDB Table: %s", err) } d.SetId(*output.TableDescription.TableName) @@ -399,6 +405,8 @@ func resourceAwsDynamoDbTableUpdate(d *schema.ResourceData, meta interface{}) er return err } + req.ProvisionedThroughput = expandDynamoDbProvisionedThroughput(capacityMap, billingMode) + _, err := conn.UpdateTable(req) if err != nil { return fmt.Errorf("Error updating DynamoDB Table (%s) billing mode: %s", d.Id(), err) @@ -591,34 +599,14 @@ func resourceAwsDynamoDbTableDelete(d *schema.ResourceData, meta interface{}) er if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "Requested resource not found: Table: ") { return nil } - return err + return fmt.Errorf("error deleting DynamoDB Table (%s): %s", d.Id(), err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{ - dynamodb.TableStatusActive, - dynamodb.TableStatusDeleting, - }, - Target: []string{}, - Timeout: d.Timeout(schema.TimeoutDelete), - Refresh: func() (interface{}, string, error) { - out, err := conn.DescribeTable(&dynamodb.DescribeTableInput{ - TableName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { - return nil, "", nil - } - - return 42, "", err - } - table := out.Table - - return table, *table.TableStatus, nil - }, + if err := waitForDynamodbTableDeletion(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { + return fmt.Errorf("error waiting for DynamoDB Table (%s) deletion: %s", d.Id(), err) } - _, err = stateConf.WaitForState() - return err + + return nil } func deleteAwsDynamoDbTable(tableName string, conn *dynamodb.DynamoDB) error { @@ -650,6 +638,42 @@ func deleteAwsDynamoDbTable(tableName string, conn *dynamodb.DynamoDB) error { }) } +func waitForDynamodbTableDeletion(conn *dynamodb.DynamoDB, tableName string, timeout time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + dynamodb.TableStatusActive, + dynamodb.TableStatusDeleting, + }, + Target: []string{}, + Timeout: timeout, + Refresh: func() (interface{}, string, error) { + input := &dynamodb.DescribeTableInput{ + TableName: aws.String(tableName), + } + + output, err := conn.DescribeTable(input) + + if isAWSErr(err, dynamodb.ErrCodeResourceNotFoundException, "") { + return nil, "", nil + } + + if err != nil { + return 42, "", err + } + + if output == nil { + return nil, "", nil + } + + return output.Table, aws.StringValue(output.Table.TableStatus), nil + }, + } + + _, err := stateConf.WaitForState() + + return err +} + func updateDynamoDbTimeToLive(d *schema.ResourceData, conn *dynamodb.DynamoDB) error { toBeEnabled := false attributeName := "" diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go new file mode 100644 index 000000000..dc0b5694a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_endpoint.go @@ -0,0 +1,337 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsEc2ClientVpnEndpoint() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2ClientVpnEndpointCreate, + Read: resourceAwsEc2ClientVpnEndpointRead, + Delete: resourceAwsEc2ClientVpnEndpointDelete, + Update: resourceAwsEc2ClientVpnEndpointUpdate, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + }, + "client_cidr_block": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "dns_servers": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "server_certificate_arn": { + Type: schema.TypeString, + Required: true, + }, + "transport_protocol": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.TransportProtocolUdp, + ValidateFunc: validation.StringInSlice([]string{ + ec2.TransportProtocolTcp, + ec2.TransportProtocolUdp, + }, false), + }, + "authentication_options": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.ClientVpnAuthenticationTypeCertificateAuthentication, + ec2.ClientVpnAuthenticationTypeDirectoryServiceAuthentication, + }, false), + }, + "active_directory_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "root_certificate_chain_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + }, + }, + "connection_log_options": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_log_group": { + Type: schema.TypeString, + Optional: true, + }, + "cloudwatch_log_stream": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Required: true, + }, + }, + }, + }, + "dns_name": { + Type: schema.TypeString, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsEc2ClientVpnEndpointCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.CreateClientVpnEndpointInput{ + ClientCidrBlock: aws.String(d.Get("client_cidr_block").(string)), + ServerCertificateArn: aws.String(d.Get("server_certificate_arn").(string)), + TransportProtocol: aws.String(d.Get("transport_protocol").(string)), + } + + if v, ok := d.GetOk("description"); ok { + req.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("dns_servers"); ok { + req.DnsServers = expandStringList(v.(*schema.Set).List()) + } + + if v, ok := d.GetOk("authentication_options"); ok { + authOptsSet := v.([]interface{}) + attrs := authOptsSet[0].(map[string]interface{}) + + authOptsReq := &ec2.ClientVpnAuthenticationRequest{ + Type: aws.String(attrs["type"].(string)), + } + + if attrs["type"].(string) == "certificate-authentication" { + authOptsReq.MutualAuthentication = &ec2.CertificateAuthenticationRequest{ + ClientRootCertificateChainArn: aws.String(attrs["root_certificate_chain_arn"].(string)), + } + } + + if attrs["type"].(string) == "directory-service-authentication" { + authOptsReq.ActiveDirectory = &ec2.DirectoryServiceAuthenticationRequest{ + DirectoryId: aws.String(attrs["active_directory_id"].(string)), + } + } + + req.AuthenticationOptions = []*ec2.ClientVpnAuthenticationRequest{authOptsReq} + } + + if v, ok := d.GetOk("connection_log_options"); ok { + connLogSet := v.([]interface{}) + attrs := connLogSet[0].(map[string]interface{}) + + connLogReq := &ec2.ConnectionLogOptions{ + Enabled: aws.Bool(attrs["enabled"].(bool)), + } + + if attrs["enabled"].(bool) && attrs["cloudwatch_log_group"].(string) != "" { + connLogReq.CloudwatchLogGroup = aws.String(attrs["cloudwatch_log_group"].(string)) + } + + if attrs["enabled"].(bool) && attrs["cloudwatch_log_stream"].(string) != "" { + connLogReq.CloudwatchLogStream = aws.String(attrs["cloudwatch_log_stream"].(string)) + } + + req.ConnectionLogOptions = connLogReq + } + + log.Printf("[DEBUG] Creating Client VPN endpoint: %#v", req) + var resp *ec2.CreateClientVpnEndpointOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = conn.CreateClientVpnEndpoint(req) + if isAWSErr(err, "OperationNotPermitted", "Endpoint cannot be created while another endpoint is being created") { + return resource.RetryableError(err) + } + if err != nil { + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("Error creating Client VPN endpoint: %s", err) + } + + d.SetId(*resp.ClientVpnEndpointId) + + return resourceAwsEc2ClientVpnEndpointRead(d, meta) +} + +func resourceAwsEc2ClientVpnEndpointRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + var err error + + result, err := conn.DescribeClientVpnEndpoints(&ec2.DescribeClientVpnEndpointsInput{ + ClientVpnEndpointIds: []*string{aws.String(d.Id())}, + }) + + if err != nil { + return fmt.Errorf("Error reading Client VPN endpoint: %s", err) + } + + if result == nil || len(result.ClientVpnEndpoints) == 0 || result.ClientVpnEndpoints[0] == nil { + log.Printf("[WARN] EC2 Client VPN Endpoint (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if result.ClientVpnEndpoints[0].Status != nil && aws.StringValue(result.ClientVpnEndpoints[0].Status.Code) == ec2.ClientVpnEndpointStatusCodeDeleted { + log.Printf("[WARN] EC2 Client VPN Endpoint (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("description", result.ClientVpnEndpoints[0].Description) + d.Set("client_cidr_block", result.ClientVpnEndpoints[0].ClientCidrBlock) + d.Set("server_certificate_arn", result.ClientVpnEndpoints[0].ServerCertificateArn) + d.Set("transport_protocol", result.ClientVpnEndpoints[0].TransportProtocol) + d.Set("dns_name", result.ClientVpnEndpoints[0].DnsName) + d.Set("status", result.ClientVpnEndpoints[0].Status) + + err = d.Set("authentication_options", flattenAuthOptsConfig(result.ClientVpnEndpoints[0].AuthenticationOptions)) + if err != nil { + return err + } + + err = d.Set("connection_log_options", flattenConnLoggingConfig(result.ClientVpnEndpoints[0].ConnectionLogOptions)) + if err != nil { + return err + } + + return nil +} + +func resourceAwsEc2ClientVpnEndpointDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + _, err := conn.DeleteClientVpnEndpoint(&ec2.DeleteClientVpnEndpointInput{ + ClientVpnEndpointId: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Error deleting Client VPN endpoint: %s", err) + } + + return nil +} + +func resourceAwsEc2ClientVpnEndpointUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.ModifyClientVpnEndpointInput{ + ClientVpnEndpointId: aws.String(d.Id()), + } + + if d.HasChange("description") { + req.Description = aws.String(d.Get("description").(string)) + } + + if d.HasChange("dns_servers") { + dnsValue := expandStringList(d.Get("dns_servers").(*schema.Set).List()) + var enabledValue *bool + + if len(dnsValue) > 0 { + enabledValue = aws.Bool(true) + } else { + enabledValue = aws.Bool(false) + } + + dnsMod := &ec2.DnsServersOptionsModifyStructure{ + CustomDnsServers: dnsValue, + Enabled: enabledValue, + } + req.DnsServers = dnsMod + } + + if d.HasChange("server_certificate_arn") { + req.ServerCertificateArn = aws.String(d.Get("server_certificate_arn").(string)) + } + + if d.HasChange("connection_log_options") { + if v, ok := d.GetOk("connection_log_options"); ok { + connSet := v.([]interface{}) + attrs := connSet[0].(map[string]interface{}) + + connReq := &ec2.ConnectionLogOptions{ + Enabled: aws.Bool(attrs["enabled"].(bool)), + } + + if attrs["enabled"].(bool) && attrs["cloudwatch_log_group"].(string) != "" { + connReq.CloudwatchLogGroup = aws.String(attrs["cloudwatch_log_group"].(string)) + } + + if attrs["enabled"].(bool) && attrs["cloudwatch_log_stream"].(string) != "" { + connReq.CloudwatchLogStream = aws.String(attrs["cloudwatch_log_stream"].(string)) + } + + req.ConnectionLogOptions = connReq + } + } + + _, err := conn.ModifyClientVpnEndpoint(req) + if err != nil { + return fmt.Errorf("Error modifying Client VPN endpoint: %s", err) + } + + return resourceAwsEc2ClientVpnEndpointRead(d, meta) +} + +func flattenConnLoggingConfig(lopts *ec2.ConnectionLogResponseOptions) []map[string]interface{} { + m := make(map[string]interface{}) + if lopts.CloudwatchLogGroup != nil { + m["cloudwatch_log_group"] = *lopts.CloudwatchLogGroup + } + if lopts.CloudwatchLogStream != nil { + m["cloudwatch_log_stream"] = *lopts.CloudwatchLogStream + } + m["enabled"] = *lopts.Enabled + return []map[string]interface{}{m} +} + +func flattenAuthOptsConfig(aopts []*ec2.ClientVpnAuthentication) []map[string]interface{} { + m := make(map[string]interface{}) + if aopts[0].MutualAuthentication != nil { + m["root_certificate_chain_arn"] = *aopts[0].MutualAuthentication.ClientRootCertificateChain + } + if aopts[0].ActiveDirectory != nil { + m["active_directory_id"] = *aopts[0].ActiveDirectory.DirectoryId + } + m["type"] = *aopts[0].Type + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go new file mode 100644 index 000000000..6210a0c02 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_client_vpn_network_association.go @@ -0,0 +1,175 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsEc2ClientVpnNetworkAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2ClientVpnNetworkAssociationCreate, + Read: resourceAwsEc2ClientVpnNetworkAssociationRead, + Delete: resourceAwsEc2ClientVpnNetworkAssociationDelete, + + Schema: map[string]*schema.Schema{ + "client_vpn_endpoint_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "subnet_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "security_groups": { + Type: schema.TypeSet, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsEc2ClientVpnNetworkAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.AssociateClientVpnTargetNetworkInput{ + ClientVpnEndpointId: aws.String(d.Get("client_vpn_endpoint_id").(string)), + SubnetId: aws.String(d.Get("subnet_id").(string)), + } + + log.Printf("[DEBUG] Creating Client VPN network association: %#v", req) + resp, err := conn.AssociateClientVpnTargetNetwork(req) + if err != nil { + return fmt.Errorf("Error creating Client VPN network association: %s", err) + } + + d.SetId(*resp.AssociationId) + + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.AssociationStatusCodeAssociating}, + Target: []string{ec2.AssociationStatusCodeAssociated}, + Refresh: clientVpnNetworkAssociationRefreshFunc(conn, d.Id(), d.Get("client_vpn_endpoint_id").(string)), + Timeout: d.Timeout(schema.TimeoutCreate), + } + + log.Printf("[DEBUG] Waiting for Client VPN endpoint to associate with target network: %s", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Client VPN endpoint to associate with target network: %s", err) + } + + return resourceAwsEc2ClientVpnNetworkAssociationRead(d, meta) +} + +func resourceAwsEc2ClientVpnNetworkAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + var err error + + result, err := conn.DescribeClientVpnTargetNetworks(&ec2.DescribeClientVpnTargetNetworksInput{ + ClientVpnEndpointId: aws.String(d.Get("client_vpn_endpoint_id").(string)), + AssociationIds: []*string{aws.String(d.Id())}, + }) + + if isAWSErr(err, "InvalidClientVpnAssociationId.NotFound", "") || isAWSErr(err, "InvalidClientVpnEndpointId.NotFound", "") { + log.Printf("[WARN] EC2 Client VPN Network Association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("Error reading Client VPN network association: %s", err) + } + + if result == nil || len(result.ClientVpnTargetNetworks) == 0 || result.ClientVpnTargetNetworks[0] == nil { + log.Printf("[WARN] EC2 Client VPN Network Association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if result.ClientVpnTargetNetworks[0].Status != nil && aws.StringValue(result.ClientVpnTargetNetworks[0].Status.Code) == ec2.AssociationStatusCodeDisassociated { + log.Printf("[WARN] EC2 Client VPN Network Association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("client_vpn_endpoint_id", result.ClientVpnTargetNetworks[0].ClientVpnEndpointId) + d.Set("status", result.ClientVpnTargetNetworks[0].Status.Code) + d.Set("subnet_id", result.ClientVpnTargetNetworks[0].TargetNetworkId) + d.Set("vpc_id", result.ClientVpnTargetNetworks[0].VpcId) + + if err := d.Set("security_groups", aws.StringValueSlice(result.ClientVpnTargetNetworks[0].SecurityGroups)); err != nil { + return fmt.Errorf("error setting security_groups: %s", err) + } + + return nil +} + +func resourceAwsEc2ClientVpnNetworkAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + _, err := conn.DisassociateClientVpnTargetNetwork(&ec2.DisassociateClientVpnTargetNetworkInput{ + ClientVpnEndpointId: aws.String(d.Get("client_vpn_endpoint_id").(string)), + AssociationId: aws.String(d.Id()), + }) + + if isAWSErr(err, "InvalidClientVpnAssociationId.NotFound", "") || isAWSErr(err, "InvalidClientVpnEndpointId.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("Error deleting Client VPN network association: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.AssociationStatusCodeDisassociating}, + Target: []string{ec2.AssociationStatusCodeDisassociated}, + Refresh: clientVpnNetworkAssociationRefreshFunc(conn, d.Id(), d.Get("client_vpn_endpoint_id").(string)), + Timeout: d.Timeout(schema.TimeoutDelete), + } + + log.Printf("[DEBUG] Waiting for Client VPN endpoint to disassociate with target network: %s", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Client VPN endpoint to disassociate with target network: %s", err) + } + + return nil +} + +func clientVpnNetworkAssociationRefreshFunc(conn *ec2.EC2, cvnaID string, cvepID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, err := conn.DescribeClientVpnTargetNetworks(&ec2.DescribeClientVpnTargetNetworksInput{ + ClientVpnEndpointId: aws.String(cvepID), + AssociationIds: []*string{aws.String(cvnaID)}, + }) + + if isAWSErr(err, "InvalidClientVpnAssociationId.NotFound", "") || isAWSErr(err, "InvalidClientVpnEndpointId.NotFound", "") { + return 42, ec2.AssociationStatusCodeDisassociated, nil + } + + if err != nil { + return nil, "", err + } + + if resp == nil || len(resp.ClientVpnTargetNetworks) == 0 || resp.ClientVpnTargetNetworks[0] == nil { + return 42, ec2.AssociationStatusCodeDisassociated, nil + } + + return resp.ClientVpnTargetNetworks[0], aws.StringValue(resp.ClientVpnTargetNetworks[0].Status.Code), nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go index 7e816cdde..03dd06f20 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go @@ -239,10 +239,7 @@ func resourceAwsEc2Fleet() *schema.Resource { return false } totalTargetCapacityO, _ := d.GetChange("target_capacity_specification.0.total_target_capacity") - if oldInt != totalTargetCapacityO.(int) { - return false - } - return true + return oldInt == totalTargetCapacityO.(int) }, }, "spot_target_capacity": { @@ -270,10 +267,7 @@ func resourceAwsEc2Fleet() *schema.Resource { return false } totalTargetCapacityO, _ := d.GetChange("target_capacity_specification.0.total_target_capacity") - if oldInt != totalTargetCapacityO.(int) { - return false - } - return true + return oldInt == totalTargetCapacityO.(int) }, }, "total_target_capacity": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go index 020925d5b..cd00adcb9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_transit_gateway_route.go @@ -124,7 +124,7 @@ func resourceAwsEc2TransitGatewayRouteRead(d *schema.ResourceData, meta interfac d.Set("destination_cidr_block", transitGatewayRoute.DestinationCidrBlock) d.Set("transit_gateway_attachment_id", "") - if len(transitGatewayRoute.TransitGatewayAttachments) == 0 || transitGatewayRoute.TransitGatewayAttachments[0] != nil { + if len(transitGatewayRoute.TransitGatewayAttachments) > 0 && transitGatewayRoute.TransitGatewayAttachments[0] != nil { d.Set("transit_gateway_attachment_id", transitGatewayRoute.TransitGatewayAttachments[0].TransitGatewayAttachmentId) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go index 8b540432b..40da39502 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go @@ -7,7 +7,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ecr" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -17,6 +16,7 @@ func resourceAwsEcrRepository() *schema.Resource { return &schema.Resource{ Create: resourceAwsEcrRepositoryCreate, Read: resourceAwsEcrRepositoryRead, + Update: resourceAwsEcrRepositoryUpdate, Delete: resourceAwsEcrRepositoryDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -32,6 +32,7 @@ func resourceAwsEcrRepository() *schema.Resource { Required: true, ForceNew: true, }, + "tags": tagsSchema(), "arn": { Type: schema.TypeString, Computed: true, @@ -55,19 +56,23 @@ func resourceAwsEcrRepositoryCreate(d *schema.ResourceData, meta interface{}) er RepositoryName: aws.String(d.Get("name").(string)), } - log.Printf("[DEBUG] Creating ECR resository: %s", input) + log.Printf("[DEBUG] Creating ECR repository: %#v", input) out, err := conn.CreateRepository(&input) if err != nil { - return err + return fmt.Errorf("error creating ECR repository: %s", err) } repository := *out.Repository log.Printf("[DEBUG] ECR repository created: %q", *repository.RepositoryArn) - d.SetId(*repository.RepositoryName) + d.SetId(aws.StringValue(repository.RepositoryName)) + // ARN required for setting any tags. d.Set("arn", repository.RepositoryArn) - d.Set("registry_id", repository.RegistryId) + + if err := setTagsECR(conn, d); err != nil { + return fmt.Errorf("error setting ECR repository tags: %s", err) + } return resourceAwsEcrRepositoryRead(d, meta) } @@ -75,10 +80,10 @@ func resourceAwsEcrRepositoryCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecrconn - log.Printf("[DEBUG] Reading repository %s", d.Id()) + log.Printf("[DEBUG] Reading ECR repository %s", d.Id()) var out *ecr.DescribeRepositoriesOutput input := &ecr.DescribeRepositoriesInput{ - RepositoryNames: []*string{aws.String(d.Id())}, + RepositoryNames: aws.StringSlice([]string{d.Id()}), } err := resource.Retry(1*time.Minute, func() *resource.RetryError { @@ -100,7 +105,7 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro } if err != nil { - return err + return fmt.Errorf("error reading ECR repository: %s", err) } repository := out.Repositories[0] @@ -110,9 +115,23 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro d.Set("registry_id", repository.RegistryId) d.Set("repository_url", repository.RepositoryUri) + if err := getTagsECR(conn, d); err != nil { + return fmt.Errorf("error getting ECR repository tags: %s", err) + } + return nil } +func resourceAwsEcrRepositoryUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecrconn + + if err := setTagsECR(conn, d); err != nil { + return fmt.Errorf("error setting ECR repository tags: %s", err) + } + + return resourceAwsEcrRepositoryRead(d, meta) +} + func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecrconn @@ -122,28 +141,21 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er Force: aws.Bool(true), }) if err != nil { - if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { + if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { return nil } - return err + return fmt.Errorf("error deleting ECR repository: %s", err) } log.Printf("[DEBUG] Waiting for ECR Repository %q to be deleted", d.Id()) err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { _, err := conn.DescribeRepositories(&ecr.DescribeRepositoriesInput{ - RepositoryNames: []*string{aws.String(d.Id())}, + RepositoryNames: aws.StringSlice([]string{d.Id()}), }) - if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - - if awsErr.Code() == "RepositoryNotFoundException" { + if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { return nil } - return resource.NonRetryableError(err) } @@ -151,7 +163,7 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er fmt.Errorf("%q: Timeout while waiting for the ECR Repository to be deleted", d.Id())) }) if err != nil { - return err + return fmt.Errorf("error deleting ECR repository: %s", err) } log.Printf("[DEBUG] repository %q deleted.", d.Get("name").(string)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go index bbe88552b..a22818818 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go @@ -49,10 +49,7 @@ func resourceAwsEcsService() *schema.Resource { Type: schema.TypeInt, Optional: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { - return true - } - return false + return d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon }, }, @@ -75,6 +72,12 @@ func resourceAwsEcsService() *schema.Resource { Default: "EC2", }, + "platform_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "scheduling_strategy": { Type: schema.TypeString, Optional: true, @@ -223,10 +226,7 @@ func resourceAwsEcsService() *schema.Resource { ForceNew: true, Optional: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if strings.ToLower(old) == strings.ToLower(new) { - return true - } - return false + return strings.EqualFold(old, new) }, }, }, @@ -271,10 +271,7 @@ func resourceAwsEcsService() *schema.Resource { return value }, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if strings.ToLower(old) == strings.ToLower(new) { - return true - } - return false + return strings.EqualFold(old, new) }, }, }, @@ -416,6 +413,10 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.PropagateTags = aws.String(v.(string)) } + if v, ok := d.GetOk("platform_version"); ok { + input.PlatformVersion = aws.String(v.(string)) + } + loadBalancers := expandEcsLoadBalancers(d.Get("load_balancer").(*schema.Set).List()) if len(loadBalancers) > 0 { log.Printf("[DEBUG] Adding ECS load balancers: %s", loadBalancers) @@ -596,6 +597,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { d.Set("launch_type", service.LaunchType) d.Set("enable_ecs_managed_tags", service.EnableECSManagedTags) d.Set("propagate_tags", service.PropagateTags) + d.Set("platform_version", service.PlatformVersion) // Save cluster in the same format if strings.HasPrefix(d.Get("cluster").(string), "arn:"+meta.(*AWSClient).partition+":ecs:") { @@ -887,6 +889,11 @@ func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error } } + if d.HasChange("platform_version") { + updateService = true + input.PlatformVersion = aws.String(d.Get("platform_version").(string)) + } + if d.HasChange("health_check_grace_period_seconds") { updateService = true input.HealthCheckGracePeriodSeconds = aws.Int64(int64(d.Get("health_check_grace_period_seconds").(int))) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go index 4e06fe6e5..3f4f98a72 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go @@ -255,9 +255,7 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro d.Id(), err.Error()) } - for _, tag := range tagsResp.Tags { - tags = append(tags, tag) - } + tags = append(tags, tagsResp.Tags...) if tagsResp.NextMarker != nil { marker = *tagsResp.NextMarker @@ -301,9 +299,8 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro d.Set("throughput_mode", fs.ThroughputMode) region := meta.(*AWSClient).region - err = d.Set("dns_name", resourceAwsEfsDnsName(*fs.FileSystemId, region)) - if err != nil { - return err + if err := d.Set("dns_name", resourceAwsEfsDnsName(aws.StringValue(fs.FileSystemId), region)); err != nil { + return fmt.Errorf("error setting dns_name: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go index ee1d8e0cb..778881b11 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go @@ -221,9 +221,8 @@ func resourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) err } region := meta.(*AWSClient).region - err = d.Set("dns_name", resourceAwsEfsMountTargetDnsName(*mt.FileSystemId, region)) - if err != nil { - return err + if err := d.Set("dns_name", resourceAwsEfsMountTargetDnsName(aws.StringValue(mt.FileSystemId), region)); err != nil { + return fmt.Errorf("error setting dns_name: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go index a12d87522..ffe4c13a3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_application_version.go @@ -133,7 +133,7 @@ func resourceAwsElasticBeanstalkApplicationVersionDelete(d *schema.ResourceData, application := d.Get("application").(string) name := d.Id() - if d.Get("force_delete").(bool) == false { + if !d.Get("force_delete").(bool) { environments, err := versionUsedBy(application, name, conn) if err != nil { return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go index d4954d29a..0947ea92b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go @@ -238,7 +238,7 @@ func expandETNotifications(d *schema.ResourceData) *elastictranscoder.Notificati } s := set.(*schema.Set).List() - if s == nil || len(s) == 0 { + if len(s) == 0 { return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go index 5986e487c..d30a9f0bb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go @@ -438,7 +438,7 @@ func resourceAwsElasticacheClusterRead(d *schema.ResourceData, meta interface{}) if c.ConfigurationEndpoint != nil { d.Set("port", c.ConfigurationEndpoint.Port) d.Set("configuration_endpoint", aws.String(fmt.Sprintf("%s:%d", *c.ConfigurationEndpoint.Address, *c.ConfigurationEndpoint.Port))) - d.Set("cluster_address", aws.String(fmt.Sprintf("%s", *c.ConfigurationEndpoint.Address))) + d.Set("cluster_address", aws.String((*c.ConfigurationEndpoint.Address))) } else if len(c.CacheNodes) > 0 { d.Set("port", int(aws.Int64Value(c.CacheNodes[0].Endpoint.Port))) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go index 06502feea..b5f38a6fb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" "github.com/aws/aws-sdk-go/service/iam" + "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -27,6 +28,31 @@ func resourceAwsElasticSearchDomain() *schema.Resource { State: resourceAwsElasticSearchDomainImport, }, + CustomizeDiff: customdiff.Sequence( + customdiff.ForceNewIf("elasticsearch_version", func(d *schema.ResourceDiff, meta interface{}) bool { + newVersion := d.Get("elasticsearch_version").(string) + domainName := d.Get("domain_name").(string) + + conn := meta.(*AWSClient).esconn + resp, err := conn.GetCompatibleElasticsearchVersions(&elasticsearch.GetCompatibleElasticsearchVersionsInput{ + DomainName: aws.String(domainName), + }) + if err != nil { + log.Printf("[ERROR] Failed to get compatible ElasticSearch versions %s", domainName) + return false + } + if len(resp.CompatibleElasticsearchVersions) != 1 { + return true + } + for _, targetVersion := range resp.CompatibleElasticsearchVersions[0].TargetVersions { + if aws.StringValue(targetVersion) == newVersion { + return false + } + } + return true + }), + ), + Schema: map[string]*schema.Schema{ "access_policies": { Type: schema.TypeString, @@ -253,7 +279,6 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "1.5", - ForceNew: true, }, "cognito_options": { Type: schema.TypeList, @@ -731,7 +756,7 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface return resource.NonRetryableError(err) } - if *out.DomainStatus.Processing == false { + if !*out.DomainStatus.Processing { return nil } @@ -742,6 +767,40 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface return err } + if d.HasChange("elasticsearch_version") { + upgradeInput := elasticsearch.UpgradeElasticsearchDomainInput{ + DomainName: aws.String(d.Get("domain_name").(string)), + TargetVersion: aws.String(d.Get("elasticsearch_version").(string)), + } + + _, err := conn.UpgradeElasticsearchDomain(&upgradeInput) + if err != nil { + return fmt.Errorf("Failed to upgrade elasticsearch domain: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{elasticsearch.UpgradeStatusInProgress}, + Target: []string{elasticsearch.UpgradeStatusSucceeded}, + Refresh: func() (interface{}, string, error) { + out, err := conn.GetUpgradeStatus(&elasticsearch.GetUpgradeStatusInput{ + DomainName: aws.String(d.Get("domain_name").(string)), + }) + if err != nil { + return nil, "", err + } + + return out, aws.StringValue(out.StepStatus), nil + }, + Timeout: 60 * time.Minute, // TODO: Make this configurable. Large ES domains may take a very long time to upgrade + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // The upgrade status isn't instantly available for the current upgrade so will either be nil or reflect a previous upgrade + } + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return waitErr + } + } + d.Partial(false) return resourceAwsElasticSearchDomainRead(d, meta) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go index da4e58816..46ae0c1f8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain_policy.go @@ -77,7 +77,7 @@ func resourceAwsElasticSearchDomainPolicyUpsert(d *schema.ResourceData, meta int return resource.NonRetryableError(err) } - if *out.DomainStatus.Processing == false { + if !*out.DomainStatus.Processing { return nil } @@ -111,16 +111,12 @@ func resourceAwsElasticSearchDomainPolicyDelete(d *schema.ResourceData, meta int return resource.NonRetryableError(err) } - if *out.DomainStatus.Processing == false { + if !*out.DomainStatus.Processing { return nil } return resource.RetryableError( fmt.Errorf("%q: Timeout while waiting for policy to be deleted", d.Id())) }) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go index 38ca61e26..331c9b711 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go @@ -944,7 +944,7 @@ func validateHeathCheckTarget(v interface{}, k string) (ws []string, errors []er "%q cannot contain a path in the Health Check target: %s", k, value)) } - break + case "http", "https": // Check if value is in the form :/ for HTTP and/or HTTPS. if matches[3] == "" { @@ -959,7 +959,7 @@ func validateHeathCheckTarget(v interface{}, k string) (ws []string, errors []er "than 1024 characters in the Health Check target: %s", k, value)) } - break + } return @@ -1029,11 +1029,7 @@ func cleanupELBNetworkInterfaces(conn *ec2.EC2, name string) error { } err = deleteNetworkInterfaces(conn, out.NetworkInterfaces) - if err != nil { - return err - } - - return nil + return err } func detachNetworkInterfaces(conn *ec2.EC2, nis []*ec2.NetworkInterface) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go index 366b2ad7e..8cb418e38 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go @@ -1,6 +1,7 @@ package aws import ( + "bytes" "log" "encoding/json" @@ -14,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" "github.com/aws/aws-sdk-go/service/emr" + "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -26,6 +28,61 @@ func resourceAwsEMRCluster() *schema.Resource { Read: resourceAwsEMRClusterRead, Update: resourceAwsEMRClusterUpdate, Delete: resourceAwsEMRClusterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + CustomizeDiff: func(diff *schema.ResourceDiff, v interface{}) error { + if diff.HasChange("instance_group") { + o, n := diff.GetChange("instance_group") + oSet := o.(*schema.Set).List() + nSet := n.(*schema.Set).List() + + // Everything in instance group needs to be set to forcenew if the autoscaling policy doesn't change + if len(oSet) != len(nSet) { + return nil + } + for _, currInstanceGroup := range oSet { + for _, nextInstanceGroup := range nSet { + oInstanceGroup := currInstanceGroup.(map[string]interface{}) + nInstanceGroup := nextInstanceGroup.(map[string]interface{}) + + if oInstanceGroup["instance_role"].(string) != nInstanceGroup["instance_role"].(string) || oInstanceGroup["name"].(string) != nInstanceGroup["name"].(string) { + continue + } + + oAutoScalingPolicy := oInstanceGroup["autoscaling_policy"].(string) + nAutoScalingPolicy := nInstanceGroup["autoscaling_policy"].(string) + + if oAutoScalingPolicy == "" && nAutoScalingPolicy == "" { + continue + } + + oJSON, err := structure.NormalizeJsonString(oAutoScalingPolicy) + if err != nil { + return fmt.Errorf("error reading old json value: %s", err) + } + nJSON, err := structure.NormalizeJsonString(nAutoScalingPolicy) + if err != nil { + return fmt.Errorf("error reading new json value: %s", err) + } + + if oJSON != nJSON { + continue + } + for _, k := range diff.GetChangedKeysPrefix(fmt.Sprintf("instance_group.%d", resourceAwsEMRClusterInstanceGroupHash(oInstanceGroup))) { + if strings.HasSuffix(k, ".#") { + k = strings.TrimSuffix(k, ".#") + } + diff.ForceNew(k) + } + break + } + } + } + return nil + }, + Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, @@ -39,9 +96,9 @@ func resourceAwsEMRCluster() *schema.Resource { }, "master_instance_type": { Type: schema.TypeString, - Required: false, Optional: true, ForceNew: true, + Computed: true, }, "additional_info": { Type: schema.TypeString, @@ -61,8 +118,10 @@ func resourceAwsEMRCluster() *schema.Resource { Computed: true, }, "core_instance_count": { - Type: schema.TypeInt, - Optional: true, + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(1), + Computed: true, }, "cluster_state": { Type: schema.TypeString, @@ -194,17 +253,17 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeSet, Optional: true, ForceNew: true, + Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "bid_price": { Type: schema.TypeString, Optional: true, - Required: false, }, "ebs_config": { Type: schema.TypeSet, Optional: true, - ForceNew: true, + Computed: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "iops": { @@ -227,6 +286,7 @@ func resourceAwsEMRCluster() *schema.Resource { }, }, }, + Set: resourceAwsEMRClusterEBSConfigHash, }, "instance_count": { Type: schema.TypeInt, @@ -255,15 +315,18 @@ func resourceAwsEMRCluster() *schema.Resource { "instance_type": { Type: schema.TypeString, Required: true, - ForceNew: true, }, "name": { Type: schema.TypeString, Optional: true, - ForceNew: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, }, }, }, + Set: resourceAwsEMRClusterInstanceGroupHash, }, "bootstrap_action": { Type: schema.TypeSet, @@ -430,14 +493,31 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error } if v, ok := d.GetOk("master_instance_type"); ok { - instanceConfig.MasterInstanceType = aws.String(v.(string)) - instanceConfig.SlaveInstanceType = aws.String(v.(string)) + masterInstanceGroupConfig := &emr.InstanceGroupConfig{ + InstanceRole: aws.String("MASTER"), + InstanceType: aws.String(v.(string)), + InstanceCount: aws.Int64(1), + } + instanceConfig.InstanceGroups = append(instanceConfig.InstanceGroups, masterInstanceGroupConfig) } + + var coreInstanceType string if v, ok := d.GetOk("core_instance_type"); ok { - instanceConfig.SlaveInstanceType = aws.String(v.(string)) + coreInstanceType = v.(string) } + var coreInstanceCount int64 if v, ok := d.GetOk("core_instance_count"); ok { - instanceConfig.InstanceCount = aws.Int64(int64(v.(int))) + coreInstanceCount = int64(v.(int)) + } + if (coreInstanceCount == 0 && coreInstanceType != "") || (coreInstanceCount > 0 && coreInstanceType == "") { + return fmt.Errorf("Must specify both `core_instance_count` and `core_instance_type`") + } else if coreInstanceCount > 0 && coreInstanceType != "" { + coreInstanceGroupConfig := &emr.InstanceGroupConfig{ + InstanceCount: aws.Int64(int64(d.Get("core_instance_count").(int))), + InstanceRole: aws.String("CORE"), + InstanceType: aws.String(d.Get("core_instance_type").(string)), + } + instanceConfig.InstanceGroups = append(instanceConfig.InstanceGroups, coreInstanceGroupConfig) } var instanceProfile string @@ -451,9 +531,6 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error if v, ok := attributes["subnet_id"]; ok { instanceConfig.Ec2SubnetId = aws.String(v.(string)) } - if v, ok := attributes["subnet_id"]; ok { - instanceConfig.Ec2SubnetId = aws.String(v.(string)) - } if v, ok := attributes["additional_master_security_groups"]; ok { strSlice := strings.Split(v.(string), ",") @@ -601,6 +678,8 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error } d.SetId(*resp.JobFlowId) + // This value can only be obtained through a deprecated function + d.Set("keep_job_flow_alive_when_no_steps", params.Instances.KeepJobFlowAliveWhenNoSteps) log.Println("[INFO] Waiting for EMR Cluster to be available") @@ -664,9 +743,19 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { coreGroup := emrCoreInstanceGroup(instanceGroups) if coreGroup != nil { d.Set("core_instance_type", coreGroup.InstanceType) + d.Set("core_instance_count", coreGroup.RequestedInstanceCount) } - if err := d.Set("instance_group", flattenInstanceGroups(instanceGroups)); err != nil { - log.Printf("[ERR] Error setting EMR instance groups: %s", err) + masterGroup := findMasterGroup(instanceGroups) + if masterGroup != nil { + d.Set("master_instance_type", masterGroup.InstanceType) + } + + flattenedInstanceGroups, err := flattenInstanceGroups(instanceGroups) + if err != nil { + return fmt.Errorf("error flattening instance groups: %+v", err) + } + if err := d.Set("instance_group", flattenedInstanceGroups); err != nil { + return fmt.Errorf("[ERR] Error setting EMR instance groups: %s", err) } } @@ -682,19 +771,14 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("tags", tagsToMapEMR(cluster.Tags)) d.Set("ebs_root_volume_size", cluster.EbsRootVolumeSize) d.Set("scale_down_behavior", cluster.ScaleDownBehavior) + d.Set("termination_protection", cluster.TerminationProtected) if cluster.CustomAmiId != nil { d.Set("custom_ami_id", cluster.CustomAmiId) } if err := d.Set("applications", flattenApplications(cluster.Applications)); err != nil { - log.Printf("[ERR] Error setting EMR Applications for cluster (%s): %s", d.Id(), err) - } - - // Configurations is a JSON document. It's built with an expand method but a - // simple string should be returned as JSON - if err := d.Set("configurations", cluster.Configurations); err != nil { - log.Printf("[ERR] Error setting EMR configurations for cluster (%s): %s", d.Id(), err) + return fmt.Errorf("error setting EMR Applications for cluster (%s): %s", d.Id(), err) } if _, ok := d.GetOk("configurations_json"); ok { @@ -708,7 +792,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { } if err := d.Set("ec2_attributes", flattenEc2Attributes(cluster.Ec2InstanceAttributes)); err != nil { - log.Printf("[ERR] Error setting EMR Ec2 Attributes: %s", err) + return fmt.Errorf("error setting EMR Ec2 Attributes: %s", err) } if err := d.Set("kerberos_attributes", flattenEmrKerberosAttributes(d, cluster.KerberosAttributes)); err != nil { @@ -719,11 +803,11 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { ClusterId: cluster.Id, }) if err != nil { - log.Printf("[WARN] Error listing bootstrap actions: %s", err) + return fmt.Errorf("error listing bootstrap actions: %s", err) } if err := d.Set("bootstrap_action", flattenBootstrapArguments(respBootstraps.BootstrapActions)); err != nil { - log.Printf("[WARN] Error setting Bootstrap Actions: %s", err) + return fmt.Errorf("error setting Bootstrap Actions: %s", err) } var stepSummaries []*emr.StepSummary @@ -839,6 +923,45 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } } + if d.HasChange("instance_group") { + o, n := d.GetChange("instance_group") + oSet := o.(*schema.Set).List() + nSet := n.(*schema.Set).List() + for _, currInstanceGroup := range oSet { + for _, nextInstanceGroup := range nSet { + oInstanceGroup := currInstanceGroup.(map[string]interface{}) + nInstanceGroup := nextInstanceGroup.(map[string]interface{}) + + if oInstanceGroup["instance_role"].(string) != nInstanceGroup["instance_role"].(string) || oInstanceGroup["name"].(string) != nInstanceGroup["name"].(string) { + continue + } + + if v, ok := nInstanceGroup["autoscaling_policy"]; ok && v.(string) != "" { + var autoScalingPolicy *emr.AutoScalingPolicy + + err := json.Unmarshal([]byte(v.(string)), &autoScalingPolicy) + if err != nil { + return fmt.Errorf("error parsing EMR Auto Scaling Policy JSON for update: \n\n%s\n\n%s", v.(string), err) + } + + putAutoScalingPolicy := &emr.PutAutoScalingPolicyInput{ + ClusterId: aws.String(d.Id()), + AutoScalingPolicy: autoScalingPolicy, + InstanceGroupId: aws.String(oInstanceGroup["id"].(string)), + } + + _, errModify := conn.PutAutoScalingPolicy(putAutoScalingPolicy) + if errModify != nil { + return fmt.Errorf("error updating autoscaling policy for instance group %q: %s", oInstanceGroup["id"].(string), errModify) + } + + break + } + } + + } + } + if err := setTagsEMR(conn, d); err != nil { return err } else { @@ -901,7 +1024,7 @@ func resourceAwsEMRClusterDelete(d *schema.ResourceData, meta interface{}) error }) if err != nil { - log.Printf("[ERR] Error waiting for EMR Cluster (%s) Instances to drain", d.Id()) + return fmt.Errorf("error waiting for EMR Cluster (%s) Instances to drain", d.Id()) } return nil @@ -1043,46 +1166,115 @@ func flattenEmrStepSummary(stepSummary *emr.StepSummary) map[string]interface{} return m } -func flattenInstanceGroups(igs []*emr.InstanceGroup) []map[string]interface{} { - result := make([]map[string]interface{}, 0) - - for _, ig := range igs { - attrs := make(map[string]interface{}) - if ig.BidPrice != nil { - attrs["bid_price"] = *ig.BidPrice - } else { - attrs["bid_price"] = "" - } - ebsConfig := make([]map[string]interface{}, 0) - for _, ebs := range ig.EbsBlockDevices { - ebsAttrs := make(map[string]interface{}) - if ebs.VolumeSpecification.Iops != nil { - ebsAttrs["iops"] = *ebs.VolumeSpecification.Iops - } else { - ebsAttrs["iops"] = "" - } - ebsAttrs["size"] = *ebs.VolumeSpecification.SizeInGB - ebsAttrs["type"] = *ebs.VolumeSpecification.VolumeType - ebsAttrs["volumes_per_instance"] = 1 - - ebsConfig = append(ebsConfig, ebsAttrs) - } - attrs["ebs_config"] = ebsConfig - attrs["instance_count"] = *ig.RequestedInstanceCount - attrs["instance_role"] = *ig.InstanceGroupType - attrs["instance_type"] = *ig.InstanceType - - if ig.AutoScalingPolicy != nil { - attrs["autoscaling_policy"] = *ig.AutoScalingPolicy - } else { - attrs["autoscaling_policy"] = "" - } - - attrs["name"] = *ig.Name - result = append(result, attrs) +func flattenInstanceGroup(ig *emr.InstanceGroup) (map[string]interface{}, error) { + attrs := map[string]interface{}{} + if ig.BidPrice != nil { + attrs["bid_price"] = *ig.BidPrice } - return result + attrs["id"] = *ig.Id + attrs["ebs_config"] = flattenEBSConfig(ig.EbsBlockDevices) + attrs["instance_count"] = int(*ig.RequestedInstanceCount) + attrs["instance_role"] = *ig.InstanceGroupType + attrs["instance_type"] = *ig.InstanceType + if ig.Name != nil { + attrs["name"] = *ig.Name + } + + if ig.AutoScalingPolicy != nil { + // AutoScalingPolicy has an additional Status field and null values that are causing a new hashcode to be generated + // for `instance_group`. + // We are purposefully omitting that field and the null values here when we flatten the autoscaling policy string + // for the statefile. + for i, rule := range ig.AutoScalingPolicy.Rules { + for j, dimension := range rule.Trigger.CloudWatchAlarmDefinition.Dimensions { + if *dimension.Key == "JobFlowId" { + tmpDimensions := append(ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions[:j], ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions[j+1:]...) + ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions = tmpDimensions + } + } + if len(ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions) == 0 { + ig.AutoScalingPolicy.Rules[i].Trigger.CloudWatchAlarmDefinition.Dimensions = nil + } + } + + tmpAutoScalingPolicy := emr.AutoScalingPolicy{ + Constraints: ig.AutoScalingPolicy.Constraints, + Rules: ig.AutoScalingPolicy.Rules, + } + autoscalingPolicyConstraintsBytes, err := json.Marshal(tmpAutoScalingPolicy.Constraints) + if err != nil { + return nil, fmt.Errorf("error parsing EMR Cluster Instance Groups AutoScalingPolicy Constraints: %s", err) + } + autoscalingPolicyConstraintsString := string(autoscalingPolicyConstraintsBytes) + + autoscalingPolicyRulesBytes, err := json.Marshal(tmpAutoScalingPolicy.Rules) + if err != nil { + return nil, fmt.Errorf("error parsing EMR Cluster Instance Groups AutoScalingPolicy Rules: %s", err) + } + + var rules []map[string]interface{} + if err := json.Unmarshal(autoscalingPolicyRulesBytes, &rules); err != nil { + return nil, err + } + + var cleanRules []map[string]interface{} + for _, rule := range rules { + cleanRules = append(cleanRules, removeNil(rule)) + } + + withoutNulls, err := json.Marshal(cleanRules) + if err != nil { + return nil, err + } + autoscalingPolicyRulesString := string(withoutNulls) + + autoscalingPolicyString := fmt.Sprintf("{\"Constraints\":%s,\"Rules\":%s}", autoscalingPolicyConstraintsString, autoscalingPolicyRulesString) + + attrs["autoscaling_policy"] = autoscalingPolicyString + } else { + attrs["autoscaling_policy"] = "" + } + + if attrs["name"] != nil { + attrs["name"] = *ig.Name + } + + return attrs, nil +} + +func flattenInstanceGroups(igs []*emr.InstanceGroup) (*schema.Set, error) { + instanceGroupSet := []interface{}{} + for _, ig := range igs { + flattenedInstanceGroup, err := flattenInstanceGroup(ig) + if err != nil { + return nil, err + } + instanceGroupSet = append(instanceGroupSet, flattenedInstanceGroup) + } + + return schema.NewSet(resourceAwsEMRClusterInstanceGroupHash, instanceGroupSet), nil +} + +func flattenEBSConfig(ebsBlockDevices []*emr.EbsBlockDevice) *schema.Set { + ebsConfig := make([]interface{}, 0) + for _, ebs := range ebsBlockDevices { + ebsAttrs := make(map[string]interface{}) + if ebs.VolumeSpecification.Iops != nil { + ebsAttrs["iops"] = int(*ebs.VolumeSpecification.Iops) + } + if ebs.VolumeSpecification.SizeInGB != nil { + ebsAttrs["size"] = int(*ebs.VolumeSpecification.SizeInGB) + } + if ebs.VolumeSpecification.VolumeType != nil { + ebsAttrs["type"] = *ebs.VolumeSpecification.VolumeType + } + ebsAttrs["volumes_per_instance"] = 1 + + ebsConfig = append(ebsConfig, ebsAttrs) + } + + return schema.NewSet(resourceAwsEMRClusterEBSConfigHash, ebsConfig) } func flattenBootstrapArguments(actions []*emr.Command) []map[string]interface{} { @@ -1159,7 +1351,7 @@ func setTagsEMR(conn *emr.EMR, d *schema.ResourceData) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -1300,8 +1492,8 @@ func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) ([]*emr.Inst InstanceCount: aws.Int64(int64(configInstanceCount)), } - applyBidPrice(config, configAttributes) - applyEbsConfig(configAttributes, config) + expandBidPrice(config, configAttributes) + expandEbsConfig(configAttributes, config) if v, ok := configAttributes["autoscaling_policy"]; ok && v.(string) != "" { var autoScalingPolicy *emr.AutoScalingPolicy @@ -1321,7 +1513,7 @@ func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) ([]*emr.Inst return instanceGroupConfig, nil } -func applyBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string]interface{}) { +func expandBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string]interface{}) { if bidPrice, ok := configAttributes["bid_price"]; ok { if bidPrice != "" { config.BidPrice = aws.String(bidPrice.(string)) @@ -1332,7 +1524,7 @@ func applyBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string] } } -func applyEbsConfig(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { +func expandEbsConfig(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { if rawEbsConfigs, ok := configAttributes["ebs_config"]; ok { ebsConfig := &emr.EbsConfiguration{} @@ -1439,7 +1631,7 @@ func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interfac if err != nil { if awsErr, ok := err.(awserr.Error); ok { - if "ClusterNotFound" == awsErr.Code() { + if awsErr.Code() == "ClusterNotFound" { return 42, "destroyed", nil } } @@ -1469,3 +1661,60 @@ func resourceAwsEMRClusterStateRefreshFunc(d *schema.ResourceData, meta interfac return resp.Cluster, state, nil } } + +func findMasterGroup(instanceGroups []*emr.InstanceGroup) *emr.InstanceGroup { + for _, group := range instanceGroups { + if *group.InstanceGroupType == emr.InstanceRoleTypeMaster { + return group + } + } + return nil +} + +// EMRCluster always has an instance role of either master, core, or task +// Name is optional for core and master(only group allowed for this type) but needed for task +// since you can have multiple task instance groups. +func resourceAwsEMRClusterInstanceGroupHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["instance_role"].(string))) + buf.WriteString(fmt.Sprintf("%s-", m["instance_type"].(string))) + buf.WriteString(fmt.Sprintf("%d-", m["instance_count"].(int))) + if v, ok := m["name"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + if v, ok := m["bid_price"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + + if v, ok := m["autoscaling_policy"]; ok { + pleaseWork, _ := structure.NormalizeJsonString(v.(string)) + buf.WriteString(fmt.Sprintf("%s-", pleaseWork)) + } + + if v, ok := m["ebs_config"]; ok { + configs := v.(*schema.Set).List() + + // There is an issue where an `ebs_config` is automatically configured when not specified in Terraform and + // this causes the hashcode to change. Instead, we'll ignore that configuration when setting up the hashcode. + if len(configs) > 1 { + for _, ebsConfigs := range configs { + buf.WriteString(fmt.Sprintf("%d-", resourceAwsEMRClusterEBSConfigHash(ebsConfigs.(map[string]interface{})))) + } + } + } + + return hashcode.String(buf.String()) +} + +func resourceAwsEMRClusterEBSConfigHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%d-", m["size"].(int))) + buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) + buf.WriteString(fmt.Sprintf("%d-", m["volumes_per_instance"].(int))) + if v, ok := m["iops"]; ok && v.(int) != 0 { + buf.WriteString(fmt.Sprintf("%d-", v.(int))) + } + return hashcode.String(buf.String()) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go index 15758e229..9b0c80f07 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go @@ -205,9 +205,7 @@ func fetchAllEMRInstanceGroups(conn *emr.EMR, clusterId string) ([]*emr.Instance } if respGrps.InstanceGroups != nil { - for _, g := range respGrps.InstanceGroups { - groups = append(groups, g) - } + groups = append(groups, respGrps.InstanceGroups...) } else { log.Printf("[DEBUG] EMR Instance Group list was empty") } @@ -309,8 +307,5 @@ func resourceAwsEMRInstanceGroupDelete(d *schema.ResourceData, meta interface{}) } _, err := conn.ModifyInstanceGroups(params) - if err != nil { - return err - } - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go index f2ef67f20..22d81714d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_alias.go @@ -135,11 +135,7 @@ func resourceAwsGameliftAliasDelete(d *schema.ResourceData, meta interface{}) er _, err := conn.DeleteAlias(&gamelift.DeleteAliasInput{ AliasId: aws.String(d.Id()), }) - if err != nil { - return err - } - - return nil + return err } func expandGameliftRoutingStrategy(cfg []interface{}) *gamelift.RoutingStrategy { @@ -168,7 +164,7 @@ func flattenGameliftRoutingStrategy(rs *gamelift.RoutingStrategy) []interface{} return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if rs.FleetId != nil { m["fleet_id"] = *rs.FleetId } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go index 2c13f228c..322a1ad6c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_build.go @@ -173,11 +173,7 @@ func resourceAwsGameliftBuildDelete(d *schema.ResourceData, meta interface{}) er _, err := conn.DeleteBuild(&gamelift.DeleteBuildInput{ BuildId: aws.String(d.Id()), }) - if err != nil { - return err - } - - return nil + return err } func expandGameliftStorageLocation(cfg []interface{}) *gamelift.S3Location { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go index 3d51b1154..36212a997 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go @@ -415,7 +415,7 @@ func expandGameliftIpPermissions(cfgs []interface{}) []*gamelift.IpPermission { return []*gamelift.IpPermission{} } - perms := make([]*gamelift.IpPermission, len(cfgs), len(cfgs)) + perms := make([]*gamelift.IpPermission, len(cfgs)) for i, rawCfg := range cfgs { cfg := rawCfg.(map[string]interface{}) perms[i] = expandGameliftIpPermission(cfg) @@ -454,7 +454,7 @@ func flattenGameliftResourceCreationLimitPolicy(policy *gamelift.ResourceCreatio return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) m["new_game_sessions_per_creator"] = *policy.NewGameSessionsPerCreator m["policy_period_in_minutes"] = *policy.PolicyPeriodInMinutes @@ -486,7 +486,7 @@ func expandGameliftServerProcesses(cfgs []interface{}) []*gamelift.ServerProcess return []*gamelift.ServerProcess{} } - processes := make([]*gamelift.ServerProcess, len(cfgs), len(cfgs)) + processes := make([]*gamelift.ServerProcess, len(cfgs)) for i, rawCfg := range cfgs { cfg := rawCfg.(map[string]interface{}) process := &gamelift.ServerProcess{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go index 587402f22..08b505722 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go @@ -406,7 +406,7 @@ func getGlacierVaultNotification(glacierconn *glacier.Glacier, vaultName string) return nil, fmt.Errorf("Error reading Glacier Vault Notifications: %s", err.Error()) } - notifications := make(map[string]interface{}, 0) + notifications := make(map[string]interface{}) log.Print("[DEBUG] Flattening Glacier Vault Notifications") diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go new file mode 100644 index 000000000..c95d4a800 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_globalaccelerator_accelerator.go @@ -0,0 +1,362 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/globalaccelerator" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlobalAcceleratorAccelerator() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlobalAcceleratorAcceleratorCreate, + Read: resourceAwsGlobalAcceleratorAcceleratorRead, + Update: resourceAwsGlobalAcceleratorAcceleratorUpdate, + Delete: resourceAwsGlobalAcceleratorAcceleratorDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "ip_address_type": { + Type: schema.TypeString, + Optional: true, + Default: globalaccelerator.IpAddressTypeIpv4, + ValidateFunc: validation.StringInSlice([]string{ + globalaccelerator.IpAddressTypeIpv4, + }, false), + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "ip_sets": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ip_addresses": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ip_family": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "attributes": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "flow_logs_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "flow_logs_s3_bucket": { + Type: schema.TypeString, + Optional: true, + }, + "flow_logs_s3_prefix": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsGlobalAcceleratorAcceleratorCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).globalacceleratorconn + + opts := &globalaccelerator.CreateAcceleratorInput{ + Name: aws.String(d.Get("name").(string)), + IdempotencyToken: aws.String(resource.UniqueId()), + Enabled: aws.Bool(d.Get("enabled").(bool)), + } + + if v, ok := d.GetOk("ip_address_type"); ok { + opts.IpAddressType = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Create Global Accelerator accelerator: %s", opts) + + resp, err := conn.CreateAccelerator(opts) + if err != nil { + return fmt.Errorf("Error creating Global Accelerator accelerator: %s", err) + } + + d.SetId(*resp.Accelerator.AcceleratorArn) + + err = resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn, d.Id()) + if err != nil { + return err + } + + if v := d.Get("attributes").([]interface{}); len(v) > 0 { + err = resourceAwsGlobalAcceleratorAcceleratorUpdateAttributes(conn, d.Id(), v[0].(map[string]interface{})) + if err != nil { + return err + } + } + + return resourceAwsGlobalAcceleratorAcceleratorRead(d, meta) +} + +func resourceAwsGlobalAcceleratorAcceleratorRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).globalacceleratorconn + + accelerator, err := resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn, d.Id()) + + if err != nil { + return fmt.Errorf("Error reading Global Accelerator accelerator: %s", err) + } + + if accelerator == nil { + log.Printf("[WARN] Global Accelerator accelerator (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", accelerator.Name) + d.Set("ip_address_type", accelerator.IpAddressType) + d.Set("enabled", accelerator.Enabled) + if err := d.Set("ip_sets", resourceAwsGlobalAcceleratorAcceleratorFlattenIpSets(accelerator.IpSets)); err != nil { + return fmt.Errorf("Error setting Global Accelerator accelerator ip_sets: %s", err) + } + + resp, err := conn.DescribeAcceleratorAttributes(&globalaccelerator.DescribeAcceleratorAttributesInput{ + AcceleratorArn: aws.String(d.Id()), + }) + + if err != nil { + return fmt.Errorf("Error reading Global Accelerator accelerator attributes: %s", err) + } + + if err := d.Set("attributes", resourceAwsGlobalAcceleratorAcceleratorFlattenAttributes(resp.AcceleratorAttributes)); err != nil { + return fmt.Errorf("Error setting Global Accelerator accelerator attributes: %s", err) + } + + return nil +} + +func resourceAwsGlobalAcceleratorAcceleratorFlattenIpSets(ipsets []*globalaccelerator.IpSet) []interface{} { + out := make([]interface{}, len(ipsets)) + + for i, ipset := range ipsets { + m := make(map[string]interface{}) + + m["ip_addresses"] = flattenStringList(ipset.IpAddresses) + m["ip_family"] = aws.StringValue(ipset.IpFamily) + + out[i] = m + } + + return out +} + +func resourceAwsGlobalAcceleratorAcceleratorFlattenAttributes(attributes *globalaccelerator.AcceleratorAttributes) []interface{} { + if attributes == nil { + return nil + } + + out := make([]interface{}, 1) + m := make(map[string]interface{}) + m["flow_logs_enabled"] = aws.BoolValue(attributes.FlowLogsEnabled) + m["flow_logs_s3_bucket"] = aws.StringValue(attributes.FlowLogsS3Bucket) + m["flow_logs_s3_prefix"] = aws.StringValue(attributes.FlowLogsS3Prefix) + out[0] = m + + return out +} + +func resourceAwsGlobalAcceleratorAcceleratorStateRefreshFunc(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + accelerator, err := resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn, acceleratorArn) + + if err != nil { + log.Printf("Error retrieving Global Accelerator accelerator when waiting: %s", err) + return nil, "", err + } + + if accelerator == nil { + return nil, "", nil + } + + if accelerator.Status != nil { + log.Printf("[DEBUG] Global Accelerator accelerator (%s) status : %s", acceleratorArn, aws.StringValue(accelerator.Status)) + } + + return accelerator, aws.StringValue(accelerator.Status), nil + } +} + +func resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string) (*globalaccelerator.Accelerator, error) { + resp, err := conn.DescribeAccelerator(&globalaccelerator.DescribeAcceleratorInput{ + AcceleratorArn: aws.String(acceleratorArn), + }) + + if err != nil { + if isAWSErr(err, globalaccelerator.ErrCodeAcceleratorNotFoundException, "") { + return nil, nil + } + return nil, err + } + + return resp.Accelerator, nil +} + +func resourceAwsGlobalAcceleratorAcceleratorUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).globalacceleratorconn + + d.Partial(true) + + if d.HasChange("name") || d.HasChange("ip_address_type") || d.HasChange("enabled") { + opts := &globalaccelerator.UpdateAcceleratorInput{ + AcceleratorArn: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Enabled: aws.Bool(d.Get("enabled").(bool)), + } + + if v, ok := d.GetOk("ip_address_type"); ok { + opts.IpAddressType = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Update Global Accelerator accelerator: %s", opts) + + _, err := conn.UpdateAccelerator(opts) + if err != nil { + return fmt.Errorf("Error updating Global Accelerator accelerator: %s", err) + } + + d.SetPartial("name") + d.SetPartial("ip_address_type") + d.SetPartial("enabled") + + err = resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn, d.Id()) + if err != nil { + return err + } + } + + if d.HasChange("attributes") { + if v := d.Get("attributes").([]interface{}); len(v) > 0 { + err := resourceAwsGlobalAcceleratorAcceleratorUpdateAttributes(conn, d.Id(), v[0].(map[string]interface{})) + if err != nil { + return err + } + + } + + d.SetPartial("attributes") + } + + d.Partial(false) + + return resourceAwsGlobalAcceleratorAcceleratorRead(d, meta) +} + +func resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{globalaccelerator.AcceleratorStatusInProgress}, + Target: []string{globalaccelerator.AcceleratorStatusDeployed}, + Refresh: resourceAwsGlobalAcceleratorAcceleratorStateRefreshFunc(conn, acceleratorArn), + Timeout: 5 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for Global Accelerator accelerator (%s) availability", acceleratorArn) + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Global Accelerator accelerator (%s) availability: %s", acceleratorArn, err) + } + + return nil +} + +func resourceAwsGlobalAcceleratorAcceleratorUpdateAttributes(conn *globalaccelerator.GlobalAccelerator, acceleratorArn string, attributes map[string]interface{}) error { + opts := &globalaccelerator.UpdateAcceleratorAttributesInput{ + AcceleratorArn: aws.String(acceleratorArn), + FlowLogsEnabled: aws.Bool(attributes["flow_logs_enabled"].(bool)), + } + + if v := attributes["flow_logs_s3_bucket"]; v != nil { + opts.FlowLogsS3Bucket = aws.String(v.(string)) + } + + if v := attributes["flow_logs_s3_prefix"]; v != nil { + opts.FlowLogsS3Prefix = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Update Global Accelerator accelerator attributes: %s", opts) + + _, err := conn.UpdateAcceleratorAttributes(opts) + if err != nil { + return fmt.Errorf("Error updating Global Accelerator accelerator attributes: %s", err) + } + + return nil +} + +func resourceAwsGlobalAcceleratorAcceleratorDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).globalacceleratorconn + + { + opts := &globalaccelerator.UpdateAcceleratorInput{ + AcceleratorArn: aws.String(d.Id()), + Enabled: aws.Bool(false), + } + + log.Printf("[DEBUG] Disabling Global Accelerator accelerator: %s", opts) + + _, err := conn.UpdateAccelerator(opts) + if err != nil { + return fmt.Errorf("Error disabling Global Accelerator accelerator: %s", err) + } + + err = resourceAwsGlobalAcceleratorAcceleratorWaitForState(conn, d.Id()) + if err != nil { + return err + } + } + + { + opts := &globalaccelerator.DeleteAcceleratorInput{ + AcceleratorArn: aws.String(d.Id()), + } + + _, err := conn.DeleteAccelerator(opts) + if err != nil { + if isAWSErr(err, globalaccelerator.ErrCodeAcceleratorNotFoundException, "") { + return nil + } + return fmt.Errorf("Error deleting Global Accelerator accelerator: %s", err) + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go index 37f39462a..63699ce4b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go @@ -293,7 +293,7 @@ func expandGlueDynamoDBTargets(targets []interface{}) []*glue.DynamoDBTarget { return []*glue.DynamoDBTarget{} } - perms := make([]*glue.DynamoDBTarget, len(targets), len(targets)) + perms := make([]*glue.DynamoDBTarget, len(targets)) for i, rawCfg := range targets { cfg := rawCfg.(map[string]interface{}) perms[i] = expandGlueDynamoDBTarget(cfg) @@ -314,7 +314,7 @@ func expandGlueS3Targets(targets []interface{}) []*glue.S3Target { return []*glue.S3Target{} } - perms := make([]*glue.S3Target, len(targets), len(targets)) + perms := make([]*glue.S3Target, len(targets)) for i, rawCfg := range targets { cfg := rawCfg.(map[string]interface{}) perms[i] = expandGlueS3Target(cfg) @@ -338,7 +338,7 @@ func expandGlueJdbcTargets(targets []interface{}) []*glue.JdbcTarget { return []*glue.JdbcTarget{} } - perms := make([]*glue.JdbcTarget, len(targets), len(targets)) + perms := make([]*glue.JdbcTarget, len(targets)) for i, rawCfg := range targets { cfg := rawCfg.(map[string]interface{}) perms[i] = expandGlueJdbcTarget(cfg) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go index 58793b967..a2cff2eea 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_detector.go @@ -30,6 +30,11 @@ func resourceAwsGuardDutyDetector() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "finding_publishing_frequency": { + Type: schema.TypeString, + Optional: true, + Default: "SIX_HOURS", + }, }, } } @@ -38,7 +43,8 @@ func resourceAwsGuardDutyDetectorCreate(d *schema.ResourceData, meta interface{} conn := meta.(*AWSClient).guarddutyconn input := guardduty.CreateDetectorInput{ - Enable: aws.Bool(d.Get("enable").(bool)), + Enable: aws.Bool(d.Get("enable").(bool)), + FindingPublishingFrequency: aws.String(d.Get("finding_publishing_frequency").(string)), } log.Printf("[DEBUG] Creating GuardDuty Detector: %s", input) @@ -70,6 +76,7 @@ func resourceAwsGuardDutyDetectorRead(d *schema.ResourceData, meta interface{}) d.Set("account_id", meta.(*AWSClient).accountid) d.Set("enable", *gdo.Status == guardduty.DetectorStatusEnabled) + d.Set("finding_publishing_frequency", gdo.FindingPublishingFrequency) return nil } @@ -78,8 +85,9 @@ func resourceAwsGuardDutyDetectorUpdate(d *schema.ResourceData, meta interface{} conn := meta.(*AWSClient).guarddutyconn input := guardduty.UpdateDetectorInput{ - DetectorId: aws.String(d.Id()), - Enable: aws.Bool(d.Get("enable").(bool)), + DetectorId: aws.String(d.Id()), + Enable: aws.Bool(d.Get("enable").(bool)), + FindingPublishingFrequency: aws.String(d.Get("finding_publishing_frequency").(string)), } log.Printf("[DEBUG] Update GuardDuty Detector: %s", input) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go index 2f9cb681f..9b2fe4efa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go @@ -97,8 +97,11 @@ func resourceAwsIamAccessKeyCreate(d *schema.ResourceData, meta interface{}) err } } - d.Set("ses_smtp_password", - sesSmtpPasswordFromSecretKey(createResp.AccessKey.SecretAccessKey)) + sesSMTPPassword, err := sesSmtpPasswordFromSecretKey(createResp.AccessKey.SecretAccessKey) + if err != nil { + return fmt.Errorf("error getting SES SMTP Password from Secret Access Key: %s", err) + } + d.Set("ses_smtp_password", sesSMTPPassword) return resourceAwsIamAccessKeyReadResult(d, &iam.AccessKeyMetadata{ AccessKeyId: createResp.AccessKey.AccessKeyId, @@ -161,18 +164,20 @@ func resourceAwsIamAccessKeyDelete(d *schema.ResourceData, meta interface{}) err return nil } -func sesSmtpPasswordFromSecretKey(key *string) string { +func sesSmtpPasswordFromSecretKey(key *string) (string, error) { if key == nil { - return "" + return "", nil } version := byte(0x02) message := []byte("SendRawEmail") hmacKey := []byte(*key) h := hmac.New(sha256.New, hmacKey) - h.Write(message) + if _, err := h.Write(message); err != nil { + return "", err + } rawSig := h.Sum(nil) versionedSig := make([]byte, 0, len(rawSig)+1) versionedSig = append(versionedSig, version) versionedSig = append(versionedSig, rawSig...) - return base64.StdEncoding.EncodeToString(versionedSig) + return base64.StdEncoding.EncodeToString(versionedSig), nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go index 34a8f0b27..64af0bf48 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go @@ -130,11 +130,8 @@ func resourceAwsIamGroupMembershipDelete(d *schema.ResourceData, meta interface{ userList := expandStringList(d.Get("users").(*schema.Set).List()) group := d.Get("group").(string) - if err := removeUsersFromGroup(conn, userList, group); err != nil { - return err - } - - return nil + err := removeUsersFromGroup(conn, userList, group) + return err } func removeUsersFromGroup(conn *iam.IAM, users []*string, group string) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go index cb35b0ca7..4f00c273c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy.go @@ -2,11 +2,11 @@ package aws import ( "fmt" + "log" "net/url" "strings" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" @@ -88,7 +88,8 @@ func resourceAwsIamGroupPolicyRead(d *schema.ResourceData, meta interface{}) err var err error getResp, err := iamconn.GetGroupPolicy(request) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX test me + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM Group Policy (%s) for %s not found, removing from state", name, group) d.SetId("") return nil } @@ -122,6 +123,9 @@ func resourceAwsIamGroupPolicyDelete(d *schema.ResourceData, meta interface{}) e } if _, err := iamconn.DeleteGroupPolicy(request); err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } return fmt.Errorf("Error deleting IAM group policy %s: %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go index 6e5ca3f44..84ab11d96 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go @@ -123,10 +123,7 @@ func attachPolicyToGroup(conn *iam.IAM, group string, arn string) error { GroupName: aws.String(group), PolicyArn: aws.String(arn), }) - if err != nil { - return err - } - return nil + return err } func detachPolicyFromGroup(conn *iam.IAM, group string, arn string) error { @@ -134,8 +131,5 @@ func detachPolicyFromGroup(conn *iam.IAM, group string, arn string) error { GroupName: aws.String(group), PolicyArn: aws.String(arn), }) - if err != nil { - return err - } - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go index 7414ddd29..a9f958e42 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go @@ -52,7 +52,7 @@ func resourceAwsIamInstanceProfile() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 128 characters", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]+$").MatchString(value) { + if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q must match [\\w+=,.@-]", k)) } @@ -72,7 +72,7 @@ func resourceAwsIamInstanceProfile() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 64 characters, name is limited to 128", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]+$").MatchString(value) { + if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q must match [\\w+=,.@-]", k)) } @@ -122,7 +122,7 @@ func resourceAwsIamInstanceProfileCreate(d *schema.ResourceData, meta interface{ _, hasRoles := d.GetOk("roles") _, hasRole := d.GetOk("role") - if hasRole == false && hasRoles == false { + if !hasRole && !hasRoles { return fmt.Errorf("Either `role` or `roles` (deprecated) must be specified when creating an IAM Instance Profile") } @@ -342,9 +342,6 @@ func instanceProfileReadResult(d *schema.ResourceData, result *iam.InstanceProfi for _, role := range result.Roles { roles.Add(*role.RoleName) } - if err := d.Set("roles", roles); err != nil { - return err - } - - return nil + err := d.Set("roles", roles) + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go index a5c8449ba..c6b153c80 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go @@ -54,7 +54,7 @@ func resourceAwsIamPolicy() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 128 characters", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]*$").MatchString(value) { + if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q must match [\\w+=,.@-]", k)) } @@ -73,7 +73,7 @@ func resourceAwsIamPolicy() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 96 characters, name is limited to 128", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]*$").MatchString(value) { + if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q must match [\\w+=,.@-]", k)) } @@ -243,13 +243,11 @@ func resourceAwsIamPolicyDelete(d *schema.ResourceData, meta interface{}) error PolicyArn: aws.String(d.Id()), } - _, err := iamconn.DeletePolicy(request) - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - - if err != nil { - return fmt.Errorf("Error deleting IAM policy %s: %#v", d.Id(), err) + if _, err := iamconn.DeletePolicy(request); err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + return fmt.Errorf("Error deleting IAM policy %s: %s", d.Id(), err) } return nil @@ -283,10 +281,8 @@ func iamPolicyPruneVersions(arn string, iamconn *iam.IAM) error { } } - if err := iamPolicyDeleteVersion(arn, *oldestVersion.VersionId, iamconn); err != nil { - return err - } - return nil + err1 := iamPolicyDeleteVersion(arn, *oldestVersion.VersionId, iamconn) + return err1 } func iamPolicyDeleteNondefaultVersions(arn string, iamconn *iam.IAM) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go index 5e1c92273..5cf0b47b8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go @@ -185,7 +185,7 @@ func resourceAwsIamPolicyAttachmentDelete(d *schema.ResourceData, meta interface } func composeErrors(desc string, uErr error, rErr error, gErr error) error { - errMsg := fmt.Sprintf(desc) + errMsg := fmt.Sprint(desc) errs := []error{uErr, rErr, gErr} for _, e := range errs { if e != nil { @@ -217,8 +217,7 @@ func attachPolicyToRoles(conn *iam.IAM, roles []*string, arn string) error { return err } - var attachmentErr error - attachmentErr = resource.Retry(2*time.Minute, func() *resource.RetryError { + var attachmentErr = resource.Retry(2*time.Minute, func() *resource.RetryError { input := iam.ListRolePoliciesInput{ RoleName: r, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go index 08867eee1..2b68cf41b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go @@ -49,7 +49,7 @@ func resourceAwsIamRole() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 64 characters", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]*$").MatchString(value) { + if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q must match [\\w+=,.@-]", k)) } @@ -69,7 +69,7 @@ func resourceAwsIamRole() *schema.Resource { errors = append(errors, fmt.Errorf( "%q cannot be longer than 32 characters, name is limited to 64", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]*$").MatchString(value) { + if !regexp.MustCompile(`^[\w+=,.@-]*$`).MatchString(value) { errors = append(errors, fmt.Errorf( "%q must match [\\w+=,.@-]", k)) } @@ -341,83 +341,19 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn // Roles cannot be destroyed when attached to an existing Instance Profile - resp, err := iamconn.ListInstanceProfilesForRole(&iam.ListInstanceProfilesForRoleInput{ - RoleName: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error listing Profiles for IAM Role (%s) when trying to delete: %s", d.Id(), err) - } - - // Loop and remove this Role from any Profiles - if len(resp.InstanceProfiles) > 0 { - for _, i := range resp.InstanceProfiles { - _, err := iamconn.RemoveRoleFromInstanceProfile(&iam.RemoveRoleFromInstanceProfileInput{ - InstanceProfileName: i.InstanceProfileName, - RoleName: aws.String(d.Id()), - }) - if err != nil { - return fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err) - } - } + if err := deleteAwsIamRoleInstanceProfiles(iamconn, d.Id()); err != nil { + return fmt.Errorf("error deleting IAM Role (%s) instance profiles: %s", d.Id(), err) } if d.Get("force_detach_policies").(bool) { // For managed policies - managedPolicies := make([]*string, 0) - err = iamconn.ListAttachedRolePoliciesPages(&iam.ListAttachedRolePoliciesInput{ - RoleName: aws.String(d.Id()), - }, func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { - for _, v := range page.AttachedPolicies { - managedPolicies = append(managedPolicies, v.PolicyArn) - } - return len(page.AttachedPolicies) > 0 - }) - if err != nil { - return fmt.Errorf("Error listing Policies for IAM Role (%s) when trying to delete: %s", d.Id(), err) - } - if len(managedPolicies) > 0 { - for _, parn := range managedPolicies { - _, err = iamconn.DetachRolePolicy(&iam.DetachRolePolicyInput{ - PolicyArn: parn, - RoleName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] Role policy attachment (%s) was already removed from role (%s)", aws.StringValue(parn), d.Id()) - } else { - return fmt.Errorf("Error deleting IAM Role %s: %s", d.Id(), err) - } - } - } + if err := deleteAwsIamRolePolicyAttachments(iamconn, d.Id()); err != nil { + return fmt.Errorf("error deleting IAM Role (%s) policy attachments: %s", d.Id(), err) } // For inline policies - inlinePolicies := make([]*string, 0) - err = iamconn.ListRolePoliciesPages(&iam.ListRolePoliciesInput{ - RoleName: aws.String(d.Id()), - }, func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { - for _, v := range page.PolicyNames { - inlinePolicies = append(inlinePolicies, v) - } - return len(page.PolicyNames) > 0 - }) - if err != nil { - return fmt.Errorf("Error listing inline Policies for IAM Role (%s) when trying to delete: %s", d.Id(), err) - } - if len(inlinePolicies) > 0 { - for _, pname := range inlinePolicies { - _, err := iamconn.DeleteRolePolicy(&iam.DeleteRolePolicyInput{ - PolicyName: pname, - RoleName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - log.Printf("[WARN] Inline role policy (%s) was already removed from role (%s)", aws.StringValue(pname), d.Id()) - } else { - return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", d.Id(), err) - } - } - } + if err := deleteAwsIamRolePolicies(iamconn, d.Id()); err != nil { + return fmt.Errorf("error deleting IAM Role (%s) policies: %s", d.Id(), err) } } @@ -438,3 +374,98 @@ func resourceAwsIamRoleDelete(d *schema.ResourceData, meta interface{}) error { return nil }) } + +func deleteAwsIamRoleInstanceProfiles(conn *iam.IAM, rolename string) error { + resp, err := conn.ListInstanceProfilesForRole(&iam.ListInstanceProfilesForRoleInput{ + RoleName: aws.String(rolename), + }) + if err != nil { + return fmt.Errorf("Error listing Profiles for IAM Role (%s) when trying to delete: %s", rolename, err) + } + + // Loop and remove this Role from any Profiles + for _, i := range resp.InstanceProfiles { + input := &iam.RemoveRoleFromInstanceProfileInput{ + InstanceProfileName: i.InstanceProfileName, + RoleName: aws.String(rolename), + } + + _, err := conn.RemoveRoleFromInstanceProfile(input) + + if err != nil { + return fmt.Errorf("Error deleting IAM Role %s: %s", rolename, err) + } + } + + return nil +} + +func deleteAwsIamRolePolicyAttachments(conn *iam.IAM, rolename string) error { + managedPolicies := make([]*string, 0) + input := &iam.ListAttachedRolePoliciesInput{ + RoleName: aws.String(rolename), + } + + err := conn.ListAttachedRolePoliciesPages(input, func(page *iam.ListAttachedRolePoliciesOutput, lastPage bool) bool { + for _, v := range page.AttachedPolicies { + managedPolicies = append(managedPolicies, v.PolicyArn) + } + return !lastPage + }) + if err != nil { + return fmt.Errorf("Error listing Policies for IAM Role (%s) when trying to delete: %s", rolename, err) + } + for _, parn := range managedPolicies { + input := &iam.DetachRolePolicyInput{ + PolicyArn: parn, + RoleName: aws.String(rolename), + } + + _, err = conn.DetachRolePolicy(input) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + continue + } + + if err != nil { + return fmt.Errorf("Error deleting IAM Role %s: %s", rolename, err) + } + } + + return nil +} + +func deleteAwsIamRolePolicies(conn *iam.IAM, rolename string) error { + inlinePolicies := make([]*string, 0) + input := &iam.ListRolePoliciesInput{ + RoleName: aws.String(rolename), + } + + err := conn.ListRolePoliciesPages(input, func(page *iam.ListRolePoliciesOutput, lastPage bool) bool { + inlinePolicies = append(inlinePolicies, page.PolicyNames...) + return !lastPage + }) + + if err != nil { + return fmt.Errorf("Error listing inline Policies for IAM Role (%s) when trying to delete: %s", rolename, err) + } + + for _, pname := range inlinePolicies { + input := &iam.DeleteRolePolicyInput{ + PolicyName: pname, + RoleName: aws.String(rolename), + } + + _, err := conn.DeleteRolePolicy(input) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + continue + } + + if err != nil { + return fmt.Errorf("Error deleting inline policy of IAM Role %s: %s", rolename, err) + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go index 5ca6096f4..c317c4e48 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go @@ -2,11 +2,11 @@ package aws import ( "fmt" + "log" "net/url" "strings" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" @@ -97,7 +97,8 @@ func resourceAwsIamRolePolicyRead(d *schema.ResourceData, meta interface{}) erro getResp, err := iamconn.GetRolePolicy(request) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX test me + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM Role Policy (%s) for %s not found, removing from state", name, role) d.SetId("") return nil } @@ -135,6 +136,9 @@ func resourceAwsIamRolePolicyDelete(d *schema.ResourceData, meta interface{}) er } if _, err := iamconn.DeleteRolePolicy(request); err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } return fmt.Errorf("Error deleting IAM role policy %s: %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go index 48ac3e91a..d4f4975f9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go @@ -128,10 +128,7 @@ func attachPolicyToRole(conn *iam.IAM, role string, arn string) error { RoleName: aws.String(role), PolicyArn: aws.String(arn), }) - if err != nil { - return err - } - return nil + return err } func detachPolicyFromRole(conn *iam.IAM, role string, arn string) error { @@ -139,8 +136,5 @@ func detachPolicyFromRole(conn *iam.IAM, role string, arn string) error { RoleName: aws.String(role), PolicyArn: aws.String(arn), }) - if err != nil { - return err - } - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go index c9c79297e..e3402f032 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go @@ -183,11 +183,7 @@ func resourceAwsIAMServerCertificateDelete(d *schema.ResourceData, meta interfac return nil }) - if err != nil { - return err - } - - return nil + return err } func resourceAwsIAMServerCertificateImport( diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go index c3a622a92..4f23ef8f1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go @@ -219,49 +219,26 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn // IAM Users must be removed from all groups before they can be deleted - var groups []string - listGroups := &iam.ListGroupsForUserInput{ - UserName: aws.String(d.Id()), - } - pageOfGroups := func(page *iam.ListGroupsForUserOutput, lastPage bool) (shouldContinue bool) { - for _, g := range page.Groups { - groups = append(groups, *g.GroupName) - } - return !lastPage - } - err := iamconn.ListGroupsForUserPages(listGroups, pageOfGroups) - if err != nil { - return fmt.Errorf("Error removing user %q from all groups: %s", d.Id(), err) - } - for _, g := range groups { - // use iam group membership func to remove user from all groups - log.Printf("[DEBUG] Removing IAM User %s from IAM Group %s", d.Id(), g) - if err := removeUsersFromGroup(iamconn, []*string{aws.String(d.Id())}, g); err != nil { - return err - } + if err := deleteAwsIamUserGroupMemberships(iamconn, d.Id()); err != nil { + return fmt.Errorf("error removing IAM User (%s) group memberships: %s", d.Id(), err) } // All access keys, MFA devices and login profile for the user must be removed if d.Get("force_destroy").(bool) { - - err = deleteAwsIamUserAccessKeys(iamconn, d.Id()) - if err != nil { - return err + if err := deleteAwsIamUserAccessKeys(iamconn, d.Id()); err != nil { + return fmt.Errorf("error removing IAM User (%s) access keys: %s", d.Id(), err) } - err = deleteAwsIamUserSSHKeys(iamconn, d.Id()) - if err != nil { - return err + if err := deleteAwsIamUserSSHKeys(iamconn, d.Id()); err != nil { + return fmt.Errorf("error removing IAM User (%s) SSH keys: %s", d.Id(), err) } - err = deleteAwsIamUserMFADevices(iamconn, d.Id()) - if err != nil { - return err + if err := deleteAwsIamUserMFADevices(iamconn, d.Id()); err != nil { + return fmt.Errorf("error removing IAM User (%s) MFA devices: %s", d.Id(), err) } - err = deleteAwsIamUserLoginProfile(iamconn, d.Id()) - if err != nil { - return err + if err := deleteAwsIamUserLoginProfile(iamconn, d.Id()); err != nil { + return fmt.Errorf("error removing IAM User (%s) login profile: %s", d.Id(), err) } } @@ -270,11 +247,13 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { } log.Println("[DEBUG] Delete IAM User request:", deleteUserInput) - _, err = iamconn.DeleteUser(deleteUserInput) + _, err := iamconn.DeleteUser(deleteUserInput) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } return fmt.Errorf("Error deleting IAM User %s: %s", d.Id(), err) } @@ -291,6 +270,32 @@ func validateAwsIamUserName(v interface{}, k string) (ws []string, errors []erro return } +func deleteAwsIamUserGroupMemberships(conn *iam.IAM, username string) error { + var groups []string + listGroups := &iam.ListGroupsForUserInput{ + UserName: aws.String(username), + } + pageOfGroups := func(page *iam.ListGroupsForUserOutput, lastPage bool) (shouldContinue bool) { + for _, g := range page.Groups { + groups = append(groups, *g.GroupName) + } + return !lastPage + } + err := conn.ListGroupsForUserPages(listGroups, pageOfGroups) + if err != nil { + return fmt.Errorf("Error removing user %q from all groups: %s", username, err) + } + for _, g := range groups { + // use iam group membership func to remove user from all groups + log.Printf("[DEBUG] Removing IAM User %s from IAM Group %s", username, g) + if err := removeUsersFromGroup(conn, []*string{aws.String(username)}, g); err != nil { + return err + } + } + + return nil +} + func deleteAwsIamUserSSHKeys(svc *iam.IAM, username string) error { var publicKeys []string var err error diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go index e5333a384..815272009 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go @@ -128,11 +128,8 @@ func resourceAwsIamUserGroupMembershipDelete(d *schema.ResourceData, meta interf user := d.Get("user").(string) groups := expandStringList(d.Get("groups").(*schema.Set).List()) - if err := removeUserFromGroups(conn, user, groups); err != nil { - return err - } - - return nil + err := removeUserFromGroups(conn, user, groups) + return err } func removeUserFromGroups(conn *iam.IAM, user string, groups []*string) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go index 2d680acc0..98b6c0aa1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go @@ -6,6 +6,7 @@ import ( "fmt" "log" "math/big" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -103,20 +104,16 @@ func generateIAMPassword(length int) string { // Check the generated password contains all character classes listed in the // IAM password policy. func checkIAMPwdPolicy(pass []byte) bool { - if !(bytes.ContainsAny(pass, charLower) && + return (bytes.ContainsAny(pass, charLower) && bytes.ContainsAny(pass, charNumbers) && bytes.ContainsAny(pass, charSymbols) && - bytes.ContainsAny(pass, charUpper)) { - return false - } - - return true + bytes.ContainsAny(pass, charUpper)) } func resourceAwsIamUserLoginProfileCreate(d *schema.ResourceData, meta interface{}) error { iamconn := meta.(*AWSClient).iamconn - encryptionKey, err := encryption.RetrieveGPGKey(d.Get("pgp_key").(string)) + encryptionKey, err := encryption.RetrieveGPGKey(strings.TrimSpace(d.Get("pgp_key").(string))) if err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go index c69a492d8..5bcccc259 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy.go @@ -2,11 +2,11 @@ package aws import ( "fmt" + "log" "net/url" "strings" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" @@ -101,7 +101,8 @@ func resourceAwsIamUserPolicyRead(d *schema.ResourceData, meta interface{}) erro getResp, err := iamconn.GetUserPolicy(request) if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { // XXX test me + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM User Policy (%s) for %s not found, removing from state", name, user) d.SetId("") return nil } @@ -139,6 +140,9 @@ func resourceAwsIamUserPolicyDelete(d *schema.ResourceData, meta interface{}) er } if _, err := iamconn.DeleteUserPolicy(request); err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } return fmt.Errorf("Error deleting IAM user policy %s: %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go index ec28e0472..7e8ed3ad7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go @@ -125,10 +125,7 @@ func attachPolicyToUser(conn *iam.IAM, user string, arn string) error { UserName: aws.String(user), PolicyArn: aws.String(arn), }) - if err != nil { - return err - } - return nil + return err } func detachPolicyFromUser(conn *iam.IAM, user string, arn string) error { @@ -136,8 +133,5 @@ func detachPolicyFromUser(conn *iam.IAM, user string, arn string) error { UserName: aws.String(user), PolicyArn: aws.String(arn), }) - if err != nil { - return err - } - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go index b6c2c80c0..dc34ef660 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_inspector_assessment_target.go @@ -1,11 +1,11 @@ package aws import ( + "fmt" "log" "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/inspector" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -17,6 +17,9 @@ func resourceAWSInspectorAssessmentTarget() *schema.Resource { Read: resourceAwsInspectorAssessmentTargetRead, Update: resourceAwsInspectorAssessmentTargetUpdate, Delete: resourceAwsInspectorAssessmentTargetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -30,7 +33,7 @@ func resourceAWSInspectorAssessmentTarget() *schema.Resource { }, "resource_group_arn": { Type: schema.TypeString, - Required: true, + Optional: true, }, }, } @@ -39,19 +42,19 @@ func resourceAWSInspectorAssessmentTarget() *schema.Resource { func resourceAwsInspectorAssessmentTargetCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).inspectorconn - targetName := d.Get("name").(string) - resourceGroupArn := d.Get("resource_group_arn").(string) - - resp, err := conn.CreateAssessmentTarget(&inspector.CreateAssessmentTargetInput{ - AssessmentTargetName: aws.String(targetName), - ResourceGroupArn: aws.String(resourceGroupArn), - }) - if err != nil { - return err + input := &inspector.CreateAssessmentTargetInput{ + AssessmentTargetName: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("resource_group_arn"); ok { + input.ResourceGroupArn = aws.String(v.(string)) + } + + resp, err := conn.CreateAssessmentTarget(input) + if err != nil { + return fmt.Errorf("error creating Inspector Assessment Target: %s", err) } - log.Printf("[DEBUG] Inspector Assessment %s created", *resp.AssessmentTargetArn) - d.Set("arn", resp.AssessmentTargetArn) d.SetId(*resp.AssessmentTargetArn) return resourceAwsInspectorAssessmentTargetRead(d, meta) @@ -60,25 +63,22 @@ func resourceAwsInspectorAssessmentTargetCreate(d *schema.ResourceData, meta int func resourceAwsInspectorAssessmentTargetRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).inspectorconn - resp, err := conn.DescribeAssessmentTargets(&inspector.DescribeAssessmentTargetsInput{ - AssessmentTargetArns: []*string{ - aws.String(d.Id()), - }, - }) + assessmentTarget, err := describeInspectorAssessmentTarget(conn, d.Id()) if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "InvalidInputException" { - return nil - } else { - log.Printf("[ERROR] Error finding Inspector Assessment Target: %s", err) - return err - } + return fmt.Errorf("error describing Inspector Assessment Target (%s): %s", d.Id(), err) } - if resp.AssessmentTargets != nil && len(resp.AssessmentTargets) > 0 { - d.Set("name", resp.AssessmentTargets[0].Name) + if assessmentTarget == nil { + log.Printf("[WARN] Inspector Assessment Target (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } + d.Set("arn", assessmentTarget.Arn) + d.Set("name", assessmentTarget.Name) + d.Set("resource_group_arn", assessmentTarget.ResourceGroupArn) + return nil } @@ -88,16 +88,17 @@ func resourceAwsInspectorAssessmentTargetUpdate(d *schema.ResourceData, meta int input := inspector.UpdateAssessmentTargetInput{ AssessmentTargetArn: aws.String(d.Id()), AssessmentTargetName: aws.String(d.Get("name").(string)), - ResourceGroupArn: aws.String(d.Get("resource_group_arn").(string)), + } + + if v, ok := d.GetOk("resource_group_arn"); ok { + input.ResourceGroupArn = aws.String(v.(string)) } _, err := conn.UpdateAssessmentTarget(&input) if err != nil { - return err + return fmt.Errorf("error updating Inspector Assessment Target (%s): %s", d.Id(), err) } - log.Println("[DEBUG] Inspector Assessment Target updated") - return resourceAwsInspectorAssessmentTargetRead(d, meta) } @@ -108,16 +109,42 @@ func resourceAwsInspectorAssessmentTargetDelete(d *schema.ResourceData, meta int _, err := conn.DeleteAssessmentTarget(&inspector.DeleteAssessmentTargetInput{ AssessmentTargetArn: aws.String(d.Id()), }) - if err != nil { - if inspectorerr, ok := err.(awserr.Error); ok && inspectorerr.Code() == "AssessmentRunInProgressException" { - log.Printf("[ERROR] Assement Run in progress: %s", err) - return resource.RetryableError(err) - } else { - log.Printf("[ERROR] Error deleting Assement Target: %s", err) - return resource.NonRetryableError(err) - } + + if isAWSErr(err, inspector.ErrCodeAssessmentRunInProgressException, "") { + return resource.RetryableError(err) } + + if err != nil { + return resource.NonRetryableError(err) + } + return nil }) } + +func describeInspectorAssessmentTarget(conn *inspector.Inspector, arn string) (*inspector.AssessmentTarget, error) { + input := &inspector.DescribeAssessmentTargetsInput{ + AssessmentTargetArns: []*string{aws.String(arn)}, + } + + output, err := conn.DescribeAssessmentTargets(input) + + if isAWSErr(err, inspector.ErrCodeInvalidInputException, "") { + return nil, nil + } + + if err != nil { + return nil, err + } + + var assessmentTarget *inspector.AssessmentTarget + for _, target := range output.AssessmentTargets { + if aws.StringValue(target.Arn) == arn { + assessmentTarget = target + break + } + } + + return assessmentTarget, nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go index 1076494d3..a66e5d53b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go @@ -1027,7 +1027,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { if ec2err, ok := err.(awserr.Error); ok { // Tolerate InvalidParameterCombination error in Classic, otherwise // return the error - if "InvalidParameterCombination" != ec2err.Code() { + if ec2err.Code() != "InvalidParameterCombination" { return err } log.Printf("[WARN] Attempted to modify SourceDestCheck on non VPC instance: %s", ec2err.Message()) @@ -1214,11 +1214,8 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - if err := awsTerminateInstance(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { - return err - } - - return nil + err := awsTerminateInstance(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) + return err } // InstanceStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch @@ -1925,9 +1922,16 @@ func awsTerminateInstance(conn *ec2.EC2, id string, timeout time.Duration) error InstanceIds: []*string{aws.String(id)}, } if _, err := conn.TerminateInstances(req); err != nil { + if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidInstanceID.NotFound" { + return nil + } return fmt.Errorf("Error terminating instance: %s", err) } + return waitForInstanceDeletion(conn, id, timeout) +} + +func waitForInstanceDeletion(conn *ec2.EC2, id string, timeout time.Duration) error { log.Printf("[DEBUG] Waiting for instance (%s) to become terminated", id) stateConf := &resource.StateChangeConf{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go index 41b93b964..befc93f29 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go @@ -376,7 +376,7 @@ func IGAttachStateRefreshFunc(conn *ec2.EC2, id string, expected string) resourc ig := resp.InternetGateways[0] - if time.Now().Sub(start) > 10*time.Second { + if time.Since(start) > 10*time.Second { return ig, expected, nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go index a8e50044e..425247d9a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go @@ -608,9 +608,5 @@ func resourceAwsIotTopicRuleDelete(d *schema.ResourceData, meta interface{}) err log.Printf("[DEBUG] Deleting IoT Topic Rule: %s", params) _, err := conn.DeleteTopicRule(params) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go index 2aaaf3556..9bb0ff083 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go @@ -575,12 +575,17 @@ func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta i createOpts.Outputs = []*kinesisanalytics.Output{outputs} } + // Retry for IAM eventual consistency err := resource.Retry(1*time.Minute, func() *resource.RetryError { output, err := conn.CreateApplication(createOpts) if err != nil { if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { return resource.RetryableError(err) } + // InvalidArgumentException: Given IAM role arn : arn:aws:iam::123456789012:role/xxx does not provide Invoke permissions on the Lambda resource : arn:aws:lambda:us-west-2:123456789012:function:yyy + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "does not provide Invoke permissions on the Lambda resource") { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } d.SetId(aws.StringValue(output.ApplicationSummary.ApplicationARN)) @@ -679,6 +684,7 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i CurrentApplicationVersionId: aws.Int64(int64(version)), CloudWatchLoggingOption: cloudwatchLoggingOption, } + // Retry for IAM eventual consistency err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.AddApplicationCloudWatchLoggingOption(addOpts) if err != nil { @@ -706,12 +712,17 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i CurrentApplicationVersionId: aws.Int64(int64(version)), Input: input, } + // Retry for IAM eventual consistency err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.AddApplicationInput(addOpts) if err != nil { if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { return resource.RetryableError(err) } + // InvalidArgumentException: Given IAM role arn : arn:aws:iam::123456789012:role/xxx does not provide Invoke permissions on the Lambda resource : arn:aws:lambda:us-west-2:123456789012:function:yyy + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "does not provide Invoke permissions on the Lambda resource") { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } return nil @@ -733,12 +744,17 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i CurrentApplicationVersionId: aws.Int64(int64(version)), Output: output, } + // Retry for IAM eventual consistency err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.AddApplicationOutput(addOpts) if err != nil { if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { return resource.RetryableError(err) } + // InvalidArgumentException: Given IAM role arn : arn:aws:iam::123456789012:role/xxx does not provide Invoke permissions on the Lambda resource : arn:aws:lambda:us-west-2:123456789012:function:yyy + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "does not provide Invoke permissions on the Lambda resource") { + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } return nil @@ -762,6 +778,7 @@ func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta i CurrentApplicationVersionId: aws.Int64(int64(version)), ReferenceDataSource: referenceData, } + // Retry for IAM eventual consistency err := resource.Retry(1*time.Minute, func() *resource.RetryError { _, err := conn.AddApplicationReferenceDataSource(addOpts) if err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go index e7a356168..fd72e32e1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -228,6 +228,7 @@ func flattenFirehoseExtendedS3Configuration(description *firehose.ExtendedS3Dest "cloudwatch_logging_options": flattenCloudwatchLoggingOptions(description.CloudWatchLoggingOptions), "compression_format": aws.StringValue(description.CompressionFormat), "data_format_conversion_configuration": flattenFirehoseDataFormatConversionConfiguration(description.DataFormatConversionConfiguration), + "error_output_prefix": aws.StringValue(description.ErrorOutputPrefix), "prefix": aws.StringValue(description.Prefix), "processing_configuration": flattenProcessingConfiguration(description.ProcessingConfiguration, aws.StringValue(description.RoleARN)), "role_arn": aws.StringValue(description.RoleARN), @@ -542,7 +543,7 @@ func flattenProcessingConfiguration(pc *firehose.ProcessingConfiguration, roleAr "BufferIntervalInSeconds": "60", } - processors := make([]interface{}, len(pc.Processors), len(pc.Processors)) + processors := make([]interface{}, len(pc.Processors)) for i, p := range pc.Processors { t := aws.StringValue(p.Type) parameters := make([]interface{}, 0) @@ -997,6 +998,11 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { }, }, + "error_output_prefix": { + Type: schema.TypeString, + Optional: true, + }, + "kms_key_arn": { Type: schema.TypeString, Optional: true, @@ -1396,6 +1402,10 @@ func createExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) } + if v, ok := s3["error_output_prefix"]; ok && v.(string) != "" { + configuration.ErrorOutputPrefix = aws.String(v.(string)) + } + if s3BackupMode, ok := s3["s3_backup_mode"]; ok { configuration.S3BackupMode = aws.String(s3BackupMode.(string)) configuration.S3BackupConfiguration = expandS3BackupConfig(d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{})) @@ -1477,6 +1487,10 @@ func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat configuration.CloudWatchLoggingOptions = extractCloudWatchLoggingConfiguration(s3) } + if v, ok := s3["error_output_prefix"]; ok && v.(string) != "" { + configuration.ErrorOutputPrefix = aws.String(v.(string)) + } + if s3BackupMode, ok := s3["s3_backup_mode"]; ok { configuration.S3BackupMode = aws.String(s3BackupMode.(string)) configuration.S3BackupUpdate = updateS3BackupConfig(d.Get("extended_s3_configuration").([]interface{})[0].(map[string]interface{})) @@ -1486,7 +1500,7 @@ func updateExtendedS3Config(d *schema.ResourceData) *firehose.ExtendedS3Destinat } func expandFirehoseDataFormatConversionConfiguration(l []interface{}) *firehose.DataFormatConversionConfiguration { - if len(l) == 0 { + if len(l) == 0 || l[0] == nil { return nil } @@ -1501,7 +1515,7 @@ func expandFirehoseDataFormatConversionConfiguration(l []interface{}) *firehose. } func expandFirehoseInputFormatConfiguration(l []interface{}) *firehose.InputFormatConfiguration { - if len(l) == 0 { + if len(l) == 0 || l[0] == nil { return nil } @@ -1513,7 +1527,7 @@ func expandFirehoseInputFormatConfiguration(l []interface{}) *firehose.InputForm } func expandFirehoseDeserializer(l []interface{}) *firehose.Deserializer { - if len(l) == 0 { + if len(l) == 0 || l[0] == nil { return nil } @@ -1560,7 +1574,7 @@ func expandFirehoseOpenXJsonSerDe(l []interface{}) *firehose.OpenXJsonSerDe { } func expandFirehoseOutputFormatConfiguration(l []interface{}) *firehose.OutputFormatConfiguration { - if len(l) == 0 { + if len(l) == 0 || l[0] == nil { return nil } @@ -1572,7 +1586,7 @@ func expandFirehoseOutputFormatConfiguration(l []interface{}) *firehose.OutputFo } func expandFirehoseSerializer(l []interface{}) *firehose.Serializer { - if len(l) == 0 { + if len(l) == 0 || l[0] == nil { return nil } @@ -1636,7 +1650,7 @@ func expandFirehoseParquetSerDe(l []interface{}) *firehose.ParquetSerDe { } func expandFirehoseSchemaConfiguration(l []interface{}) *firehose.SchemaConfiguration { - if len(l) == 0 { + if len(l) == 0 || l[0] == nil { return nil } @@ -2278,20 +2292,10 @@ func resourceAwsKinesisFirehoseDeliveryStreamDelete(d *schema.ResourceData, meta }) if err != nil { - return err + return fmt.Errorf("error deleting Kinesis Firehose Delivery Stream (%s): %s", sn, err) } - stateConf := &resource.StateChangeConf{ - Pending: []string{"DELETING"}, - Target: []string{"DESTROYED"}, - Refresh: firehoseStreamStateRefreshFunc(conn, sn), - Timeout: 20 * time.Minute, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - - _, err = stateConf.WaitForState() - if err != nil { + if err := waitForKinesisFirehoseDeliveryStreamDeletion(conn, sn); err != nil { return fmt.Errorf( "Error waiting for Delivery Stream (%s) to be destroyed: %s", sn, err) @@ -2316,3 +2320,18 @@ func firehoseStreamStateRefreshFunc(conn *firehose.Firehose, sn string) resource return resp.DeliveryStreamDescription, *resp.DeliveryStreamDescription.DeliveryStreamStatus, nil } } + +func waitForKinesisFirehoseDeliveryStreamDeletion(conn *firehose.Firehose, deliveryStreamName string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"DELETING"}, + Target: []string{"DESTROYED"}, + Refresh: firehoseStreamStateRefreshFunc(conn, deliveryStreamName), + Timeout: 20 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, err := stateConf.WaitForState() + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go index 0294dbfe5..a0a2eb311 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go @@ -66,10 +66,7 @@ func resourceAwsKinesisStream() *schema.Resource { kinesis.EncryptionTypeKms, }, true), DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if strings.ToLower(old) == strings.ToLower(new) { - return true - } - return false + return strings.EqualFold(old, new) }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go index 53054d961..a6362f0cd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go @@ -275,11 +275,7 @@ func resourceAwsKmsGrantDelete(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Checking if grant is revoked: %s", grantId) err = waitForKmsGrantToBeRevoked(conn, keyId, grantId) - if err != nil { - return err - } - - return nil + return err } func resourceAwsKmsGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { @@ -429,10 +425,8 @@ func kmsGrantConstraintsIsValid(constraints *schema.Set) bool { } } - if constraintCount > 1 { - return false - } - return true + return constraintCount <= 1 + } func expandKmsGrantConstraints(configured *schema.Set) *kms.GrantConstraints { @@ -506,7 +500,7 @@ func flattenKmsGrantConstraints(constraint *kms.GrantConstraints) *schema.Set { return constraints } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if constraint.EncryptionContextEquals != nil { if len(constraint.EncryptionContextEquals) > 0 { m["encryption_context_equals"] = pointersMapToStringList(constraint.EncryptionContextEquals) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go index 674836761..74ebeadbd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go @@ -21,6 +21,24 @@ import ( const awsMutexLambdaKey = `aws_lambda_function` +var validLambdaRuntimes = []string{ + // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here + lambda.RuntimeDotnetcore10, + lambda.RuntimeDotnetcore20, + lambda.RuntimeDotnetcore21, + lambda.RuntimeGo1X, + lambda.RuntimeJava8, + lambda.RuntimeNodejs43, + lambda.RuntimeNodejs43Edge, + lambda.RuntimeNodejs610, + lambda.RuntimeNodejs810, + lambda.RuntimeProvided, + lambda.RuntimePython27, + lambda.RuntimePython36, + lambda.RuntimePython37, + lambda.RuntimeRuby25, +} + func resourceAwsLambdaFunction() *schema.Resource { return &schema.Resource{ Create: resourceAwsLambdaFunctionCreate, @@ -87,6 +105,15 @@ func resourceAwsLambdaFunction() *schema.Resource { Type: schema.TypeString, Required: true, }, + "layers": { + Type: schema.TypeList, + Optional: true, + MaxItems: 5, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateArn, + }, + }, "memory_size": { Type: schema.TypeInt, Optional: true, @@ -101,25 +128,9 @@ func resourceAwsLambdaFunction() *schema.Resource { Required: true, }, "runtime": { - Type: schema.TypeString, - Required: true, - ValidateFunc: validation.StringInSlice([]string{ - // lambda.RuntimeNodejs has reached end of life since October 2016 so not included here - lambda.RuntimeDotnetcore10, - lambda.RuntimeDotnetcore20, - lambda.RuntimeDotnetcore21, - lambda.RuntimeGo1X, - lambda.RuntimeJava8, - lambda.RuntimeNodejs43, - lambda.RuntimeNodejs43Edge, - lambda.RuntimeNodejs610, - lambda.RuntimeNodejs810, - lambda.RuntimeProvided, - lambda.RuntimePython27, - lambda.RuntimePython36, - lambda.RuntimePython37, - lambda.RuntimeRuby25, - }, false), + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice(validLambdaRuntimes, false), }, "timeout": { Type: schema.TypeInt, @@ -315,6 +326,10 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e Publish: aws.Bool(d.Get("publish").(bool)), } + if v, ok := d.GetOk("layers"); ok && len(v.([]interface{})) > 0 { + params.Layers = expandStringList(v.([]interface{})) + } + if v, ok := d.GetOk("dead_letter_config"); ok { dlcMaps := v.([]interface{}) if len(dlcMaps) == 1 { // Schema guarantees either 0 or 1 @@ -508,6 +523,12 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err d.Set("source_code_hash", function.CodeSha256) d.Set("source_code_size", function.CodeSize) + layers := flattenLambdaLayers(function.Layers) + log.Printf("[INFO] Setting Lambda %s Layers %#v from API", d.Id(), layers) + if err := d.Set("layers", layers); err != nil { + return fmt.Errorf("Error setting layers for Lambda Function (%s): %s", d.Id(), err) + } + config := flattenLambdaVpcConfigResponse(function.VpcConfig) log.Printf("[INFO] Setting Lambda %s VPC config %#v from API", d.Id(), config) if err := d.Set("vpc_config", config); err != nil { @@ -662,6 +683,11 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e configReq.KMSKeyArn = aws.String(d.Get("kms_key_arn").(string)) configUpdate = true } + if d.HasChange("layers") { + layers := d.Get("layers").([]interface{}) + configReq.Layers = expandStringList(layers) + configUpdate = true + } if d.HasChange("dead_letter_config") { dlcMaps := d.Get("dead_letter_config").([]interface{}) configReq.DeadLetterConfig = &lambda.DeadLetterConfig{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go new file mode 100644 index 000000000..f0f89d710 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_layer_version.go @@ -0,0 +1,261 @@ +package aws + +import ( + "errors" + "fmt" + "log" + "strconv" + "strings" + + "github.com/aws/aws-sdk-go/aws" + arn2 "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/lambda" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +const awsMutexLambdaLayerKey = `aws_lambda_layer_version` + +func resourceAwsLambdaLayerVersion() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsLambdaLayerVersionPublish, + Read: resourceAwsLambdaLayerVersionRead, + Delete: resourceAwsLambdaLayerVersionDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "layer_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "filename": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"s3_bucket", "s3_key", "s3_object_version"}, + }, + "s3_bucket": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"filename"}, + }, + "s3_key": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"filename"}, + }, + "s3_object_version": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{"filename"}, + }, + "compatible_runtimes": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + MinItems: 0, + MaxItems: 5, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringInSlice(validLambdaRuntimes, false), + }, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "license_info": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(0, 512), + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "layer_arn": { + Type: schema.TypeString, + Computed: true, + }, + "created_date": { + Type: schema.TypeString, + Computed: true, + }, + "source_code_hash": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + "source_code_size": { + Type: schema.TypeInt, + Computed: true, + }, + "version": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsLambdaLayerVersionPublish(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).lambdaconn + + layerName := d.Get("layer_name").(string) + filename, hasFilename := d.GetOk("filename") + s3Bucket, bucketOk := d.GetOk("s3_bucket") + s3Key, keyOk := d.GetOk("s3_key") + s3ObjectVersion, versionOk := d.GetOk("s3_object_version") + + if !hasFilename && !bucketOk && !keyOk && !versionOk { + return errors.New("filename or s3_* attributes must be set") + } + + var layerContent *lambda.LayerVersionContentInput + if hasFilename { + awsMutexKV.Lock(awsMutexLambdaLayerKey) + defer awsMutexKV.Unlock(awsMutexLambdaLayerKey) + file, err := loadFileContent(filename.(string)) + if err != nil { + return fmt.Errorf("Unable to load %q: %s", filename.(string), err) + } + layerContent = &lambda.LayerVersionContentInput{ + ZipFile: file, + } + } else { + if !bucketOk || !keyOk { + return errors.New("s3_bucket and s3_key must all be set while using s3 code source") + } + layerContent = &lambda.LayerVersionContentInput{ + S3Bucket: aws.String(s3Bucket.(string)), + S3Key: aws.String(s3Key.(string)), + } + if versionOk { + layerContent.S3ObjectVersion = aws.String(s3ObjectVersion.(string)) + } + } + + params := &lambda.PublishLayerVersionInput{ + Content: layerContent, + Description: aws.String(d.Get("description").(string)), + LayerName: aws.String(layerName), + LicenseInfo: aws.String(d.Get("license_info").(string)), + } + + if v, ok := d.GetOk("compatible_runtimes"); ok && v.(*schema.Set).Len() > 0 { + params.CompatibleRuntimes = expandStringList(v.(*schema.Set).List()) + } + + log.Printf("[DEBUG] Publishing Lambda layer: %s", params) + result, err := conn.PublishLayerVersion(params) + if err != nil { + return fmt.Errorf("Error creating lambda layer: %s", err) + } + + d.SetId(aws.StringValue(result.LayerVersionArn)) + return resourceAwsLambdaLayerVersionRead(d, meta) +} + +func resourceAwsLambdaLayerVersionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).lambdaconn + + layerName, version, err := resourceAwsLambdaLayerVersionParseId(d.Id()) + if err != nil { + return fmt.Errorf("Error parsing lambda layer ID: %s", err) + } + + layerVersion, err := conn.GetLayerVersion(&lambda.GetLayerVersionInput{ + LayerName: aws.String(layerName), + VersionNumber: aws.Int64(version), + }) + + if isAWSErr(err, lambda.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Lambda Layer Version (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading Lambda Layer version (%s): %s", d.Id(), err) + } + + if err := d.Set("layer_name", layerName); err != nil { + return fmt.Errorf("Error setting lambda layer name: %s", err) + } + if err := d.Set("version", strconv.FormatInt(version, 10)); err != nil { + return fmt.Errorf("Error setting lambda layer version: %s", err) + } + if err := d.Set("arn", layerVersion.LayerArn); err != nil { + return fmt.Errorf("Error setting lambda layer arn: %s", err) + } + if err := d.Set("layer_arn", layerVersion.LayerVersionArn); err != nil { + return fmt.Errorf("Error setting lambda layer qualified arn: %s", err) + } + if err := d.Set("description", layerVersion.Description); err != nil { + return fmt.Errorf("Error setting lambda layer description: %s", err) + } + if err := d.Set("license_info", layerVersion.LicenseInfo); err != nil { + return fmt.Errorf("Error setting lambda layer license info: %s", err) + } + if err := d.Set("created_date", layerVersion.CreatedDate); err != nil { + return fmt.Errorf("Error setting lambda layer created date: %s", err) + } + if err := d.Set("source_code_hash", layerVersion.Content.CodeSha256); err != nil { + return fmt.Errorf("Error setting lambda layer source code hash: %s", err) + } + if err := d.Set("source_code_size", layerVersion.Content.CodeSize); err != nil { + return fmt.Errorf("Error setting lambda layer source code size: %s", err) + } + if err := d.Set("compatible_runtimes", flattenStringList(layerVersion.CompatibleRuntimes)); err != nil { + return fmt.Errorf("Error setting lambda layer compatible runtimes: %s", err) + } + + return nil +} + +func resourceAwsLambdaLayerVersionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).lambdaconn + + version, err := strconv.ParseInt(d.Get("version").(string), 10, 64) + if err != nil { + return fmt.Errorf("Error parsing lambda layer version: %s", err) + } + + _, err = conn.DeleteLayerVersion(&lambda.DeleteLayerVersionInput{ + LayerName: aws.String(d.Get("layer_name").(string)), + VersionNumber: aws.Int64(version), + }) + if err != nil { + return fmt.Errorf("error deleting Lambda Layer Version (%s): %s", d.Id(), err) + } + + log.Printf("[DEBUG] Lambda layer %q deleted", d.Get("arn").(string)) + return nil +} + +func resourceAwsLambdaLayerVersionParseId(id string) (layerName string, version int64, err error) { + arn, err := arn2.Parse(id) + if err != nil { + return + } + parts := strings.Split(arn.Resource, ":") + if len(parts) != 3 || parts[0] != "layer" { + err = fmt.Errorf("lambda_layer ID must be a valid Layer ARN") + return + } + + layerName = parts[1] + version, err = strconv.ParseInt(parts[2], 10, 64) + return +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go index 76bbd3324..1382612d9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go @@ -126,26 +126,28 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Adding new Lambda permission: %s", input) var out *lambda.AddPermissionOutput + // Retry for IAM and Lambda eventual consistency err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error out, err = conn.AddPermission(&input) + if isAWSErr(err, lambda.ErrCodeResourceConflictException, "") { + return resource.RetryableError(err) + } + + if isAWSErr(err, lambda.ErrCodeResourceNotFoundException, "") { + return resource.RetryableError(err) + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - // IAM is eventually consistent :/ - if awsErr.Code() == "ResourceConflictException" { - return resource.RetryableError( - fmt.Errorf("Error adding new Lambda Permission for %s, retrying: %s", - *input.FunctionName, err)) - } - } return resource.NonRetryableError(err) } + return nil }) if err != nil { - return err + return fmt.Errorf("Error adding new Lambda Permission for %s: %s", functionName, err) } if out != nil && out.Statement != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go index ca406e305..7417d8f34 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_configuration.go @@ -625,7 +625,7 @@ func readBlockDevicesFromLaunchConfiguration(d *schema.ResourceData, lc *autosca // Collect existing configured devices, so we can check // existing value of delete_on_termination below - existingEbsBlockDevices := make(map[string]map[string]interface{}, 0) + existingEbsBlockDevices := make(map[string]map[string]interface{}) if v, ok := d.GetOk("ebs_block_device"); ok { ebsBlocks := v.(*schema.Set) for _, ebd := range ebsBlocks.List() { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go index 4a118269f..3dd76480a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go @@ -308,6 +308,20 @@ func resourceAwsLaunchTemplate() *schema.Resource { Optional: true, }, + "license_specification": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "license_configuration_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + "monitoring": { Type: schema.TypeList, Optional: true, @@ -627,6 +641,10 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err return err } + if err := d.Set("license_specification", getLicenseSpecifications(ltData.LicenseSpecifications)); err != nil { + return err + } + if err := d.Set("monitoring", getMonitoring(ltData.Monitoring)); err != nil { return err } @@ -830,6 +848,16 @@ func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []inte return s } +func getLicenseSpecifications(licenseSpecifications []*ec2.LaunchTemplateLicenseConfiguration) []map[string]interface{} { + var s []map[string]interface{} + for _, v := range licenseSpecifications { + s = append(s, map[string]interface{}{ + "license_configuration_arn": aws.StringValue(v.LicenseConfigurationArn), + }) + } + return s +} + func getMonitoring(m *ec2.LaunchTemplatesMonitoring) []interface{} { s := []interface{}{} if m != nil { @@ -980,6 +1008,9 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate bdms := v.([]interface{}) for _, bdm := range bdms { + if bdm == nil { + continue + } blockDeviceMapping, err := readBlockDeviceMappingFromConfig(bdm.(map[string]interface{})) if err != nil { return nil, err @@ -992,7 +1023,7 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate if v, ok := d.GetOk("capacity_reservation_specification"); ok { crs := v.([]interface{}) - if len(crs) > 0 { + if len(crs) > 0 && crs[0] != nil { opts.CapacityReservationSpecification = readCapacityReservationSpecificationFromConfig(crs[0].(map[string]interface{})) } } @@ -1000,7 +1031,7 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate if v, ok := d.GetOk("credit_specification"); ok && (strings.HasPrefix(instanceType, "t2") || strings.HasPrefix(instanceType, "t3")) { cs := v.([]interface{}) - if len(cs) > 0 { + if len(cs) > 0 && cs[0] != nil { opts.CreditSpecification = readCreditSpecificationFromConfig(cs[0].(map[string]interface{})) } } @@ -1018,7 +1049,7 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate if v, ok := d.GetOk("iam_instance_profile"); ok { iip := v.([]interface{}) - if len(iip) > 0 { + if len(iip) > 0 && iip[0] != nil { opts.IamInstanceProfile = readIamInstanceProfileFromConfig(iip[0].(map[string]interface{})) } } @@ -1026,7 +1057,7 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate if v, ok := d.GetOk("instance_market_options"); ok { imo := v.([]interface{}) - if len(imo) > 0 { + if len(imo) > 0 && imo[0] != nil { instanceMarketOptions, err := readInstanceMarketOptionsFromConfig(imo[0].(map[string]interface{})) if err != nil { return nil, err @@ -1035,9 +1066,22 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate } } + if v, ok := d.GetOk("license_specification"); ok { + var licenseSpecifications []*ec2.LaunchTemplateLicenseConfigurationRequest + lsList := v.(*schema.Set).List() + + for _, ls := range lsList { + if ls == nil { + continue + } + licenseSpecifications = append(licenseSpecifications, readLicenseSpecificationFromConfig(ls.(map[string]interface{}))) + } + opts.LicenseSpecifications = licenseSpecifications + } + if v, ok := d.GetOk("monitoring"); ok { m := v.([]interface{}) - if len(m) > 0 { + if len(m) > 0 && m[0] != nil { mData := m[0].(map[string]interface{}) monitoring := &ec2.LaunchTemplatesMonitoringRequest{ Enabled: aws.Bool(mData["enabled"].(bool)), @@ -1051,6 +1095,9 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate niList := v.([]interface{}) for _, ni := range niList { + if ni == nil { + continue + } niData := ni.(map[string]interface{}) networkInterface := readNetworkInterfacesFromConfig(niData) networkInterfaces = append(networkInterfaces, networkInterface) @@ -1061,7 +1108,7 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate if v, ok := d.GetOk("placement"); ok { p := v.([]interface{}) - if len(p) > 0 { + if len(p) > 0 && p[0] != nil { opts.Placement = readPlacementFromConfig(p[0].(map[string]interface{})) } } @@ -1071,6 +1118,9 @@ func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplate t := v.([]interface{}) for _, ts := range t { + if ts == nil { + continue + } tsData := ts.(map[string]interface{}) tags := tagsFromMap(tsData["tags"].(map[string]interface{})) tagSpecification := &ec2.LaunchTemplateTagSpecificationRequest{ @@ -1329,6 +1379,16 @@ func readInstanceMarketOptionsFromConfig(imo map[string]interface{}) (*ec2.Launc return instanceMarketOptions, nil } +func readLicenseSpecificationFromConfig(ls map[string]interface{}) *ec2.LaunchTemplateLicenseConfigurationRequest { + licenseSpecification := &ec2.LaunchTemplateLicenseConfigurationRequest{} + + if v, ok := ls["license_configuration_arn"].(string); ok && v != "" { + licenseSpecification.LicenseConfigurationArn = aws.String(v) + } + + return licenseSpecification +} + func readPlacementFromConfig(p map[string]interface{}) *ec2.LaunchTemplatePlacementRequest { placement := &ec2.LaunchTemplatePlacementRequest{} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go index 5add0801f..e31943a33 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb.go @@ -557,11 +557,8 @@ func cleanupLBNetworkInterfaces(conn *ec2.EC2, lbArn string) error { } err = deleteNetworkInterfaces(conn, out.NetworkInterfaces) - if err != nil { - return err - } - return nil + return err } func waitForNLBNetworkInterfacesToDetach(conn *ec2.EC2, lbArn string) error { @@ -631,7 +628,7 @@ func flattenSubnetMappingsFromAvailabilityZones(availabilityZones []*elbv2.Avail l := make([]map[string]interface{}, 0) for _, availabilityZone := range availabilityZones { for _, loadBalancerAddress := range availabilityZone.LoadBalancerAddresses { - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) m["subnet_id"] = aws.StringValue(availabilityZone.SubnetId) if loadBalancerAddress.AllocationId != nil { @@ -760,12 +757,11 @@ func customizeDiffNLBSubnets(diff *schema.ResourceDiff, v interface{}) error { // Application Load Balancers, so the logic below is simple individual checks. // If other differences arise we'll want to refactor to check other // conditions in combinations, but for now all we handle is subnets - lbType := diff.Get("load_balancer_type").(string) - if "network" != lbType { + if lbType := diff.Get("load_balancer_type").(string); lbType != "network" { return nil } - if "" == diff.Id() { + if diff.Id() == "" { return nil } @@ -780,8 +776,7 @@ func customizeDiffNLBSubnets(diff *schema.ResourceDiff, v interface{}) error { ns := n.(*schema.Set) remove := os.Difference(ns).List() add := ns.Difference(os).List() - delta := len(remove) > 0 || len(add) > 0 - if delta { + if len(remove) > 0 || len(add) > 0 { if err := diff.SetNew("subnets", n); err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go index 27ddee3f7..7720ddc6c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go @@ -60,6 +60,7 @@ func resourceAwsLbListener() *schema.Resource { elbv2.ProtocolEnumHttp, elbv2.ProtocolEnumHttps, elbv2.ProtocolEnumTcp, + elbv2.ProtocolEnumTls, }, true), }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go index 0130949d8..94ffb3d8a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go @@ -57,25 +57,26 @@ func resourceAwsLbTargetGroup() *schema.Resource { "port": { Type: schema.TypeInt, - Required: true, + Optional: true, ForceNew: true, ValidateFunc: validation.IntBetween(1, 65535), }, "protocol": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, ValidateFunc: validation.StringInSlice([]string{ elbv2.ProtocolEnumHttp, elbv2.ProtocolEnumHttps, elbv2.ProtocolEnumTcp, + elbv2.ProtocolEnumTls, }, true), }, "vpc_id": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, @@ -102,8 +103,13 @@ func resourceAwsLbTargetGroup() *schema.Resource { "target_type": { Type: schema.TypeString, Optional: true, - Default: "instance", + Default: elbv2.TargetTypeEnumInstance, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.TargetTypeEnumInstance, + elbv2.TargetTypeEnumIp, + elbv2.TargetTypeEnumLambda, + }, false), }, "stickiness": { @@ -225,26 +231,40 @@ func resourceAwsLbTargetGroupCreate(d *schema.ResourceData, meta interface{}) er params := &elbv2.CreateTargetGroupInput{ Name: aws.String(groupName), - Port: aws.Int64(int64(d.Get("port").(int))), - Protocol: aws.String(d.Get("protocol").(string)), - VpcId: aws.String(d.Get("vpc_id").(string)), TargetType: aws.String(d.Get("target_type").(string)), } + if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { + if _, ok := d.GetOk("port"); !ok { + return fmt.Errorf("port should be set when target type is %s", d.Get("target_type").(string)) + } + + if _, ok := d.GetOk("protocol"); !ok { + return fmt.Errorf("protocol should be set when target type is %s", d.Get("target_type").(string)) + } + + if _, ok := d.GetOk("vpc_id"); !ok { + return fmt.Errorf("vpc_id should be set when target type is %s", d.Get("target_type").(string)) + } + params.Port = aws.Int64(int64(d.Get("port").(int))) + params.Protocol = aws.String(d.Get("protocol").(string)) + params.VpcId = aws.String(d.Get("vpc_id").(string)) + } + if healthChecks := d.Get("health_check").([]interface{}); len(healthChecks) == 1 { healthCheck := healthChecks[0].(map[string]interface{}) params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int))) - params.HealthCheckPort = aws.String(healthCheck["port"].(string)) - params.HealthCheckProtocol = aws.String(healthCheck["protocol"].(string)) + params.HealthyThresholdCount = aws.Int64(int64(healthCheck["healthy_threshold"].(int))) params.UnhealthyThresholdCount = aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))) t := healthCheck["timeout"].(int) if t != 0 { params.HealthCheckTimeoutSeconds = aws.Int64(int64(t)) } + healthCheckProtocol := healthCheck["protocol"].(string) - if *params.HealthCheckProtocol != "TCP" { + if healthCheckProtocol != "TCP" { p := healthCheck["path"].(string) if p != "" { params.HealthCheckPath = aws.String(p) @@ -257,6 +277,10 @@ func resourceAwsLbTargetGroupCreate(d *schema.ResourceData, meta interface{}) er } } } + if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { + params.HealthCheckPort = aws.String(healthCheck["port"].(string)) + params.HealthCheckProtocol = aws.String(healthCheckProtocol) + } } resp, err := elbconn.CreateTargetGroup(params) @@ -267,9 +291,7 @@ func resourceAwsLbTargetGroupCreate(d *schema.ResourceData, meta interface{}) er if len(resp.TargetGroups) == 0 { return errors.New("Error creating LB Target Group: no groups returned in response") } - d.SetId(aws.StringValue(resp.TargetGroups[0].TargetGroupArn)) - return resourceAwsLbTargetGroupUpdate(d, meta) } @@ -313,8 +335,6 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er params = &elbv2.ModifyTargetGroupInput{ TargetGroupArn: aws.String(d.Id()), - HealthCheckPort: aws.String(healthCheck["port"].(string)), - HealthCheckProtocol: aws.String(healthCheck["protocol"].(string)), HealthyThresholdCount: aws.Int64(int64(healthCheck["healthy_threshold"].(int))), UnhealthyThresholdCount: aws.Int64(int64(healthCheck["unhealthy_threshold"].(int))), } @@ -324,15 +344,19 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er params.HealthCheckTimeoutSeconds = aws.Int64(int64(t)) } - healthCheckProtocol := strings.ToLower(healthCheck["protocol"].(string)) + healthCheckProtocol := healthCheck["protocol"].(string) - if healthCheckProtocol != "tcp" && !d.IsNewResource() { + if healthCheckProtocol != "TCP" && !d.IsNewResource() { params.Matcher = &elbv2.Matcher{ HttpCode: aws.String(healthCheck["matcher"].(string)), } params.HealthCheckPath = aws.String(healthCheck["path"].(string)) params.HealthCheckIntervalSeconds = aws.Int64(int64(healthCheck["interval"].(int))) } + if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { + params.HealthCheckPort = aws.String(healthCheck["port"].(string)) + params.HealthCheckProtocol = aws.String(healthCheckProtocol) + } } if params != nil { @@ -343,68 +367,70 @@ func resourceAwsLbTargetGroupUpdate(d *schema.ResourceData, meta interface{}) er } } - var attrs []*elbv2.TargetGroupAttribute + if d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { + var attrs []*elbv2.TargetGroupAttribute - if d.HasChange("deregistration_delay") { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("deregistration_delay.timeout_seconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("deregistration_delay").(int))), - }) - } - - if d.HasChange("slow_start") { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("slow_start.duration_seconds"), - Value: aws.String(fmt.Sprintf("%d", d.Get("slow_start").(int))), - }) - } - - if d.HasChange("proxy_protocol_v2") { - attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("proxy_protocol_v2.enabled"), - Value: aws.String(strconv.FormatBool(d.Get("proxy_protocol_v2").(bool))), - }) - } - - // In CustomizeDiff we allow LB stickiness to be declared for TCP target - // groups, so long as it's not enabled. This allows for better support for - // modules, but also means we need to completely skip sending the data to the - // API if it's defined on a TCP target group. - if d.HasChange("stickiness") && d.Get("protocol") != "TCP" { - stickinessBlocks := d.Get("stickiness").([]interface{}) - if len(stickinessBlocks) == 1 { - stickiness := stickinessBlocks[0].(map[string]interface{}) - - attrs = append(attrs, - &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.enabled"), - Value: aws.String(strconv.FormatBool(stickiness["enabled"].(bool))), - }, - &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.type"), - Value: aws.String(stickiness["type"].(string)), - }, - &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.lb_cookie.duration_seconds"), - Value: aws.String(fmt.Sprintf("%d", stickiness["cookie_duration"].(int))), - }) - } else if len(stickinessBlocks) == 0 { + if d.HasChange("deregistration_delay") { attrs = append(attrs, &elbv2.TargetGroupAttribute{ - Key: aws.String("stickiness.enabled"), - Value: aws.String("false"), + Key: aws.String("deregistration_delay.timeout_seconds"), + Value: aws.String(fmt.Sprintf("%d", d.Get("deregistration_delay").(int))), }) } - } - if len(attrs) > 0 { - params := &elbv2.ModifyTargetGroupAttributesInput{ - TargetGroupArn: aws.String(d.Id()), - Attributes: attrs, + if d.HasChange("slow_start") { + attrs = append(attrs, &elbv2.TargetGroupAttribute{ + Key: aws.String("slow_start.duration_seconds"), + Value: aws.String(fmt.Sprintf("%d", d.Get("slow_start").(int))), + }) } - _, err := elbconn.ModifyTargetGroupAttributes(params) - if err != nil { - return fmt.Errorf("Error modifying Target Group Attributes: %s", err) + if d.HasChange("proxy_protocol_v2") { + attrs = append(attrs, &elbv2.TargetGroupAttribute{ + Key: aws.String("proxy_protocol_v2.enabled"), + Value: aws.String(strconv.FormatBool(d.Get("proxy_protocol_v2").(bool))), + }) + } + + // In CustomizeDiff we allow LB stickiness to be declared for TCP target + // groups, so long as it's not enabled. This allows for better support for + // modules, but also means we need to completely skip sending the data to the + // API if it's defined on a TCP target group. + if d.HasChange("stickiness") && d.Get("protocol") != "TCP" && d.Get("target_type").(string) != elbv2.TargetTypeEnumLambda { + stickinessBlocks := d.Get("stickiness").([]interface{}) + if len(stickinessBlocks) == 1 { + stickiness := stickinessBlocks[0].(map[string]interface{}) + + attrs = append(attrs, + &elbv2.TargetGroupAttribute{ + Key: aws.String("stickiness.enabled"), + Value: aws.String(strconv.FormatBool(stickiness["enabled"].(bool))), + }, + &elbv2.TargetGroupAttribute{ + Key: aws.String("stickiness.type"), + Value: aws.String(stickiness["type"].(string)), + }, + &elbv2.TargetGroupAttribute{ + Key: aws.String("stickiness.lb_cookie.duration_seconds"), + Value: aws.String(fmt.Sprintf("%d", stickiness["cookie_duration"].(int))), + }) + } else if len(stickinessBlocks) == 0 { + attrs = append(attrs, &elbv2.TargetGroupAttribute{ + Key: aws.String("stickiness.enabled"), + Value: aws.String("false"), + }) + } + } + + if len(attrs) > 0 { + params := &elbv2.ModifyTargetGroupAttributesInput{ + TargetGroupArn: aws.String(d.Id()), + Attributes: attrs, + } + + _, err := elbconn.ModifyTargetGroupAttributes(params) + if err != nil { + return fmt.Errorf("Error modifying Target Group Attributes: %s", err) + } } } @@ -490,9 +516,6 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t d.Set("arn", targetGroup.TargetGroupArn) d.Set("arn_suffix", lbTargetGroupSuffixFromARN(targetGroup.TargetGroupArn)) d.Set("name", targetGroup.TargetGroupName) - d.Set("port", targetGroup.Port) - d.Set("protocol", targetGroup.Protocol) - d.Set("vpc_id", targetGroup.VpcId) d.Set("target_type", targetGroup.TargetType) healthCheck := make(map[string]interface{}) @@ -509,6 +532,11 @@ func flattenAwsLbTargetGroupResource(d *schema.ResourceData, meta interface{}, t if targetGroup.Matcher != nil && targetGroup.Matcher.HttpCode != nil { healthCheck["matcher"] = aws.StringValue(targetGroup.Matcher.HttpCode) } + if v, _ := d.Get("target_type").(string); v != elbv2.TargetTypeEnumLambda { + d.Set("vpc_id", targetGroup.VpcId) + d.Set("port", targetGroup.Port) + d.Set("protocol", targetGroup.Protocol) + } if err := d.Set("health_check", []interface{}{healthCheck}); err != nil { return fmt.Errorf("error setting health_check: %s", err) @@ -632,20 +660,20 @@ func resourceAwsLbTargetGroupCustomizeDiff(diff *schema.ResourceDiff, v interfac if protocol == "TCP" { // Cannot set custom matcher on TCP health checks if m := healthCheck["matcher"].(string); m != "" { - return fmt.Errorf("%s: custom matcher is not supported for target_groups with TCP protocol", diff.Id()) + return fmt.Errorf("%s: health_check.matcher is not supported for target_groups with TCP protocol", diff.Id()) } // Cannot set custom path on TCP health checks if m := healthCheck["path"].(string); m != "" { - return fmt.Errorf("%s: custom path is not supported for target_groups with TCP protocol", diff.Id()) + return fmt.Errorf("%s: health_check.path is not supported for target_groups with TCP protocol", diff.Id()) } // Cannot set custom timeout on TCP health checks if t := healthCheck["timeout"].(int); t != 0 && diff.Id() == "" { // timeout has a default value, so only check this if this is a network // LB and is a first run - return fmt.Errorf("%s: custom timeout is not supported for target_groups with TCP protocol", diff.Id()) + return fmt.Errorf("%s: health_check.timeout is not supported for target_groups with TCP protocol", diff.Id()) } if healthCheck["healthy_threshold"].(int) != healthCheck["unhealthy_threshold"].(int) { - return fmt.Errorf("%s: healthy_threshold %d and unhealthy_threshold %d must be the same for target_groups with TCP protocol", diff.Id(), healthCheck["healthy_threshold"].(int), healthCheck["unhealthy_threshold"].(int)) + return fmt.Errorf("%s: health_check.healthy_threshold %d and health_check.unhealthy_threshold %d must be the same for target_groups with TCP protocol", diff.Id(), healthCheck["healthy_threshold"].(int), healthCheck["unhealthy_threshold"].(int)) } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go new file mode 100644 index 000000000..646d4031b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_association.go @@ -0,0 +1,146 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/licensemanager" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsLicenseManagerAssociation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsLicenseManagerAssociationCreate, + Read: resourceAwsLicenseManagerAssociationRead, + Delete: resourceAwsLicenseManagerAssociationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "license_configuration_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + }, + } +} + +func resourceAwsLicenseManagerAssociationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + resourceArn := d.Get("resource_arn").(string) + licenseConfigurationArn := d.Get("license_configuration_arn").(string) + + opts := &licensemanager.UpdateLicenseSpecificationsForResourceInput{ + AddLicenseSpecifications: []*licensemanager.LicenseSpecification{{ + LicenseConfigurationArn: aws.String(licenseConfigurationArn), + }}, + ResourceArn: aws.String(resourceArn), + } + + log.Printf("[DEBUG] License Manager association: %s", opts) + + _, err := conn.UpdateLicenseSpecificationsForResource(opts) + if err != nil { + return fmt.Errorf("Error creating License Manager association: %s", err) + } + + d.SetId(fmt.Sprintf("%s,%s", resourceArn, licenseConfigurationArn)) + + return resourceAwsLicenseManagerAssociationRead(d, meta) +} + +func resourceAwsLicenseManagerAssociationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + resourceArn, licenseConfigurationArn, err := resourceAwsLicenseManagerAssociationParseId(d.Id()) + if err != nil { + return err + } + + licenseSpecification, err := resourceAwsLicenseManagerAssociationFindSpecification(conn, resourceArn, licenseConfigurationArn) + if err != nil { + return fmt.Errorf("Error reading License Manager association: %s", err) + } + + if licenseSpecification == nil { + log.Printf("[WARN] License Manager association (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("resource_arn", resourceArn) + d.Set("license_configuration_arn", licenseConfigurationArn) + + return nil +} + +func resourceAwsLicenseManagerAssociationFindSpecification(conn *licensemanager.LicenseManager, resourceArn, licenseConfigurationArn string) (*licensemanager.LicenseSpecification, error) { + opts := &licensemanager.ListLicenseSpecificationsForResourceInput{ + ResourceArn: aws.String(resourceArn), + } + + for { + resp, err := conn.ListLicenseSpecificationsForResource(opts) + + if err != nil { + return nil, err + } + + for _, licenseSpecification := range resp.LicenseSpecifications { + if aws.StringValue(licenseSpecification.LicenseConfigurationArn) == licenseConfigurationArn { + return licenseSpecification, nil + } + } + + if len(resp.LicenseSpecifications) == 0 || resp.NextToken == nil { + return nil, nil + } + + opts.NextToken = resp.NextToken + } +} + +func resourceAwsLicenseManagerAssociationParseId(id string) (string, string, error) { + parts := strings.SplitN(id, ",", 2) + if len(parts) != 2 { + return "", "", fmt.Errorf("Expected License Manager Association ID in the form resource_arn,license_configuration_arn - received: %s", id) + } + return parts[0], parts[1], nil +} + +func resourceAwsLicenseManagerAssociationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + resourceArn, licenseConfigurationArn, err := resourceAwsLicenseManagerAssociationParseId(d.Id()) + if err != nil { + return err + } + + opts := &licensemanager.UpdateLicenseSpecificationsForResourceInput{ + RemoveLicenseSpecifications: []*licensemanager.LicenseSpecification{{ + LicenseConfigurationArn: aws.String(licenseConfigurationArn), + }}, + ResourceArn: aws.String(resourceArn), + } + + log.Printf("[DEBUG] License Manager association: %s", opts) + + _, err = conn.UpdateLicenseSpecificationsForResource(opts) + if err != nil { + return fmt.Errorf("Error deleting License Manager association: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go new file mode 100644 index 000000000..8dd6a17f0 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_licensemanager_license_configuration.go @@ -0,0 +1,187 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/licensemanager" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsLicenseManagerLicenseConfiguration() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsLicenseManagerLicenseConfigurationCreate, + Read: resourceAwsLicenseManagerLicenseConfigurationRead, + Update: resourceAwsLicenseManagerLicenseConfigurationUpdate, + Delete: resourceAwsLicenseManagerLicenseConfigurationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Optional: true, + }, + "license_count": { + Type: schema.TypeInt, + Optional: true, + }, + "license_count_hard_limit": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "license_counting_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + licensemanager.LicenseCountingTypeVCpu, + licensemanager.LicenseCountingTypeInstance, + licensemanager.LicenseCountingTypeCore, + licensemanager.LicenseCountingTypeSocket, + }, false), + }, + "license_rules": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^#([^=]+)=(.+)$"), "Expected format is #RuleType=RuleValue"), + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "tags": tagsSchema(), + }, + } +} + +func resourceAwsLicenseManagerLicenseConfigurationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + opts := &licensemanager.CreateLicenseConfigurationInput{ + LicenseCountingType: aws.String(d.Get("license_counting_type").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("description"); ok { + opts.Description = aws.String(v.(string)) + } + + if v, ok := d.GetOk("license_count"); ok { + opts.LicenseCount = aws.Int64(int64(v.(int))) + } + + if v, ok := d.GetOk("license_count_hard_limit"); ok { + opts.LicenseCountHardLimit = aws.Bool(v.(bool)) + } + + if v, ok := d.GetOk("license_rules"); ok { + opts.LicenseRules = expandStringList(v.([]interface{})) + } + + if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 { + opts.Tags = tagsFromMapLicenseManager(v.(map[string]interface{})) + } + + log.Printf("[DEBUG] License Manager license configuration: %s", opts) + + resp, err := conn.CreateLicenseConfiguration(opts) + if err != nil { + return fmt.Errorf("Error creating License Manager license configuration: %s", err) + } + d.SetId(*resp.LicenseConfigurationArn) + return resourceAwsLicenseManagerLicenseConfigurationRead(d, meta) +} + +func resourceAwsLicenseManagerLicenseConfigurationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + resp, err := conn.GetLicenseConfiguration(&licensemanager.GetLicenseConfigurationInput{ + LicenseConfigurationArn: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, licensemanager.ErrCodeInvalidParameterValueException, "") { + log.Printf("[WARN] License Manager license configuration (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error reading License Manager license configuration: %s", err) + } + + d.Set("description", resp.Description) + d.Set("license_count", resp.LicenseCount) + d.Set("license_count_hard_limit", resp.LicenseCountHardLimit) + d.Set("license_counting_type", resp.LicenseCountingType) + if err := d.Set("license_rules", flattenStringList(resp.LicenseRules)); err != nil { + return fmt.Errorf("error setting license_rules: %s", err) + } + d.Set("name", resp.Name) + + if err := d.Set("tags", tagsToMapLicenseManager(resp.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsLicenseManagerLicenseConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + d.Partial(true) + + if d.HasChange("tags") { + if err := setTagsLicenseManager(conn, d); err != nil { + return err + } + d.SetPartial("tags") + } + + d.Partial(false) + + opts := &licensemanager.UpdateLicenseConfigurationInput{ + LicenseConfigurationArn: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + Description: aws.String(d.Get("description").(string)), + LicenseCountHardLimit: aws.Bool(d.Get("license_count_hard_limit").(bool)), + } + + if v, ok := d.GetOk("license_count"); ok { + opts.LicenseCount = aws.Int64(int64(v.(int))) + } + + log.Printf("[DEBUG] License Manager license configuration: %s", opts) + + _, err := conn.UpdateLicenseConfiguration(opts) + if err != nil { + return fmt.Errorf("Error updating License Manager license configuration: %s", err) + } + return resourceAwsLicenseManagerLicenseConfigurationRead(d, meta) +} + +func resourceAwsLicenseManagerLicenseConfigurationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).licensemanagerconn + + opts := &licensemanager.DeleteLicenseConfigurationInput{ + LicenseConfigurationArn: aws.String(d.Id()), + } + + _, err := conn.DeleteLicenseConfiguration(opts) + if err != nil { + if isAWSErr(err, licensemanager.ErrCodeInvalidParameterValueException, "") { + return nil + } + return fmt.Errorf("Error deleting License Manager license configuration: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go index 865eb59d9..0656a88d6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_domain.go @@ -72,8 +72,5 @@ func resourceAwsLightsailDomainDelete(d *schema.ResourceData, meta interface{}) DomainName: aws.String(d.Id()), }) - if err != nil { - return err - } - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go index 60f67d58c..d8c5746ce 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_backend_server_policy.go @@ -96,9 +96,7 @@ func resourceAwsLoadBalancerBackendServerPoliciesRead(d *schema.ResourceData, me continue } - for _, name := range backendServer.PolicyNames { - policyNames = append(policyNames, name) - } + policyNames = append(policyNames, backendServer.PolicyNames...) } d.Set("load_balancer_name", loadBalancerName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go index a423d74d8..96ca1ccdd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_listener_policy.go @@ -96,9 +96,7 @@ func resourceAwsLoadBalancerListenerPoliciesRead(d *schema.ResourceData, meta in continue } - for _, name := range listener.PolicyNames { - policyNames = append(policyNames, name) - } + policyNames = append(policyNames, listener.PolicyNames...) } d.Set("load_balancer_name", loadBalancerName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go new file mode 100644 index 000000000..356d3241a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_package_channel.go @@ -0,0 +1,182 @@ +package aws + +import ( + "fmt" + "regexp" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mediapackage" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsMediaPackageChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsMediaPackageChannelCreate, + Read: resourceAwsMediaPackageChannelRead, + Update: resourceAwsMediaPackageChannelUpdate, + Delete: resourceAwsMediaPackageChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "channel_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[\w-]+$`), "must only contain alphanumeric characters, dashes or underscores"), + }, + "description": { + Type: schema.TypeString, + Optional: true, + Default: "Managed by Terraform", + }, + "hls_ingest": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "ingest_endpoints": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "password": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + "url": { + Type: schema.TypeString, + Computed: true, + }, + "username": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func resourceAwsMediaPackageChannelCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediapackageconn + + input := &mediapackage.CreateChannelInput{ + Id: aws.String(d.Get("channel_id").(string)), + Description: aws.String(d.Get("description").(string)), + } + + _, err := conn.CreateChannel(input) + if err != nil { + return fmt.Errorf("error creating MediaPackage Channel: %s", err) + } + + d.SetId(d.Get("channel_id").(string)) + return resourceAwsMediaPackageChannelRead(d, meta) +} + +func resourceAwsMediaPackageChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediapackageconn + + input := &mediapackage.DescribeChannelInput{ + Id: aws.String(d.Id()), + } + resp, err := conn.DescribeChannel(input) + if err != nil { + return fmt.Errorf("error describing MediaPackage Channel: %s", err) + } + d.Set("arn", resp.Arn) + d.Set("channel_id", resp.Id) + d.Set("description", resp.Description) + + if err := d.Set("hls_ingest", flattenMediaPackageHLSIngest(resp.HlsIngest)); err != nil { + return fmt.Errorf("error setting hls_ingest: %s", err) + } + + return nil +} + +func resourceAwsMediaPackageChannelUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediapackageconn + + input := &mediapackage.UpdateChannelInput{ + Id: aws.String(d.Id()), + Description: aws.String(d.Get("description").(string)), + } + + _, err := conn.UpdateChannel(input) + if err != nil { + return fmt.Errorf("error updating MediaPackage Channel: %s", err) + } + + return resourceAwsMediaPackageChannelRead(d, meta) +} + +func resourceAwsMediaPackageChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).mediapackageconn + + input := &mediapackage.DeleteChannelInput{ + Id: aws.String(d.Id()), + } + _, err := conn.DeleteChannel(input) + if err != nil { + if isAWSErr(err, mediapackage.ErrCodeNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting MediaPackage Channel: %s", err) + } + + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + dcinput := &mediapackage.DescribeChannelInput{ + Id: aws.String(d.Id()), + } + _, err := conn.DescribeChannel(dcinput) + if err != nil { + if isAWSErr(err, mediapackage.ErrCodeNotFoundException, "") { + return nil + } + return resource.NonRetryableError(err) + } + return resource.RetryableError(fmt.Errorf("MediaPackage Channel (%s) still exists", d.Id())) + }) + if err != nil { + return fmt.Errorf("error waiting for MediaPackage Channel (%s) deletion: %s", d.Id(), err) + } + + return nil +} + +func flattenMediaPackageHLSIngest(h *mediapackage.HlsIngest) []map[string]interface{} { + if h.IngestEndpoints == nil { + return []map[string]interface{}{ + {"ingest_endpoints": []map[string]interface{}{}}, + } + } + + var ingestEndpoints []map[string]interface{} + for _, e := range h.IngestEndpoints { + endpoint := map[string]interface{}{ + "password": aws.StringValue(e.Password), + "url": aws.StringValue(e.Url), + "username": aws.StringValue(e.Username), + } + + ingestEndpoints = append(ingestEndpoints, endpoint) + } + + return []map[string]interface{}{ + {"ingest_endpoints": ingestEndpoints}, + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go index cb88ed340..ce76b6ad9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_media_store_container.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/mediastore" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsMediaStoreContainer() *schema.Resource { @@ -21,16 +22,10 @@ func resourceAwsMediaStoreContainer() *schema.Resource { }, Schema: map[string]*schema.Schema{ "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile("^\\w+$").MatchString(value) { - errors = append(errors, fmt.Errorf("%q must contain alphanumeric characters or underscores", k)) - } - return - }, + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`^\w+$`), "must contain alphanumeric characters or underscores"), }, "arn": { Type: schema.TypeString, @@ -114,10 +109,10 @@ func resourceAwsMediaStoreContainerDelete(d *schema.ResourceData, meta interface } return resource.NonRetryableError(err) } - return resource.RetryableError(nil) + return resource.RetryableError(fmt.Errorf("Media Store Container (%s) still exists", d.Id())) }) if err != nil { - return err + return fmt.Errorf("error waiting for Media Store Container (%s) deletion: %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go index d493579ba..704ad6a41 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go @@ -203,6 +203,7 @@ func resourceAwsMqBroker() *schema.Resource { }, }, }, + "tags": tagsSchema(), }, } } @@ -237,6 +238,9 @@ func resourceAwsMqBrokerCreate(d *schema.ResourceData, meta interface{}) error { if v, ok := d.GetOk("subnet_ids"); ok { input.SubnetIds = expandStringList(v.(*schema.Set).List()) } + if v, ok := d.GetOk("tags"); ok { + input.Tags = tagsFromMapGeneric(v.(map[string]interface{})) + } log.Printf("[INFO] Creating MQ Broker: %s", input) out, err := conn.CreateBroker(&input) @@ -320,7 +324,7 @@ func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { return err } - rawUsers := make([]*mq.User, len(out.Users), len(out.Users)) + rawUsers := make([]*mq.User, len(out.Users)) for i, u := range out.Users { uOut, err := conn.DescribeUser(&mq.DescribeUserInput{ BrokerId: aws.String(d.Id()), @@ -338,12 +342,11 @@ func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { } users := flattenMqUsers(rawUsers, d.Get("user").(*schema.Set).List()) - err = d.Set("user", users) - if err != nil { + if err = d.Set("user", users); err != nil { return err } - return nil + return getTagsMQ(conn, d, aws.StringValue(out.BrokerArn)) } func resourceAwsMqBrokerUpdate(d *schema.ResourceData, meta interface{}) error { @@ -401,6 +404,10 @@ func resourceAwsMqBrokerUpdate(d *schema.ResourceData, meta interface{}) error { } } + if tagErr := setTagsMQ(conn, d, d.Get("arn").(string)); tagErr != nil { + return fmt.Errorf("error setting mq broker tags: %s", tagErr) + } + return nil } @@ -496,7 +503,7 @@ func updateAwsMqBrokerUsers(conn *mq.MQ, bId string, oldUsers, newUsers []interf func diffAwsMqBrokerUsers(bId string, oldUsers, newUsers []interface{}) ( cr []*mq.CreateUserRequest, di []*mq.DeleteUserInput, ur []*mq.UpdateUserRequest, e error) { - existingUsers := make(map[string]interface{}, 0) + existingUsers := make(map[string]interface{}) for _, ou := range oldUsers { u := ou.(map[string]interface{}) username := u["username"].(string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go index 265a02d6c..169faf0ff 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_configuration.go @@ -67,6 +67,7 @@ func resourceAwsMqConfiguration() *schema.Resource { Type: schema.TypeInt, Computed: true, }, + "tags": tagsSchema(), }, } } @@ -80,6 +81,10 @@ func resourceAwsMqConfigurationCreate(d *schema.ResourceData, meta interface{}) Name: aws.String(d.Get("name").(string)), } + if v, ok := d.GetOk("tags"); ok { + input.Tags = tagsFromMapGeneric(v.(map[string]interface{})) + } + log.Printf("[INFO] Creating MQ Configuration: %s", input) out, err := conn.CreateConfiguration(&input) if err != nil { @@ -130,7 +135,7 @@ func resourceAwsMqConfigurationRead(d *schema.ResourceData, meta interface{}) er d.Set("data", string(b)) - return nil + return getTagsMQ(conn, d, aws.StringValue(out.Arn)) } func resourceAwsMqConfigurationUpdate(d *schema.ResourceData, meta interface{}) error { @@ -153,6 +158,10 @@ func resourceAwsMqConfigurationUpdate(d *schema.ResourceData, meta interface{}) return err } + if tagErr := setTagsMQ(conn, d, d.Get("arn").(string)); tagErr != nil { + return fmt.Errorf("error setting mq configuration tags: %s", err) + } + return resourceAwsMqConfigurationRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go index 3ced18b51..792bf867f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go @@ -613,7 +613,7 @@ func resourceAwsNeptuneClusterDelete(d *schema.ResourceData, meta interface{}) e skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - if skipFinalSnapshot == false { + if !skipFinalSnapshot { if name, present := d.GetOk("final_snapshot_identifier"); present { deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) } else { @@ -702,11 +702,7 @@ func setIamRoleToNeptuneCluster(clusterIdentifier string, roleArn string, conn * RoleArn: aws.String(roleArn), } _, err := conn.AddRoleToDBCluster(params) - if err != nil { - return err - } - - return nil + return err } func removeIamRoleFromNeptuneCluster(clusterIdentifier string, roleArn string, conn *neptune.Neptune) error { @@ -715,11 +711,7 @@ func removeIamRoleFromNeptuneCluster(clusterIdentifier string, roleArn string, c RoleArn: aws.String(roleArn), } _, err := conn.RemoveRoleFromDBCluster(params) - if err != nil { - return err - } - - return nil + return err } var resourceAwsNeptuneClusterCreatePendingStates = []string{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go index 6cb8ec42a..6a4458303 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_instance.go @@ -304,7 +304,7 @@ func resourceAwsNeptuneClusterInstanceRead(d *schema.ResourceData, meta interfac } for _, m := range dbc.DBClusterMembers { if aws.StringValue(db.DBInstanceIdentifier) == aws.StringValue(m.DBInstanceIdentifier) { - if aws.BoolValue(m.IsClusterWriter) == true { + if aws.BoolValue(m.IsClusterWriter) { d.Set("writer", true) } else { d.Set("writer", false) @@ -460,11 +460,8 @@ func resourceAwsNeptuneClusterInstanceDelete(d *schema.ResourceData, meta interf Delay: 30 * time.Second, } - if _, err := stateConf.WaitForState(); err != nil { - return err - } - - return nil + _, err := stateConf.WaitForState() + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go index 3db16ee10..9d6647699 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_subnet_group.go @@ -109,9 +109,7 @@ func resourceAwsNeptuneSubnetGroupRead(d *schema.ResourceData, meta interface{}) var subnetGroups []*neptune.DBSubnetGroup if err := conn.DescribeDBSubnetGroupsPages(&describeOpts, func(resp *neptune.DescribeDBSubnetGroupsOutput, lastPage bool) bool { - for _, v := range resp.DBSubnetGroups { - subnetGroups = append(subnetGroups, v) - } + subnetGroups = append(subnetGroups, resp.DBSubnetGroups...) return !lastPage }); err != nil { if isAWSErr(err, neptune.ErrCodeDBSubnetGroupNotFoundFault, "") { @@ -128,8 +126,7 @@ func resourceAwsNeptuneSubnetGroupRead(d *schema.ResourceData, meta interface{}) return nil } - var subnetGroup *neptune.DBSubnetGroup - subnetGroup = subnetGroups[0] + var subnetGroup *neptune.DBSubnetGroup = subnetGroups[0] if subnetGroup.DBSubnetGroupName == nil { return fmt.Errorf("Unable to find Neptune Subnet Group: %#v", subnetGroups) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go index 1c261b2c4..746c6858a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go @@ -74,10 +74,7 @@ func resourceAwsNetworkAcl() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if strings.ToLower(old) == strings.ToLower(new) { - return true - } - return false + return strings.EqualFold(old, new) }, }, "protocol": { @@ -127,10 +124,7 @@ func resourceAwsNetworkAcl() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if strings.ToLower(old) == strings.ToLower(new) { - return true - } - return false + return strings.EqualFold(old, new) }, }, "protocol": { @@ -224,7 +218,7 @@ func resourceAwsNetworkAclRead(d *schema.ResourceData, meta interface{}) error { continue } - if *e.Egress == true { + if *e.Egress { egressEntries = append(egressEntries, e) } else { ingressEntries = append(ingressEntries, e) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go index 6fe843ca7..ac4c4a422 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go @@ -125,7 +125,7 @@ func resourceAwsNetworkAclRuleCreate(d *schema.ResourceData, meta interface{}) e cidr, hasCidr := d.GetOk("cidr_block") ipv6Cidr, hasIpv6Cidr := d.GetOk("ipv6_cidr_block") - if hasCidr == false && hasIpv6Cidr == false { + if !hasCidr && !hasIpv6Cidr { return fmt.Errorf("Either `cidr_block` or `ipv6_cidr_block` must be defined") } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go index e0ef1a265..ef983b6a4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go @@ -617,5 +617,4 @@ func resourceAwsOpsworksSetApplicationAttributes(d *schema.ResourceData, v map[s return } - return } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go index ccbddadce..f89bec61b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go @@ -585,11 +585,8 @@ func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) e for _, sg := range instance.SecurityGroupIds { sgs = append(sgs, *sg) } - if err := d.Set("security_group_ids", sgs); err != nil { - return err - } - - return nil + err1 := d.Set("security_group_ids", sgs) + return err1 } func resourceAwsOpsworksInstanceCreate(d *schema.ResourceData, meta interface{}) error { @@ -855,11 +852,7 @@ func resourceAwsOpsworksInstanceDelete(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Deleting OpsWorks instance: %s", d.Id()) _, err := client.DeleteInstance(req) - if err != nil { - return err - } - - return nil + return err } func resourceAwsOpsworksInstanceImport( diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go index 99ba4bf54..22d998386 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_permission.go @@ -98,7 +98,7 @@ func resourceAwsOpsworksPermissionRead(d *schema.ResourceData, meta interface{}) } - if false == found { + if !found { d.SetId("") log.Printf("[INFO] The correct permission could not be found for: %s on stack: %s", d.Get("user_arn"), d.Get("stack_id")) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go index 352dc0824..27933eef9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go @@ -65,7 +65,7 @@ func resourceAwsOpsworksRdsDbInstanceUpdate(d *schema.ResourceData, meta interfa requestUpdate = true } - if true == requestUpdate { + if requestUpdate { log.Printf("[DEBUG] Opsworks RDS DB Instance Modification request: %s", req) err := resource.Retry(2*time.Minute, func() *resource.RetryError { @@ -121,11 +121,7 @@ func resourceAwsOpsworksRdsDbInstanceDeregister(d *schema.ResourceData, meta int return nil }) - if err != nil { - return err - } - - return nil + return err } func resourceAwsOpsworksRdsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { @@ -157,7 +153,7 @@ func resourceAwsOpsworksRdsDbInstanceRead(d *schema.ResourceData, meta interface } - if false == found { + if !found { d.SetId("") log.Printf("[INFO] The rds instance '%s' could not be found for stack: '%s'", d.Get("rds_db_instance_arn"), d.Get("stack_id")) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go index d5bb938d9..69908963e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go @@ -262,7 +262,7 @@ func resourceAwsPinpointAppDelete(d *schema.ResourceData, meta interface{}) erro } func expandPinpointCampaignHook(configs []interface{}) *pinpoint.CampaignHook { - if configs == nil || len(configs) == 0 { + if len(configs) == 0 { return nil } @@ -300,7 +300,7 @@ func flattenPinpointCampaignHook(ch *pinpoint.CampaignHook) []interface{} { } func expandPinpointCampaignLimits(configs []interface{}) *pinpoint.CampaignLimits { - if configs == nil || len(configs) == 0 { + if len(configs) == 0 { return nil } @@ -343,7 +343,7 @@ func flattenPinpointCampaignLimits(cl *pinpoint.CampaignLimits) []interface{} { } func expandPinpointQuietTime(configs []interface{}) *pinpoint.QuietTime { - if configs == nil || len(configs) == 0 { + if len(configs) == 0 { return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go index ce4b751d4..58b579b80 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_placement_group.go @@ -144,9 +144,5 @@ func resourceAwsPlacementGroupDelete(d *schema.ResourceData, meta interface{}) e } _, err = wait.WaitForState() - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go new file mode 100644 index 000000000..9820e7c67 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ram_resource_share.go @@ -0,0 +1,241 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ram" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsRamResourceShare() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsRamResourceShareCreate, + Read: resourceAwsRamResourceShareRead, + Update: resourceAwsRamResourceShareUpdate, + Delete: resourceAwsRamResourceShareDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(5 * time.Minute), + Delete: schema.DefaultTimeout(5 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + + "allow_external_principals": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsRamResourceShareCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ramconn + + request := &ram.CreateResourceShareInput{ + Name: aws.String(d.Get("name").(string)), + AllowExternalPrincipals: aws.Bool(d.Get("allow_external_principals").(bool)), + } + + if v, ok := d.GetOk("tags"); ok { + tags := tagsFromMapRAM(v.(map[string]interface{})) + request.Tags = tags + } + + log.Println("[DEBUG] Create RAM resource share request:", request) + createResp, err := conn.CreateResourceShare(request) + if err != nil { + return fmt.Errorf("Error creating RAM resource share: %s", err) + } + + d.SetId(aws.StringValue(createResp.ResourceShare.ResourceShareArn)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{ram.ResourceShareStatusPending}, + Target: []string{ram.ResourceShareStatusActive}, + Refresh: resourceAwsRamResourceShareStateRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for RAM resource share (%s) to become ready: %s", d.Id(), err) + } + + return resourceAwsRamResourceShareRead(d, meta) +} + +func resourceAwsRamResourceShareRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ramconn + + request := &ram.GetResourceSharesInput{ + ResourceShareArns: []*string{aws.String(d.Id())}, + ResourceOwner: aws.String(ram.ResourceOwnerSelf), + } + + output, err := conn.GetResourceShares(request) + if err != nil { + if isAWSErr(err, ram.ErrCodeUnknownResourceException, "") { + log.Printf("[WARN] No RAM resource share by ARN (%s) found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error reading RAM resource share %s: %s", d.Id(), err) + } + + if len(output.ResourceShares) == 0 { + log.Printf("[WARN] No RAM resource share by ARN (%s) found, removing from state", d.Id()) + d.SetId("") + return nil + } + + resourceShare := output.ResourceShares[0] + + if aws.StringValue(resourceShare.Status) != ram.ResourceShareStatusActive { + log.Printf("[WARN] RAM resource share (%s) delet(ing|ed), removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("name", resourceShare.Name) + d.Set("allow_external_principals", resourceShare.AllowExternalPrincipals) + + if err := d.Set("tags", tagsToMapRAM(resourceShare.Tags)); err != nil { + return fmt.Errorf("Error setting tags: %s", err) + } + + return nil +} + +func resourceAwsRamResourceShareUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ramconn + + d.Partial(true) + + if d.HasChange("name") || d.HasChange("allow_external_principals") { + request := &ram.UpdateResourceShareInput{ + ResourceShareArn: aws.String(d.Id()), + Name: aws.String(d.Get("name").(string)), + AllowExternalPrincipals: aws.Bool(d.Get("allow_external_principals").(bool)), + } + + log.Println("[DEBUG] Update RAM resource share request:", request) + _, err := conn.UpdateResourceShare(request) + if err != nil { + if isAWSErr(err, ram.ErrCodeUnknownResourceException, "") { + log.Printf("[WARN] No RAM resource share by ARN (%s) found", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error updating RAM resource share %s: %s", d.Id(), err) + } + + d.SetPartial("name") + d.SetPartial("allow_external_principals") + } + + if d.HasChange("tags") { + // Reset all tags to empty set + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + c, r := diffTagsRAM(tagsFromMapRAM(o), tagsFromMapRAM(n)) + + if len(r) > 0 { + _, err := conn.UntagResource(&ram.UntagResourceInput{ + ResourceShareArn: aws.String(d.Id()), + TagKeys: tagKeysRam(r), + }) + if err != nil { + return fmt.Errorf("Error deleting RAM resource share tags: %s", err) + } + } + + if len(c) > 0 { + input := &ram.TagResourceInput{ + ResourceShareArn: aws.String(d.Id()), + Tags: c, + } + _, err := conn.TagResource(input) + if err != nil { + return fmt.Errorf("Error updating RAM resource share tags: %s", err) + } + } + + d.SetPartial("tags") + } + + d.Partial(false) + + return resourceAwsRamResourceShareRead(d, meta) +} + +func resourceAwsRamResourceShareDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ramconn + + deleteResourceShareInput := &ram.DeleteResourceShareInput{ + ResourceShareArn: aws.String(d.Id()), + } + + log.Println("[DEBUG] Delete RAM resource share request:", deleteResourceShareInput) + _, err := conn.DeleteResourceShare(deleteResourceShareInput) + if err != nil { + if isAWSErr(err, ram.ErrCodeUnknownResourceException, "") { + return nil + } + return fmt.Errorf("Error deleting RAM resource share %s: %s", d.Id(), err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ram.ResourceShareStatusDeleting}, + Target: []string{ram.ResourceShareStatusDeleted}, + Refresh: resourceAwsRamResourceShareStateRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for RAM resource share (%s) to become ready: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsRamResourceShareStateRefreshFunc(conn *ram.RAM, resourceShareArn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + request := &ram.GetResourceSharesInput{ + ResourceShareArns: []*string{aws.String(resourceShareArn)}, + ResourceOwner: aws.String(ram.ResourceOwnerSelf), + } + + output, err := conn.GetResourceShares(request) + + if err != nil { + return nil, ram.ResourceShareStatusFailed, err + } + + if len(output.ResourceShares) == 0 { + return nil, ram.ResourceShareStatusDeleted, nil + } + + resourceShare := output.ResourceShares[0] + + return resourceShare, aws.StringValue(resourceShare.Status), nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go index 2f46a8727..ba3f28c88 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go @@ -1,6 +1,7 @@ package aws import ( + "errors" "fmt" "log" "regexp" @@ -106,6 +107,11 @@ func resourceAwsRDSCluster() *schema.Resource { Computed: true, }, + "global_cluster_identifier": { + Type: schema.TypeString, + Optional: true, + }, + "reader_endpoint": { Type: schema.TypeString, Computed: true, @@ -130,6 +136,7 @@ func resourceAwsRDSCluster() *schema.Resource { ForceNew: true, Default: "provisioned", ValidateFunc: validation.StringInSlice([]string{ + "global", "parallelquery", "provisioned", "serverless", @@ -750,6 +757,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error createOpts.EngineVersion = aws.String(attr.(string)) } + if attr, ok := d.GetOk("global_cluster_identifier"); ok { + createOpts.GlobalClusterIdentifier = aws.String(attr.(string)) + } + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { createOpts.VpcSecurityGroupIds = expandStringList(attr.List()) } @@ -975,6 +986,21 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] Failed to save tags for RDS Cluster (%s): %s", aws.StringValue(dbc.DBClusterIdentifier), err) } + // Fetch and save Global Cluster if engine mode global + d.Set("global_cluster_identifier", "") + + if aws.StringValue(dbc.EngineMode) == "global" { + globalCluster, err := rdsDescribeGlobalClusterFromDbClusterARN(conn, aws.StringValue(dbc.DBClusterArn)) + + if err != nil { + return fmt.Errorf("error reading RDS Global Cluster information for DB Cluster (%s): %s", d.Id(), err) + } + + if globalCluster != nil { + d.Set("global_cluster_identifier", globalCluster.GlobalClusterIdentifier) + } + } + return nil } @@ -1084,6 +1110,30 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error } } + if d.HasChange("global_cluster_identifier") { + oRaw, nRaw := d.GetChange("global_cluster_identifier") + o := oRaw.(string) + n := nRaw.(string) + + if o == "" { + return errors.New("Existing RDS Clusters cannot be added to an existing RDS Global Cluster") + } + + if n != "" { + return errors.New("Existing RDS Clusters cannot be migrated between existing RDS Global Clusters") + } + + input := &rds.RemoveFromGlobalClusterInput{ + DbClusterIdentifier: aws.String(d.Get("arn").(string)), + GlobalClusterIdentifier: aws.String(o), + } + + log.Printf("[DEBUG] Removing RDS Cluster from RDS Global Cluster: %s", input) + if _, err := conn.RemoveFromGlobalCluster(input); err != nil { + return fmt.Errorf("error removing RDS Cluster (%s) from RDS Global Cluster: %s", d.Id(), err) + } + } + if d.HasChange("iam_roles") { oraw, nraw := d.GetChange("iam_roles") if oraw == nil { @@ -1128,6 +1178,22 @@ func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error conn := meta.(*AWSClient).rdsconn log.Printf("[DEBUG] Destroying RDS Cluster (%s)", d.Id()) + // Automatically remove from global cluster to bypass this error on deletion: + // InvalidDBClusterStateFault: This cluster is a part of a global cluster, please remove it from globalcluster first + if d.Get("global_cluster_identifier").(string) != "" { + input := &rds.RemoveFromGlobalClusterInput{ + DbClusterIdentifier: aws.String(d.Get("arn").(string)), + GlobalClusterIdentifier: aws.String(d.Get("global_cluster_identifier").(string)), + } + + log.Printf("[DEBUG] Removing RDS Cluster from RDS Global Cluster: %s", input) + _, err := conn.RemoveFromGlobalCluster(input) + + if err != nil && !isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { + return fmt.Errorf("error removing RDS Cluster (%s) from RDS Global Cluster: %s", d.Id(), err) + } + } + deleteOpts := rds.DeleteDBClusterInput{ DBClusterIdentifier: aws.String(d.Id()), } @@ -1135,7 +1201,7 @@ func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) deleteOpts.SkipFinalSnapshot = aws.Bool(skipFinalSnapshot) - if skipFinalSnapshot == false { + if !skipFinalSnapshot { if name, present := d.GetOk("final_snapshot_identifier"); present { deleteOpts.FinalDBSnapshotIdentifier = aws.String(name.(string)) } else { @@ -1220,11 +1286,7 @@ func setIamRoleToRdsCluster(clusterIdentifier string, roleArn string, conn *rds. RoleArn: aws.String(roleArn), } _, err := conn.AddRoleToDBCluster(params) - if err != nil { - return err - } - - return nil + return err } func removeIamRoleFromRdsCluster(clusterIdentifier string, roleArn string, conn *rds.RDS) error { @@ -1233,11 +1295,7 @@ func removeIamRoleFromRdsCluster(clusterIdentifier string, roleArn string, conn RoleArn: aws.String(roleArn), } _, err := conn.RemoveRoleFromDBCluster(params) - if err != nil { - return err - } - - return nil + return err } var resourceAwsRdsClusterCreatePendingStates = []string{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go index 5bd7c11aa..13dc9a4c2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go @@ -353,7 +353,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) for _, m := range dbc.DBClusterMembers { if *db.DBInstanceIdentifier == *m.DBInstanceIdentifier { - if *m.IsClusterWriter == true { + if *m.IsClusterWriter { d.Set("writer", true) } else { d.Set("writer", false) @@ -552,11 +552,8 @@ func resourceAwsRDSClusterInstanceDelete(d *schema.ResourceData, meta interface{ Delay: 30 * time.Second, // Wait 30 secs before starting } - if _, err := stateConf.WaitForState(); err != nil { - return err - } - - return nil + _, err := stateConf.WaitForState() + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go index 358abc5e0..160cea0a2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go @@ -212,9 +212,9 @@ func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta inte } else { paramsToModify, parameters = parameters[:rdsClusterParameterGroupMaxParamsBulkEdit], parameters[rdsClusterParameterGroupMaxParamsBulkEdit:] } - parameterGroupName := d.Get("name").(string) + modifyOpts := rds.ModifyDBClusterParameterGroupInput{ - DBClusterParameterGroupName: aws.String(parameterGroupName), + DBClusterParameterGroupName: aws.String(d.Id()), Parameters: paramsToModify, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go new file mode 100644 index 000000000..119415992 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_global_cluster.go @@ -0,0 +1,349 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsRDSGlobalCluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsRDSGlobalClusterCreate, + Read: resourceAwsRDSGlobalClusterRead, + Update: resourceAwsRDSGlobalClusterUpdate, + Delete: resourceAwsRDSGlobalClusterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "database_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "deletion_protection": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "engine": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "aurora", + ValidateFunc: validation.StringInSlice([]string{ + "aurora", + }, false), + }, + "engine_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "global_cluster_identifier": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "global_cluster_resource_id": { + Type: schema.TypeString, + Computed: true, + }, + "storage_encrypted": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsRDSGlobalClusterCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + input := &rds.CreateGlobalClusterInput{ + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), + GlobalClusterIdentifier: aws.String(d.Get("global_cluster_identifier").(string)), + StorageEncrypted: aws.Bool(d.Get("storage_encrypted").(bool)), + } + + if v, ok := d.GetOk("database_name"); ok { + input.DatabaseName = aws.String(v.(string)) + } + + if v, ok := d.GetOk("engine"); ok { + input.Engine = aws.String(v.(string)) + } + + if v, ok := d.GetOk("engine_version"); ok { + input.EngineVersion = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating RDS Global Cluster: %s", input) + output, err := conn.CreateGlobalCluster(input) + if err != nil { + return fmt.Errorf("error creating RDS Global Cluster: %s", err) + } + + d.SetId(aws.StringValue(output.GlobalCluster.GlobalClusterIdentifier)) + + if err := waitForRdsGlobalClusterCreation(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for RDS Global Cluster (%s) availability: %s", d.Id(), err) + } + + return resourceAwsRDSGlobalClusterRead(d, meta) +} + +func resourceAwsRDSGlobalClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + globalCluster, err := rdsDescribeGlobalCluster(conn, d.Id()) + + if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { + log.Printf("[WARN] RDS Global Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading RDS Global Cluster: %s", err) + } + + if globalCluster == nil { + log.Printf("[WARN] RDS Global Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if aws.StringValue(globalCluster.Status) == "deleting" || aws.StringValue(globalCluster.Status) == "deleted" { + log.Printf("[WARN] RDS Global Cluster (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(globalCluster.Status)) + d.SetId("") + return nil + } + + d.Set("arn", globalCluster.GlobalClusterArn) + d.Set("database_name", globalCluster.DatabaseName) + d.Set("deletion_protection", globalCluster.DeletionProtection) + d.Set("engine", globalCluster.Engine) + d.Set("engine_version", globalCluster.EngineVersion) + d.Set("global_cluster_identifier", globalCluster.GlobalClusterIdentifier) + d.Set("global_cluster_resource_id", globalCluster.GlobalClusterResourceId) + d.Set("storage_encrypted", globalCluster.StorageEncrypted) + + return nil +} + +func resourceAwsRDSGlobalClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + input := &rds.ModifyGlobalClusterInput{ + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), + GlobalClusterIdentifier: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Updating RDS Global Cluster (%s): %s", d.Id(), input) + _, err := conn.ModifyGlobalCluster(input) + + if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting RDS Global Cluster: %s", err) + } + + if err := waitForRdsGlobalClusterUpdate(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for RDS Global Cluster (%s) update: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsRDSGlobalClusterDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + input := &rds.DeleteGlobalClusterInput{ + GlobalClusterIdentifier: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting RDS Global Cluster (%s): %s", d.Id(), input) + + // Allow for eventual consistency + // InvalidGlobalClusterStateFault: Global Cluster arn:aws:rds::123456789012:global-cluster:tf-acc-test-5618525093076697001-0 is not empty + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteGlobalCluster(input) + + if isAWSErr(err, rds.ErrCodeInvalidGlobalClusterStateFault, "is not empty") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting RDS Global Cluster: %s", err) + } + + if err := waitForRdsGlobalClusterDeletion(conn, d.Id()); err != nil { + return fmt.Errorf("error waiting for RDS Global Cluster (%s) deletion: %s", d.Id(), err) + } + + return nil +} + +func rdsDescribeGlobalCluster(conn *rds.RDS, globalClusterID string) (*rds.GlobalCluster, error) { + var globalCluster *rds.GlobalCluster + + input := &rds.DescribeGlobalClustersInput{ + GlobalClusterIdentifier: aws.String(globalClusterID), + } + + log.Printf("[DEBUG] Reading RDS Global Cluster (%s): %s", globalClusterID, input) + err := conn.DescribeGlobalClustersPages(input, func(page *rds.DescribeGlobalClustersOutput, lastPage bool) bool { + if page == nil { + return !lastPage + } + + for _, gc := range page.GlobalClusters { + if gc == nil { + continue + } + + if aws.StringValue(gc.GlobalClusterIdentifier) == globalClusterID { + globalCluster = gc + return false + } + } + + return !lastPage + }) + + return globalCluster, err +} + +func rdsDescribeGlobalClusterFromDbClusterARN(conn *rds.RDS, dbClusterARN string) (*rds.GlobalCluster, error) { + var globalCluster *rds.GlobalCluster + + input := &rds.DescribeGlobalClustersInput{ + Filters: []*rds.Filter{ + { + Name: aws.String("db-cluster-id"), + Values: []*string{aws.String(dbClusterARN)}, + }, + }, + } + + log.Printf("[DEBUG] Reading RDS Global Clusters: %s", input) + err := conn.DescribeGlobalClustersPages(input, func(page *rds.DescribeGlobalClustersOutput, lastPage bool) bool { + if page == nil { + return !lastPage + } + + for _, gc := range page.GlobalClusters { + if gc == nil { + continue + } + + for _, globalClusterMember := range gc.GlobalClusterMembers { + if aws.StringValue(globalClusterMember.DBClusterArn) == dbClusterARN { + globalCluster = gc + return false + } + } + } + + return !lastPage + }) + + return globalCluster, err +} + +func rdsGlobalClusterRefreshFunc(conn *rds.RDS, globalClusterID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + globalCluster, err := rdsDescribeGlobalCluster(conn, globalClusterID) + + if isAWSErr(err, rds.ErrCodeGlobalClusterNotFoundFault, "") { + return nil, "deleted", nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading RDS Global Cluster (%s): %s", globalClusterID, err) + } + + if globalCluster == nil { + return nil, "deleted", nil + } + + return globalCluster, aws.StringValue(globalCluster.Status), nil + } +} + +func waitForRdsGlobalClusterCreation(conn *rds.RDS, globalClusterID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"creating"}, + Target: []string{"available"}, + Refresh: rdsGlobalClusterRefreshFunc(conn, globalClusterID), + Timeout: 10 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for RDS Global Cluster (%s) availability", globalClusterID) + _, err := stateConf.WaitForState() + + return err +} + +func waitForRdsGlobalClusterUpdate(conn *rds.RDS, globalClusterID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"modifying"}, + Target: []string{"available"}, + Refresh: rdsGlobalClusterRefreshFunc(conn, globalClusterID), + Timeout: 10 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for RDS Global Cluster (%s) availability", globalClusterID) + _, err := stateConf.WaitForState() + + return err +} + +func waitForRdsGlobalClusterDeletion(conn *rds.RDS, globalClusterID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + "available", + "deleting", + }, + Target: []string{"deleted"}, + Refresh: rdsGlobalClusterRefreshFunc(conn, globalClusterID), + Timeout: 10 * time.Minute, + NotFoundChecks: 1, + } + + log.Printf("[DEBUG] Waiting for RDS Global Cluster (%s) deletion", globalClusterID) + _, err := stateConf.WaitForState() + + if isResourceNotFoundError(err) { + return nil + } + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go index 285849cc2..fbe782fd6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go @@ -153,8 +153,7 @@ func resourceAwsRedshiftCluster() *schema.Resource { "encrypted": { Type: schema.TypeBool, Optional: true, - Computed: true, - ForceNew: true, + Default: false, }, "enhanced_vpc_routing": { @@ -167,7 +166,6 @@ func resourceAwsRedshiftCluster() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ForceNew: true, ValidateFunc: validateArn, }, @@ -713,6 +711,16 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) requestUpdate = true } + if d.HasChange("encrypted") { + req.Encrypted = aws.Bool(d.Get("encrypted").(bool)) + requestUpdate = true + } + + if d.Get("encrypted").(bool) && d.HasChange("kms_key_id") { + req.KmsKeyId = aws.String(d.Get("kms_key_id").(string)) + requestUpdate = true + } + if requestUpdate { log.Printf("[INFO] Modifying Redshift Cluster: %s", d.Id()) log.Printf("[DEBUG] Redshift Cluster Modify options: %s", req) @@ -893,7 +901,7 @@ func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) skipFinalSnapshot := d.Get("skip_final_snapshot").(bool) deleteOpts.SkipFinalClusterSnapshot = aws.Bool(skipFinalSnapshot) - if skipFinalSnapshot == false { + if !skipFinalSnapshot { if name, present := d.GetOk("final_snapshot_identifier"); present { deleteOpts.FinalClusterSnapshotIdentifier = aws.String(name.(string)) } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go index 0e0b750c0..a9d4ad026 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -121,11 +121,7 @@ func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta int log.Printf("[DEBUG] Checking if grant is deleted: %s", grantName) err = waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn, grantName) - if err != nil { - return err - } - - return nil + return err } func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go new file mode 100644 index 000000000..ac3138ed4 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_resourcegroups_group.go @@ -0,0 +1,178 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/resourcegroups" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsResourceGroupsGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsResourceGroupsGroupCreate, + Read: resourceAwsResourceGroupsGroupRead, + Update: resourceAwsResourceGroupsGroupUpdate, + Delete: resourceAwsResourceGroupsGroupDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + }, + + "resource_query": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "query": { + Type: schema.TypeString, + Required: true, + }, + + "type": { + Type: schema.TypeString, + Optional: true, + Default: resourcegroups.QueryTypeTagFilters10, + ValidateFunc: validation.StringInSlice([]string{ + resourcegroups.QueryTypeTagFilters10, + }, false), + }, + }, + }, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func extractResourceGroupResourceQuery(resourceQueryList []interface{}) *resourcegroups.ResourceQuery { + resourceQuery := resourceQueryList[0].(map[string]interface{}) + + return &resourcegroups.ResourceQuery{ + Query: aws.String(resourceQuery["query"].(string)), + Type: aws.String(resourceQuery["type"].(string)), + } +} + +func resourceAwsResourceGroupsGroupCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).resourcegroupsconn + + input := resourcegroups.CreateGroupInput{ + Description: aws.String(d.Get("description").(string)), + Name: aws.String(d.Get("name").(string)), + ResourceQuery: extractResourceGroupResourceQuery(d.Get("resource_query").([]interface{})), + } + + res, err := conn.CreateGroup(&input) + if err != nil { + return fmt.Errorf("error creating resource group: %s", err) + } + + d.SetId(aws.StringValue(res.Group.Name)) + + return resourceAwsResourceGroupsGroupRead(d, meta) +} + +func resourceAwsResourceGroupsGroupRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).resourcegroupsconn + + g, err := conn.GetGroup(&resourcegroups.GetGroupInput{ + GroupName: aws.String(d.Id()), + }) + + if err != nil { + if isAWSErr(err, resourcegroups.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Resource Groups Group (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error reading resource group (%s): %s", d.Id(), err) + } + + d.Set("name", aws.StringValue(g.Group.Name)) + d.Set("description", aws.StringValue(g.Group.Description)) + d.Set("arn", aws.StringValue(g.Group.GroupArn)) + + q, err := conn.GetGroupQuery(&resourcegroups.GetGroupQueryInput{ + GroupName: aws.String(d.Id()), + }) + + if err != nil { + return fmt.Errorf("error reading resource query for resource group (%s): %s", d.Id(), err) + } + + resultQuery := map[string]interface{}{} + resultQuery["query"] = aws.StringValue(q.GroupQuery.ResourceQuery.Query) + resultQuery["type"] = aws.StringValue(q.GroupQuery.ResourceQuery.Type) + if err := d.Set("resource_query", []map[string]interface{}{resultQuery}); err != nil { + return fmt.Errorf("error setting resource_query: %s", err) + } + + return nil +} + +func resourceAwsResourceGroupsGroupUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).resourcegroupsconn + + if d.HasChange("description") { + input := resourcegroups.UpdateGroupInput{ + GroupName: aws.String(d.Id()), + Description: aws.String(d.Get("description").(string)), + } + + _, err := conn.UpdateGroup(&input) + if err != nil { + return fmt.Errorf("error updating resource group (%s): %s", d.Id(), err) + } + } + + if d.HasChange("resource_query") { + input := resourcegroups.UpdateGroupQueryInput{ + GroupName: aws.String(d.Id()), + ResourceQuery: extractResourceGroupResourceQuery(d.Get("resource_query").([]interface{})), + } + + _, err := conn.UpdateGroupQuery(&input) + if err != nil { + return fmt.Errorf("error updating resource query for resource group (%s): %s", d.Id(), err) + } + } + + return resourceAwsResourceGroupsGroupRead(d, meta) +} + +func resourceAwsResourceGroupsGroupDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).resourcegroupsconn + + input := resourcegroups.DeleteGroupInput{ + GroupName: aws.String(d.Id()), + } + + _, err := conn.DeleteGroup(&input) + if err != nil { + return fmt.Errorf("error deleting resource group (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go index 1c91d70bf..15fc8ee6c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go @@ -424,11 +424,7 @@ func resourceAwsRouteUpdate(d *schema.ResourceData, meta interface{}) error { // Replace the route _, err := conn.ReplaceRoute(replaceOpts) - if err != nil { - return err - } - - return nil + return err } func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { @@ -445,8 +441,7 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { } log.Printf("[DEBUG] Route delete opts: %s", deleteOpts) - var err error - err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { + var err error = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { log.Printf("[DEBUG] Trying to delete route with opts %s", deleteOpts) resp, err := conn.DeleteRoute(deleteOpts) log.Printf("[DEBUG] Route delete result: %s", resp) @@ -468,11 +463,7 @@ func resourceAwsRouteDelete(d *schema.ResourceData, meta interface{}) error { return resource.NonRetryableError(err) }) - if err != nil { - return err - } - - return nil + return err } func resourceAwsRouteExists(d *schema.ResourceData, meta interface{}) (bool, error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go index 98f0d15b7..d9c609907 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go @@ -386,9 +386,5 @@ func resourceAwsRoute53HealthCheckDelete(d *schema.ResourceData, meta interface{ log.Printf("[DEBUG] Deleteing Route53 health check: %s", d.Id()) _, err := conn.DeleteHealthCheck(&route53.DeleteHealthCheckInput{HealthCheckId: aws.String(d.Id())}) - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go index c6e22501e..671cc7af8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go @@ -110,7 +110,7 @@ func resourceAwsRoute53Record() *schema.Resource { Required: true, StateFunc: normalizeAwsAliasName, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - return strings.ToLower(old) == strings.ToLower(new) + return strings.EqualFold(old, new) }, }, @@ -262,7 +262,7 @@ func resourceAwsRoute53RecordUpdate(d *schema.ResourceData, meta interface{}) er if !d.HasChange("type") && !d.HasChange("set_identifier") { // If neither type nor set_identifier changed we use UPSERT, - // for resouce update here we simply fall through to + // for resource update here we simply fall through to // our resource create function. return resourceAwsRoute53RecordCreate(d, meta) } @@ -748,10 +748,6 @@ func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) er } err = waitForRoute53RecordSetToSync(conn, cleanChangeID(*changeInfo.Id)) - if err != nil { - return err - } - return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go index 8e60d8ce0..a550f9afa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go @@ -129,8 +129,8 @@ func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) erro // Private Route53 Hosted Zones can only be created with their first VPC association, // however we need to associate the remaining after creation. - var vpcs []*route53.VPC - vpcs = expandRoute53VPCs(d.Get("vpc").(*schema.Set).List(), region) + + var vpcs []*route53.VPC = expandRoute53VPCs(d.Get("vpc").(*schema.Set).List(), region) // Backwards compatibility if vpcID, ok := d.GetOk("vpc_id"); ok { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go index c5763c29e..ccac3f10a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone_association.go @@ -134,11 +134,7 @@ func resourceAwsRoute53ZoneAssociationDelete(d *schema.ResourceData, meta interf } _, err := r53.DisassociateVPCFromHostedZone(req) - if err != nil { - return err - } - - return nil + return err } func resourceAwsRoute53ZoneAssociationParseId(id string) (zone_id, vpc_id string) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go new file mode 100644 index 000000000..e809824b2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_account_public_access_block.go @@ -0,0 +1,182 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3control" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsS3AccountPublicAccessBlock() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsS3AccountPublicAccessBlockCreate, + Read: resourceAwsS3AccountPublicAccessBlockRead, + Update: resourceAwsS3AccountPublicAccessBlockUpdate, + Delete: resourceAwsS3AccountPublicAccessBlockDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "account_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateAwsAccountId, + }, + "block_public_acls": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "block_public_policy": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "ignore_public_acls": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "restrict_public_buckets": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func resourceAwsS3AccountPublicAccessBlockCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3controlconn + + accountID := meta.(*AWSClient).accountid + if v, ok := d.GetOk("account_id"); ok { + accountID = v.(string) + } + + input := &s3control.PutPublicAccessBlockInput{ + AccountId: aws.String(accountID), + PublicAccessBlockConfiguration: &s3control.PublicAccessBlockConfiguration{ + BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), + BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), + IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), + RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), + }, + } + + log.Printf("[DEBUG] Creating S3 Account Public Access Block: %s", input) + _, err := conn.PutPublicAccessBlock(input) + if err != nil { + return fmt.Errorf("error creating S3 Account Public Access Block: %s", err) + } + + d.SetId(accountID) + + return resourceAwsS3AccountPublicAccessBlockRead(d, meta) +} + +func resourceAwsS3AccountPublicAccessBlockRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3controlconn + + input := &s3control.GetPublicAccessBlockInput{ + AccountId: aws.String(d.Id()), + } + + // Retry for eventual consistency on creation + var output *s3control.GetPublicAccessBlockOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + output, err = conn.GetPublicAccessBlock(input) + + if d.IsNewResource() && isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { + log.Printf("[WARN] S3 Account Public Access Block (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading S3 Account Public Access Block: %s", err) + } + + if output == nil || output.PublicAccessBlockConfiguration == nil { + return fmt.Errorf("error reading S3 Account Public Access Block (%s): missing public access block configuration", d.Id()) + } + + d.Set("account_id", d.Id()) + d.Set("block_public_acls", output.PublicAccessBlockConfiguration.BlockPublicAcls) + d.Set("block_public_policy", output.PublicAccessBlockConfiguration.BlockPublicPolicy) + d.Set("ignore_public_acls", output.PublicAccessBlockConfiguration.IgnorePublicAcls) + d.Set("restrict_public_buckets", output.PublicAccessBlockConfiguration.RestrictPublicBuckets) + + return nil +} + +func resourceAwsS3AccountPublicAccessBlockUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3controlconn + + input := &s3control.PutPublicAccessBlockInput{ + AccountId: aws.String(d.Id()), + PublicAccessBlockConfiguration: &s3control.PublicAccessBlockConfiguration{ + BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), + BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), + IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), + RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), + }, + } + + log.Printf("[DEBUG] Updating S3 Account Public Access Block: %s", input) + _, err := conn.PutPublicAccessBlock(input) + if err != nil { + return fmt.Errorf("error updating S3 Account Public Access Block (%s): %s", d.Id(), err) + } + + // Workaround API eventual consistency issues. This type of logic should not normally be used. + // We cannot reliably determine when the Read after Update might be properly updated. + // Rather than introduce complicated retry logic, we presume that a lack of an update error + // means our update succeeded with our expected values. + d.Set("block_public_acls", input.PublicAccessBlockConfiguration.BlockPublicAcls) + d.Set("block_public_policy", input.PublicAccessBlockConfiguration.BlockPublicPolicy) + d.Set("ignore_public_acls", input.PublicAccessBlockConfiguration.IgnorePublicAcls) + d.Set("restrict_public_buckets", input.PublicAccessBlockConfiguration.RestrictPublicBuckets) + + // Skip normal Read after Update due to eventual consistency issues + return nil +} + +func resourceAwsS3AccountPublicAccessBlockDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).s3controlconn + + input := &s3control.DeletePublicAccessBlockInput{ + AccountId: aws.String(d.Id()), + } + + _, err := conn.DeletePublicAccessBlock(input) + + if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting S3 Account Public Access Block (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go index 32e504022..dc6a8ade9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go @@ -243,6 +243,7 @@ func resourceAwsS3Bucket() *schema.Resource { Type: schema.TypeSet, Optional: true, Set: expirationHash, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "date": { @@ -264,6 +265,7 @@ func resourceAwsS3Bucket() *schema.Resource { }, "noncurrent_version_expiration": { Type: schema.TypeSet, + MaxItems: 1, Optional: true, Set: expirationHash, Elem: &schema.Resource{ @@ -530,6 +532,64 @@ func resourceAwsS3Bucket() *schema.Resource { }, }, + "object_lock_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "object_lock_enabled": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.ObjectLockEnabledEnabled, + }, false), + }, + + "rule": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "default_retention": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mode": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.ObjectLockModeGovernance, + s3.ObjectLockModeCompliance, + }, false), + }, + + "days": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(1), + }, + + "years": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(1), + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "tags": tagsSchema(), }, } @@ -577,6 +637,12 @@ func resourceAwsS3BucketCreate(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("Error validating S3 bucket name: %s", err) } + // S3 Object Lock can only be enabled on bucket creation. + objectLockConfiguration := expandS3ObjectLockConfiguration(d.Get("object_lock_configuration").([]interface{})) + if objectLockConfiguration != nil && aws.StringValue(objectLockConfiguration.ObjectLockEnabled) == s3.ObjectLockEnabledEnabled { + req.ObjectLockEnabledForBucket = aws.Bool(true) + } + err := resource.Retry(5*time.Minute, func() *resource.RetryError { log.Printf("[DEBUG] Trying to create new S3 bucket: %q", bucket) _, err := s3conn.CreateBucket(req) @@ -675,6 +741,12 @@ func resourceAwsS3BucketUpdate(d *schema.ResourceData, meta interface{}) error { } } + if d.HasChange("object_lock_configuration") { + if err := resourceAwsS3BucketObjectLockConfigurationUpdate(s3conn, d); err != nil { + return err + } + } + return resourceAwsS3BucketRead(d, meta) } @@ -870,7 +942,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { }) // Amazon S3 Transfer Acceleration might not be supported in the region - if err != nil && !isAWSErr(err, "UnsupportedArgument", "") { + if err != nil && !isAWSErr(err, "MethodNotAllowed", "") && !isAWSErr(err, "UnsupportedArgument", "") { return fmt.Errorf("error getting S3 Bucket acceleration configuration: %s", err) } if accelerate, ok := accelerateResponse.(*s3.GetBucketAccelerateConfigurationOutput); ok { @@ -1082,6 +1154,15 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error setting server_side_encryption_configuration: %s", err) } + // Object Lock configuration. + if conf, err := readS3ObjectLockConfiguration(s3conn, d.Id()); err != nil { + return fmt.Errorf("error getting S3 Bucket Object Lock configuration: %s", err) + } else { + if err := d.Set("object_lock_configuration", conf); err != nil { + return fmt.Errorf("error setting object_lock_configuration: %s", err) + } + } + // Add the region as an attribute locationResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { @@ -1729,6 +1810,23 @@ func resourceAwsS3BucketServerSideEncryptionConfigurationUpdate(s3conn *s3.S3, d return nil } +func resourceAwsS3BucketObjectLockConfigurationUpdate(s3conn *s3.S3, d *schema.ResourceData) error { + // S3 Object Lock configuration cannot be deleted, only updated. + req := &s3.PutObjectLockConfigurationInput{ + Bucket: aws.String(d.Get("bucket").(string)), + ObjectLockConfiguration: expandS3ObjectLockConfiguration(d.Get("object_lock_configuration").([]interface{})), + } + + _, err := retryOnAwsCode(s3.ErrCodeNoSuchBucket, func() (interface{}, error) { + return s3conn.PutObjectLockConfiguration(req) + }) + if err != nil { + return fmt.Errorf("error putting S3 object lock configuration: %s", err) + } + + return nil +} + func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema.ResourceData) error { bucket := d.Get("bucket").(string) replicationConfiguration := d.Get("replication_configuration").([]interface{}) @@ -2370,3 +2468,87 @@ func sourceSseKmsObjectsHash(v interface{}) int { type S3Website struct { Endpoint, Domain string } + +// +// S3 Object Lock functions. +// + +func readS3ObjectLockConfiguration(conn *s3.S3, bucket string) (interface{}, error) { + resp, err := retryOnAwsCode(s3.ErrCodeNoSuchBucket, func() (interface{}, error) { + return conn.GetObjectLockConfiguration(&s3.GetObjectLockConfigurationInput{ + Bucket: aws.String(bucket), + }) + }) + if err != nil { + if isAWSErr(err, "ObjectLockConfigurationNotFoundError", "") { + return nil, nil + } + return nil, err + } + + return flattenS3ObjectLockConfiguration(resp.(*s3.GetObjectLockConfigurationOutput).ObjectLockConfiguration), nil +} + +func expandS3ObjectLockConfiguration(vConf []interface{}) *s3.ObjectLockConfiguration { + if len(vConf) == 0 || vConf[0] == nil { + return nil + } + + mConf := vConf[0].(map[string]interface{}) + + conf := &s3.ObjectLockConfiguration{} + + if vObjectLockEnabled, ok := mConf["object_lock_enabled"].(string); ok && vObjectLockEnabled != "" { + conf.ObjectLockEnabled = aws.String(vObjectLockEnabled) + } + + if vRule, ok := mConf["rule"].([]interface{}); ok && len(vRule) > 0 { + mRule := vRule[0].(map[string]interface{}) + + if vDefaultRetention, ok := mRule["default_retention"].([]interface{}); ok && len(vDefaultRetention) > 0 && vDefaultRetention[0] != nil { + mDefaultRetention := vDefaultRetention[0].(map[string]interface{}) + + conf.Rule = &s3.ObjectLockRule{ + DefaultRetention: &s3.DefaultRetention{}, + } + + if vMode, ok := mDefaultRetention["mode"].(string); ok && vMode != "" { + conf.Rule.DefaultRetention.Mode = aws.String(vMode) + } + if vDays, ok := mDefaultRetention["days"].(int); ok && vDays > 0 { + conf.Rule.DefaultRetention.Days = aws.Int64(int64(vDays)) + } + if vYears, ok := mDefaultRetention["years"].(int); ok && vYears > 0 { + conf.Rule.DefaultRetention.Years = aws.Int64(int64(vYears)) + } + } + } + + return conf +} + +func flattenS3ObjectLockConfiguration(conf *s3.ObjectLockConfiguration) []interface{} { + if conf == nil { + return []interface{}{} + } + + mConf := map[string]interface{}{ + "object_lock_enabled": aws.StringValue(conf.ObjectLockEnabled), + } + + if conf.Rule != nil && conf.Rule.DefaultRetention != nil { + mRule := map[string]interface{}{ + "default_retention": []interface{}{ + map[string]interface{}{ + "mode": aws.StringValue(conf.Rule.DefaultRetention.Mode), + "days": int(aws.Int64Value(conf.Rule.DefaultRetention.Days)), + "years": int(aws.Int64Value(conf.Rule.DefaultRetention.Years)), + }, + }, + } + + mConf["rule"] = []interface{}{mRule} + } + + return []interface{}{mConf} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go index 3e681505b..b00d23c0e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go @@ -358,7 +358,7 @@ func flattenS3InventoryFilter(filter *s3.InventoryFilter) []map[string]interface result := make([]map[string]interface{}, 0, 1) - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if filter.Prefix != nil { m["prefix"] = aws.StringValue(filter.Prefix) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go index 278823b5d..8bba0078f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go @@ -22,12 +22,12 @@ import ( func resourceAwsS3BucketObject() *schema.Resource { return &schema.Resource{ - Create: resourceAwsS3BucketObjectPut, + Create: resourceAwsS3BucketObjectCreate, Read: resourceAwsS3BucketObjectRead, - Update: resourceAwsS3BucketObjectPut, + Update: resourceAwsS3BucketObjectUpdate, Delete: resourceAwsS3BucketObjectDelete, - CustomizeDiff: updateComputedAttributes, + CustomizeDiff: resourceAwsS3BucketObjectCustomizeDiff, Schema: map[string]*schema.Schema{ "bucket": { @@ -36,9 +36,15 @@ func resourceAwsS3BucketObject() *schema.Resource { ForceNew: true, }, + "key": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "acl": { Type: schema.TypeString, - Default: "private", + Default: s3.ObjectCannedACLPrivate, Optional: true, ValidateFunc: validation.StringInSlice([]string{ s3.ObjectCannedACLPrivate, @@ -77,12 +83,6 @@ func resourceAwsS3BucketObject() *schema.Resource { Computed: true, }, - "key": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - }, - "source": { Type: schema.TypeString, Optional: true, @@ -156,13 +156,6 @@ func resourceAwsS3BucketObject() *schema.Resource { } } -func updateComputedAttributes(d *schema.ResourceDiff, meta interface{}) error { - if d.HasChange("etag") { - d.SetNewComputed("version_id") - } - return nil -} - func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn @@ -178,10 +171,16 @@ func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) erro } file, err := os.Open(path) if err != nil { - return fmt.Errorf("Error opening S3 bucket object source (%s): %s", source, err) + return fmt.Errorf("Error opening S3 bucket object source (%s): %s", path, err) } body = file + defer func() { + err := file.Close() + if err != nil { + log.Printf("[WARN] Error closing S3 bucket object source (%s): %s", path, err) + } + }() } else if v, ok := d.GetOk("content"); ok { content := v.(string) body = bytes.NewReader([]byte(content)) @@ -258,19 +257,18 @@ func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) erro putInput.WebsiteRedirectLocation = aws.String(v.(string)) } - resp, err := s3conn.PutObject(putInput) - if err != nil { + if _, err := s3conn.PutObject(putInput); err != nil { return fmt.Errorf("Error putting object in S3 bucket (%s): %s", bucket, err) } - // See https://forums.aws.amazon.com/thread.jspa?threadID=44003 - d.Set("etag", strings.Trim(*resp.ETag, `"`)) - - d.Set("version_id", resp.VersionId) d.SetId(key) return resourceAwsS3BucketObjectRead(d, meta) } +func resourceAwsS3BucketObjectCreate(d *schema.ResourceData, meta interface{}) error { + return resourceAwsS3BucketObjectPut(d, meta) +} + func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn @@ -321,7 +319,8 @@ func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) err d.Set("kms_key_id", resp.SSEKMSKeyId) } } - d.Set("etag", strings.Trim(*resp.ETag, `"`)) + // See https://forums.aws.amazon.com/thread.jspa?threadID=44003 + d.Set("etag", strings.Trim(aws.StringValue(resp.ETag), `"`)) // The "STANDARD" (which is also the default) storage // class when set would not be included in the results. @@ -331,25 +330,66 @@ func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) err } if !restricted { - tagResp, err := s3conn.GetObjectTagging( - &s3.GetObjectTaggingInput{ - Bucket: aws.String(bucket), - Key: aws.String(key), - }) - if err != nil { - return fmt.Errorf("Failed to get object tags (bucket: %s, key: %s): %s", bucket, key, err) + if err := getTagsS3Object(s3conn, d); err != nil { + return fmt.Errorf("error getting S3 object tags (bucket: %s, key: %s): %s", bucket, key, err) } - d.Set("tags", tagsToMapS3(tagResp.TagSet)) } return nil } +func resourceAwsS3BucketObjectUpdate(d *schema.ResourceData, meta interface{}) error { + // Changes to any of these attributes requires creation of a new object version (if bucket is versioned): + for _, key := range []string{ + "cache_control", + "content_disposition", + "content_encoding", + "content_language", + "content_type", + "source", + "content", + "content_base64", + "storage_class", + "server_side_encryption", + "kms_key_id", + "etag", + "website_redirect", + } { + if d.HasChange(key) { + return resourceAwsS3BucketObjectPut(d, meta) + } + } + + conn := meta.(*AWSClient).s3conn + + if d.HasChange("acl") { + _, err := conn.PutObjectAcl(&s3.PutObjectAclInput{ + Bucket: aws.String(d.Get("bucket").(string)), + Key: aws.String(d.Get("key").(string)), + ACL: aws.String(d.Get("acl").(string)), + }) + if err != nil { + return fmt.Errorf("error putting S3 object ACL: %s", err) + } + } + + if err := setTagsS3Object(conn, d); err != nil { + return fmt.Errorf("error setting S3 object tags: %s", err) + } + + return resourceAwsS3BucketObjectRead(d, meta) +} + func resourceAwsS3BucketObjectDelete(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn bucket := d.Get("bucket").(string) key := d.Get("key").(string) + // We are effectively ignoring any leading '/' in the key name as aws.Config.DisableRestProtocolURICleaning is false + // so we need to explicitly ignore any leading '/' in the s3.ListObjectVersions call. + if strings.HasPrefix(key, "/") { + key = key[1:] + } if _, ok := d.GetOk("version_id"); ok { // Bucket is versioned, we need to delete all versions @@ -388,3 +428,11 @@ func resourceAwsS3BucketObjectDelete(d *schema.ResourceData, meta interface{}) e return nil } + +func resourceAwsS3BucketObjectCustomizeDiff(d *schema.ResourceDiff, meta interface{}) error { + if d.HasChange("etag") { + d.SetNewComputed("version_id") + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go new file mode 100644 index 000000000..a103cc0b2 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_public_access_block.go @@ -0,0 +1,195 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/service/s3control" + "github.com/hashicorp/terraform/helper/resource" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsS3BucketPublicAccessBlock() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsS3BucketPublicAccessBlockCreate, + Read: resourceAwsS3BucketPublicAccessBlockRead, + Update: resourceAwsS3BucketPublicAccessBlockUpdate, + Delete: resourceAwsS3BucketPublicAccessBlockDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "bucket": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "block_public_acls": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "block_public_policy": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "ignore_public_acls": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + + "restrict_public_buckets": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + } +} + +func resourceAwsS3BucketPublicAccessBlockCreate(d *schema.ResourceData, meta interface{}) error { + s3conn := meta.(*AWSClient).s3conn + bucket := d.Get("bucket").(string) + + input := &s3.PutPublicAccessBlockInput{ + Bucket: aws.String(bucket), + PublicAccessBlockConfiguration: &s3.PublicAccessBlockConfiguration{ + BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), + BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), + IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), + RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), + }, + } + + log.Printf("[DEBUG] S3 bucket: %s, public access block: %v", bucket, input.PublicAccessBlockConfiguration) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := s3conn.PutPublicAccessBlock(input) + + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { + return fmt.Errorf("error creating public access block policy for S3 bucket (%s): %s", bucket, err) + } + + d.SetId(bucket) + return resourceAwsS3BucketPublicAccessBlockRead(d, meta) +} + +func resourceAwsS3BucketPublicAccessBlockRead(d *schema.ResourceData, meta interface{}) error { + s3conn := meta.(*AWSClient).s3conn + + input := &s3.GetPublicAccessBlockInput{ + Bucket: aws.String(d.Id()), + } + + // Retry for eventual consistency on creation + var output *s3.GetPublicAccessBlockOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + output, err = s3conn.GetPublicAccessBlock(input) + + if d.IsNewResource() && (isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") || + isAWSErr(err, s3.ErrCodeNoSuchBucket, "")) { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { + log.Printf("[WARN] S3 Bucket Public Access Block (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading S3 bucket Public Access Block: %s", err) + } + + if output == nil || output.PublicAccessBlockConfiguration == nil { + return fmt.Errorf("error reading S3 Bucket Public Access Block (%s): missing public access block configuration", d.Id()) + } + + d.Set("bucket", d.Id()) + d.Set("block_public_acls", output.PublicAccessBlockConfiguration.BlockPublicAcls) + d.Set("block_public_policy", output.PublicAccessBlockConfiguration.BlockPublicPolicy) + d.Set("ignore_public_acls", output.PublicAccessBlockConfiguration.IgnorePublicAcls) + d.Set("restrict_public_buckets", output.PublicAccessBlockConfiguration.RestrictPublicBuckets) + + return nil +} + +func resourceAwsS3BucketPublicAccessBlockUpdate(d *schema.ResourceData, meta interface{}) error { + s3conn := meta.(*AWSClient).s3conn + + input := &s3.PutPublicAccessBlockInput{ + Bucket: aws.String(d.Id()), + PublicAccessBlockConfiguration: &s3.PublicAccessBlockConfiguration{ + BlockPublicAcls: aws.Bool(d.Get("block_public_acls").(bool)), + BlockPublicPolicy: aws.Bool(d.Get("block_public_policy").(bool)), + IgnorePublicAcls: aws.Bool(d.Get("ignore_public_acls").(bool)), + RestrictPublicBuckets: aws.Bool(d.Get("restrict_public_buckets").(bool)), + }, + } + + log.Printf("[DEBUG] Updating S3 bucket Public Access Block: %s", input) + _, err := s3conn.PutPublicAccessBlock(input) + if err != nil { + return fmt.Errorf("error updating S3 Bucket Public Access Block (%s): %s", d.Id(), err) + } + + // Workaround API eventual consistency issues. This type of logic should not normally be used. + // We cannot reliably determine when the Read after Update might be properly updated. + // Rather than introduce complicated retry logic, we presume that a lack of an update error + // means our update succeeded with our expected values. + d.Set("block_public_acls", input.PublicAccessBlockConfiguration.BlockPublicAcls) + d.Set("block_public_policy", input.PublicAccessBlockConfiguration.BlockPublicPolicy) + d.Set("ignore_public_acls", input.PublicAccessBlockConfiguration.IgnorePublicAcls) + d.Set("restrict_public_buckets", input.PublicAccessBlockConfiguration.RestrictPublicBuckets) + + // Skip normal Read after Update due to eventual consistency issues + return nil +} + +func resourceAwsS3BucketPublicAccessBlockDelete(d *schema.ResourceData, meta interface{}) error { + s3conn := meta.(*AWSClient).s3conn + + input := &s3.DeletePublicAccessBlockInput{ + Bucket: aws.String(d.Id()), + } + + log.Printf("[DEBUG] S3 bucket: %s, delete public access block", d.Id()) + _, err := s3conn.DeletePublicAccessBlock(input) + + if isAWSErr(err, s3control.ErrCodeNoSuchPublicAccessBlockConfiguration, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting S3 Bucket Public Access Block (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go new file mode 100644 index 000000000..8da56ad3f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_model.go @@ -0,0 +1,391 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSagemakerModel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSagemakerModelCreate, + Read: resourceAwsSagemakerModelRead, + Update: resourceAwsSagemakerModelUpdate, + Delete: resourceAwsSagemakerModelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validateSagemakerName, + }, + + "primary_container": { + Type: schema.TypeList, + MaxItems: 1, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "container_hostname": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateSagemakerName, + }, + + "image": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateSagemakerImage, + }, + + "model_data_url": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateSagemakerModelDataUrl, + }, + + "environment": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + ValidateFunc: validateSagemakerEnvironment, + }, + }, + }, + }, + + "vpc_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "subnets": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "security_group_ids": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + }, + }, + + "execution_role_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "enable_network_isolation": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + + "container": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "container_hostname": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateSagemakerName, + }, + + "image": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateSagemakerImage, + }, + + "model_data_url": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateSagemakerModelDataUrl, + }, + + "environment": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + ValidateFunc: validateSagemakerEnvironment, + }, + }, + }, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsSagemakerModelCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + var name string + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else { + name = resource.UniqueId() + } + + createOpts := &sagemaker.CreateModelInput{ + ModelName: aws.String(name), + } + + if v, ok := d.GetOk("primary_container"); ok { + m := v.([]interface{})[0].(map[string]interface{}) + createOpts.PrimaryContainer = expandContainer(m) + } + + if v, ok := d.GetOk("container"); ok { + containers := expandContainers(v.([]interface{})) + createOpts.SetContainers(containers) + } + + if v, ok := d.GetOk("execution_role_arn"); ok { + createOpts.SetExecutionRoleArn(v.(string)) + } + + if v, ok := d.GetOk("tags"); ok { + createOpts.SetTags(tagsFromMapSagemaker(v.(map[string]interface{}))) + } + + if v, ok := d.GetOk("vpc_config"); ok { + vpcConfig := expandSageMakerVpcConfigRequest(v.([]interface{})) + createOpts.SetVpcConfig(vpcConfig) + } + + if v, ok := d.GetOk("enable_network_isolation"); ok { + createOpts.SetEnableNetworkIsolation(v.(bool)) + } + + log.Printf("[DEBUG] Sagemaker model create config: %#v", *createOpts) + _, err := retryOnAwsCode("ValidationException", func() (interface{}, error) { + return conn.CreateModel(createOpts) + }) + + if err != nil { + return fmt.Errorf("error creating Sagemaker model: %s", err) + } + d.SetId(name) + + return resourceAwsSagemakerModelRead(d, meta) +} + +func expandSageMakerVpcConfigRequest(l []interface{}) *sagemaker.VpcConfig { + if len(l) == 0 { + return nil + } + + m := l[0].(map[string]interface{}) + + return &sagemaker.VpcConfig{ + SecurityGroupIds: expandStringSet(m["security_group_ids"].(*schema.Set)), + Subnets: expandStringSet(m["subnets"].(*schema.Set)), + } +} + +func resourceAwsSagemakerModelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + request := &sagemaker.DescribeModelInput{ + ModelName: aws.String(d.Id()), + } + + model, err := conn.DescribeModel(request) + if err != nil { + if sagemakerErr, ok := err.(awserr.Error); ok && sagemakerErr.Code() == "ValidationException" { + log.Printf("[INFO] unable to find the sagemaker model resource and therefore it is removed from the state: %s", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Sagemaker model %s: %s", d.Id(), err) + } + + if err := d.Set("arn", model.ModelArn); err != nil { + return fmt.Errorf("unable to set arn for sagemaker model %q: %+v", d.Id(), err) + } + if err := d.Set("name", model.ModelName); err != nil { + return err + } + if err := d.Set("execution_role_arn", model.ExecutionRoleArn); err != nil { + return err + } + if err := d.Set("enable_network_isolation", model.EnableNetworkIsolation); err != nil { + return err + } + if err := d.Set("primary_container", flattenContainer(model.PrimaryContainer)); err != nil { + return err + } + if err := d.Set("container", flattenContainers(model.Containers)); err != nil { + return err + } + if err := d.Set("vpc_config", flattenSageMakerVpcConfigResponse(model.VpcConfig)); err != nil { + return fmt.Errorf("error setting vpc_config: %s", err) + } + + tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ + ResourceArn: model.ModelArn, + }) + if err != nil { + return fmt.Errorf("error listing tags of Sagemaker model %s: %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { + return err + } + return nil +} + +func flattenSageMakerVpcConfigResponse(vpcConfig *sagemaker.VpcConfig) []map[string]interface{} { + if vpcConfig == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "security_group_ids": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.SecurityGroupIds)), + "subnets": schema.NewSet(schema.HashString, flattenStringList(vpcConfig.Subnets)), + } + + return []map[string]interface{}{m} +} + +func resourceAwsSagemakerModelUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + d.Partial(true) + + if err := setSagemakerTags(conn, d); err != nil { + return err + } else { + d.SetPartial("tags") + } + + d.Partial(false) + + return resourceAwsSagemakerModelRead(d, meta) +} + +func resourceAwsSagemakerModelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + deleteOpts := &sagemaker.DeleteModelInput{ + ModelName: aws.String(d.Id()), + } + log.Printf("[INFO] Deleting Sagemaker model: %s", d.Id()) + + return resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err := conn.DeleteModel(deleteOpts) + if err == nil { + return nil + } + + sagemakerErr, ok := err.(awserr.Error) + if !ok { + return resource.NonRetryableError(err) + } + + if sagemakerErr.Code() == "ResourceNotFound" { + return resource.RetryableError(err) + } + + return resource.NonRetryableError(fmt.Errorf("error deleting Sagemaker model: %s", err)) + }) +} + +func expandContainer(m map[string]interface{}) *sagemaker.ContainerDefinition { + container := sagemaker.ContainerDefinition{ + Image: aws.String(m["image"].(string)), + } + + if v, ok := m["container_hostname"]; ok && v.(string) != "" { + container.ContainerHostname = aws.String(v.(string)) + } + if v, ok := m["model_data_url"]; ok && v.(string) != "" { + container.ModelDataUrl = aws.String(v.(string)) + } + if v, ok := m["environment"]; ok { + container.Environment = stringMapToPointers(v.(map[string]interface{})) + } + + return &container +} + +func expandContainers(a []interface{}) []*sagemaker.ContainerDefinition { + containers := make([]*sagemaker.ContainerDefinition, 0, len(a)) + + for _, m := range a { + containers = append(containers, expandContainer(m.(map[string]interface{}))) + } + + return containers +} + +func flattenContainer(container *sagemaker.ContainerDefinition) []interface{} { + if container == nil { + return []interface{}{} + } + + cfg := make(map[string]interface{}) + + cfg["image"] = *container.Image + + if container.ContainerHostname != nil { + cfg["container_hostname"] = *container.ContainerHostname + } + if container.ModelDataUrl != nil { + cfg["model_data_url"] = *container.ModelDataUrl + } + if container.Environment != nil { + cfg["environment"] = flattenEnvironment(container.Environment) + } + + return []interface{}{cfg} +} + +func flattenContainers(containers []*sagemaker.ContainerDefinition) []interface{} { + fContainers := make([]interface{}, 0, len(containers)) + for _, container := range containers { + fContainers = append(fContainers, flattenContainer(container)[0].(map[string]interface{})) + } + return fContainers +} + +func flattenEnvironment(env map[string]*string) map[string]string { + m := map[string]string{} + for k, v := range env { + m[k] = *v + } + return m +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go new file mode 100644 index 000000000..948b01c30 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sagemaker_notebook_instance.go @@ -0,0 +1,386 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSagemakerNotebookInstance() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSagemakerNotebookInstanceCreate, + Read: resourceAwsSagemakerNotebookInstanceRead, + Update: resourceAwsSagemakerNotebookInstanceUpdate, + Delete: resourceAwsSagemakerNotebookInstanceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateSagemakerName, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + + "instance_type": { + Type: schema.TypeString, + Required: true, + }, + + "subnet_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "security_groups": { + Type: schema.TypeSet, + MinItems: 1, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + + "tags": tagsSchema(), + }, + } +} + +func resourceAwsSagemakerNotebookInstanceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + name := d.Get("name").(string) + + createOpts := &sagemaker.CreateNotebookInstanceInput{ + SecurityGroupIds: expandStringSet(d.Get("security_groups").(*schema.Set)), + NotebookInstanceName: aws.String(name), + RoleArn: aws.String(d.Get("role_arn").(string)), + InstanceType: aws.String(d.Get("instance_type").(string)), + } + + if s, ok := d.GetOk("subnet_id"); ok { + createOpts.SubnetId = aws.String(s.(string)) + } + + if k, ok := d.GetOk("kms_key_id"); ok { + createOpts.KmsKeyId = aws.String(k.(string)) + } + + if v, ok := d.GetOk("tags"); ok { + tagsIn := v.(map[string]interface{}) + createOpts.Tags = tagsFromMapSagemaker(tagsIn) + } + + log.Printf("[DEBUG] sagemaker notebook instance create config: %#v", *createOpts) + _, err := conn.CreateNotebookInstance(createOpts) + if err != nil { + return fmt.Errorf("Error creating Sagemaker Notebook Instance: %s", err) + } + + d.SetId(name) + log.Printf("[INFO] sagemaker notebook instance ID: %s", d.Id()) + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + sagemaker.NotebookInstanceStatusUpdating, + sagemaker.NotebookInstanceStatusPending, + sagemaker.NotebookInstanceStatusStopped, + }, + Target: []string{sagemaker.NotebookInstanceStatusInService}, + Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to create: %s", d.Id(), err) + } + + return resourceAwsSagemakerNotebookInstanceRead(d, meta) +} + +func resourceAwsSagemakerNotebookInstanceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ + NotebookInstanceName: aws.String(d.Id()), + } + notebookInstance, err := conn.DescribeNotebookInstance(describeNotebookInput) + if err != nil { + if isAWSErr(err, "ValidationException", "RecordNotFound") { + d.SetId("") + log.Printf("[WARN] Unable to find sageMaker notebook instance (%s); removing from state", d.Id()) + return nil + } + return fmt.Errorf("error finding sagemaker notebook instance (%s): %s", d.Id(), err) + + } + + if err := d.Set("security_groups", flattenStringList(notebookInstance.SecurityGroups)); err != nil { + return fmt.Errorf("error setting security groups for sagemaker notebook instance (%s): %s", d.Id(), err) + } + if err := d.Set("name", notebookInstance.NotebookInstanceName); err != nil { + return fmt.Errorf("error setting name for sagemaker notebook instance (%s): %s", d.Id(), err) + } + if err := d.Set("role_arn", notebookInstance.RoleArn); err != nil { + return fmt.Errorf("error setting role_arn for sagemaker notebook instance (%s): %s", d.Id(), err) + } + if err := d.Set("instance_type", notebookInstance.InstanceType); err != nil { + return fmt.Errorf("error setting instance_type for sagemaker notebook instance (%s): %s", d.Id(), err) + } + if err := d.Set("subnet_id", notebookInstance.SubnetId); err != nil { + return fmt.Errorf("error setting subnet_id for sagemaker notebook instance (%s): %s", d.Id(), err) + } + + if err := d.Set("kms_key_id", notebookInstance.KmsKeyId); err != nil { + return fmt.Errorf("error setting kms_key_id for sagemaker notebook instance (%s): %s", d.Id(), err) + } + + if err := d.Set("arn", notebookInstance.NotebookInstanceArn); err != nil { + return fmt.Errorf("error setting arn for sagemaker notebook instance (%s): %s", d.Id(), err) + } + tagsOutput, err := conn.ListTags(&sagemaker.ListTagsInput{ + ResourceArn: notebookInstance.NotebookInstanceArn, + }) + if err != nil { + return fmt.Errorf("error listing tags for sagemaker notebook instance (%s): %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapSagemaker(tagsOutput.Tags)); err != nil { + return fmt.Errorf("error setting tags for notebook instance (%s): %s", d.Id(), err) + } + return nil +} + +func resourceAwsSagemakerNotebookInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + d.Partial(true) + + if err := setSagemakerTags(conn, d); err != nil { + return err + } + d.SetPartial("tags") + + hasChanged := false + // Update + updateOpts := &sagemaker.UpdateNotebookInstanceInput{ + NotebookInstanceName: aws.String(d.Get("name").(string)), + } + + if d.HasChange("role_arn") { + updateOpts.RoleArn = aws.String(d.Get("role_arn").(string)) + hasChanged = true + } + + if d.HasChange("instance_type") { + updateOpts.InstanceType = aws.String(d.Get("instance_type").(string)) + hasChanged = true + } + + if hasChanged { + + // Stop notebook + _, previousStatus, _ := sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id())() + if previousStatus != sagemaker.NotebookInstanceStatusStopped { + if err := stopSagemakerNotebookInstance(conn, d.Id()); err != nil { + return fmt.Errorf("error stopping sagemaker notebook instance prior to updating: %s", err) + } + } + + if _, err := conn.UpdateNotebookInstance(updateOpts); err != nil { + return fmt.Errorf("error updating sagemaker notebook instance: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + sagemaker.NotebookInstanceStatusUpdating, + }, + Target: []string{sagemaker.NotebookInstanceStatusStopped}, + Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + } + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to update: %s", d.Id(), err) + } + + // Restart if needed + if previousStatus == sagemaker.NotebookInstanceStatusInService { + startOpts := &sagemaker.StartNotebookInstanceInput{ + NotebookInstanceName: aws.String(d.Id()), + } + + // StartNotebookInstance sometimes doesn't take so we'll check for a state change and if + // it doesn't change we'll send another request + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + if _, err := conn.StartNotebookInstance(startOpts); err != nil { + return resource.NonRetryableError(fmt.Errorf("error starting sagemaker notebook instance (%s): %s", d.Id(), err)) + } + stateConf := &resource.StateChangeConf{ + Pending: []string{ + sagemaker.NotebookInstanceStatusStopped, + }, + Target: []string{sagemaker.NotebookInstanceStatusInService, sagemaker.NotebookInstanceStatusPending}, + Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), + Timeout: 30 * time.Second, + } + _, err := stateConf.WaitForState() + if err != nil { + return resource.RetryableError(fmt.Errorf("error waiting for sagemaker notebook instance (%s) to start: %s", d.Id(), err)) + } + + return nil + }) + if err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + sagemaker.NotebookInstanceStatusUpdating, + sagemaker.NotebookInstanceStatusPending, + sagemaker.NotebookInstanceStatusStopped, + }, + Target: []string{sagemaker.NotebookInstanceStatusInService}, + Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to start after update: %s", d.Id(), err) + } + } + } + + d.Partial(false) + + return resourceAwsSagemakerNotebookInstanceRead(d, meta) +} + +func resourceAwsSagemakerNotebookInstanceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sagemakerconn + + describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ + NotebookInstanceName: aws.String(d.Id()), + } + notebook, err := conn.DescribeNotebookInstance(describeNotebookInput) + if err != nil { + if isAWSErr(err, "ValidationException", "RecordNotFound") { + return nil + } + return fmt.Errorf("unable to find sagemaker notebook instance to delete (%s): %s", d.Id(), err) + } + if *notebook.NotebookInstanceStatus != sagemaker.NotebookInstanceStatusFailed && *notebook.NotebookInstanceStatus != sagemaker.NotebookInstanceStatusStopped { + if err := stopSagemakerNotebookInstance(conn, d.Id()); err != nil { + return err + } + } + + deleteOpts := &sagemaker.DeleteNotebookInstanceInput{ + NotebookInstanceName: aws.String(d.Id()), + } + + if _, err := conn.DeleteNotebookInstance(deleteOpts); err != nil { + return fmt.Errorf("error trying to delete sagemaker notebook instance (%s): %s", d.Id(), err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + sagemaker.NotebookInstanceStatusDeleting, + }, + Target: []string{""}, + Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, d.Id()), + Timeout: 10 * time.Minute, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to delete: %s", d.Id(), err) + } + + return nil +} + +func stopSagemakerNotebookInstance(conn *sagemaker.SageMaker, id string) error { + describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ + NotebookInstanceName: aws.String(id), + } + notebook, err := conn.DescribeNotebookInstance(describeNotebookInput) + if err != nil { + if isAWSErr(err, "ValidationException", "RecordNotFound") { + return nil + } + return fmt.Errorf("unable to find sagemaker notebook instance (%s): %s", id, err) + } + if *notebook.NotebookInstanceStatus == sagemaker.NotebookInstanceStatusStopped { + return nil + } + + stopOpts := &sagemaker.StopNotebookInstanceInput{ + NotebookInstanceName: aws.String(id), + } + + if _, err := conn.StopNotebookInstance(stopOpts); err != nil { + return fmt.Errorf("Error stopping sagemaker notebook instance: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + sagemaker.NotebookInstanceStatusStopping, + }, + Target: []string{sagemaker.NotebookInstanceStatusStopped}, + Refresh: sagemakerNotebookInstanceStateRefreshFunc(conn, id), + Timeout: 10 * time.Minute, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for sagemaker notebook instance (%s) to stop: %s", id, err) + } + + return nil +} + +func sagemakerNotebookInstanceStateRefreshFunc(conn *sagemaker.SageMaker, name string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + describeNotebookInput := &sagemaker.DescribeNotebookInstanceInput{ + NotebookInstanceName: aws.String(name), + } + notebook, err := conn.DescribeNotebookInstance(describeNotebookInput) + if err != nil { + if isAWSErr(err, "ValidationException", "RecordNotFound") { + return 1, "", nil + } + return nil, "", err + } + + if notebook == nil { + return nil, "", nil + } + + return notebook, *notebook.NotebookInstanceStatus, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go index edb126870..b86d94d80 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go @@ -348,7 +348,7 @@ func resourceAwsSecretsManagerSecretUpdate(d *schema.ResourceData, meta interfac if len(remove) > 0 { log.Printf("[DEBUG] Removing Secrets Manager Secret %q tags: %#v", d.Id(), remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go index 4db73d56c..0723e85c5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go @@ -1137,7 +1137,7 @@ func matchRules(rType string, local []interface{}, remote []map[string]interface } if _, ok := r["self"]; ok { - if r["self"].(bool) == true { + if r["self"].(bool) { lenSGs++ } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go new file mode 100644 index 000000000..dece3fc8b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_product_subscription.go @@ -0,0 +1,134 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSecurityHubProductSubscription() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecurityHubProductSubscriptionCreate, + Read: resourceAwsSecurityHubProductSubscriptionRead, + Delete: resourceAwsSecurityHubProductSubscriptionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "product_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsSecurityHubProductSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + productArn := d.Get("product_arn").(string) + + log.Printf("[DEBUG] Enabling Security Hub product subscription for product %s", productArn) + + resp, err := conn.EnableImportFindingsForProduct(&securityhub.EnableImportFindingsForProductInput{ + ProductArn: aws.String(productArn), + }) + + if err != nil { + return fmt.Errorf("Error enabling Security Hub product subscription for product %s: %s", productArn, err) + } + + d.SetId(fmt.Sprintf("%s,%s", productArn, *resp.ProductSubscriptionArn)) + + return resourceAwsSecurityHubProductSubscriptionRead(d, meta) +} + +func resourceAwsSecurityHubProductSubscriptionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + + productArn, productSubscriptionArn, err := resourceAwsSecurityHubProductSubscriptionParseId(d.Id()) + + if err != nil { + return err + } + + log.Printf("[DEBUG] Reading Security Hub product subscriptions to find %s", d.Id()) + + exists, err := resourceAwsSecurityHubProductSubscriptionCheckExists(conn, productSubscriptionArn) + + if err != nil { + return fmt.Errorf("Error reading Security Hub product subscriptions to find %s: %s", d.Id(), err) + } + + if !exists { + log.Printf("[WARN] Security Hub product subscriptions (%s) not found, removing from state", d.Id()) + d.SetId("") + } + + d.Set("product_arn", productArn) + d.Set("arn", productSubscriptionArn) + + return nil +} + +func resourceAwsSecurityHubProductSubscriptionCheckExists(conn *securityhub.SecurityHub, productSubscriptionArn string) (bool, error) { + input := &securityhub.ListEnabledProductsForImportInput{} + exists := false + + err := conn.ListEnabledProductsForImportPages(input, func(page *securityhub.ListEnabledProductsForImportOutput, lastPage bool) bool { + for _, readProductSubscriptionArn := range page.ProductSubscriptions { + if aws.StringValue(readProductSubscriptionArn) == productSubscriptionArn { + exists = true + return false + } + } + return !lastPage + }) + + if err != nil { + return false, err + } + + return exists, nil +} + +func resourceAwsSecurityHubProductSubscriptionParseId(id string) (string, string, error) { + parts := strings.SplitN(id, ",", 2) + + if len(parts) != 2 { + return "", "", fmt.Errorf("Expected Security Hub product subscription ID in format , - received: %s", id) + } + + return parts[0], parts[1], nil +} + +func resourceAwsSecurityHubProductSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Printf("[DEBUG] Disabling Security Hub product subscription %s", d.Id()) + + _, productSubscriptionArn, err := resourceAwsSecurityHubProductSubscriptionParseId(d.Id()) + + if err != nil { + return err + } + + _, err = conn.DisableImportFindingsForProduct(&securityhub.DisableImportFindingsForProductInput{ + ProductSubscriptionArn: aws.String(productSubscriptionArn), + }) + + if err != nil { + return fmt.Errorf("Error disabling Security Hub product subscription %s: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go new file mode 100644 index 000000000..b40bf660a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_securityhub_standards_subscription.go @@ -0,0 +1,93 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/securityhub" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsSecurityHubStandardsSubscription() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsSecurityHubStandardsSubscriptionCreate, + Read: resourceAwsSecurityHubStandardsSubscriptionRead, + Delete: resourceAwsSecurityHubStandardsSubscriptionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "standards_arn": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateArn, + }, + }, + } +} + +func resourceAwsSecurityHubStandardsSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Printf("[DEBUG] Enabling Security Hub standard %s", d.Get("standards_arn")) + + resp, err := conn.BatchEnableStandards(&securityhub.BatchEnableStandardsInput{ + StandardsSubscriptionRequests: []*securityhub.StandardsSubscriptionRequest{ + { + StandardsArn: aws.String(d.Get("standards_arn").(string)), + }, + }, + }) + + if err != nil { + return fmt.Errorf("Error enabling Security Hub standard: %s", err) + } + + standardsSubscription := resp.StandardsSubscriptions[0] + + d.SetId(*standardsSubscription.StandardsSubscriptionArn) + + return resourceAwsSecurityHubStandardsSubscriptionRead(d, meta) +} + +func resourceAwsSecurityHubStandardsSubscriptionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + + log.Printf("[DEBUG] Reading Security Hub standard %s", d.Id()) + resp, err := conn.GetEnabledStandards(&securityhub.GetEnabledStandardsInput{ + StandardsSubscriptionArns: []*string{aws.String(d.Id())}, + }) + + if err != nil { + return fmt.Errorf("Error reading Security Hub standard %s: %s", d.Id(), err) + } + + if len(resp.StandardsSubscriptions) == 0 { + log.Printf("[WARN] Security Hub standard (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + standardsSubscription := resp.StandardsSubscriptions[0] + + d.Set("standards_arn", standardsSubscription.StandardsArn) + + return nil +} + +func resourceAwsSecurityHubStandardsSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).securityhubconn + log.Printf("[DEBUG] Disabling Security Hub standard %s", d.Id()) + + _, err := conn.BatchDisableStandards(&securityhub.BatchDisableStandardsInput{ + StandardsSubscriptionArns: []*string{aws.String(d.Id())}, + }) + + if err != nil { + return fmt.Errorf("Error disabling Security Hub standard %s: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go new file mode 100644 index 000000000..b6653809b --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_http_namespace.go @@ -0,0 +1,130 @@ +package aws + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/servicediscovery" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsServiceDiscoveryHttpNamespace() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsServiceDiscoveryHttpNamespaceCreate, + Read: resourceAwsServiceDiscoveryHttpNamespaceRead, + Delete: resourceAwsServiceDiscoveryHttpNamespaceDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateServiceDiscoveryHttpNamespaceName, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsServiceDiscoveryHttpNamespaceCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sdconn + + name := d.Get("name").(string) + + input := &servicediscovery.CreateHttpNamespaceInput{ + Name: aws.String(name), + CreatorRequestId: aws.String(resource.UniqueId()), + } + + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) + } + + resp, err := conn.CreateHttpNamespace(input) + if err != nil { + return fmt.Errorf("error creating Service Discovery HTTP Namespace (%s): %s", name, err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, + Target: []string{servicediscovery.OperationStatusSuccess}, + Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), + Timeout: 5 * time.Minute, + } + + opresp, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) creation: %s", name, err) + } + + d.SetId(*opresp.(*servicediscovery.GetOperationOutput).Operation.Targets["NAMESPACE"]) + return resourceAwsServiceDiscoveryHttpNamespaceRead(d, meta) +} + +func resourceAwsServiceDiscoveryHttpNamespaceRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sdconn + + input := &servicediscovery.GetNamespaceInput{ + Id: aws.String(d.Id()), + } + + resp, err := conn.GetNamespace(input) + if err != nil { + if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { + d.SetId("") + return nil + } + return fmt.Errorf("error reading Service Discovery HTTP Namespace (%s): %s", d.Id(), err) + } + + d.Set("name", resp.Namespace.Name) + d.Set("description", resp.Namespace.Description) + d.Set("arn", resp.Namespace.Arn) + + return nil +} + +func resourceAwsServiceDiscoveryHttpNamespaceDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sdconn + + input := &servicediscovery.DeleteNamespaceInput{ + Id: aws.String(d.Id()), + } + + resp, err := conn.DeleteNamespace(input) + if err != nil { + if isAWSErr(err, servicediscovery.ErrCodeNamespaceNotFound, "") { + d.SetId("") + return nil + } + return fmt.Errorf("error deleting Service Discovery HTTP Namespace (%s): %s", d.Id(), err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{servicediscovery.OperationStatusSubmitted, servicediscovery.OperationStatusPending}, + Target: []string{servicediscovery.OperationStatusSuccess}, + Refresh: servicediscoveryOperationRefreshStatusFunc(conn, *resp.OperationId), + Timeout: 5 * time.Minute, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for Service Discovery HTTP Namespace (%s) deletion: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go index da5b0fb3d..24e899ec4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_private_dns_namespace.go @@ -130,9 +130,5 @@ func resourceAwsServiceDiscoveryPrivateDnsNamespaceDelete(d *schema.ResourceData } _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go index d311f2247..6020b071a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_public_dns_namespace.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -129,11 +130,7 @@ func resourceAwsServiceDiscoveryPublicDnsNamespaceDelete(d *schema.ResourceData, } _, err = stateConf.WaitForState() - if err != nil { - return err - } - - return nil + return err } func servicediscoveryOperationRefreshStatusFunc(conn *servicediscovery.ServiceDiscovery, oid string) resource.StateRefreshFunc { @@ -142,9 +139,20 @@ func servicediscoveryOperationRefreshStatusFunc(conn *servicediscovery.ServiceDi OperationId: aws.String(oid), } resp, err := conn.GetOperation(input) + if err != nil { - return nil, "failed", err + return nil, servicediscovery.OperationStatusFail, err } - return resp, *resp.Operation.Status, nil + + // Error messages can also be contained in the response with FAIL status + // "ErrorCode":"CANNOT_CREATE_HOSTED_ZONE", + // "ErrorMessage":"The VPC that you chose, vpc-xxx in region xxx, is already associated with another private hosted zone that has an overlapping name space, xxx.. (Service: AmazonRoute53; Status Code: 400; Error Code: ConflictingDomainExists; Request ID: xxx)" + // "Status":"FAIL", + + if aws.StringValue(resp.Operation.Status) == servicediscovery.OperationStatusFail { + return resp, servicediscovery.OperationStatusFail, fmt.Errorf("%s: %s", aws.StringValue(resp.Operation.ErrorCode), aws.StringValue(resp.Operation.ErrorMessage)) + } + + return resp, aws.StringValue(resp.Operation.Status), nil } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go index efaeacef4..ea8bc23ba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go @@ -239,11 +239,7 @@ func resourceAwsServiceDiscoveryServiceDelete(d *schema.ResourceData, meta inter } _, err := conn.DeleteService(input) - if err != nil { - return err - } - - return nil + return err } func expandServiceDiscoveryDnsConfig(configured map[string]interface{}) *servicediscovery.DnsConfig { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go index 287de0f66..04a637e78 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_configuration_set.go @@ -75,11 +75,7 @@ func resourceAwsSesConfigurationSetDelete(d *schema.ResourceData, meta interface ConfigurationSetName: aws.String(d.Id()), }) - if err != nil { - return err - } - - return nil + return err } func findConfigurationSet(name string, token *string, meta interface{}) (bool, error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go index 0c9ef2435..d7ec34456 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_event_destination.go @@ -199,11 +199,7 @@ func resourceAwsSesEventDestinationDelete(d *schema.ResourceData, meta interface EventDestinationName: aws.String(d.Id()), }) - if err != nil { - return err - } - - return nil + return err } func generateCloudWatchDestination(v []interface{}) []*ses.CloudWatchDimensionConfiguration { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go index ba28eadb7..fa98d8bce 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go @@ -595,11 +595,7 @@ func resourceAwsSesReceiptRuleRead(d *schema.ResourceData, meta interface{}) err } err = d.Set("workmail_action", workmailActionList) - if err != nil { - return err - } - - return nil + return err } func resourceAwsSesReceiptRuleDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go index 932d42acb..a2ae91917 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule_set.go @@ -73,11 +73,7 @@ func resourceAwsSesReceiptRuleSetDelete(d *schema.ResourceData, meta interface{} RuleSetName: aws.String(d.Id()), }) - if err != nil { - return err - } - - return nil + return err } func findRuleSet(name string, token *string, meta interface{}) (bool, error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go index 9fac36165..496b7a8bd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go @@ -17,6 +17,7 @@ func resourceAwsSfnActivity() *schema.Resource { return &schema.Resource{ Create: resourceAwsSfnActivityCreate, Read: resourceAwsSfnActivityRead, + Update: resourceAwsSfnActivityUpdate, Delete: resourceAwsSfnActivityDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -34,6 +35,7 @@ func resourceAwsSfnActivity() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "tags": tagsSchema(), }, } } @@ -53,6 +55,59 @@ func resourceAwsSfnActivityCreate(d *schema.ResourceData, meta interface{}) erro d.SetId(*activity.ActivityArn) + if v, ok := d.GetOk("tags"); ok { + input := &sfn.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: tagsFromMapSfn(v.(map[string]interface{})), + } + log.Printf("[DEBUG] Tagging SFN Activity: %s", input) + _, err := conn.TagResource(input) + if err != nil { + return fmt.Errorf("error tagging SFN Activity (%s): %s", d.Id(), input) + } + } + return resourceAwsSfnActivityRead(d, meta) +} + +func resourceAwsSfnActivityUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).sfnconn + + if d.HasChange("tags") { + oldTagsRaw, newTagsRaw := d.GetChange("tags") + oldTagsMap := oldTagsRaw.(map[string]interface{}) + newTagsMap := newTagsRaw.(map[string]interface{}) + createTags, removeTags := diffTagsSfn(tagsFromMapSfn(oldTagsMap), tagsFromMapSfn(newTagsMap)) + + if len(removeTags) > 0 { + removeTagKeys := make([]*string, len(removeTags)) + for i, removeTag := range removeTags { + removeTagKeys[i] = removeTag.Key + } + + input := &sfn.UntagResourceInput{ + ResourceArn: aws.String(d.Id()), + TagKeys: removeTagKeys, + } + + log.Printf("[DEBUG] Untagging State Function Activity: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging State Function Activity (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &sfn.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging State Function Activity: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging State Function Activity (%s): %s", d.Id(), err) + } + } + } + return resourceAwsSfnActivityRead(d, meta) } @@ -77,6 +132,20 @@ func resourceAwsSfnActivityRead(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] Error setting creation_date: %s", err) } + tagsResp, err := conn.ListTagsForResource( + &sfn.ListTagsForResourceInput{ + ResourceArn: aws.String(d.Id()), + }, + ) + + if err != nil { + return fmt.Errorf("error listing SFN Activity (%s) tags: %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapSfn(tagsResp.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go index 388cfa562..c0d3148c4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go @@ -52,6 +52,7 @@ func resourceAwsSfnStateMachine() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "tags": tagsSchema(), }, } } @@ -92,6 +93,17 @@ func resourceAwsSfnStateMachineCreate(d *schema.ResourceData, meta interface{}) d.SetId(*activity.StateMachineArn) + if v, ok := d.GetOk("tags"); ok { + input := &sfn.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: tagsFromMapSfn(v.(map[string]interface{})), + } + log.Printf("[DEBUG] Tagging SFN State Machine: %s", input) + _, err := conn.TagResource(input) + if err != nil { + return fmt.Errorf("error tagging SFN State Machine (%s): %s", d.Id(), input) + } + } return resourceAwsSfnStateMachineRead(d, meta) } @@ -121,6 +133,17 @@ func resourceAwsSfnStateMachineRead(d *schema.ResourceData, meta interface{}) er if err := d.Set("creation_date", sm.CreationDate.Format(time.RFC3339)); err != nil { log.Printf("[DEBUG] Error setting creation_date: %s", err) } + tagsResp, err := conn.ListTagsForResource( + &sfn.ListTagsForResourceInput{ + ResourceArn: aws.String(d.Id()), + }, + ) + if err != nil { + return fmt.Errorf("error listing SFN Activity (%s) tags: %s", d.Id(), err) + } + if err := d.Set("tags", tagsToMapSfn(tagsResp.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } return nil } @@ -145,6 +168,42 @@ func resourceAwsSfnStateMachineUpdate(d *schema.ResourceData, meta interface{}) return err } + if d.HasChange("tags") { + oldTagsRaw, newTagsRaw := d.GetChange("tags") + oldTagsMap := oldTagsRaw.(map[string]interface{}) + newTagsMap := newTagsRaw.(map[string]interface{}) + createTags, removeTags := diffTagsSfn(tagsFromMapSfn(oldTagsMap), tagsFromMapSfn(newTagsMap)) + + if len(removeTags) > 0 { + removeTagKeys := make([]*string, len(removeTags)) + for i, removeTag := range removeTags { + removeTagKeys[i] = removeTag.Key + } + + input := &sfn.UntagResourceInput{ + ResourceArn: aws.String(d.Id()), + TagKeys: removeTagKeys, + } + + log.Printf("[DEBUG] Untagging State Function: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging State Function (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &sfn.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging State Function: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging State Function (%s): %s", d.Id(), err) + } + } + } + return resourceAwsSfnStateMachineRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go index c684e06cf..b4afc8f99 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go @@ -240,10 +240,7 @@ func resourceAwsSnsPlatformApplicationDelete(d *schema.ResourceData, meta interf _, err := snsconn.DeletePlatformApplication(&sns.DeletePlatformApplicationInput{ PlatformApplicationArn: aws.String(d.Id()), }) - if err != nil { - return err - } - return nil + return err } func decodeResourceAwsSnsPlatformApplicationID(input string) (arnS, name, platform string, err error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go index 93284520e..df1006e5e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go @@ -241,10 +241,8 @@ func resourceAwsSnsTopicDelete(d *schema.ResourceData, meta interface{}) error { _, err := snsconn.DeleteTopic(&sns.DeleteTopicInput{ TopicArn: aws.String(d.Id()), }) - if err != nil { - return err - } - return nil + + return err } func updateAwsSnsTopicAttribute(topicArn, name string, value interface{}, conn *sns.SNS) error { @@ -267,8 +265,6 @@ func updateAwsSnsTopicAttribute(topicArn, name string, value interface{}, conn * _, err := retryOnAwsCode(sns.ErrCodeInvalidParameterException, func() (interface{}, error) { return conn.SetTopicAttributes(&req) }) - if err != nil { - return err - } - return nil + + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go index 2607007f7..2a86ec2f0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go @@ -197,10 +197,8 @@ func resourceAwsSnsTopicSubscriptionDelete(d *schema.ResourceData, meta interfac _, err := snsconn.Unsubscribe(&sns.UnsubscribeInput{ SubscriptionArn: aws.String(d.Id()), }) - if err != nil { - return err - } - return nil + + return err } func subscribeToSNSTopic(d *schema.ResourceData, snsconn *sns.SNS) (output *sns.SubscribeOutput, err error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go index 4dbd1e6e2..52a454216 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go @@ -451,7 +451,7 @@ func buildSpotFleetLaunchSpecification(d map[string]interface{}, meta interface{ } associatePublicIpAddress, hasPublicIpAddress := d["associate_public_ip_address"] - if hasPublicIpAddress && associatePublicIpAddress.(bool) == true && hasSubnetId { + if hasPublicIpAddress && associatePublicIpAddress.(bool) && hasSubnetId { // If we have a non-default VPC / Subnet specified, we can flag // AssociatePublicIpAddress to get a Public IP assigned. By default these are not provided. diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go index 58b6a9d23..a36806a5c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go @@ -267,7 +267,7 @@ func resourceAwsSqsQueueRead(d *schema.ResourceData, meta interface{}) error { if err != nil { if awsErr, ok := err.(awserr.Error); ok { log.Printf("ERROR Found %s", awsErr.Code()) - if "AWS.SimpleQueueService.NonExistentQueue" == awsErr.Code() { + if awsErr.Code() == "AWS.SimpleQueueService.NonExistentQueue" { d.SetId("") log.Printf("[DEBUG] SQS Queue (%s) not found", d.Get("name").(string)) return nil @@ -343,10 +343,7 @@ func resourceAwsSqsQueueDelete(d *schema.ResourceData, meta interface{}) error { _, err := sqsconn.DeleteQueue(&sqs.DeleteQueueInput{ QueueUrl: aws.String(d.Id()), }) - if err != nil { - return err - } - return nil + return err } func extractNameFromSqsQueueUrl(queue string) (string, error) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go index 741256a95..62f835baf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go @@ -363,11 +363,10 @@ func resourceAwsSsmDocumentDelete(d *schema.ResourceData, meta interface{}) erro return resource.NonRetryableError(err) } - return resource.RetryableError( - fmt.Errorf("%q: Timeout while waiting for the document to be deleted", d.Id())) + return resource.RetryableError(fmt.Errorf("SSM Document (%s) still exists", d.Id())) }) if err != nil { - return err + return fmt.Errorf("error waiting for SSM Document (%s) deletion: %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go index e444233c9..4004b546b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" @@ -50,6 +51,21 @@ func resourceAwsSsmMaintenanceWindow() *schema.Resource { Optional: true, Default: true, }, + + "end_date": { + Type: schema.TypeString, + Optional: true, + }, + + "schedule_timezone": { + Type: schema.TypeString, + Optional: true, + }, + + "start_date": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -58,51 +74,75 @@ func resourceAwsSsmMaintenanceWindowCreate(d *schema.ResourceData, meta interfac ssmconn := meta.(*AWSClient).ssmconn params := &ssm.CreateMaintenanceWindowInput{ + AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), + Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), + Duration: aws.Int64(int64(d.Get("duration").(int))), Name: aws.String(d.Get("name").(string)), Schedule: aws.String(d.Get("schedule").(string)), - Duration: aws.Int64(int64(d.Get("duration").(int))), - Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), - AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), + } + + if v, ok := d.GetOk("end_date"); ok { + params.EndDate = aws.String(v.(string)) + } + + if v, ok := d.GetOk("schedule_timezone"); ok { + params.ScheduleTimezone = aws.String(v.(string)) + } + + if v, ok := d.GetOk("start_date"); ok { + params.StartDate = aws.String(v.(string)) } resp, err := ssmconn.CreateMaintenanceWindow(params) if err != nil { - return err + return fmt.Errorf("error creating SSM Maintenance Window: %s", err) } d.SetId(*resp.WindowId) - return resourceAwsSsmMaintenanceWindowUpdate(d, meta) + + if !d.Get("enabled").(bool) { + input := &ssm.UpdateMaintenanceWindowInput{ + Enabled: aws.Bool(false), + WindowId: aws.String(d.Id()), + } + + _, err := ssmconn.UpdateMaintenanceWindow(input) + if err != nil { + return fmt.Errorf("error disabling SSM Maintenance Window (%s): %s", d.Id(), err) + } + } + + return resourceAwsSsmMaintenanceWindowRead(d, meta) } func resourceAwsSsmMaintenanceWindowUpdate(d *schema.ResourceData, meta interface{}) error { ssmconn := meta.(*AWSClient).ssmconn + // Replace must be set otherwise its not possible to remove optional attributes, e.g. + // ValidationException: 1 validation error detected: Value '' at 'startDate' failed to satisfy constraint: Member must have length greater than or equal to 1 params := &ssm.UpdateMaintenanceWindowInput{ - WindowId: aws.String(d.Id()), + AllowUnassociatedTargets: aws.Bool(d.Get("allow_unassociated_targets").(bool)), + Cutoff: aws.Int64(int64(d.Get("cutoff").(int))), + Duration: aws.Int64(int64(d.Get("duration").(int))), + Enabled: aws.Bool(d.Get("enabled").(bool)), + Name: aws.String(d.Get("name").(string)), + Replace: aws.Bool(true), + Schedule: aws.String(d.Get("schedule").(string)), + WindowId: aws.String(d.Id()), } - if d.HasChange("name") { - params.Name = aws.String(d.Get("name").(string)) + if v, ok := d.GetOk("end_date"); ok { + params.EndDate = aws.String(v.(string)) } - if d.HasChange("schedule") { - params.Schedule = aws.String(d.Get("schedule").(string)) + if v, ok := d.GetOk("schedule_timezone"); ok { + params.ScheduleTimezone = aws.String(v.(string)) } - if d.HasChange("duration") { - params.Duration = aws.Int64(int64(d.Get("duration").(int))) + if v, ok := d.GetOk("start_date"); ok { + params.StartDate = aws.String(v.(string)) } - if d.HasChange("cutoff") { - params.Cutoff = aws.Int64(int64(d.Get("cutoff").(int))) - } - - if d.HasChange("allow_unassociated_targets") { - params.AllowUnassociatedTargets = aws.Bool(d.Get("allow_unassociated_targets").(bool)) - } - - params.Enabled = aws.Bool(d.Get("enabled").(bool)) - _, err := ssmconn.UpdateMaintenanceWindow(params) if err != nil { if isAWSErr(err, ssm.ErrCodeDoesNotExistException, "") { @@ -110,7 +150,7 @@ func resourceAwsSsmMaintenanceWindowUpdate(d *schema.ResourceData, meta interfac d.SetId("") return nil } - return err + return fmt.Errorf("error updating SSM Maintenance Window (%s): %s", d.Id(), err) } return resourceAwsSsmMaintenanceWindowRead(d, meta) @@ -130,15 +170,18 @@ func resourceAwsSsmMaintenanceWindowRead(d *schema.ResourceData, meta interface{ d.SetId("") return nil } - return err + return fmt.Errorf("error reading SSM Maintenance Window (%s): %s", d.Id(), err) } - d.Set("name", resp.Name) + d.Set("allow_unassociated_targets", resp.AllowUnassociatedTargets) d.Set("cutoff", resp.Cutoff) d.Set("duration", resp.Duration) d.Set("enabled", resp.Enabled) - d.Set("allow_unassociated_targets", resp.AllowUnassociatedTargets) + d.Set("end_date", resp.EndDate) + d.Set("name", resp.Name) + d.Set("schedule_timezone", resp.ScheduleTimezone) d.Set("schedule", resp.Schedule) + d.Set("start_date", resp.StartDate) return nil } @@ -154,7 +197,7 @@ func resourceAwsSsmMaintenanceWindowDelete(d *schema.ResourceData, meta interfac _, err := ssmconn.DeleteMaintenanceWindow(params) if err != nil { - return err + return fmt.Errorf("error deleting SSM Maintenance Window (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go index 140aa855b..e4f1a0c7b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go @@ -140,7 +140,7 @@ func resourceAwsSsmMaintenanceWindowTargetUpdate(d *schema.ResourceData, meta in _, err := ssmconn.UpdateMaintenanceWindowTarget(params) if err != nil { - return err + return fmt.Errorf("error updating SSM Maintenance Window Target (%s): %s", d.Id(), err) } return nil @@ -158,7 +158,7 @@ func resourceAwsSsmMaintenanceWindowTargetDelete(d *schema.ResourceData, meta in _, err := ssmconn.DeregisterTargetFromMaintenanceWindow(params) if err != nil { - return err + return fmt.Errorf("error deregistering SSM Maintenance Window Target (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go index f9da3fd9e..414f7099f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go @@ -2,9 +2,10 @@ package aws import ( "fmt" - "github.com/hashicorp/terraform/helper/validation" "log" + "github.com/hashicorp/terraform/helper/validation" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" "github.com/hashicorp/terraform/helper/schema" @@ -299,7 +300,7 @@ func resourceAwsSsmMaintenanceWindowTaskDelete(d *schema.ResourceData, meta inte _, err := ssmconn.DeregisterTaskFromMaintenanceWindow(params) if err != nil { - return err + return fmt.Errorf("error deregistering SSM Maintenance Window Task (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go index f4849ce3d..d2094a8b2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_parameter.go @@ -159,7 +159,7 @@ func resourceAwsSsmParameterDelete(d *schema.ResourceData, meta interface{}) err Name: aws.String(d.Get("name").(string)), }) if err != nil { - return err + return fmt.Errorf("error deleting SSM Parameter (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go index 40f97147f..8311437e5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go @@ -274,7 +274,7 @@ func resourceAwsSsmPatchBaselineDelete(d *schema.ResourceData, meta interface{}) _, err := ssmconn.DeletePatchBaseline(params) if err != nil { - return err + return fmt.Errorf("error deleting SSM Patch Baseline (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go index 20327b248..3489a3c2b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_group.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" @@ -88,7 +89,7 @@ func resourceAwsSsmPatchGroupDelete(d *schema.ResourceData, meta interface{}) er _, err := ssmconn.DeregisterPatchBaselineForPatchGroup(params) if err != nil { - return err + return fmt.Errorf("error deregistering SSM Patch Group (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go index 8d3c821f7..9d53bac6c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_server.go @@ -62,6 +62,12 @@ func resourceAwsTransferServer() *schema.Resource { ValidateFunc: validateArn, }, + "force_destroy": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "tags": tagsSchema(), }, } @@ -69,10 +75,11 @@ func resourceAwsTransferServer() *schema.Resource { func resourceAwsTransferServerCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).transferconn - tags := tagsFromMapTransferServer(d.Get("tags").(map[string]interface{})) + tags := tagsFromMapTransfer(d.Get("tags").(map[string]interface{})) + createOpts := &transfer.CreateServerInput{} - createOpts := &transfer.CreateServerInput{ - Tags: tags, + if len(tags) != 0 { + createOpts.Tags = tags } identityProviderDetails := &transfer.IdentityProviderDetails{} @@ -140,7 +147,7 @@ func resourceAwsTransferServerRead(d *schema.ResourceData, meta interface{}) err d.Set("identity_provider_type", resp.Server.IdentityProviderType) d.Set("logging_role", resp.Server.LoggingRole) - if err := d.Set("tags", tagsToMapTransferServer(resp.Server.Tags)); err != nil { + if err := d.Set("tags", tagsToMapTransfer(resp.Server.Tags)); err != nil { return fmt.Errorf("Error setting tags: %s", err) } return nil @@ -183,7 +190,7 @@ func resourceAwsTransferServerUpdate(d *schema.ResourceData, meta interface{}) e } } - if err := setTagsTransferServer(conn, d); err != nil { + if err := setTagsTransfer(conn, d); err != nil { return fmt.Errorf("Error update tags: %s", err) } @@ -193,6 +200,13 @@ func resourceAwsTransferServerUpdate(d *schema.ResourceData, meta interface{}) e func resourceAwsTransferServerDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).transferconn + if d.Get("force_destroy").(bool) { + log.Printf("[DEBUG] Transfer Server (%s) attempting to forceDestroy", d.Id()) + if err := deleteTransferUsers(conn, d.Id(), nil); err != nil { + return err + } + } + delOpts := &transfer.DeleteServerInput{ ServerId: aws.String(d.Id()), } @@ -233,3 +247,41 @@ func waitForTransferServerDeletion(conn *transfer.Transfer, serverID string) err return resource.RetryableError(fmt.Errorf("Transfer Server (%s) still exists", serverID)) }) } + +func deleteTransferUsers(conn *transfer.Transfer, serverID string, nextToken *string) error { + listOpts := &transfer.ListUsersInput{ + ServerId: aws.String(serverID), + NextToken: nextToken, + } + + log.Printf("[DEBUG] List Transfer User Option: %#v", listOpts) + + resp, err := conn.ListUsers(listOpts) + if err != nil { + return err + } + + for _, user := range resp.Users { + + delOpts := &transfer.DeleteUserInput{ + ServerId: aws.String(serverID), + UserName: user.UserName, + } + + log.Printf("[DEBUG] Delete Transfer User Option: %#v", delOpts) + + _, err = conn.DeleteUser(delOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + continue + } + return fmt.Errorf("error deleting Transfer User (%s) for Server(%s): %s", *user.UserName, serverID, err) + } + } + + if resp.NextToken != nil { + return deleteTransferUsers(conn, serverID, resp.NextToken) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go new file mode 100644 index 000000000..332916c89 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_ssh_key.go @@ -0,0 +1,150 @@ +package aws + +import ( + "fmt" + "log" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/transfer" + + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsTransferSshKey() *schema.Resource { + + return &schema.Resource{ + Create: resourceAwsTransferSshKeyCreate, + Read: resourceAwsTransferSshKeyRead, + Delete: resourceAwsTransferSshKeyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + "body": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + old = cleanSshKey(old) + new = cleanSshKey(new) + return strings.Trim(old, "\n") == strings.Trim(new, "\n") + }, + }, + + "server_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateTransferServerID, + }, + + "user_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateTransferUserName, + }, + }, + } +} + +func resourceAwsTransferSshKeyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + userName := d.Get("user_name").(string) + serverID := d.Get("server_id").(string) + + createOpts := &transfer.ImportSshPublicKeyInput{ + ServerId: aws.String(serverID), + UserName: aws.String(userName), + SshPublicKeyBody: aws.String(d.Get("body").(string)), + } + + log.Printf("[DEBUG] Create Transfer SSH Public Key Option: %#v", createOpts) + + resp, err := conn.ImportSshPublicKey(createOpts) + if err != nil { + return fmt.Errorf("Error importing ssh public key: %s", err) + } + + d.SetId(fmt.Sprintf("%s/%s/%s", serverID, userName, *resp.SshPublicKeyId)) + + return nil +} + +func resourceAwsTransferSshKeyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + serverID, userName, sshKeyID, err := decodeTransferSshKeyId(d.Id()) + if err != nil { + return fmt.Errorf("error parsing Transfer SSH Public Key ID: %s", err) + } + + descOpts := &transfer.DescribeUserInput{ + UserName: aws.String(userName), + ServerId: aws.String(serverID), + } + + log.Printf("[DEBUG] Describe Transfer User Option: %#v", descOpts) + + resp, err := conn.DescribeUser(descOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Transfer User (%s) for Server (%s) not found, removing ssh public key (%s) from state", userName, serverID, sshKeyID) + d.SetId("") + return nil + } + return err + } + + var body string + for _, s := range resp.User.SshPublicKeys { + if sshKeyID == *s.SshPublicKeyId { + body = *s.SshPublicKeyBody + } + } + + if body == "" { + log.Printf("[WARN] No such ssh public key found for User (%s) in Server (%s)", userName, serverID) + d.SetId("") + } + + d.Set("server_id", resp.ServerId) + d.Set("user_name", resp.User.UserName) + d.Set("body", body) + + return nil +} + +func resourceAwsTransferSshKeyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + serverID, userName, sshKeyID, err := decodeTransferSshKeyId(d.Id()) + if err != nil { + return fmt.Errorf("error parsing Transfer SSH Public Key ID: %s", err) + } + + delOpts := &transfer.DeleteSshPublicKeyInput{ + UserName: aws.String(userName), + ServerId: aws.String(serverID), + SshPublicKeyId: aws.String(sshKeyID), + } + + log.Printf("[DEBUG] Delete Transfer SSH Public Key Option: %#v", delOpts) + + _, err = conn.DeleteSshPublicKey(delOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting Transfer User Ssh Key (%s): %s", d.Id(), err) + } + + return nil +} + +func decodeTransferSshKeyId(id string) (string, string, string, error) { + idParts := strings.SplitN(id, "/", 3) + if len(idParts) != 3 || idParts[0] == "" || idParts[1] == "" || idParts[2] == "" { + return "", "", "", fmt.Errorf("unexpected format of ID (%s), expected SERVERID/USERNAME/SSHKEYID", id) + } + return idParts[0], idParts[1], idParts[2], nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go new file mode 100644 index 000000000..dddcb86d9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_transfer_user.go @@ -0,0 +1,247 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/transfer" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsTransferUser() *schema.Resource { + + return &schema.Resource{ + Create: resourceAwsTransferUserCreate, + Read: resourceAwsTransferUserRead, + Update: resourceAwsTransferUserUpdate, + Delete: resourceAwsTransferUserDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Schema: map[string]*schema.Schema{ + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "home_directory": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 1024), + }, + + "policy": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateIAMPolicyJson, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + }, + + "role": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "server_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateTransferServerID, + }, + + "tags": tagsSchema(), + + "user_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateTransferUserName, + }, + }, + } +} + +func resourceAwsTransferUserCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + userName := d.Get("user_name").(string) + serverID := d.Get("server_id").(string) + + createOpts := &transfer.CreateUserInput{ + ServerId: aws.String(serverID), + UserName: aws.String(userName), + Role: aws.String(d.Get("role").(string)), + } + + if attr, ok := d.GetOk("home_directory"); ok { + createOpts.HomeDirectory = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("policy"); ok { + createOpts.Policy = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("tags"); ok { + createOpts.Tags = tagsFromMapTransfer(attr.(map[string]interface{})) + } + + log.Printf("[DEBUG] Create Transfer User Option: %#v", createOpts) + + _, err := conn.CreateUser(createOpts) + if err != nil { + return fmt.Errorf("error creating Transfer User: %s", err) + } + + d.SetId(fmt.Sprintf("%s/%s", serverID, userName)) + + return resourceAwsTransferUserRead(d, meta) +} + +func resourceAwsTransferUserRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + serverID, userName, err := decodeTransferUserId(d.Id()) + if err != nil { + return fmt.Errorf("error parsing Transfer User ID: %s", err) + } + + descOpts := &transfer.DescribeUserInput{ + UserName: aws.String(userName), + ServerId: aws.String(serverID), + } + + log.Printf("[DEBUG] Describe Transfer User Option: %#v", descOpts) + + resp, err := conn.DescribeUser(descOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Transfer User (%s) for Server (%s) not found, removing from state", userName, serverID) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Transfer User (%s): %s", d.Id(), err) + } + + d.Set("server_id", resp.ServerId) + d.Set("user_name", resp.User.UserName) + d.Set("arn", resp.User.Arn) + d.Set("home_directory", resp.User.HomeDirectory) + d.Set("policy", resp.User.Policy) + d.Set("role", resp.User.Role) + + if err := d.Set("tags", tagsToMapTransfer(resp.User.Tags)); err != nil { + return fmt.Errorf("Error setting tags: %s", err) + } + return nil +} + +func resourceAwsTransferUserUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + updateFlag := false + serverID, userName, err := decodeTransferUserId(d.Id()) + if err != nil { + return fmt.Errorf("error parsing Transfer User ID: %s", err) + } + + updateOpts := &transfer.UpdateUserInput{ + UserName: aws.String(userName), + ServerId: aws.String(serverID), + } + + if d.HasChange("home_directory") { + updateOpts.HomeDirectory = aws.String(d.Get("home_directory").(string)) + updateFlag = true + } + + if d.HasChange("policy") { + updateOpts.Policy = aws.String(d.Get("policy").(string)) + updateFlag = true + } + + if d.HasChange("role") { + updateOpts.Role = aws.String(d.Get("role").(string)) + updateFlag = true + } + + if updateFlag { + _, err := conn.UpdateUser(updateOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Transfer User (%s) for Server (%s) not found, removing from state", userName, serverID) + d.SetId("") + return nil + } + return fmt.Errorf("error updating Transfer User (%s): %s", d.Id(), err) + } + } + + if err := setTagsTransfer(conn, d); err != nil { + return fmt.Errorf("Error update tags: %s", err) + } + + return resourceAwsTransferUserRead(d, meta) +} + +func resourceAwsTransferUserDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).transferconn + serverID, userName, err := decodeTransferUserId(d.Id()) + if err != nil { + return fmt.Errorf("error parsing Transfer User ID: %s", err) + } + + delOpts := &transfer.DeleteUserInput{ + UserName: aws.String(userName), + ServerId: aws.String(serverID), + } + + log.Printf("[DEBUG] Delete Transfer User Option: %#v", delOpts) + + _, err = conn.DeleteUser(delOpts) + if err != nil { + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("error deleting Transfer User (%s) for Server(%s): %s", userName, serverID, err) + } + + if err := waitForTransferUserDeletion(conn, serverID, userName); err != nil { + return fmt.Errorf("error waiting for Transfer User (%s) for Server (%s): %s", userName, serverID, err) + } + + return nil +} + +func decodeTransferUserId(id string) (string, string, error) { + idParts := strings.SplitN(id, "/", 2) + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return "", "", fmt.Errorf("unexpected format of ID (%s), expected SERVERID/USERNAME", id) + } + return idParts[0], idParts[1], nil +} + +func waitForTransferUserDeletion(conn *transfer.Transfer, serverID, userName string) error { + params := &transfer.DescribeUserInput{ + ServerId: aws.String(serverID), + UserName: aws.String(userName), + } + + return resource.Retry(10*time.Minute, func() *resource.RetryError { + _, err := conn.DescribeUser(params) + + if isAWSErr(err, transfer.ErrCodeResourceNotFoundException, "") { + return nil + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return resource.RetryableError(fmt.Errorf("Transfer User (%s) for Server (%s) still exists", userName, serverID)) + }) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go index 45ebf5236..e9b4bd296 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go @@ -264,16 +264,8 @@ func resourceAwsVpcEndpointDelete(d *schema.ResourceData, meta interface{}) erro } } - stateConf := &resource.StateChangeConf{ - Pending: []string{"available", "pending", "deleting"}, - Target: []string{"deleted"}, - Refresh: vpcEndpointStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutDelete), - Delay: 5 * time.Second, - MinTimeout: 5 * time.Second, - } - if _, err = stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for VPC Endpoint (%s) to delete: %s", d.Id(), err) + if err := vpcEndpointWaitUntilDeleted(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { + return fmt.Errorf("error waiting for VPC Endpoint (%s) to delete: %s", d.Id(), err) } return nil @@ -359,6 +351,21 @@ func vpcEndpointWaitUntilAvailable(conn *ec2.EC2, vpceId string, timeout time.Du return nil } +func vpcEndpointWaitUntilDeleted(conn *ec2.EC2, vpceId string, timeout time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"available", "pending", "deleting"}, + Target: []string{"deleted"}, + Refresh: vpcEndpointStateRefresh(conn, vpceId), + Timeout: timeout, + Delay: 5 * time.Second, + MinTimeout: 5 * time.Second, + } + + _, err := stateConf.WaitForState() + + return err +} + func vpcEndpointAttributes(d *schema.ResourceData, vpce *ec2.VpcEndpoint, conn *ec2.EC2) error { d.Set("state", vpce.State) d.Set("vpc_id", vpce.VpcId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go new file mode 100644 index 000000000..db6f7e5c7 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_worklink_fleet.go @@ -0,0 +1,426 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/worklink" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsWorkLinkFleet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsWorkLinkFleetCreate, + Read: resourceAwsWorkLinkFleetRead, + Update: resourceAwsWorkLinkFleetUpdate, + Delete: resourceAwsWorkLinkFleetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateWorklinkFleetName, + }, + "display_name": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 100), + }, + "audit_stream_arn": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateArn, + }, + "network": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "vpc_id": { + Type: schema.TypeString, + Required: true, + }, + "security_group_ids": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "subnet_ids": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + }, + }, + "device_ca_certificate": { + Type: schema.TypeString, + Optional: true, + StateFunc: func(v interface{}) string { + s, ok := v.(string) + if !ok { + return "" + } + return strings.TrimSpace(s) + }, + }, + "identity_provider": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + "saml_metadata": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(1, 204800), + }, + }, + }, + }, + "company_code": { + Type: schema.TypeString, + Computed: true, + }, + "created_time": { + Type: schema.TypeString, + Computed: true, + }, + "last_updated_time": { + Type: schema.TypeString, + Computed: true, + }, + "optimize_for_end_user_location": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + }, + } +} + +func resourceAwsWorkLinkFleetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).worklinkconn + + input := &worklink.CreateFleetInput{ + FleetName: aws.String(d.Get("name").(string)), + OptimizeForEndUserLocation: aws.Bool(d.Get("optimize_for_end_user_location").(bool)), + } + + if v, ok := d.GetOk("display_name"); ok { + input.DisplayName = aws.String(v.(string)) + } + + resp, err := conn.CreateFleet(input) + if err != nil { + return fmt.Errorf("Error creating Worklink Fleet: %s", err) + } + + d.SetId(aws.StringValue(resp.FleetArn)) + + if err := updateAuditStreamConfiguration(conn, d); err != nil { + return err + } + + if err := updateCompanyNetworkConfiguration(conn, d); err != nil { + return err + } + + if err := updateDevicePolicyConfiguration(conn, d); err != nil { + return err + } + + if err := updateIdentityProviderConfiguration(conn, d); err != nil { + return err + } + + return resourceAwsWorkLinkFleetRead(d, meta) +} + +func resourceAwsWorkLinkFleetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).worklinkconn + + resp, err := conn.DescribeFleetMetadata(&worklink.DescribeFleetMetadataInput{ + FleetArn: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error describe worklink fleet: %s", err) + } + + d.Set("arn", d.Id()) + d.Set("name", aws.StringValue(resp.FleetName)) + d.Set("display_name", aws.StringValue(resp.DisplayName)) + d.Set("optimize_for_end_user_location", aws.BoolValue(resp.OptimizeForEndUserLocation)) + d.Set("company_code", aws.StringValue(resp.CompanyCode)) + d.Set("created_time", resp.CreatedTime.Format(time.RFC3339)) + if resp.LastUpdatedTime != nil { + d.Set("last_updated_time", resp.LastUpdatedTime.Format(time.RFC3339)) + } + auditStreamConfigurationResp, err := conn.DescribeAuditStreamConfiguration(&worklink.DescribeAuditStreamConfigurationInput{ + FleetArn: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Error describe worklink audit stream configuration: %s", err) + } + d.Set("audit_stream_arn", auditStreamConfigurationResp.AuditStreamArn) + + companyNetworkConfigurationResp, err := conn.DescribeCompanyNetworkConfiguration(&worklink.DescribeCompanyNetworkConfigurationInput{ + FleetArn: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Error describe worklink company network configuration: %s", err) + } + if err := d.Set("network", flattenWorkLinkNetworkConfigResponse(companyNetworkConfigurationResp)); err != nil { + return fmt.Errorf("Error setting network: %s", err) + } + + identityProviderConfigurationResp, err := conn.DescribeIdentityProviderConfiguration(&worklink.DescribeIdentityProviderConfigurationInput{ + FleetArn: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Error describe worklink company network configuration: %s", err) + } + + if err := d.Set("identity_provider", flattenWorkLinkIdentityProviderConfigResponse(identityProviderConfigurationResp)); err != nil { + return fmt.Errorf("Error setting identity_provider: %s", err) + } + + devicePolicyConfigurationResp, err := conn.DescribeDevicePolicyConfiguration(&worklink.DescribeDevicePolicyConfigurationInput{ + FleetArn: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("Error describe worklink device policy configuration: %s", err) + } + d.Set("device_ca_certificate", strings.TrimSpace(aws.StringValue(devicePolicyConfigurationResp.DeviceCaCertificate))) + + return nil +} + +func resourceAwsWorkLinkFleetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).worklinkconn + + input := &worklink.UpdateFleetMetadataInput{ + FleetArn: aws.String(d.Id()), + OptimizeForEndUserLocation: aws.Bool(d.Get("optimize_for_end_user_location").(bool)), + } + + if v, ok := d.GetOk("display_name"); ok { + input.DisplayName = aws.String(v.(string)) + } + + if d.HasChange("display_name") || d.HasChange("optimize_for_end_user_location") { + _, err := conn.UpdateFleetMetadata(input) + if err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error updating worklink fleet: %s", err) + } + } + + if d.HasChange("audit_stream_arn") { + if err := updateAuditStreamConfiguration(conn, d); err != nil { + return err + } + } + + if d.HasChange("network") { + if err := updateCompanyNetworkConfiguration(conn, d); err != nil { + return err + } + } + + if d.HasChange("device_ca_certificate") { + if err := updateDevicePolicyConfiguration(conn, d); err != nil { + return err + } + } + + if d.HasChange("identity_provider") { + if err := updateIdentityProviderConfiguration(conn, d); err != nil { + return err + } + } + + return resourceAwsWorkLinkFleetRead(d, meta) +} + +func resourceAwsWorkLinkFleetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).worklinkconn + + input := &worklink.DeleteFleetInput{ + FleetArn: aws.String(d.Id()), + } + + if _, err := conn.DeleteFleet(input); err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + return nil + } + return fmt.Errorf("Error deleting Worklink Fleet resource share %s: %s", d.Id(), err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"DELETING"}, + Target: []string{"DELETED"}, + Refresh: worklinkFleetStateRefresh(conn, d.Id()), + Timeout: 15 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, err := stateConf.WaitForState() + if err != nil { + return fmt.Errorf( + "Error waiting for Worklink Fleet (%s) to become deleted: %s", + d.Id(), err) + } + + return nil +} + +func worklinkFleetStateRefresh(conn *worklink.WorkLink, arn string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + emptyResp := &worklink.DescribeFleetMetadataOutput{} + + resp, err := conn.DescribeFleetMetadata(&worklink.DescribeFleetMetadataInput{ + FleetArn: aws.String(arn), + }) + if err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + return emptyResp, "DELETED", nil + } + } + + return resp, *resp.FleetStatus, nil + } +} + +func updateAuditStreamConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { + input := &worklink.UpdateAuditStreamConfigurationInput{ + FleetArn: aws.String(d.Id()), + } + if v, ok := d.GetOk("audit_stream_arn"); ok { + input.AuditStreamArn = aws.String(v.(string)) + } else if d.IsNewResource() { + return nil + } + + log.Printf("[DEBUG] Update audit stream configuration option: %#v", input) + if _, err := conn.UpdateAuditStreamConfiguration(input); err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error Updating Worklink Audit Stream Configuration: %s", err) + } + + return nil +} + +func updateCompanyNetworkConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { + oldNetwork, newNetwork := d.GetChange("network") + if len(oldNetwork.([]interface{})) > 0 && len(newNetwork.([]interface{})) == 0 { + return fmt.Errorf("Company Network Configuration cannot be removed from WorkLink Fleet(%s),"+ + " use 'terraform taint' to recreate the resource if you wish.", d.Id()) + } + + if v, ok := d.GetOk("network"); ok && len(v.([]interface{})) > 0 { + config := v.([]interface{})[0].(map[string]interface{}) + input := &worklink.UpdateCompanyNetworkConfigurationInput{ + FleetArn: aws.String(d.Id()), + SecurityGroupIds: expandStringSet(config["security_group_ids"].(*schema.Set)), + SubnetIds: expandStringSet(config["subnet_ids"].(*schema.Set)), + VpcId: aws.String(config["vpc_id"].(string)), + } + log.Printf("[DEBUG] Update company network configuration option: %#v", input) + if _, err := conn.UpdateCompanyNetworkConfiguration(input); err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error Updating Worklink Network Configuration: %s", err) + } + } + return nil +} + +func updateDevicePolicyConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { + input := &worklink.UpdateDevicePolicyConfigurationInput{ + FleetArn: aws.String(d.Id()), + } + if v, ok := d.GetOk("device_ca_certificate"); ok { + input.DeviceCaCertificate = aws.String(v.(string)) + } else if d.IsNewResource() { + return nil + } + + log.Printf("[DEBUG] Update device policy configuration option: %#v", input) + if _, err := conn.UpdateDevicePolicyConfiguration(input); err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error Updating Worklink Device Policy Configuration: %s", err) + } + return nil +} + +func updateIdentityProviderConfiguration(conn *worklink.WorkLink, d *schema.ResourceData) error { + oldIdentityProvider, newIdentityProvider := d.GetChange("identity_provider") + + if len(oldIdentityProvider.([]interface{})) > 0 && len(newIdentityProvider.([]interface{})) == 0 { + return fmt.Errorf("Identity Provider Configuration cannot be removed from WorkLink Fleet(%s),"+ + " use 'terraform taint' to recreate the resource if you wish.", d.Id()) + } + + if v, ok := d.GetOk("identity_provider"); ok && len(v.([]interface{})) > 0 { + config := v.([]interface{})[0].(map[string]interface{}) + input := &worklink.UpdateIdentityProviderConfigurationInput{ + FleetArn: aws.String(d.Id()), + IdentityProviderType: aws.String(config["type"].(string)), + IdentityProviderSamlMetadata: aws.String(config["saml_metadata"].(string)), + } + log.Printf("[DEBUG] Update identity provider configuration option: %#v", input) + if _, err := conn.UpdateIdentityProviderConfiguration(input); err != nil { + if isAWSErr(err, worklink.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Worklink Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("Error Updating Identity Provider Configuration: %s", err) + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go index 2712fb155..42fc6b8c0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go @@ -52,6 +52,57 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { return nil } +func getTagsS3Object(conn *s3.S3, d *schema.ResourceData) error { + resp, err := retryOnAwsCode(s3.ErrCodeNoSuchKey, func() (interface{}, error) { + return conn.GetObjectTagging(&s3.GetObjectTaggingInput{ + Bucket: aws.String(d.Get("bucket").(string)), + Key: aws.String(d.Get("key").(string)), + }) + }) + if err != nil { + return err + } + + if err := d.Set("tags", tagsToMapS3(resp.(*s3.GetObjectTaggingOutput).TagSet)); err != nil { + return err + } + + return nil +} + +func setTagsS3Object(conn *s3.S3, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + + // Set tags + if len(o) > 0 { + _, err := conn.DeleteObjectTagging(&s3.DeleteObjectTaggingInput{ + Bucket: aws.String(d.Get("bucket").(string)), + Key: aws.String(d.Get("key").(string)), + }) + if err != nil { + return err + } + } + if len(n) > 0 { + _, err := conn.PutObjectTagging(&s3.PutObjectTaggingInput{ + Bucket: aws.String(d.Get("bucket").(string)), + Key: aws.String(d.Get("key").(string)), + Tagging: &s3.Tagging{ + TagSet: tagsFromMapS3(n), + }, + }) + if err != nil { + return err + } + } + } + + return nil +} + // diffTags takes our tags locally and the ones remotely and returns // the set of tags that must be created, and the set of tags that must // be destroyed. @@ -128,7 +179,8 @@ func tagIgnoredS3(t *s3.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go index 69f582031..3fa41fcf3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go @@ -23,6 +23,7 @@ import ( "github.com/aws/aws-sdk-go/service/dax" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/aws/aws-sdk-go/service/docdb" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecs" @@ -41,6 +42,7 @@ import ( "github.com/aws/aws-sdk-go/service/route53" "github.com/aws/aws-sdk-go/service/ssm" "github.com/aws/aws-sdk-go/service/waf" + "github.com/aws/aws-sdk-go/service/worklink" "github.com/beevik/etree" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -349,7 +351,29 @@ func expandRedshiftParameters(configured []interface{}) ([]*redshift.Parameter, return parameters, nil } -func expandOptionConfiguration(configured []interface{}) ([]*rds.OptionConfiguration, error) { +// Takes the result of flatmap.Expand for an array of parameters and +// returns Parameter API compatible objects +func expandDocDBParameters(configured []interface{}) ([]*docdb.Parameter, error) { + parameters := make([]*docdb.Parameter, 0, len(configured)) + + // Loop over our configured parameters and create + // an array of aws-sdk-go compatible objects + for _, pRaw := range configured { + data := pRaw.(map[string]interface{}) + + p := &docdb.Parameter{ + ApplyMethod: aws.String(data["apply_method"].(string)), + ParameterName: aws.String(data["name"].(string)), + ParameterValue: aws.String(data["value"].(string)), + } + + parameters = append(parameters, p) + } + + return parameters, nil +} + +func expandOptionConfiguration(configured []interface{}) []*rds.OptionConfiguration { var option []*rds.OptionConfiguration for _, pRaw := range configured { @@ -391,7 +415,7 @@ func expandOptionConfiguration(configured []interface{}) ([]*rds.OptionConfigura option = append(option, o) } - return option, nil + return option } func expandOptionSetting(list []interface{}) []*rds.OptionSetting { @@ -725,57 +749,96 @@ func flattenEcsContainerDefinitions(definitions []*ecs.ContainerDefinition) (str } // Flattens an array of Options into a []map[string]interface{} -func flattenOptions(list []*rds.Option) []map[string]interface{} { - result := make([]map[string]interface{}, 0, len(list)) - for _, i := range list { - if i.OptionName != nil { - r := make(map[string]interface{}) - r["option_name"] = strings.ToLower(*i.OptionName) - // Default empty string, guard against nil parameter values - r["port"] = "" - if i.Port != nil { - r["port"] = int(*i.Port) - } - r["version"] = "" - if i.OptionVersion != nil { - r["version"] = strings.ToLower(*i.OptionVersion) - } - if i.VpcSecurityGroupMemberships != nil { - vpcs := make([]string, 0, len(i.VpcSecurityGroupMemberships)) - for _, vpc := range i.VpcSecurityGroupMemberships { - id := vpc.VpcSecurityGroupId - vpcs = append(vpcs, *id) - } +func flattenOptions(apiOptions []*rds.Option, optionConfigurations []*rds.OptionConfiguration) []map[string]interface{} { + result := make([]map[string]interface{}, 0) - r["vpc_security_group_memberships"] = vpcs - } - if i.DBSecurityGroupMemberships != nil { - dbs := make([]string, 0, len(i.DBSecurityGroupMemberships)) - for _, db := range i.DBSecurityGroupMemberships { - id := db.DBSecurityGroupName - dbs = append(dbs, *id) - } - - r["db_security_group_memberships"] = dbs - } - if i.OptionSettings != nil { - settings := make([]map[string]interface{}, 0, len(i.OptionSettings)) - for _, j := range i.OptionSettings { - setting := map[string]interface{}{ - "name": *j.Name, - } - if j.Value != nil { - setting["value"] = *j.Value - } - - settings = append(settings, setting) - } - - r["option_settings"] = settings - } - result = append(result, r) + for _, apiOption := range apiOptions { + if apiOption == nil || apiOption.OptionName == nil { + continue } + + var configuredOption *rds.OptionConfiguration + + for _, optionConfiguration := range optionConfigurations { + if aws.StringValue(apiOption.OptionName) == aws.StringValue(optionConfiguration.OptionName) { + configuredOption = optionConfiguration + break + } + } + + dbSecurityGroupMemberships := make([]interface{}, 0) + for _, db := range apiOption.DBSecurityGroupMemberships { + if db != nil { + dbSecurityGroupMemberships = append(dbSecurityGroupMemberships, aws.StringValue(db.DBSecurityGroupName)) + } + } + + optionSettings := make([]interface{}, 0) + for _, apiOptionSetting := range apiOption.OptionSettings { + // The RDS API responds with all settings. Omit settings that match default value, + // but only if unconfigured. This is to prevent operators from continually needing + // to continually update their Terraform configurations to match new option settings + // when added by the API. + var configuredOptionSetting *rds.OptionSetting + + if configuredOption != nil { + for _, configuredOptionOptionSetting := range configuredOption.OptionSettings { + if aws.StringValue(apiOptionSetting.Name) == aws.StringValue(configuredOptionOptionSetting.Name) { + configuredOptionSetting = configuredOptionOptionSetting + break + } + } + } + + if configuredOptionSetting == nil && aws.StringValue(apiOptionSetting.Value) == aws.StringValue(apiOptionSetting.DefaultValue) { + continue + } + + optionSetting := map[string]interface{}{ + "name": aws.StringValue(apiOptionSetting.Name), + "value": aws.StringValue(apiOptionSetting.Value), + } + + // Some values, like passwords, are sent back from the API as ****. + // Set the response to match the configuration to prevent an unexpected difference + if configuredOptionSetting != nil && aws.StringValue(apiOptionSetting.Value) == "****" { + optionSetting["value"] = aws.StringValue(configuredOptionSetting.Value) + } + + optionSettings = append(optionSettings, optionSetting) + } + optionSettingsResource := &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "value": { + Type: schema.TypeString, + Required: true, + }, + }, + } + + vpcSecurityGroupMemberships := make([]interface{}, 0) + for _, vpc := range apiOption.VpcSecurityGroupMemberships { + if vpc != nil { + vpcSecurityGroupMemberships = append(vpcSecurityGroupMemberships, aws.StringValue(vpc.VpcSecurityGroupId)) + } + } + + r := map[string]interface{}{ + "db_security_group_memberships": schema.NewSet(schema.HashString, dbSecurityGroupMemberships), + "option_name": aws.StringValue(apiOption.OptionName), + "option_settings": schema.NewSet(schema.HashResource(optionSettingsResource), optionSettings), + "port": aws.Int64Value(apiOption.Port), + "version": aws.StringValue(apiOption.OptionVersion), + "vpc_security_group_memberships": schema.NewSet(schema.HashString, vpcSecurityGroupMemberships), + } + + result = append(result, r) } + return result } @@ -842,6 +905,21 @@ func flattenNeptuneParameters(list []*neptune.Parameter) []map[string]interface{ return result } +// Flattens an array of Parameters into a []map[string]interface{} +func flattenDocDBParameters(list []*docdb.Parameter) []map[string]interface{} { + result := make([]map[string]interface{}, 0, len(list)) + for _, i := range list { + if i.ParameterValue != nil { + result = append(result, map[string]interface{}{ + "apply_method": aws.StringValue(i.ApplyMethod), + "name": aws.StringValue(i.ParameterName), + "value": aws.StringValue(i.ParameterValue), + }) + } + } + return result +} + // Takes the result of flatmap.Expand for an array of strings // and returns a []*string func expandStringList(configured []interface{}) []*string { @@ -1001,13 +1079,13 @@ func flattenStepAdjustments(adjustments []*autoscaling.StepAdjustment) []map[str result := make([]map[string]interface{}, 0, len(adjustments)) for _, raw := range adjustments { a := map[string]interface{}{ - "scaling_adjustment": *raw.ScalingAdjustment, + "scaling_adjustment": aws.Int64Value(raw.ScalingAdjustment), } if raw.MetricIntervalUpperBound != nil { - a["metric_interval_upper_bound"] = *raw.MetricIntervalUpperBound + a["metric_interval_upper_bound"] = fmt.Sprintf("%g", aws.Float64Value(raw.MetricIntervalUpperBound)) } if raw.MetricIntervalLowerBound != nil { - a["metric_interval_lower_bound"] = *raw.MetricIntervalLowerBound + a["metric_interval_lower_bound"] = fmt.Sprintf("%g", aws.Float64Value(raw.MetricIntervalLowerBound)) } result = append(result, a) } @@ -1410,6 +1488,14 @@ func flattenLambdaEnvironment(lambdaEnv *lambda.EnvironmentResponse) []interface return []interface{}{envs} } +func flattenLambdaLayers(layers []*lambda.Layer) []interface{} { + arns := make([]*string, len(layers)) + for i, layer := range layers { + arns[i] = layer.Arn + } + return flattenStringList(arns) +} + func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]interface{} { settings := make(map[string]interface{}) @@ -2907,9 +2993,9 @@ func flattenIoTRuleSqsActions(actions []*iot.Action) []map[string]interface{} { result := make(map[string]interface{}) v := a.Sqs if v != nil { - result["role_arn"] = *v.RoleArn - result["use_base64"] = *v.UseBase64 - result["queue_url"] = *v.QueueUrl + result["role_arn"] = aws.StringValue(v.RoleArn) + result["use_base64"] = aws.BoolValue(v.UseBase64) + result["queue_url"] = aws.StringValue(v.QueueUrl) results = append(results, result) } @@ -3639,6 +3725,41 @@ func flattenWafWebAclRules(ts []*waf.ActivatedRule) []map[string]interface{} { return out } +func flattenWorkLinkNetworkConfigResponse(c *worklink.DescribeCompanyNetworkConfigurationOutput) []map[string]interface{} { + config := make(map[string]interface{}) + + if c == nil { + return nil + } + + if len(c.SubnetIds) == 0 && len(c.SecurityGroupIds) == 0 && aws.StringValue(c.VpcId) == "" { + return nil + } + + config["subnet_ids"] = schema.NewSet(schema.HashString, flattenStringList(c.SubnetIds)) + config["security_group_ids"] = schema.NewSet(schema.HashString, flattenStringList(c.SecurityGroupIds)) + config["vpc_id"] = aws.StringValue(c.VpcId) + + return []map[string]interface{}{config} +} + +func flattenWorkLinkIdentityProviderConfigResponse(c *worklink.DescribeIdentityProviderConfigurationOutput) []map[string]interface{} { + config := make(map[string]interface{}) + + if c.IdentityProviderType == nil && c.IdentityProviderSamlMetadata == nil { + return nil + } + + if c.IdentityProviderType != nil { + config["type"] = aws.StringValue(c.IdentityProviderType) + } + if c.IdentityProviderSamlMetadata != nil { + config["saml_metadata"] = aws.StringValue(c.IdentityProviderSamlMetadata) + } + + return []map[string]interface{}{config} +} + // escapeJsonPointer escapes string per RFC 6901 // so it can be used as path in JSON patch operations func escapeJsonPointer(path string) string { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go index f716b5c0d..058511268 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go @@ -338,7 +338,8 @@ func tagIgnored(t *ec2.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } @@ -351,7 +352,8 @@ func tagIgnoredELBv2(t *elbv2.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go index 29158b109..57e26d3d9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsBeanstalk.go @@ -64,7 +64,8 @@ func tagIgnoredBeanstalk(t *elasticbeanstalk.Tag) bool { filter := []string{"^aws:", "^elasticbeanstalk:", "Name"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go index b4302ddd1..c0d7657c9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCloudtrail.go @@ -103,7 +103,8 @@ func tagIgnoredCloudtrail(t *cloudtrail.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go index 816744503..ef044f9d1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDAX.go @@ -21,7 +21,7 @@ func setTagsDax(conn *dax.DAX, d *schema.ResourceData, arn string) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -106,7 +106,8 @@ func tagIgnoredDax(t *dax.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go index 49f4d06cf..0088d139d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDS.go @@ -21,7 +21,7 @@ func setTagsDS(conn *directoryservice.DirectoryService, d *schema.ResourceData, // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -106,7 +106,8 @@ func tagIgnoredDS(t *directoryservice.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go index ca353a857..593762f82 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDX.go @@ -43,7 +43,7 @@ func setTagsDX(conn *directconnect.DirectConnect, d *schema.ResourceData, arn st // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -128,7 +128,8 @@ func tagIgnoredDX(t *directconnect.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go new file mode 100644 index 000000000..7674225fd --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsDocDB.go @@ -0,0 +1,137 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/docdb" + "github.com/hashicorp/terraform/helper/schema" +) + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsDocDB(conn *docdb.DocDB, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsDocDB(tagsFromMapDocDB(o), tagsFromMapDocDB(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + k := make([]*string, len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.RemoveTagsFromResource(&docdb.RemoveTagsFromResourceInput{ + ResourceName: aws.String(d.Get("arn").(string)), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.AddTagsToResource(&docdb.AddTagsToResourceInput{ + ResourceName: aws.String(d.Get("arn").(string)), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsDocDB(oldTags, newTags []*docdb.Tag) ([]*docdb.Tag, []*docdb.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*docdb.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } else if ok { + // already present so remove from new + delete(create, aws.StringValue(t.Key)) + } + } + + return tagsFromMapDocDB(create), remove +} + +func saveTagsDocDB(conn *docdb.DocDB, d *schema.ResourceData, arn string) error { + resp, err := conn.ListTagsForResource(&docdb.ListTagsForResourceInput{ + ResourceName: aws.String(arn), + }) + + if err != nil { + return fmt.Errorf("Error retreiving tags for ARN: %s", arn) + } + + var dt []*docdb.Tag + if len(resp.TagList) > 0 { + dt = resp.TagList + } + + return d.Set("tags", tagsToMapDocDB(dt)) +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapDocDB(m map[string]interface{}) []*docdb.Tag { + result := make([]*docdb.Tag, 0, len(m)) + for k, v := range m { + t := &docdb.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredDocDB(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapDocDB(ts []*docdb.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredDocDB(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredDocDB(t *docdb.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) + r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) + if r { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go index b9b22af9c..2da2fc3df 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEC.go @@ -21,7 +21,7 @@ func setTagsEC(conn *elasticache.ElastiCache, d *schema.ResourceData, arn string // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -106,7 +106,8 @@ func tagIgnoredEC(t *elasticache.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go new file mode 100644 index 000000000..4bedcccb6 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECR.go @@ -0,0 +1,135 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ecr" + "github.com/hashicorp/terraform/helper/schema" +) + +// getTags is a helper to get the tags for a resource. It expects the +// tags field to be named "tags" and the ARN field to be named "arn". +func getTagsECR(conn *ecr.ECR, d *schema.ResourceData) error { + resp, err := conn.ListTagsForResource(&ecr.ListTagsForResourceInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + }) + if err != nil { + return err + } + + if err := d.Set("tags", tagsToMapECR(resp.Tags)); err != nil { + return err + } + + return nil +} + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" and the ARN field to be named "arn". +func setTagsECR(conn *ecr.ECR, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsECR(tagsFromMapECR(o), tagsFromMapECR(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + k := make([]*string, len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagResource(&ecr.UntagResourceInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&ecr.TagResourceInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsECR(oldTags, newTags []*ecr.Tag) ([]*ecr.Tag, []*ecr.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*ecr.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + remove = append(remove, t) + } else if ok { + // already present so remove from new + delete(create, aws.StringValue(t.Key)) + } + } + + return tagsFromMapECR(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapECR(m map[string]interface{}) []*ecr.Tag { + result := make([]*ecr.Tag, 0, len(m)) + for k, v := range m { + t := &ecr.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredECR(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapECR(ts []*ecr.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredECR(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredECR(t *ecr.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + r, _ := regexp.MatchString(v, *t.Key) + if r { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go index 9a9854288..67a924155 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go @@ -68,7 +68,8 @@ func tagIgnoredECS(t *ecs.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go index b61973165..281bd9f29 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsEFS.go @@ -105,7 +105,8 @@ func tagIgnoredEFS(t *efs.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go index 081de9cc1..b45c49a15 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsELB.go @@ -105,7 +105,8 @@ func tagIgnoredELB(t *elb.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go index d494a4972..2deb9baba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsGeneric.go @@ -60,7 +60,8 @@ func tagIgnoredGeneric(k string) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, k) - if r, _ := regexp.MatchString(v, k); r == true { + r, _ := regexp.MatchString(v, k) + if r { log.Printf("[DEBUG] Found AWS specific tag %s, ignoring.\n", k) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go index 17a547c54..6610ba8c5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go @@ -67,7 +67,8 @@ func tagIgnoredIAM(t *iam.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go index 68539f738..41e4336d7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go @@ -30,7 +30,8 @@ func tagIgnoredInspector(t *inspector.ResourceGroupTag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go index 4e918414e..d0a10d4a9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKMS.go @@ -21,7 +21,7 @@ func setTagsKMS(conn *kms.KMS, d *schema.ResourceData, keyId string) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.TagKey } @@ -106,7 +106,8 @@ func tagIgnoredKMS(t *kms.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.TagKey) - if r, _ := regexp.MatchString(v, *t.TagKey); r == true { + r, _ := regexp.MatchString(v, *t.TagKey) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.TagKey, *t.TagValue) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go index f513bab92..1af7e49a0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go @@ -27,9 +27,7 @@ func getTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn return err } - for _, tag := range resp.Tags { - tags = append(tags, tag) - } + tags = append(tags, resp.Tags...) // If HasMoreTags is true in the response, more tags are available. // To list the remaining tags, set ExclusiveStartTagKey to the key @@ -40,11 +38,8 @@ func getTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn exclusiveStartTagKey = aws.StringValue(tags[len(tags)-1].Key) } - if err := d.Set("tags", tagsToMapKinesisFirehose(tags)); err != nil { - return err - } - - return nil + err := d.Set("tags", tagsToMapKinesisFirehose(tags)) + return err } // setTags is a helper to set the tags for a resource. It expects the @@ -59,7 +54,7 @@ func setTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -144,7 +139,8 @@ func tagIgnoredKinesisFirehose(t *firehose.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go new file mode 100644 index 000000000..20f786cfd --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsLicenseManager.go @@ -0,0 +1,115 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/licensemanager" + "github.com/hashicorp/terraform/helper/schema" +) + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsLicenseManager(conn *licensemanager.LicenseManager, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsLicenseManager(tagsFromMapLicenseManager(o), tagsFromMapLicenseManager(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + k := make([]*string, len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagResource(&licensemanager.UntagResourceInput{ + ResourceArn: aws.String(d.Id()), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagResource(&licensemanager.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsLicenseManager(oldTags, newTags []*licensemanager.Tag) ([]*licensemanager.Tag, []*licensemanager.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[*t.Key] = *t.Value + } + + // Build the list of what to remove + var remove []*licensemanager.Tag + for _, t := range oldTags { + old, ok := create[*t.Key] + if !ok || old != *t.Value { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapLicenseManager(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapLicenseManager(m map[string]interface{}) []*licensemanager.Tag { + result := make([]*licensemanager.Tag, 0, len(m)) + for k, v := range m { + t := &licensemanager.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredLicenseManager(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapLicenseManager(ts []*licensemanager.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredLicenseManager(t) { + result[*t.Key] = *t.Value + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredLicenseManager(t *licensemanager.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go new file mode 100644 index 000000000..2ea270be7 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsMQ.go @@ -0,0 +1,67 @@ +package aws + +import ( + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/mq" + "github.com/hashicorp/terraform/helper/schema" +) + +// getTags is a helper to get the tags for a resource. It expects the +// tags field to be named "tags" +func getTagsMQ(conn *mq.MQ, d *schema.ResourceData, arn string) error { + resp, err := conn.ListTags(&mq.ListTagsInput{ + ResourceArn: aws.String(arn), + }) + if err != nil { + return err + } + + if err := d.Set("tags", tagsToMapGeneric(resp.Tags)); err != nil { + return err + } + + return nil +} + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsMQ(conn *mq.MQ, d *schema.ResourceData, arn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsGeneric(o, n) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + keys := make([]*string, 0, len(remove)) + for k := range remove { + keys = append(keys, aws.String(k)) + } + + _, err := conn.DeleteTags(&mq.DeleteTagsInput{ + ResourceArn: aws.String(arn), + TagKeys: keys, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + + _, err := conn.CreateTags(&mq.CreateTagsInput{ + ResourceArn: aws.String(arn), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go index 8f47bb3d8..b5f0ba2a0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go @@ -22,7 +22,7 @@ func setTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) e // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -107,7 +107,8 @@ func tagIgnoredNeptune(t *neptune.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go new file mode 100644 index 000000000..f9fb6bd90 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRAM.go @@ -0,0 +1,85 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ram" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsRAM(oldTags, newTags []*ram.Tag) ([]*ram.Tag, []*ram.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*ram.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } else if ok { + delete(create, aws.StringValue(t.Key)) + } + } + + return tagsFromMapRAM(create), remove +} + +// tagsFromMapRAM returns the tags for the given map of data for RAM. +func tagsFromMapRAM(m map[string]interface{}) []*ram.Tag { + result := make([]*ram.Tag, 0, len(m)) + for k, v := range m { + t := &ram.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredRAM(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMapRAM turns the list of RAM tags into a map. +func tagsToMapRAM(ts []*ram.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredRAM(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredRAM(t *ram.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} + +// tagKeysRam returns the keys for the list of RAM tags +func tagKeysRam(ts []*ram.Tag) []*string { + result := make([]*string, 0, len(ts)) + for _, t := range ts { + result = append(result, t.Key) + } + return result +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go index ef7a869d3..78e4f923f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go @@ -22,7 +22,7 @@ func setTagsRDS(conn *rds.RDS, d *schema.ResourceData, arn string) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %s", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -124,7 +124,8 @@ func tagIgnoredRDS(t *rds.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go index 715e82045..26af8e767 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRedshift.go @@ -19,7 +19,7 @@ func setTagsRedshift(conn *redshift.Redshift, d *schema.ResourceData, arn string // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -99,7 +99,8 @@ func tagIgnoredRedshift(t *redshift.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go index c26eafc53..9b765cb73 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSSM.go @@ -21,7 +21,7 @@ func setTagsSSM(conn *ssm.SSM, d *schema.ResourceData, id, resourceType string) // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -108,7 +108,8 @@ func tagIgnoredSSM(t *ssm.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go index 559218317..e7547ad7f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSecretsManager.go @@ -65,7 +65,8 @@ func tagIgnoredSecretsManager(t *secretsmanager.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go new file mode 100644 index 000000000..093fbc78f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsSfn.go @@ -0,0 +1,78 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/sfn" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsSfn(oldTags, newTags []*sfn.Tag) ([]*sfn.Tag, []*sfn.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*sfn.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } else if ok { + // already present so remove from new + delete(create, aws.StringValue(t.Key)) + } + } + + return tagsFromMapSfn(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapSfn(tagMap map[string]interface{}) []*sfn.Tag { + tags := make([]*sfn.Tag, 0, len(tagMap)) + for tagKey, tagValueRaw := range tagMap { + tag := &sfn.Tag{ + Key: aws.String(tagKey), + Value: aws.String(tagValueRaw.(string)), + } + if !tagIgnoredSfn(tag) { + tags = append(tags, tag) + } + } + + return tags +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapSfn(tags []*sfn.Tag) map[string]string { + tagMap := make(map[string]string) + for _, tag := range tags { + if !tagIgnoredSfn(tag) { + tagMap[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value) + } + } + + return tagMap +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredSfn(t *sfn.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) + r, _ := regexp.MatchString(v, aws.StringValue(t.Key)) + if r { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransferServer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go similarity index 77% rename from vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransferServer.go rename to vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go index 0f9a6d29d..17e41dd88 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransferServer.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsTransfer.go @@ -11,17 +11,17 @@ import ( // setTags is a helper to set the tags for a resource. It expects the // tags field to be named "tags" -func setTagsTransferServer(conn *transfer.Transfer, d *schema.ResourceData) error { +func setTagsTransfer(conn *transfer.Transfer, d *schema.ResourceData) error { if d.HasChange("tags") { oraw, nraw := d.GetChange("tags") o := oraw.(map[string]interface{}) n := nraw.(map[string]interface{}) - create, remove := diffTagsTransferServer(tagsFromMapTransferServer(o), tagsFromMapTransferServer(n)) + create, remove := diffTagsTransfer(tagsFromMapTransfer(o), tagsFromMapTransfer(n)) // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - k := make([]*string, len(remove), len(remove)) + k := make([]*string, len(remove)) for i, t := range remove { k[i] = t.Key } @@ -52,7 +52,7 @@ func setTagsTransferServer(conn *transfer.Transfer, d *schema.ResourceData) erro // diffTags takes our tags locally and the ones remotely and returns // the set of tags that must be created, and the set of tags that must // be destroyed. -func diffTagsTransferServer(oldTags, newTags []*transfer.Tag) ([]*transfer.Tag, []*transfer.Tag) { +func diffTagsTransfer(oldTags, newTags []*transfer.Tag) ([]*transfer.Tag, []*transfer.Tag) { // First, we're creating everything we have create := make(map[string]interface{}) for _, t := range newTags { @@ -72,18 +72,18 @@ func diffTagsTransferServer(oldTags, newTags []*transfer.Tag) ([]*transfer.Tag, } } - return tagsFromMapTransferServer(create), remove + return tagsFromMapTransfer(create), remove } // tagsFromMap returns the tags for the given map of data. -func tagsFromMapTransferServer(m map[string]interface{}) []*transfer.Tag { +func tagsFromMapTransfer(m map[string]interface{}) []*transfer.Tag { result := make([]*transfer.Tag, 0, len(m)) for k, v := range m { t := &transfer.Tag{ Key: aws.String(k), Value: aws.String(v.(string)), } - if !tagIgnoredTransferServer(t) { + if !tagIgnoredTransfer(t) { result = append(result, t) } } @@ -92,10 +92,10 @@ func tagsFromMapTransferServer(m map[string]interface{}) []*transfer.Tag { } // tagsToMap turns the list of tags into a map. -func tagsToMapTransferServer(ts []*transfer.Tag) map[string]string { +func tagsToMapTransfer(ts []*transfer.Tag) map[string]string { result := make(map[string]string) for _, t := range ts { - if !tagIgnoredTransferServer(t) { + if !tagIgnoredTransfer(t) { result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) } } @@ -105,11 +105,11 @@ func tagsToMapTransferServer(ts []*transfer.Tag) map[string]string { // compare a tag against a list of strings and checks if it should // be ignored or not -func tagIgnoredTransferServer(t *transfer.Tag) bool { +func tagIgnoredTransfer(t *transfer.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go index e585d1afa..54019415b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_elasticsearchservice.go @@ -105,7 +105,8 @@ func tagIgnoredElasticsearchService(t *elasticsearch.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go index fe1e5f28a..de984a5d0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_kinesis.go @@ -136,7 +136,8 @@ func tagIgnoredKinesis(t *kinesis.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go index 372167291..2b9ef529f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_route53.go @@ -102,7 +102,8 @@ func tagIgnoredRoute53(t *route53.Tag) bool { filter := []string{"^aws:"} for _, v := range filter { log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { + r, _ := regexp.MatchString(v, *t.Key) + if r { log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) return true } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go new file mode 100644 index 000000000..52dcf865a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags_sagemaker.go @@ -0,0 +1,120 @@ +package aws + +import ( + "log" + "regexp" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/sagemaker" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func tagsFromMapSagemaker(m map[string]interface{}) []*sagemaker.Tag { + result := make([]*sagemaker.Tag, 0, len(m)) + for k, v := range m { + t := &sagemaker.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredSagemaker(t) { + result = append(result, t) + } + } + + return result +} + +func tagsToMapSagemaker(ts []*sagemaker.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredSagemaker(t) { + result[*t.Key] = *t.Value + } + } + + return result +} + +func setSagemakerTags(conn *sagemaker.SageMaker, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffSagemakerTags(tagsFromMapSagemaker(o), tagsFromMapSagemaker(n)) + + if len(remove) > 0 { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) + _, err := conn.DeleteTags(&sagemaker.DeleteTagsInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + TagKeys: remove, + }) + if err != nil { + sagemakerErr, ok := err.(awserr.Error) + if ok && sagemakerErr.Code() == "ResourceNotFound" { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return err + } + } + if len(create) > 0 { + err := resource.Retry(5*time.Minute, func() *resource.RetryError { + log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) + _, err := conn.AddTags(&sagemaker.AddTagsInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + Tags: create, + }) + if err != nil { + sagemakerErr, ok := err.(awserr.Error) + if ok && sagemakerErr.Code() == "ResourceNotFound" { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return err + } + } + } + + return nil +} + +func diffSagemakerTags(oldTags, newTags []*sagemaker.Tag) ([]*sagemaker.Tag, []*string) { + create := make(map[string]interface{}) + for _, t := range newTags { + create[*t.Key] = *t.Value + } + + var remove []*string + for _, t := range oldTags { + old, ok := create[*t.Key] + if !ok || old != *t.Value { + remove = append(remove, t.Key) + } + } + + return tagsFromMapSagemaker(create), remove +} + +func tagIgnoredSagemaker(t *sagemaker.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go index c3eab5e22..a58d5a823 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go @@ -82,6 +82,34 @@ func validateTypeStringNullableFloat(v interface{}, k string) (ws []string, es [ return } +func validateTransferServerID(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + // https://docs.aws.amazon.com/transfer/latest/userguide/API_CreateUser.html + pattern := `^s-([0-9a-f]{17})$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q isn't a valid transfer server id (only lowercase alphanumeric characters are allowed): %q", + k, value)) + } + + return +} + +func validateTransferUserName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + // https://docs.aws.amazon.com/transfer/latest/userguide/API_CreateUser.html + pattern := `^[a-z0-9]{3,32}$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q isn't a valid transfer user name (only lowercase alphanumeric characters are allowed): %q", + k, value)) + } + + return +} + func validateRdsIdentifier(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { @@ -265,6 +293,138 @@ func validateDbParamGroupNamePrefix(v interface{}, k string) (ws []string, error return } +func validateDocDBIdentifier(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + +func validateDocDBIdentifierPrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + return +} + +func validateDocDBEngine() schema.SchemaValidateFunc { + return validation.StringInSlice([]string{ + "docdb", + }, false) +} + +func validateDocDBParamGroupName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of parameter group %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "parameter group %q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "parameter group %q cannot end with a hyphen", k)) + } + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "parameter group %q cannot be greater than 255 characters", k)) + } + return +} + +func validateDocDBParamGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in parameter group %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of parameter group %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "parameter group %q cannot contain two consecutive hyphens", k)) + } + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "parameter group %q cannot be greater than 226 characters", k)) + } + return +} + +func validateDocDBClusterIdentifier(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + +func validateDocDBClusterSnapshotIdentifier(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if regexp.MustCompile(`--`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot contain two consecutive hyphens", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + func validateElbName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) == 0 { @@ -308,6 +468,80 @@ func validateElbNamePrefix(v interface{}, k string) (ws []string, errors []error return } +func validateSagemakerName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q: %q", + k, value)) + } + if len(value) > 63 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 63 characters: %q", k, value)) + } + if regexp.MustCompile(`^-`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot begin with a hyphen: %q", k, value)) + } + return +} + +func validateSagemakerEnvironment(v interface{}, k string) (ws []string, errors []error) { + value := v.(map[string]interface{}) + for envK, envV := range value { + if !regexp.MustCompile(`^[0-9A-Za-z_]+$`).MatchString(envK) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and underscore allowed in %q: %q", + k, envK)) + } + if len(envK) > 1024 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 1024 characters: %q", k, envK)) + } + if len(envV.(string)) > 1024 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 1024 characters: %q", k, envV.(string))) + } + if regexp.MustCompile(`^[0-9]`).MatchString(envK) { + errors = append(errors, fmt.Errorf( + "%q cannot begin with a digit: %q", k, envK)) + } + } + return +} + +func validateSagemakerImage(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`[\S]+`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "no whitespace allowed in %q: %q", + k, value)) + } + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 255 characters: %q", k, value)) + } + return +} + +func validateSagemakerModelDataUrl(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^(https|s3)://([^/]+)/?(.*)$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must be a valid path: %q", + k, value)) + } + if len(value) > 1024 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 1024 characters: %q", k, value)) + } + if !regexp.MustCompile(`^(https|s3)://`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q must be a path that starts with either s3 or https: %q", k, value)) + } + return +} + func validateCloudWatchDashboardName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 255 { @@ -1051,6 +1285,23 @@ func validateDbSubnetGroupName(v interface{}, k string) (ws []string, errors []e return } +func validateDocDBSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) + } + if len(value) > 255 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 255 characters", k)) + } + if value == "default" { + errors = append(errors, fmt.Errorf( + "%q is not allowed as %q", "Default", k)) + } + return +} + func validateNeptuneSubnetGroupName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { @@ -1081,6 +1332,20 @@ func validateDbSubnetGroupNamePrefix(v interface{}, k string) (ws []string, erro return } +func validateDocDBSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only lowercase alphanumeric characters, hyphens, underscores, periods, and spaces allowed in %q", k)) + } + prefixMaxLength := 255 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than %d characters", k, prefixMaxLength)) + } + return +} + func validateNeptuneSubnetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[ .0-9a-z-_]+$`).MatchString(value) { @@ -2015,6 +2280,27 @@ func validateCloudFrontPublicKeyNamePrefix(v interface{}, k string) (ws []string return } +func validateServiceDiscoveryHttpNamespaceName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z_-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters, underscores and hyphens allowed in %q", k)) + } + if !regexp.MustCompile(`^[a-zA-Z]`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "first character of %q must be a letter", k)) + } + if !regexp.MustCompile(`[a-zA-Z]$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "last character of %q must be a letter", k)) + } + if len(value) > 1024 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 1024 characters", k)) + } + return +} + func validateLbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 32 { @@ -2080,3 +2366,18 @@ func validateSecretManagerSecretNamePrefix(v interface{}, k string) (ws []string } return } + +func validateWorklinkFleetName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[a-z0-9](?:[a-z0-9\-]{0,46}[a-z0-9])?$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters are allowed in %q", k)) + } + if len(value) < 1 { + errors = append(errors, fmt.Errorf("%q cannot be shorter than 1 character", k)) + } else if len(value) > 48 { + errors = append(errors, fmt.Errorf("%q cannot be longer than 48 characters", k)) + } + + return +} diff --git a/vendor/gopkg.in/inf.v0/LICENSE b/vendor/gopkg.in/inf.v0/LICENSE new file mode 100644 index 000000000..87a5cede3 --- /dev/null +++ b/vendor/gopkg.in/inf.v0/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go +Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/gopkg.in/inf.v0/dec.go b/vendor/gopkg.in/inf.v0/dec.go new file mode 100644 index 000000000..26548b63c --- /dev/null +++ b/vendor/gopkg.in/inf.v0/dec.go @@ -0,0 +1,615 @@ +// Package inf (type inf.Dec) implements "infinite-precision" decimal +// arithmetic. +// "Infinite precision" describes two characteristics: practically unlimited +// precision for decimal number representation and no support for calculating +// with any specific fixed precision. +// (Although there is no practical limit on precision, inf.Dec can only +// represent finite decimals.) +// +// This package is currently in experimental stage and the API may change. +// +// This package does NOT support: +// - rounding to specific precisions (as opposed to specific decimal positions) +// - the notion of context (each rounding must be explicit) +// - NaN and Inf values, and distinguishing between positive and negative zero +// - conversions to and from float32/64 types +// +// Features considered for possible addition: +// + formatting options +// + Exp method +// + combined operations such as AddRound/MulAdd etc +// + exchanging data in decimal32/64/128 formats +// +package inf // import "gopkg.in/inf.v0" + +// TODO: +// - avoid excessive deep copying (quo and rounders) + +import ( + "fmt" + "io" + "math/big" + "strings" +) + +// A Dec represents a signed arbitrary-precision decimal. +// It is a combination of a sign, an arbitrary-precision integer coefficient +// value, and a signed fixed-precision exponent value. +// The sign and the coefficient value are handled together as a signed value +// and referred to as the unscaled value. +// (Positive and negative zero values are not distinguished.) +// Since the exponent is most commonly non-positive, it is handled in negated +// form and referred to as scale. +// +// The mathematical value of a Dec equals: +// +// unscaled * 10**(-scale) +// +// Note that different Dec representations may have equal mathematical values. +// +// unscaled scale String() +// ------------------------- +// 0 0 "0" +// 0 2 "0.00" +// 0 -2 "0" +// 1 0 "1" +// 100 2 "1.00" +// 10 0 "10" +// 1 -1 "10" +// +// The zero value for a Dec represents the value 0 with scale 0. +// +// Operations are typically performed through the *Dec type. +// The semantics of the assignment operation "=" for "bare" Dec values is +// undefined and should not be relied on. +// +// Methods are typically of the form: +// +// func (z *Dec) Op(x, y *Dec) *Dec +// +// and implement operations z = x Op y with the result as receiver; if it +// is one of the operands it may be overwritten (and its memory reused). +// To enable chaining of operations, the result is also returned. Methods +// returning a result other than *Dec take one of the operands as the receiver. +// +// A "bare" Quo method (quotient / division operation) is not provided, as the +// result is not always a finite decimal and thus in general cannot be +// represented as a Dec. +// Instead, in the common case when rounding is (potentially) necessary, +// QuoRound should be used with a Scale and a Rounder. +// QuoExact or QuoRound with RoundExact can be used in the special cases when it +// is known that the result is always a finite decimal. +// +type Dec struct { + unscaled big.Int + scale Scale +} + +// Scale represents the type used for the scale of a Dec. +type Scale int32 + +const scaleSize = 4 // bytes in a Scale value + +// Scaler represents a method for obtaining the scale to use for the result of +// an operation on x and y. +type scaler interface { + Scale(x *Dec, y *Dec) Scale +} + +var bigInt = [...]*big.Int{ + big.NewInt(0), big.NewInt(1), big.NewInt(2), big.NewInt(3), big.NewInt(4), + big.NewInt(5), big.NewInt(6), big.NewInt(7), big.NewInt(8), big.NewInt(9), + big.NewInt(10), +} + +var exp10cache [64]big.Int = func() [64]big.Int { + e10, e10i := [64]big.Int{}, bigInt[1] + for i := range e10 { + e10[i].Set(e10i) + e10i = new(big.Int).Mul(e10i, bigInt[10]) + } + return e10 +}() + +// NewDec allocates and returns a new Dec set to the given int64 unscaled value +// and scale. +func NewDec(unscaled int64, scale Scale) *Dec { + return new(Dec).SetUnscaled(unscaled).SetScale(scale) +} + +// NewDecBig allocates and returns a new Dec set to the given *big.Int unscaled +// value and scale. +func NewDecBig(unscaled *big.Int, scale Scale) *Dec { + return new(Dec).SetUnscaledBig(unscaled).SetScale(scale) +} + +// Scale returns the scale of x. +func (x *Dec) Scale() Scale { + return x.scale +} + +// Unscaled returns the unscaled value of x for u and true for ok when the +// unscaled value can be represented as int64; otherwise it returns an undefined +// int64 value for u and false for ok. Use x.UnscaledBig().Int64() to avoid +// checking the validity of the value when the check is known to be redundant. +func (x *Dec) Unscaled() (u int64, ok bool) { + u = x.unscaled.Int64() + var i big.Int + ok = i.SetInt64(u).Cmp(&x.unscaled) == 0 + return +} + +// UnscaledBig returns the unscaled value of x as *big.Int. +func (x *Dec) UnscaledBig() *big.Int { + return &x.unscaled +} + +// SetScale sets the scale of z, with the unscaled value unchanged, and returns +// z. +// The mathematical value of the Dec changes as if it was multiplied by +// 10**(oldscale-scale). +func (z *Dec) SetScale(scale Scale) *Dec { + z.scale = scale + return z +} + +// SetUnscaled sets the unscaled value of z, with the scale unchanged, and +// returns z. +func (z *Dec) SetUnscaled(unscaled int64) *Dec { + z.unscaled.SetInt64(unscaled) + return z +} + +// SetUnscaledBig sets the unscaled value of z, with the scale unchanged, and +// returns z. +func (z *Dec) SetUnscaledBig(unscaled *big.Int) *Dec { + z.unscaled.Set(unscaled) + return z +} + +// Set sets z to the value of x and returns z. +// It does nothing if z == x. +func (z *Dec) Set(x *Dec) *Dec { + if z != x { + z.SetUnscaledBig(x.UnscaledBig()) + z.SetScale(x.Scale()) + } + return z +} + +// Sign returns: +// +// -1 if x < 0 +// 0 if x == 0 +// +1 if x > 0 +// +func (x *Dec) Sign() int { + return x.UnscaledBig().Sign() +} + +// Neg sets z to -x and returns z. +func (z *Dec) Neg(x *Dec) *Dec { + z.SetScale(x.Scale()) + z.UnscaledBig().Neg(x.UnscaledBig()) + return z +} + +// Cmp compares x and y and returns: +// +// -1 if x < y +// 0 if x == y +// +1 if x > y +// +func (x *Dec) Cmp(y *Dec) int { + xx, yy := upscale(x, y) + return xx.UnscaledBig().Cmp(yy.UnscaledBig()) +} + +// Abs sets z to |x| (the absolute value of x) and returns z. +func (z *Dec) Abs(x *Dec) *Dec { + z.SetScale(x.Scale()) + z.UnscaledBig().Abs(x.UnscaledBig()) + return z +} + +// Add sets z to the sum x+y and returns z. +// The scale of z is the greater of the scales of x and y. +func (z *Dec) Add(x, y *Dec) *Dec { + xx, yy := upscale(x, y) + z.SetScale(xx.Scale()) + z.UnscaledBig().Add(xx.UnscaledBig(), yy.UnscaledBig()) + return z +} + +// Sub sets z to the difference x-y and returns z. +// The scale of z is the greater of the scales of x and y. +func (z *Dec) Sub(x, y *Dec) *Dec { + xx, yy := upscale(x, y) + z.SetScale(xx.Scale()) + z.UnscaledBig().Sub(xx.UnscaledBig(), yy.UnscaledBig()) + return z +} + +// Mul sets z to the product x*y and returns z. +// The scale of z is the sum of the scales of x and y. +func (z *Dec) Mul(x, y *Dec) *Dec { + z.SetScale(x.Scale() + y.Scale()) + z.UnscaledBig().Mul(x.UnscaledBig(), y.UnscaledBig()) + return z +} + +// Round sets z to the value of x rounded to Scale s using Rounder r, and +// returns z. +func (z *Dec) Round(x *Dec, s Scale, r Rounder) *Dec { + return z.QuoRound(x, NewDec(1, 0), s, r) +} + +// QuoRound sets z to the quotient x/y, rounded using the given Rounder to the +// specified scale. +// +// If the rounder is RoundExact but the result can not be expressed exactly at +// the specified scale, QuoRound returns nil, and the value of z is undefined. +// +// There is no corresponding Div method; the equivalent can be achieved through +// the choice of Rounder used. +// +func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec { + return z.quo(x, y, sclr{s}, r) +} + +func (z *Dec) quo(x, y *Dec, s scaler, r Rounder) *Dec { + scl := s.Scale(x, y) + var zzz *Dec + if r.UseRemainder() { + zz, rA, rB := new(Dec).quoRem(x, y, scl, true, new(big.Int), new(big.Int)) + zzz = r.Round(new(Dec), zz, rA, rB) + } else { + zz, _, _ := new(Dec).quoRem(x, y, scl, false, nil, nil) + zzz = r.Round(new(Dec), zz, nil, nil) + } + if zzz == nil { + return nil + } + return z.Set(zzz) +} + +// QuoExact sets z to the quotient x/y and returns z when x/y is a finite +// decimal. Otherwise it returns nil and the value of z is undefined. +// +// The scale of a non-nil result is "x.Scale() - y.Scale()" or greater; it is +// calculated so that the remainder will be zero whenever x/y is a finite +// decimal. +func (z *Dec) QuoExact(x, y *Dec) *Dec { + return z.quo(x, y, scaleQuoExact{}, RoundExact) +} + +// quoRem sets z to the quotient x/y with the scale s, and if useRem is true, +// it sets remNum and remDen to the numerator and denominator of the remainder. +// It returns z, remNum and remDen. +// +// The remainder is normalized to the range -1 < r < 1 to simplify rounding; +// that is, the results satisfy the following equation: +// +// x / y = z + (remNum/remDen) * 10**(-z.Scale()) +// +// See Rounder for more details about rounding. +// +func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool, + remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) { + // difference (required adjustment) compared to "canonical" result scale + shift := s - (x.Scale() - y.Scale()) + // pointers to adjusted unscaled dividend and divisor + var ix, iy *big.Int + switch { + case shift > 0: + // increased scale: decimal-shift dividend left + ix = new(big.Int).Mul(x.UnscaledBig(), exp10(shift)) + iy = y.UnscaledBig() + case shift < 0: + // decreased scale: decimal-shift divisor left + ix = x.UnscaledBig() + iy = new(big.Int).Mul(y.UnscaledBig(), exp10(-shift)) + default: + ix = x.UnscaledBig() + iy = y.UnscaledBig() + } + // save a copy of iy in case it to be overwritten with the result + iy2 := iy + if iy == z.UnscaledBig() { + iy2 = new(big.Int).Set(iy) + } + // set scale + z.SetScale(s) + // set unscaled + if useRem { + // Int division + _, intr := z.UnscaledBig().QuoRem(ix, iy, new(big.Int)) + // set remainder + remNum.Set(intr) + remDen.Set(iy2) + } else { + z.UnscaledBig().Quo(ix, iy) + } + return z, remNum, remDen +} + +type sclr struct{ s Scale } + +func (s sclr) Scale(x, y *Dec) Scale { + return s.s +} + +type scaleQuoExact struct{} + +func (sqe scaleQuoExact) Scale(x, y *Dec) Scale { + rem := new(big.Rat).SetFrac(x.UnscaledBig(), y.UnscaledBig()) + f2, f5 := factor2(rem.Denom()), factor(rem.Denom(), bigInt[5]) + var f10 Scale + if f2 > f5 { + f10 = Scale(f2) + } else { + f10 = Scale(f5) + } + return x.Scale() - y.Scale() + f10 +} + +func factor(n *big.Int, p *big.Int) int { + // could be improved for large factors + d, f := n, 0 + for { + dd, dm := new(big.Int).DivMod(d, p, new(big.Int)) + if dm.Sign() == 0 { + f++ + d = dd + } else { + break + } + } + return f +} + +func factor2(n *big.Int) int { + // could be improved for large factors + f := 0 + for ; n.Bit(f) == 0; f++ { + } + return f +} + +func upscale(a, b *Dec) (*Dec, *Dec) { + if a.Scale() == b.Scale() { + return a, b + } + if a.Scale() > b.Scale() { + bb := b.rescale(a.Scale()) + return a, bb + } + aa := a.rescale(b.Scale()) + return aa, b +} + +func exp10(x Scale) *big.Int { + if int(x) < len(exp10cache) { + return &exp10cache[int(x)] + } + return new(big.Int).Exp(bigInt[10], big.NewInt(int64(x)), nil) +} + +func (x *Dec) rescale(newScale Scale) *Dec { + shift := newScale - x.Scale() + switch { + case shift < 0: + e := exp10(-shift) + return NewDecBig(new(big.Int).Quo(x.UnscaledBig(), e), newScale) + case shift > 0: + e := exp10(shift) + return NewDecBig(new(big.Int).Mul(x.UnscaledBig(), e), newScale) + } + return x +} + +var zeros = []byte("00000000000000000000000000000000" + + "00000000000000000000000000000000") +var lzeros = Scale(len(zeros)) + +func appendZeros(s []byte, n Scale) []byte { + for i := Scale(0); i < n; i += lzeros { + if n > i+lzeros { + s = append(s, zeros...) + } else { + s = append(s, zeros[0:n-i]...) + } + } + return s +} + +func (x *Dec) String() string { + if x == nil { + return "" + } + scale := x.Scale() + s := []byte(x.UnscaledBig().String()) + if scale <= 0 { + if scale != 0 && x.unscaled.Sign() != 0 { + s = appendZeros(s, -scale) + } + return string(s) + } + negbit := Scale(-((x.Sign() - 1) / 2)) + // scale > 0 + lens := Scale(len(s)) + if lens-negbit <= scale { + ss := make([]byte, 0, scale+2) + if negbit == 1 { + ss = append(ss, '-') + } + ss = append(ss, '0', '.') + ss = appendZeros(ss, scale-lens+negbit) + ss = append(ss, s[negbit:]...) + return string(ss) + } + // lens > scale + ss := make([]byte, 0, lens+1) + ss = append(ss, s[:lens-scale]...) + ss = append(ss, '.') + ss = append(ss, s[lens-scale:]...) + return string(ss) +} + +// Format is a support routine for fmt.Formatter. It accepts the decimal +// formats 'd' and 'f', and handles both equivalently. +// Width, precision, flags and bases 2, 8, 16 are not supported. +func (x *Dec) Format(s fmt.State, ch rune) { + if ch != 'd' && ch != 'f' && ch != 'v' && ch != 's' { + fmt.Fprintf(s, "%%!%c(dec.Dec=%s)", ch, x.String()) + return + } + fmt.Fprintf(s, x.String()) +} + +func (z *Dec) scan(r io.RuneScanner) (*Dec, error) { + unscaled := make([]byte, 0, 256) // collects chars of unscaled as bytes + dp, dg := -1, -1 // indexes of decimal point, first digit +loop: + for { + ch, _, err := r.ReadRune() + if err == io.EOF { + break loop + } + if err != nil { + return nil, err + } + switch { + case ch == '+' || ch == '-': + if len(unscaled) > 0 || dp >= 0 { // must be first character + r.UnreadRune() + break loop + } + case ch == '.': + if dp >= 0 { + r.UnreadRune() + break loop + } + dp = len(unscaled) + continue // don't add to unscaled + case ch >= '0' && ch <= '9': + if dg == -1 { + dg = len(unscaled) + } + default: + r.UnreadRune() + break loop + } + unscaled = append(unscaled, byte(ch)) + } + if dg == -1 { + return nil, fmt.Errorf("no digits read") + } + if dp >= 0 { + z.SetScale(Scale(len(unscaled) - dp)) + } else { + z.SetScale(0) + } + _, ok := z.UnscaledBig().SetString(string(unscaled), 10) + if !ok { + return nil, fmt.Errorf("invalid decimal: %s", string(unscaled)) + } + return z, nil +} + +// SetString sets z to the value of s, interpreted as a decimal (base 10), +// and returns z and a boolean indicating success. The scale of z is the +// number of digits after the decimal point (including any trailing 0s), +// or 0 if there is no decimal point. If SetString fails, the value of z +// is undefined but the returned value is nil. +func (z *Dec) SetString(s string) (*Dec, bool) { + r := strings.NewReader(s) + _, err := z.scan(r) + if err != nil { + return nil, false + } + _, _, err = r.ReadRune() + if err != io.EOF { + return nil, false + } + // err == io.EOF => scan consumed all of s + return z, true +} + +// Scan is a support routine for fmt.Scanner; it sets z to the value of +// the scanned number. It accepts the decimal formats 'd' and 'f', and +// handles both equivalently. Bases 2, 8, 16 are not supported. +// The scale of z is the number of digits after the decimal point +// (including any trailing 0s), or 0 if there is no decimal point. +func (z *Dec) Scan(s fmt.ScanState, ch rune) error { + if ch != 'd' && ch != 'f' && ch != 's' && ch != 'v' { + return fmt.Errorf("Dec.Scan: invalid verb '%c'", ch) + } + s.SkipSpace() + _, err := z.scan(s) + return err +} + +// Gob encoding version +const decGobVersion byte = 1 + +func scaleBytes(s Scale) []byte { + buf := make([]byte, scaleSize) + i := scaleSize + for j := 0; j < scaleSize; j++ { + i-- + buf[i] = byte(s) + s >>= 8 + } + return buf +} + +func scale(b []byte) (s Scale) { + for j := 0; j < scaleSize; j++ { + s <<= 8 + s |= Scale(b[j]) + } + return +} + +// GobEncode implements the gob.GobEncoder interface. +func (x *Dec) GobEncode() ([]byte, error) { + buf, err := x.UnscaledBig().GobEncode() + if err != nil { + return nil, err + } + buf = append(append(buf, scaleBytes(x.Scale())...), decGobVersion) + return buf, nil +} + +// GobDecode implements the gob.GobDecoder interface. +func (z *Dec) GobDecode(buf []byte) error { + if len(buf) == 0 { + return fmt.Errorf("Dec.GobDecode: no data") + } + b := buf[len(buf)-1] + if b != decGobVersion { + return fmt.Errorf("Dec.GobDecode: encoding version %d not supported", b) + } + l := len(buf) - scaleSize - 1 + err := z.UnscaledBig().GobDecode(buf[:l]) + if err != nil { + return err + } + z.SetScale(scale(buf[l : l+scaleSize])) + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface. +func (x *Dec) MarshalText() ([]byte, error) { + return []byte(x.String()), nil +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface. +func (z *Dec) UnmarshalText(data []byte) error { + _, ok := z.SetString(string(data)) + if !ok { + return fmt.Errorf("invalid inf.Dec") + } + return nil +} diff --git a/vendor/gopkg.in/inf.v0/rounder.go b/vendor/gopkg.in/inf.v0/rounder.go new file mode 100644 index 000000000..3a97ef529 --- /dev/null +++ b/vendor/gopkg.in/inf.v0/rounder.go @@ -0,0 +1,145 @@ +package inf + +import ( + "math/big" +) + +// Rounder represents a method for rounding the (possibly infinite decimal) +// result of a division to a finite Dec. It is used by Dec.Round() and +// Dec.Quo(). +// +// See the Example for results of using each Rounder with some sample values. +// +type Rounder rounder + +// See http://speleotrove.com/decimal/damodel.html#refround for more detailed +// definitions of these rounding modes. +var ( + RoundDown Rounder // towards 0 + RoundUp Rounder // away from 0 + RoundFloor Rounder // towards -infinity + RoundCeil Rounder // towards +infinity + RoundHalfDown Rounder // to nearest; towards 0 if same distance + RoundHalfUp Rounder // to nearest; away from 0 if same distance + RoundHalfEven Rounder // to nearest; even last digit if same distance +) + +// RoundExact is to be used in the case when rounding is not necessary. +// When used with Quo or Round, it returns the result verbatim when it can be +// expressed exactly with the given precision, and it returns nil otherwise. +// QuoExact is a shorthand for using Quo with RoundExact. +var RoundExact Rounder + +type rounder interface { + + // When UseRemainder() returns true, the Round() method is passed the + // remainder of the division, expressed as the numerator and denominator of + // a rational. + UseRemainder() bool + + // Round sets the rounded value of a quotient to z, and returns z. + // quo is rounded down (truncated towards zero) to the scale obtained from + // the Scaler in Quo(). + // + // When the remainder is not used, remNum and remDen are nil. + // When used, the remainder is normalized between -1 and 1; that is: + // + // -|remDen| < remNum < |remDen| + // + // remDen has the same sign as y, and remNum is zero or has the same sign + // as x. + Round(z, quo *Dec, remNum, remDen *big.Int) *Dec +} + +type rndr struct { + useRem bool + round func(z, quo *Dec, remNum, remDen *big.Int) *Dec +} + +func (r rndr) UseRemainder() bool { + return r.useRem +} + +func (r rndr) Round(z, quo *Dec, remNum, remDen *big.Int) *Dec { + return r.round(z, quo, remNum, remDen) +} + +var intSign = []*big.Int{big.NewInt(-1), big.NewInt(0), big.NewInt(1)} + +func roundHalf(f func(c int, odd uint) (roundUp bool)) func(z, q *Dec, rA, rB *big.Int) *Dec { + return func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + brA, brB := rA.BitLen(), rB.BitLen() + if brA < brB-1 { + // brA < brB-1 => |rA| < |rB/2| + return z + } + roundUp := false + srA, srB := rA.Sign(), rB.Sign() + s := srA * srB + if brA == brB-1 { + rA2 := new(big.Int).Lsh(rA, 1) + if s < 0 { + rA2.Neg(rA2) + } + roundUp = f(rA2.Cmp(rB)*srB, z.UnscaledBig().Bit(0)) + } else { + // brA > brB-1 => |rA| > |rB/2| + roundUp = true + } + if roundUp { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[s+1]) + } + return z + } +} + +func init() { + RoundExact = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + if rA.Sign() != 0 { + return nil + } + return z.Set(q) + }} + RoundDown = rndr{false, + func(z, q *Dec, rA, rB *big.Int) *Dec { + return z.Set(q) + }} + RoundUp = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + if rA.Sign() != 0 { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[rA.Sign()*rB.Sign()+1]) + } + return z + }} + RoundFloor = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + if rA.Sign()*rB.Sign() < 0 { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[0]) + } + return z + }} + RoundCeil = rndr{true, + func(z, q *Dec, rA, rB *big.Int) *Dec { + z.Set(q) + if rA.Sign()*rB.Sign() > 0 { + z.UnscaledBig().Add(z.UnscaledBig(), intSign[2]) + } + return z + }} + RoundHalfDown = rndr{true, roundHalf( + func(c int, odd uint) bool { + return c > 0 + })} + RoundHalfUp = rndr{true, roundHalf( + func(c int, odd uint) bool { + return c >= 0 + })} + RoundHalfEven = rndr{true, roundHalf( + func(c int, odd uint) bool { + return c > 0 || c == 0 && odd == 1 + })} +} diff --git a/vendor/k8s.io/apimachinery/LICENSE b/vendor/k8s.io/apimachinery/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/k8s.io/apimachinery/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS new file mode 100644 index 000000000..c430067f3 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/OWNERS @@ -0,0 +1,16 @@ +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- derekwaynecarr +- mikedanese +- saad-ali +- janetkuo +- tallclair +- eparis +- jbeda +- xiang90 +- mbohlool +- david-mcmahon +- goltermann diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go new file mode 100644 index 000000000..a8866a43e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/amount.go @@ -0,0 +1,299 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "math/big" + "strconv" + + inf "gopkg.in/inf.v0" +) + +// Scale is used for getting and setting the base-10 scaled value. +// Base-2 scales are omitted for mathematical simplicity. +// See Quantity.ScaledValue for more details. +type Scale int32 + +// infScale adapts a Scale value to an inf.Scale value. +func (s Scale) infScale() inf.Scale { + return inf.Scale(-s) // inf.Scale is upside-down +} + +const ( + Nano Scale = -9 + Micro Scale = -6 + Milli Scale = -3 + Kilo Scale = 3 + Mega Scale = 6 + Giga Scale = 9 + Tera Scale = 12 + Peta Scale = 15 + Exa Scale = 18 +) + +var ( + Zero = int64Amount{} + + // Used by quantity strings - treat as read only + zeroBytes = []byte("0") +) + +// int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster +// than operations on inf.Dec for values that can be represented as int64. +// +k8s:openapi-gen=true +type int64Amount struct { + value int64 + scale Scale +} + +// Sign returns 0 if the value is zero, -1 if it is less than 0, or 1 if it is greater than 0. +func (a int64Amount) Sign() int { + switch { + case a.value == 0: + return 0 + case a.value > 0: + return 1 + default: + return -1 + } +} + +// AsInt64 returns the current amount as an int64 at scale 0, or false if the value cannot be +// represented in an int64 OR would result in a loss of precision. This method is intended as +// an optimization to avoid calling AsDec. +func (a int64Amount) AsInt64() (int64, bool) { + if a.scale == 0 { + return a.value, true + } + if a.scale < 0 { + // TODO: attempt to reduce factors, although it is assumed that factors are reduced prior + // to the int64Amount being created. + return 0, false + } + return positiveScaleInt64(a.value, a.scale) +} + +// AsScaledInt64 returns an int64 representing the value of this amount at the specified scale, +// rounding up, or false if that would result in overflow. (1e20).AsScaledInt64(1) would result +// in overflow because 1e19 is not representable as an int64. Note that setting a scale larger +// than the current value may result in loss of precision - i.e. (1e-6).AsScaledInt64(0) would +// return 1, because 0.000001 is rounded up to 1. +func (a int64Amount) AsScaledInt64(scale Scale) (result int64, ok bool) { + if a.scale < scale { + result, _ = negativeScaleInt64(a.value, scale-a.scale) + return result, true + } + return positiveScaleInt64(a.value, a.scale-scale) +} + +// AsDec returns an inf.Dec representation of this value. +func (a int64Amount) AsDec() *inf.Dec { + var base inf.Dec + base.SetUnscaled(a.value) + base.SetScale(inf.Scale(-a.scale)) + return &base +} + +// Cmp returns 0 if a and b are equal, 1 if a is greater than b, or -1 if a is less than b. +func (a int64Amount) Cmp(b int64Amount) int { + switch { + case a.scale == b.scale: + // compare only the unscaled portion + case a.scale > b.scale: + result, remainder, exact := divideByScaleInt64(b.value, a.scale-b.scale) + if !exact { + return a.AsDec().Cmp(b.AsDec()) + } + if result == a.value { + switch { + case remainder == 0: + return 0 + case remainder > 0: + return -1 + default: + return 1 + } + } + b.value = result + default: + result, remainder, exact := divideByScaleInt64(a.value, b.scale-a.scale) + if !exact { + return a.AsDec().Cmp(b.AsDec()) + } + if result == b.value { + switch { + case remainder == 0: + return 0 + case remainder > 0: + return 1 + default: + return -1 + } + } + a.value = result + } + + switch { + case a.value == b.value: + return 0 + case a.value < b.value: + return -1 + default: + return 1 + } +} + +// Add adds two int64Amounts together, matching scales. It will return false and not mutate +// a if overflow or underflow would result. +func (a *int64Amount) Add(b int64Amount) bool { + switch { + case b.value == 0: + return true + case a.value == 0: + a.value = b.value + a.scale = b.scale + return true + case a.scale == b.scale: + c, ok := int64Add(a.value, b.value) + if !ok { + return false + } + a.value = c + case a.scale > b.scale: + c, ok := positiveScaleInt64(a.value, a.scale-b.scale) + if !ok { + return false + } + c, ok = int64Add(c, b.value) + if !ok { + return false + } + a.scale = b.scale + a.value = c + default: + c, ok := positiveScaleInt64(b.value, b.scale-a.scale) + if !ok { + return false + } + c, ok = int64Add(a.value, c) + if !ok { + return false + } + a.value = c + } + return true +} + +// Sub removes the value of b from the current amount, or returns false if underflow would result. +func (a *int64Amount) Sub(b int64Amount) bool { + return a.Add(int64Amount{value: -b.value, scale: b.scale}) +} + +// AsScale adjusts this amount to set a minimum scale, rounding up, and returns true iff no precision +// was lost. (1.1e5).AsScale(5) would return 1.1e5, but (1.1e5).AsScale(6) would return 1e6. +func (a int64Amount) AsScale(scale Scale) (int64Amount, bool) { + if a.scale >= scale { + return a, true + } + result, exact := negativeScaleInt64(a.value, scale-a.scale) + return int64Amount{value: result, scale: scale}, exact +} + +// AsCanonicalBytes accepts a buffer to write the base-10 string value of this field to, and returns +// either that buffer or a larger buffer and the current exponent of the value. The value is adjusted +// until the exponent is a multiple of 3 - i.e. 1.1e5 would return "110", 3. +func (a int64Amount) AsCanonicalBytes(out []byte) (result []byte, exponent int32) { + mantissa := a.value + exponent = int32(a.scale) + + amount, times := removeInt64Factors(mantissa, 10) + exponent += int32(times) + + // make sure exponent is a multiple of 3 + var ok bool + switch exponent % 3 { + case 1, -2: + amount, ok = int64MultiplyScale10(amount) + if !ok { + return infDecAmount{a.AsDec()}.AsCanonicalBytes(out) + } + exponent = exponent - 1 + case 2, -1: + amount, ok = int64MultiplyScale100(amount) + if !ok { + return infDecAmount{a.AsDec()}.AsCanonicalBytes(out) + } + exponent = exponent - 2 + } + return strconv.AppendInt(out, amount, 10), exponent +} + +// AsCanonicalBase1024Bytes accepts a buffer to write the base-1024 string value of this field to, and returns +// either that buffer or a larger buffer and the current exponent of the value. 2048 is 2 * 1024 ^ 1 and would +// return []byte("2048"), 1. +func (a int64Amount) AsCanonicalBase1024Bytes(out []byte) (result []byte, exponent int32) { + value, ok := a.AsScaledInt64(0) + if !ok { + return infDecAmount{a.AsDec()}.AsCanonicalBase1024Bytes(out) + } + amount, exponent := removeInt64Factors(value, 1024) + return strconv.AppendInt(out, amount, 10), exponent +} + +// infDecAmount implements common operations over an inf.Dec that are specific to the quantity +// representation. +type infDecAmount struct { + *inf.Dec +} + +// AsScale adjusts this amount to set a minimum scale, rounding up, and returns true iff no precision +// was lost. (1.1e5).AsScale(5) would return 1.1e5, but (1.1e5).AsScale(6) would return 1e6. +func (a infDecAmount) AsScale(scale Scale) (infDecAmount, bool) { + tmp := &inf.Dec{} + tmp.Round(a.Dec, scale.infScale(), inf.RoundUp) + return infDecAmount{tmp}, tmp.Cmp(a.Dec) == 0 +} + +// AsCanonicalBytes accepts a buffer to write the base-10 string value of this field to, and returns +// either that buffer or a larger buffer and the current exponent of the value. The value is adjusted +// until the exponent is a multiple of 3 - i.e. 1.1e5 would return "110", 3. +func (a infDecAmount) AsCanonicalBytes(out []byte) (result []byte, exponent int32) { + mantissa := a.Dec.UnscaledBig() + exponent = int32(-a.Dec.Scale()) + amount := big.NewInt(0).Set(mantissa) + // move all factors of 10 into the exponent for easy reasoning + amount, times := removeBigIntFactors(amount, bigTen) + exponent += times + + // make sure exponent is a multiple of 3 + for exponent%3 != 0 { + amount.Mul(amount, bigTen) + exponent-- + } + + return append(out, amount.String()...), exponent +} + +// AsCanonicalBase1024Bytes accepts a buffer to write the base-1024 string value of this field to, and returns +// either that buffer or a larger buffer and the current exponent of the value. 2048 is 2 * 1024 ^ 1 and would +// return []byte("2048"), 1. +func (a infDecAmount) AsCanonicalBase1024Bytes(out []byte) (result []byte, exponent int32) { + tmp := &inf.Dec{} + tmp.Round(a.Dec, 0, inf.RoundUp) + amount, exponent := removeBigIntFactors(tmp.UnscaledBig(), big1024) + return append(out, amount.String()...), exponent +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go new file mode 100644 index 000000000..9d7835bc2 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -0,0 +1,75 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto + +/* +Package resource is a generated protocol buffer package. + +It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto + +It has these top-level messages: + Quantity +*/ +package resource + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Quantity) Reset() { *m = Quantity{} } +func (*Quantity) ProtoMessage() {} +func (*Quantity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func init() { + proto.RegisterType((*Quantity)(nil), "k8s.io.apimachinery.pkg.api.resource.Quantity") +} + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 237 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8e, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x40, 0xcf, 0x0b, 0x2a, 0x19, 0x2b, 0x84, 0x10, 0xc3, 0xa5, 0x42, 0x0c, 0x2c, 0xd8, 0x6b, + 0xc5, 0xc8, 0xce, 0x00, 0x23, 0x5b, 0x92, 0x1e, 0xae, 0x15, 0xd5, 0x8e, 0x2e, 0x36, 0x52, 0xb7, + 0x8e, 0x8c, 0x1d, 0x19, 0x9b, 0xbf, 0xe9, 0xd8, 0xb1, 0x03, 0x03, 0x31, 0x3f, 0x82, 0xea, 0x36, + 0x52, 0xb7, 0x7b, 0xef, 0xf4, 0x4e, 0x97, 0xbd, 0xd4, 0xd3, 0x56, 0x1a, 0xa7, 0xea, 0x50, 0x12, + 0x5b, 0xf2, 0xd4, 0xaa, 0x4f, 0xb2, 0x33, 0xc7, 0xea, 0xb4, 0x28, 0x1a, 0xb3, 0x28, 0xaa, 0xb9, + 0xb1, 0xc4, 0x4b, 0xd5, 0xd4, 0xfa, 0x20, 0x14, 0x53, 0xeb, 0x02, 0x57, 0xa4, 0x34, 0x59, 0xe2, + 0xc2, 0xd3, 0x4c, 0x36, 0xec, 0xbc, 0x1b, 0xdf, 0x1f, 0x2b, 0x79, 0x5e, 0xc9, 0xa6, 0xd6, 0x07, + 0x21, 0x87, 0xea, 0xf6, 0x51, 0x1b, 0x3f, 0x0f, 0xa5, 0xac, 0xdc, 0x42, 0x69, 0xa7, 0x9d, 0x4a, + 0x71, 0x19, 0x3e, 0x12, 0x25, 0x48, 0xd3, 0xf1, 0xe8, 0xdd, 0x34, 0x1b, 0xbd, 0x86, 0xc2, 0x7a, + 0xe3, 0x97, 0xe3, 0xeb, 0xec, 0xa2, 0xf5, 0x6c, 0xac, 0xbe, 0x11, 0x13, 0xf1, 0x70, 0xf9, 0x76, + 0xa2, 0xa7, 0xab, 0xef, 0x4d, 0x0e, 0x5f, 0x5d, 0x0e, 0xeb, 0x2e, 0x87, 0x4d, 0x97, 0xc3, 0xea, + 0x67, 0x02, 0xcf, 0x72, 0xdb, 0x23, 0xec, 0x7a, 0x84, 0x7d, 0x8f, 0xb0, 0x8a, 0x28, 0xb6, 0x11, + 0xc5, 0x2e, 0xa2, 0xd8, 0x47, 0x14, 0xbf, 0x11, 0xc5, 0xfa, 0x0f, 0xe1, 0x7d, 0x34, 0x3c, 0xf6, + 0x1f, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x08, 0x88, 0x49, 0x0e, 0x01, 0x00, 0x00, +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto new file mode 100644 index 000000000..acc904445 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -0,0 +1,88 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apimachinery.pkg.api.resource; + +// Package-wide variables from generator "generated". +option go_package = "resource"; + +// Quantity is a fixed-point representation of a number. +// It provides convenient marshaling/unmarshaling in JSON and YAML, +// in addition to String() and Int64() accessors. +// +// The serialization format is: +// +// ::= +// (Note that may be empty, from the "" case in .) +// ::= 0 | 1 | ... | 9 +// ::= | +// ::= | . | . | . +// ::= "+" | "-" +// ::= | +// ::= | | +// ::= Ki | Mi | Gi | Ti | Pi | Ei +// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) +// ::= m | "" | k | M | G | T | P | E +// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) +// ::= "e" | "E" +// +// No matter which of the three exponent forms is used, no quantity may represent +// a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal +// places. Numbers larger or more precise will be capped or rounded up. +// (E.g.: 0.1m will rounded up to 1m.) +// This may be extended in the future if we require larger or smaller quantities. +// +// When a Quantity is parsed from a string, it will remember the type of suffix +// it had, and will use the same type again when it is serialized. +// +// Before serializing, Quantity will be put in "canonical form". +// This means that Exponent/suffix will be adjusted up or down (with a +// corresponding increase or decrease in Mantissa) such that: +// a. No precision is lost +// b. No fractional digits will be emitted +// c. The exponent (or suffix) is as large as possible. +// The sign will be omitted unless the number is negative. +// +// Examples: +// 1.5 will be serialized as "1500m" +// 1.5Gi will be serialized as "1536Mi" +// +// Note that the quantity will NEVER be internally represented by a +// floating point number. That is the whole point of this exercise. +// +// Non-canonical values will still parse as long as they are well formed, +// but will be re-emitted in their canonical form. (So always use canonical +// form, or don't diff.) +// +// This format is intended to make it difficult to use these numbers without +// writing some sort of special handling code in the hopes that that will +// cause implementors to also use a fixed point implementation. +// +// +protobuf=true +// +protobuf.embed=string +// +protobuf.options.marshal=false +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:deepcopy-gen=true +// +k8s:openapi-gen=true +message Quantity { + optional string string = 1; +} + diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/math.go b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go new file mode 100644 index 000000000..72d3880c0 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/math.go @@ -0,0 +1,314 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "math/big" + + inf "gopkg.in/inf.v0" +) + +const ( + // maxInt64Factors is the highest value that will be checked when removing factors of 10 from an int64. + // It is also the maximum decimal digits that can be represented with an int64. + maxInt64Factors = 18 +) + +var ( + // Commonly needed big.Int values-- treat as read only! + bigTen = big.NewInt(10) + bigZero = big.NewInt(0) + bigOne = big.NewInt(1) + bigThousand = big.NewInt(1000) + big1024 = big.NewInt(1024) + + // Commonly needed inf.Dec values-- treat as read only! + decZero = inf.NewDec(0, 0) + decOne = inf.NewDec(1, 0) + decMinusOne = inf.NewDec(-1, 0) + decThousand = inf.NewDec(1000, 0) + dec1024 = inf.NewDec(1024, 0) + decMinus1024 = inf.NewDec(-1024, 0) + + // Largest (in magnitude) number allowed. + maxAllowed = infDecAmount{inf.NewDec((1<<63)-1, 0)} // == max int64 + + // The maximum value we can represent milli-units for. + // Compare with the return value of Quantity.Value() to + // see if it's safe to use Quantity.MilliValue(). + MaxMilliValue = int64(((1 << 63) - 1) / 1000) +) + +const mostNegative = -(mostPositive + 1) +const mostPositive = 1<<63 - 1 + +// int64Add returns a+b, or false if that would overflow int64. +func int64Add(a, b int64) (int64, bool) { + c := a + b + switch { + case a > 0 && b > 0: + if c < 0 { + return 0, false + } + case a < 0 && b < 0: + if c > 0 { + return 0, false + } + if a == mostNegative && b == mostNegative { + return 0, false + } + } + return c, true +} + +// int64Multiply returns a*b, or false if that would overflow or underflow int64. +func int64Multiply(a, b int64) (int64, bool) { + if a == 0 || b == 0 || a == 1 || b == 1 { + return a * b, true + } + if a == mostNegative || b == mostNegative { + return 0, false + } + c := a * b + return c, c/b == a +} + +// int64MultiplyScale returns a*b, assuming b is greater than one, or false if that would overflow or underflow int64. +// Use when b is known to be greater than one. +func int64MultiplyScale(a int64, b int64) (int64, bool) { + if a == 0 || a == 1 { + return a * b, true + } + if a == mostNegative && b != 1 { + return 0, false + } + c := a * b + return c, c/b == a +} + +// int64MultiplyScale10 multiplies a by 10, or returns false if that would overflow. This method is faster than +// int64Multiply(a, 10) because the compiler can optimize constant factor multiplication. +func int64MultiplyScale10(a int64) (int64, bool) { + if a == 0 || a == 1 { + return a * 10, true + } + if a == mostNegative { + return 0, false + } + c := a * 10 + return c, c/10 == a +} + +// int64MultiplyScale100 multiplies a by 100, or returns false if that would overflow. This method is faster than +// int64Multiply(a, 100) because the compiler can optimize constant factor multiplication. +func int64MultiplyScale100(a int64) (int64, bool) { + if a == 0 || a == 1 { + return a * 100, true + } + if a == mostNegative { + return 0, false + } + c := a * 100 + return c, c/100 == a +} + +// int64MultiplyScale1000 multiplies a by 1000, or returns false if that would overflow. This method is faster than +// int64Multiply(a, 1000) because the compiler can optimize constant factor multiplication. +func int64MultiplyScale1000(a int64) (int64, bool) { + if a == 0 || a == 1 { + return a * 1000, true + } + if a == mostNegative { + return 0, false + } + c := a * 1000 + return c, c/1000 == a +} + +// positiveScaleInt64 multiplies base by 10^scale, returning false if the +// value overflows. Passing a negative scale is undefined. +func positiveScaleInt64(base int64, scale Scale) (int64, bool) { + switch scale { + case 0: + return base, true + case 1: + return int64MultiplyScale10(base) + case 2: + return int64MultiplyScale100(base) + case 3: + return int64MultiplyScale1000(base) + case 6: + return int64MultiplyScale(base, 1000000) + case 9: + return int64MultiplyScale(base, 1000000000) + default: + value := base + var ok bool + for i := Scale(0); i < scale; i++ { + if value, ok = int64MultiplyScale(value, 10); !ok { + return 0, false + } + } + return value, true + } +} + +// negativeScaleInt64 reduces base by the provided scale, rounding up, until the +// value is zero or the scale is reached. Passing a negative scale is undefined. +// The value returned, if not exact, is rounded away from zero. +func negativeScaleInt64(base int64, scale Scale) (result int64, exact bool) { + if scale == 0 { + return base, true + } + + value := base + var fraction bool + for i := Scale(0); i < scale; i++ { + if !fraction && value%10 != 0 { + fraction = true + } + value = value / 10 + if value == 0 { + if fraction { + if base > 0 { + return 1, false + } + return -1, false + } + return 0, true + } + } + if fraction { + if base > 0 { + value += 1 + } else { + value += -1 + } + } + return value, !fraction +} + +func pow10Int64(b int64) int64 { + switch b { + case 0: + return 1 + case 1: + return 10 + case 2: + return 100 + case 3: + return 1000 + case 4: + return 10000 + case 5: + return 100000 + case 6: + return 1000000 + case 7: + return 10000000 + case 8: + return 100000000 + case 9: + return 1000000000 + case 10: + return 10000000000 + case 11: + return 100000000000 + case 12: + return 1000000000000 + case 13: + return 10000000000000 + case 14: + return 100000000000000 + case 15: + return 1000000000000000 + case 16: + return 10000000000000000 + case 17: + return 100000000000000000 + case 18: + return 1000000000000000000 + default: + return 0 + } +} + +// negativeScaleInt64 returns the result of dividing base by scale * 10 and the remainder, or +// false if no such division is possible. Dividing by negative scales is undefined. +func divideByScaleInt64(base int64, scale Scale) (result, remainder int64, exact bool) { + if scale == 0 { + return base, 0, true + } + // the max scale representable in base 10 in an int64 is 18 decimal places + if scale >= 18 { + return 0, base, false + } + divisor := pow10Int64(int64(scale)) + return base / divisor, base % divisor, true +} + +// removeInt64Factors divides in a loop; the return values have the property that +// value == result * base ^ scale +func removeInt64Factors(value int64, base int64) (result int64, times int32) { + times = 0 + result = value + negative := result < 0 + if negative { + result = -result + } + switch base { + // allow the compiler to optimize the common cases + case 10: + for result >= 10 && result%10 == 0 { + times++ + result = result / 10 + } + // allow the compiler to optimize the common cases + case 1024: + for result >= 1024 && result%1024 == 0 { + times++ + result = result / 1024 + } + default: + for result >= base && result%base == 0 { + times++ + result = result / base + } + } + if negative { + result = -result + } + return result, times +} + +// removeBigIntFactors divides in a loop; the return values have the property that +// d == result * factor ^ times +// d may be modified in place. +// If d == 0, then the return values will be (0, 0) +func removeBigIntFactors(d, factor *big.Int) (result *big.Int, times int32) { + q := big.NewInt(0) + m := big.NewInt(0) + for d.Cmp(bigZero) != 0 { + q.DivMod(d, factor, m) + if m.Cmp(bigZero) != 0 { + break + } + times++ + d, q = q, d + } + return d, times +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go new file mode 100644 index 000000000..b155a62a4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -0,0 +1,738 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "bytes" + "errors" + "fmt" + "math/big" + "strconv" + "strings" + + inf "gopkg.in/inf.v0" +) + +// Quantity is a fixed-point representation of a number. +// It provides convenient marshaling/unmarshaling in JSON and YAML, +// in addition to String() and Int64() accessors. +// +// The serialization format is: +// +// ::= +// (Note that may be empty, from the "" case in .) +// ::= 0 | 1 | ... | 9 +// ::= | +// ::= | . | . | . +// ::= "+" | "-" +// ::= | +// ::= | | +// ::= Ki | Mi | Gi | Ti | Pi | Ei +// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) +// ::= m | "" | k | M | G | T | P | E +// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) +// ::= "e" | "E" +// +// No matter which of the three exponent forms is used, no quantity may represent +// a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal +// places. Numbers larger or more precise will be capped or rounded up. +// (E.g.: 0.1m will rounded up to 1m.) +// This may be extended in the future if we require larger or smaller quantities. +// +// When a Quantity is parsed from a string, it will remember the type of suffix +// it had, and will use the same type again when it is serialized. +// +// Before serializing, Quantity will be put in "canonical form". +// This means that Exponent/suffix will be adjusted up or down (with a +// corresponding increase or decrease in Mantissa) such that: +// a. No precision is lost +// b. No fractional digits will be emitted +// c. The exponent (or suffix) is as large as possible. +// The sign will be omitted unless the number is negative. +// +// Examples: +// 1.5 will be serialized as "1500m" +// 1.5Gi will be serialized as "1536Mi" +// +// Note that the quantity will NEVER be internally represented by a +// floating point number. That is the whole point of this exercise. +// +// Non-canonical values will still parse as long as they are well formed, +// but will be re-emitted in their canonical form. (So always use canonical +// form, or don't diff.) +// +// This format is intended to make it difficult to use these numbers without +// writing some sort of special handling code in the hopes that that will +// cause implementors to also use a fixed point implementation. +// +// +protobuf=true +// +protobuf.embed=string +// +protobuf.options.marshal=false +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:deepcopy-gen=true +// +k8s:openapi-gen=true +type Quantity struct { + // i is the quantity in int64 scaled form, if d.Dec == nil + i int64Amount + // d is the quantity in inf.Dec form if d.Dec != nil + d infDecAmount + // s is the generated value of this quantity to avoid recalculation + s string + + // Change Format at will. See the comment for Canonicalize for + // more details. + Format +} + +// CanonicalValue allows a quantity amount to be converted to a string. +type CanonicalValue interface { + // AsCanonicalBytes returns a byte array representing the string representation + // of the value mantissa and an int32 representing its exponent in base-10. Callers may + // pass a byte slice to the method to avoid allocations. + AsCanonicalBytes(out []byte) ([]byte, int32) + // AsCanonicalBase1024Bytes returns a byte array representing the string representation + // of the value mantissa and an int32 representing its exponent in base-1024. Callers + // may pass a byte slice to the method to avoid allocations. + AsCanonicalBase1024Bytes(out []byte) ([]byte, int32) +} + +// Format lists the three possible formattings of a quantity. +type Format string + +const ( + DecimalExponent = Format("DecimalExponent") // e.g., 12e6 + BinarySI = Format("BinarySI") // e.g., 12Mi (12 * 2^20) + DecimalSI = Format("DecimalSI") // e.g., 12M (12 * 10^6) +) + +// MustParse turns the given string into a quantity or panics; for tests +// or others cases where you know the string is valid. +func MustParse(str string) Quantity { + q, err := ParseQuantity(str) + if err != nil { + panic(fmt.Errorf("cannot parse '%v': %v", str, err)) + } + return q +} + +const ( + // splitREString is used to separate a number from its suffix; as such, + // this is overly permissive, but that's OK-- it will be checked later. + splitREString = "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$" +) + +var ( + // Errors that could happen while parsing a string. + ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'") + ErrNumeric = errors.New("unable to parse numeric part of quantity") + ErrSuffix = errors.New("unable to parse quantity's suffix") +) + +// parseQuantityString is a fast scanner for quantity values. +func parseQuantityString(str string) (positive bool, value, num, denom, suffix string, err error) { + positive = true + pos := 0 + end := len(str) + + // handle leading sign + if pos < end { + switch str[0] { + case '-': + positive = false + pos++ + case '+': + pos++ + } + } + + // strip leading zeros +Zeroes: + for i := pos; ; i++ { + if i >= end { + num = "0" + value = num + return + } + switch str[i] { + case '0': + pos++ + default: + break Zeroes + } + } + + // extract the numerator +Num: + for i := pos; ; i++ { + if i >= end { + num = str[pos:end] + value = str[0:end] + return + } + switch str[i] { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + default: + num = str[pos:i] + pos = i + break Num + } + } + + // if we stripped all numerator positions, always return 0 + if len(num) == 0 { + num = "0" + } + + // handle a denominator + if pos < end && str[pos] == '.' { + pos++ + Denom: + for i := pos; ; i++ { + if i >= end { + denom = str[pos:end] + value = str[0:end] + return + } + switch str[i] { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + default: + denom = str[pos:i] + pos = i + break Denom + } + } + // TODO: we currently allow 1.G, but we may not want to in the future. + // if len(denom) == 0 { + // err = ErrFormatWrong + // return + // } + } + value = str[0:pos] + + // grab the elements of the suffix + suffixStart := pos + for i := pos; ; i++ { + if i >= end { + suffix = str[suffixStart:end] + return + } + if !strings.ContainsAny(str[i:i+1], "eEinumkKMGTP") { + pos = i + break + } + } + if pos < end { + switch str[pos] { + case '-', '+': + pos++ + } + } +Suffix: + for i := pos; ; i++ { + if i >= end { + suffix = str[suffixStart:end] + return + } + switch str[i] { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + default: + break Suffix + } + } + // we encountered a non decimal in the Suffix loop, but the last character + // was not a valid exponent + err = ErrFormatWrong + return +} + +// ParseQuantity turns str into a Quantity, or returns an error. +func ParseQuantity(str string) (Quantity, error) { + if len(str) == 0 { + return Quantity{}, ErrFormatWrong + } + if str == "0" { + return Quantity{Format: DecimalSI, s: str}, nil + } + + positive, value, num, denom, suf, err := parseQuantityString(str) + if err != nil { + return Quantity{}, err + } + + base, exponent, format, ok := quantitySuffixer.interpret(suffix(suf)) + if !ok { + return Quantity{}, ErrSuffix + } + + precision := int32(0) + scale := int32(0) + mantissa := int64(1) + switch format { + case DecimalExponent, DecimalSI: + scale = exponent + precision = maxInt64Factors - int32(len(num)+len(denom)) + case BinarySI: + scale = 0 + switch { + case exponent >= 0 && len(denom) == 0: + // only handle positive binary numbers with the fast path + mantissa = int64(int64(mantissa) << uint64(exponent)) + // 1Mi (2^20) has ~6 digits of decimal precision, so exponent*3/10 -1 is roughly the precision + precision = 15 - int32(len(num)) - int32(float32(exponent)*3/10) - 1 + default: + precision = -1 + } + } + + if precision >= 0 { + // if we have a denominator, shift the entire value to the left by the number of places in the + // denominator + scale -= int32(len(denom)) + if scale >= int32(Nano) { + shifted := num + denom + + var value int64 + value, err := strconv.ParseInt(shifted, 10, 64) + if err != nil { + return Quantity{}, ErrNumeric + } + if result, ok := int64Multiply(value, int64(mantissa)); ok { + if !positive { + result = -result + } + // if the number is in canonical form, reuse the string + switch format { + case BinarySI: + if exponent%10 == 0 && (value&0x07 != 0) { + return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format, s: str}, nil + } + default: + if scale%3 == 0 && !strings.HasSuffix(shifted, "000") && shifted[0] != '0' { + return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format, s: str}, nil + } + } + return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format}, nil + } + } + } + + amount := new(inf.Dec) + if _, ok := amount.SetString(value); !ok { + return Quantity{}, ErrNumeric + } + + // So that no one but us has to think about suffixes, remove it. + if base == 10 { + amount.SetScale(amount.Scale() + Scale(exponent).infScale()) + } else if base == 2 { + // numericSuffix = 2 ** exponent + numericSuffix := big.NewInt(1).Lsh(bigOne, uint(exponent)) + ub := amount.UnscaledBig() + amount.SetUnscaledBig(ub.Mul(ub, numericSuffix)) + } + + // Cap at min/max bounds. + sign := amount.Sign() + if sign == -1 { + amount.Neg(amount) + } + + // This rounds non-zero values up to the minimum representable value, under the theory that + // if you want some resources, you should get some resources, even if you asked for way too small + // of an amount. Arguably, this should be inf.RoundHalfUp (normal rounding), but that would have + // the side effect of rounding values < .5n to zero. + if v, ok := amount.Unscaled(); v != int64(0) || !ok { + amount.Round(amount, Nano.infScale(), inf.RoundUp) + } + + // The max is just a simple cap. + // TODO: this prevents accumulating quantities greater than int64, for instance quota across a cluster + if format == BinarySI && amount.Cmp(maxAllowed.Dec) > 0 { + amount.Set(maxAllowed.Dec) + } + + if format == BinarySI && amount.Cmp(decOne) < 0 && amount.Cmp(decZero) > 0 { + // This avoids rounding and hopefully confusion, too. + format = DecimalSI + } + if sign == -1 { + amount.Neg(amount) + } + + return Quantity{d: infDecAmount{amount}, Format: format}, nil +} + +// DeepCopy returns a deep-copy of the Quantity value. Note that the method +// receiver is a value, so we can mutate it in-place and return it. +func (q Quantity) DeepCopy() Quantity { + if q.d.Dec != nil { + tmp := &inf.Dec{} + q.d.Dec = tmp.Set(q.d.Dec) + } + return q +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Quantity) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ Quantity) OpenAPISchemaFormat() string { return "" } + +// CanonicalizeBytes returns the canonical form of q and its suffix (see comment on Quantity). +// +// Note about BinarySI: +// * If q.Format is set to BinarySI and q.Amount represents a non-zero value between +// -1 and +1, it will be emitted as if q.Format were DecimalSI. +// * Otherwise, if q.Format is set to BinarySI, fractional parts of q.Amount will be +// rounded up. (1.1i becomes 2i.) +func (q *Quantity) CanonicalizeBytes(out []byte) (result, suffix []byte) { + if q.IsZero() { + return zeroBytes, nil + } + + var rounded CanonicalValue + format := q.Format + switch format { + case DecimalExponent, DecimalSI: + case BinarySI: + if q.CmpInt64(-1024) > 0 && q.CmpInt64(1024) < 0 { + // This avoids rounding and hopefully confusion, too. + format = DecimalSI + } else { + var exact bool + if rounded, exact = q.AsScale(0); !exact { + // Don't lose precision-- show as DecimalSI + format = DecimalSI + } + } + default: + format = DecimalExponent + } + + // TODO: If BinarySI formatting is requested but would cause rounding, upgrade to + // one of the other formats. + switch format { + case DecimalExponent, DecimalSI: + number, exponent := q.AsCanonicalBytes(out) + suffix, _ := quantitySuffixer.constructBytes(10, exponent, format) + return number, suffix + default: + // format must be BinarySI + number, exponent := rounded.AsCanonicalBase1024Bytes(out) + suffix, _ := quantitySuffixer.constructBytes(2, exponent*10, format) + return number, suffix + } +} + +// AsInt64 returns a representation of the current value as an int64 if a fast conversion +// is possible. If false is returned, callers must use the inf.Dec form of this quantity. +func (q *Quantity) AsInt64() (int64, bool) { + if q.d.Dec != nil { + return 0, false + } + return q.i.AsInt64() +} + +// ToDec promotes the quantity in place to use an inf.Dec representation and returns itself. +func (q *Quantity) ToDec() *Quantity { + if q.d.Dec == nil { + q.d.Dec = q.i.AsDec() + q.i = int64Amount{} + } + return q +} + +// AsDec returns the quantity as represented by a scaled inf.Dec. +func (q *Quantity) AsDec() *inf.Dec { + if q.d.Dec != nil { + return q.d.Dec + } + q.d.Dec = q.i.AsDec() + q.i = int64Amount{} + return q.d.Dec +} + +// AsCanonicalBytes returns the canonical byte representation of this quantity as a mantissa +// and base 10 exponent. The out byte slice may be passed to the method to avoid an extra +// allocation. +func (q *Quantity) AsCanonicalBytes(out []byte) (result []byte, exponent int32) { + if q.d.Dec != nil { + return q.d.AsCanonicalBytes(out) + } + return q.i.AsCanonicalBytes(out) +} + +// IsZero returns true if the quantity is equal to zero. +func (q *Quantity) IsZero() bool { + if q.d.Dec != nil { + return q.d.Dec.Sign() == 0 + } + return q.i.value == 0 +} + +// Sign returns 0 if the quantity is zero, -1 if the quantity is less than zero, or 1 if the +// quantity is greater than zero. +func (q *Quantity) Sign() int { + if q.d.Dec != nil { + return q.d.Dec.Sign() + } + return q.i.Sign() +} + +// AsScale returns the current value, rounded up to the provided scale, and returns +// false if the scale resulted in a loss of precision. +func (q *Quantity) AsScale(scale Scale) (CanonicalValue, bool) { + if q.d.Dec != nil { + return q.d.AsScale(scale) + } + return q.i.AsScale(scale) +} + +// RoundUp updates the quantity to the provided scale, ensuring that the value is at +// least 1. False is returned if the rounding operation resulted in a loss of precision. +// Negative numbers are rounded away from zero (-9 scale 1 rounds to -10). +func (q *Quantity) RoundUp(scale Scale) bool { + if q.d.Dec != nil { + q.s = "" + d, exact := q.d.AsScale(scale) + q.d = d + return exact + } + // avoid clearing the string value if we have already calculated it + if q.i.scale >= scale { + return true + } + q.s = "" + i, exact := q.i.AsScale(scale) + q.i = i + return exact +} + +// Add adds the provide y quantity to the current value. If the current value is zero, +// the format of the quantity will be updated to the format of y. +func (q *Quantity) Add(y Quantity) { + q.s = "" + if q.d.Dec == nil && y.d.Dec == nil { + if q.i.value == 0 { + q.Format = y.Format + } + if q.i.Add(y.i) { + return + } + } else if q.IsZero() { + q.Format = y.Format + } + q.ToDec().d.Dec.Add(q.d.Dec, y.AsDec()) +} + +// Sub subtracts the provided quantity from the current value in place. If the current +// value is zero, the format of the quantity will be updated to the format of y. +func (q *Quantity) Sub(y Quantity) { + q.s = "" + if q.IsZero() { + q.Format = y.Format + } + if q.d.Dec == nil && y.d.Dec == nil && q.i.Sub(y.i) { + return + } + q.ToDec().d.Dec.Sub(q.d.Dec, y.AsDec()) +} + +// Cmp returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the +// quantity is greater than y. +func (q *Quantity) Cmp(y Quantity) int { + if q.d.Dec == nil && y.d.Dec == nil { + return q.i.Cmp(y.i) + } + return q.AsDec().Cmp(y.AsDec()) +} + +// CmpInt64 returns 0 if the quantity is equal to y, -1 if the quantity is less than y, or 1 if the +// quantity is greater than y. +func (q *Quantity) CmpInt64(y int64) int { + if q.d.Dec != nil { + return q.d.Dec.Cmp(inf.NewDec(y, inf.Scale(0))) + } + return q.i.Cmp(int64Amount{value: y}) +} + +// Neg sets quantity to be the negative value of itself. +func (q *Quantity) Neg() { + q.s = "" + if q.d.Dec == nil { + q.i.value = -q.i.value + return + } + q.d.Dec.Neg(q.d.Dec) +} + +// int64QuantityExpectedBytes is the expected width in bytes of the canonical string representation +// of most Quantity values. +const int64QuantityExpectedBytes = 18 + +// String formats the Quantity as a string, caching the result if not calculated. +// String is an expensive operation and caching this result significantly reduces the cost of +// normal parse / marshal operations on Quantity. +func (q *Quantity) String() string { + if len(q.s) == 0 { + result := make([]byte, 0, int64QuantityExpectedBytes) + number, suffix := q.CanonicalizeBytes(result) + number = append(number, suffix...) + q.s = string(number) + } + return q.s +} + +// MarshalJSON implements the json.Marshaller interface. +func (q Quantity) MarshalJSON() ([]byte, error) { + if len(q.s) > 0 { + out := make([]byte, len(q.s)+2) + out[0], out[len(out)-1] = '"', '"' + copy(out[1:], q.s) + return out, nil + } + result := make([]byte, int64QuantityExpectedBytes, int64QuantityExpectedBytes) + result[0] = '"' + number, suffix := q.CanonicalizeBytes(result[1:1]) + // if the same slice was returned to us that we passed in, avoid another allocation by copying number into + // the source slice and returning that + if len(number) > 0 && &number[0] == &result[1] && (len(number)+len(suffix)+2) <= int64QuantityExpectedBytes { + number = append(number, suffix...) + number = append(number, '"') + return result[:1+len(number)], nil + } + // if CanonicalizeBytes needed more space than our slice provided, we may need to allocate again so use + // append + result = result[:1] + result = append(result, number...) + result = append(result, suffix...) + result = append(result, '"') + return result, nil +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +// TODO: Remove support for leading/trailing whitespace +func (q *Quantity) UnmarshalJSON(value []byte) error { + l := len(value) + if l == 4 && bytes.Equal(value, []byte("null")) { + q.d.Dec = nil + q.i = int64Amount{} + return nil + } + if l >= 2 && value[0] == '"' && value[l-1] == '"' { + value = value[1 : l-1] + } + + parsed, err := ParseQuantity(strings.TrimSpace(string(value))) + if err != nil { + return err + } + + // This copy is safe because parsed will not be referred to again. + *q = parsed + return nil +} + +// NewQuantity returns a new Quantity representing the given +// value in the given format. +func NewQuantity(value int64, format Format) *Quantity { + return &Quantity{ + i: int64Amount{value: value}, + Format: format, + } +} + +// NewMilliQuantity returns a new Quantity representing the given +// value * 1/1000 in the given format. Note that BinarySI formatting +// will round fractional values, and will be changed to DecimalSI for +// values x where (-1 < x < 1) && (x != 0). +func NewMilliQuantity(value int64, format Format) *Quantity { + return &Quantity{ + i: int64Amount{value: value, scale: -3}, + Format: format, + } +} + +// NewScaledQuantity returns a new Quantity representing the given +// value * 10^scale in DecimalSI format. +func NewScaledQuantity(value int64, scale Scale) *Quantity { + return &Quantity{ + i: int64Amount{value: value, scale: scale}, + Format: DecimalSI, + } +} + +// Value returns the value of q; any fractional part will be lost. +func (q *Quantity) Value() int64 { + return q.ScaledValue(0) +} + +// MilliValue returns the value of ceil(q * 1000); this could overflow an int64; +// if that's a concern, call Value() first to verify the number is small enough. +func (q *Quantity) MilliValue() int64 { + return q.ScaledValue(Milli) +} + +// ScaledValue returns the value of ceil(q * 10^scale); this could overflow an int64. +// To detect overflow, call Value() first and verify the expected magnitude. +func (q *Quantity) ScaledValue(scale Scale) int64 { + if q.d.Dec == nil { + i, _ := q.i.AsScaledInt64(scale) + return i + } + dec := q.d.Dec + return scaledValue(dec.UnscaledBig(), int(dec.Scale()), int(scale.infScale())) +} + +// Set sets q's value to be value. +func (q *Quantity) Set(value int64) { + q.SetScaled(value, 0) +} + +// SetMilli sets q's value to be value * 1/1000. +func (q *Quantity) SetMilli(value int64) { + q.SetScaled(value, Milli) +} + +// SetScaled sets q's value to be value * 10^scale +func (q *Quantity) SetScaled(value int64, scale Scale) { + q.s = "" + q.d.Dec = nil + q.i = int64Amount{value: value, scale: scale} +} + +// Copy is a convenience function that makes a deep copy for you. Non-deep +// copies of quantities share pointers and you will regret that. +func (q *Quantity) Copy() *Quantity { + if q.d.Dec == nil { + return &Quantity{ + s: q.s, + i: q.i, + Format: q.Format, + } + } + tmp := &inf.Dec{} + return &Quantity{ + s: q.s, + d: infDecAmount{tmp.Set(q.d.Dec)}, + Format: q.Format, + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go new file mode 100644 index 000000000..74dfb4e4b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go @@ -0,0 +1,284 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "fmt" + "io" + + "github.com/gogo/protobuf/proto" +) + +var _ proto.Sizer = &Quantity{} + +func (m *Quantity) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +// MarshalTo is a customized version of the generated Protobuf unmarshaler for a struct +// with a single string field. +func (m *Quantity) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + + data[i] = 0xa + i++ + // BEGIN CUSTOM MARSHAL + out := m.String() + i = encodeVarintGenerated(data, i, uint64(len(out))) + i += copy(data[i:], out) + // END CUSTOM MARSHAL + + return i, nil +} + +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} + +func (m *Quantity) Size() (n int) { + var l int + _ = l + + // BEGIN CUSTOM SIZE + l = len(m.String()) + // END CUSTOM SIZE + + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} + +// Unmarshal is a customized version of the generated Protobuf unmarshaler for a struct +// with a single string field. +func (m *Quantity) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Quantity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Quantity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(data[iNdEx:postIndex]) + + // BEGIN CUSTOM DECODE + p, err := ParseQuantity(s) + if err != nil { + return err + } + *m = p + // END CUSTOM DECODE + + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go new file mode 100644 index 000000000..55e177b0e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/scale_int.go @@ -0,0 +1,95 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "math" + "math/big" + "sync" +) + +var ( + // A sync pool to reduce allocation. + intPool sync.Pool + maxInt64 = big.NewInt(math.MaxInt64) +) + +func init() { + intPool.New = func() interface{} { + return &big.Int{} + } +} + +// scaledValue scales given unscaled value from scale to new Scale and returns +// an int64. It ALWAYS rounds up the result when scale down. The final result might +// overflow. +// +// scale, newScale represents the scale of the unscaled decimal. +// The mathematical value of the decimal is unscaled * 10**(-scale). +func scaledValue(unscaled *big.Int, scale, newScale int) int64 { + dif := scale - newScale + if dif == 0 { + return unscaled.Int64() + } + + // Handle scale up + // This is an easy case, we do not need to care about rounding and overflow. + // If any intermediate operation causes overflow, the result will overflow. + if dif < 0 { + return unscaled.Int64() * int64(math.Pow10(-dif)) + } + + // Handle scale down + // We have to be careful about the intermediate operations. + + // fast path when unscaled < max.Int64 and exp(10,dif) < max.Int64 + const log10MaxInt64 = 19 + if unscaled.Cmp(maxInt64) < 0 && dif < log10MaxInt64 { + divide := int64(math.Pow10(dif)) + result := unscaled.Int64() / divide + mod := unscaled.Int64() % divide + if mod != 0 { + return result + 1 + } + return result + } + + // We should only convert back to int64 when getting the result. + divisor := intPool.Get().(*big.Int) + exp := intPool.Get().(*big.Int) + result := intPool.Get().(*big.Int) + defer func() { + intPool.Put(divisor) + intPool.Put(exp) + intPool.Put(result) + }() + + // divisor = 10^(dif) + // TODO: create loop up table if exp costs too much. + divisor.Exp(bigTen, exp.SetInt64(int64(dif)), nil) + // reuse exp + remainder := exp + + // result = unscaled / divisor + // remainder = unscaled % divisor + result.DivMod(unscaled, divisor, remainder) + if remainder.Sign() != 0 { + return result.Int64() + 1 + } + + return result.Int64() +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go b/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go new file mode 100644 index 000000000..5ed7abe66 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/suffix.go @@ -0,0 +1,198 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "strconv" +) + +type suffix string + +// suffixer can interpret and construct suffixes. +type suffixer interface { + interpret(suffix) (base, exponent int32, fmt Format, ok bool) + construct(base, exponent int32, fmt Format) (s suffix, ok bool) + constructBytes(base, exponent int32, fmt Format) (s []byte, ok bool) +} + +// quantitySuffixer handles suffixes for all three formats that quantity +// can handle. +var quantitySuffixer = newSuffixer() + +type bePair struct { + base, exponent int32 +} + +type listSuffixer struct { + suffixToBE map[suffix]bePair + beToSuffix map[bePair]suffix + beToSuffixBytes map[bePair][]byte +} + +func (ls *listSuffixer) addSuffix(s suffix, pair bePair) { + if ls.suffixToBE == nil { + ls.suffixToBE = map[suffix]bePair{} + } + if ls.beToSuffix == nil { + ls.beToSuffix = map[bePair]suffix{} + } + if ls.beToSuffixBytes == nil { + ls.beToSuffixBytes = map[bePair][]byte{} + } + ls.suffixToBE[s] = pair + ls.beToSuffix[pair] = s + ls.beToSuffixBytes[pair] = []byte(s) +} + +func (ls *listSuffixer) lookup(s suffix) (base, exponent int32, ok bool) { + pair, ok := ls.suffixToBE[s] + if !ok { + return 0, 0, false + } + return pair.base, pair.exponent, true +} + +func (ls *listSuffixer) construct(base, exponent int32) (s suffix, ok bool) { + s, ok = ls.beToSuffix[bePair{base, exponent}] + return +} + +func (ls *listSuffixer) constructBytes(base, exponent int32) (s []byte, ok bool) { + s, ok = ls.beToSuffixBytes[bePair{base, exponent}] + return +} + +type suffixHandler struct { + decSuffixes listSuffixer + binSuffixes listSuffixer +} + +type fastLookup struct { + *suffixHandler +} + +func (l fastLookup) interpret(s suffix) (base, exponent int32, format Format, ok bool) { + switch s { + case "": + return 10, 0, DecimalSI, true + case "n": + return 10, -9, DecimalSI, true + case "u": + return 10, -6, DecimalSI, true + case "m": + return 10, -3, DecimalSI, true + case "k": + return 10, 3, DecimalSI, true + case "M": + return 10, 6, DecimalSI, true + case "G": + return 10, 9, DecimalSI, true + } + return l.suffixHandler.interpret(s) +} + +func newSuffixer() suffixer { + sh := &suffixHandler{} + + // IMPORTANT: if you change this section you must change fastLookup + + sh.binSuffixes.addSuffix("Ki", bePair{2, 10}) + sh.binSuffixes.addSuffix("Mi", bePair{2, 20}) + sh.binSuffixes.addSuffix("Gi", bePair{2, 30}) + sh.binSuffixes.addSuffix("Ti", bePair{2, 40}) + sh.binSuffixes.addSuffix("Pi", bePair{2, 50}) + sh.binSuffixes.addSuffix("Ei", bePair{2, 60}) + // Don't emit an error when trying to produce + // a suffix for 2^0. + sh.decSuffixes.addSuffix("", bePair{2, 0}) + + sh.decSuffixes.addSuffix("n", bePair{10, -9}) + sh.decSuffixes.addSuffix("u", bePair{10, -6}) + sh.decSuffixes.addSuffix("m", bePair{10, -3}) + sh.decSuffixes.addSuffix("", bePair{10, 0}) + sh.decSuffixes.addSuffix("k", bePair{10, 3}) + sh.decSuffixes.addSuffix("M", bePair{10, 6}) + sh.decSuffixes.addSuffix("G", bePair{10, 9}) + sh.decSuffixes.addSuffix("T", bePair{10, 12}) + sh.decSuffixes.addSuffix("P", bePair{10, 15}) + sh.decSuffixes.addSuffix("E", bePair{10, 18}) + + return fastLookup{sh} +} + +func (sh *suffixHandler) construct(base, exponent int32, fmt Format) (s suffix, ok bool) { + switch fmt { + case DecimalSI: + return sh.decSuffixes.construct(base, exponent) + case BinarySI: + return sh.binSuffixes.construct(base, exponent) + case DecimalExponent: + if base != 10 { + return "", false + } + if exponent == 0 { + return "", true + } + return suffix("e" + strconv.FormatInt(int64(exponent), 10)), true + } + return "", false +} + +func (sh *suffixHandler) constructBytes(base, exponent int32, format Format) (s []byte, ok bool) { + switch format { + case DecimalSI: + return sh.decSuffixes.constructBytes(base, exponent) + case BinarySI: + return sh.binSuffixes.constructBytes(base, exponent) + case DecimalExponent: + if base != 10 { + return nil, false + } + if exponent == 0 { + return nil, true + } + result := make([]byte, 8, 8) + result[0] = 'e' + number := strconv.AppendInt(result[1:1], int64(exponent), 10) + if &result[1] == &number[0] { + return result[:1+len(number)], true + } + result = append(result[:1], number...) + return result, true + } + return nil, false +} + +func (sh *suffixHandler) interpret(suffix suffix) (base, exponent int32, fmt Format, ok bool) { + // Try lookup tables first + if b, e, ok := sh.decSuffixes.lookup(suffix); ok { + return b, e, DecimalSI, true + } + if b, e, ok := sh.binSuffixes.lookup(suffix); ok { + return b, e, BinarySI, true + } + + if len(suffix) > 1 && (suffix[0] == 'E' || suffix[0] == 'e') { + parsed, err := strconv.ParseInt(string(suffix[1:]), 10, 64) + if err != nil { + return 0, 0, DecimalExponent, false + } + return 10, int32(parsed), DecimalExponent, true + } + + return 0, 0, DecimalExponent, false +} diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go new file mode 100644 index 000000000..ab4740790 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go @@ -0,0 +1,27 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package resource + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Quantity) DeepCopyInto(out *Quantity) { + *out = in.DeepCopy() + return +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS new file mode 100644 index 000000000..cdb125a0d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/OWNERS @@ -0,0 +1,31 @@ +reviewers: +- thockin +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- caesarxuchao +- liggitt +- nikhiljindal +- gmarek +- erictune +- davidopp +- sttts +- quinton-hoole +- luxas +- janetkuo +- justinsb +- ncdc +- soltysh +- dims +- madhusudancs +- hongchaodeng +- krousey +- mml +- mbohlool +- david-mcmahon +- therc +- mqliang +- kevin-wangzefeng +- jianhuiz +- feihujiang diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go new file mode 100644 index 000000000..042cd5b9c --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/controller_ref.go @@ -0,0 +1,54 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// IsControlledBy checks if the object has a controllerRef set to the given owner +func IsControlledBy(obj Object, owner Object) bool { + ref := GetControllerOf(obj) + if ref == nil { + return false + } + return ref.UID == owner.GetUID() +} + +// GetControllerOf returns a pointer to a copy of the controllerRef if controllee has a controller +func GetControllerOf(controllee Object) *OwnerReference { + for _, ref := range controllee.GetOwnerReferences() { + if ref.Controller != nil && *ref.Controller { + return &ref + } + } + return nil +} + +// NewControllerRef creates an OwnerReference pointing to the given owner. +func NewControllerRef(owner Object, gvk schema.GroupVersionKind) *OwnerReference { + blockOwnerDeletion := true + isController := true + return &OwnerReference{ + APIVersion: gvk.GroupVersion().String(), + Kind: gvk.Kind, + Name: owner.GetName(), + UID: owner.GetUID(), + BlockOwnerDeletion: &blockOwnerDeletion, + Controller: &isController, + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go new file mode 100644 index 000000000..5c36f82c1 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go @@ -0,0 +1,319 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + "strconv" + "strings" + + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/intstr" +) + +func AddConversionFuncs(scheme *runtime.Scheme) error { + return scheme.AddConversionFuncs( + Convert_v1_TypeMeta_To_v1_TypeMeta, + + Convert_v1_ListMeta_To_v1_ListMeta, + + Convert_intstr_IntOrString_To_intstr_IntOrString, + + Convert_Pointer_v1_Duration_To_v1_Duration, + Convert_v1_Duration_To_Pointer_v1_Duration, + + Convert_Slice_string_To_v1_Time, + + Convert_v1_Time_To_v1_Time, + Convert_v1_MicroTime_To_v1_MicroTime, + + Convert_resource_Quantity_To_resource_Quantity, + + Convert_string_To_labels_Selector, + Convert_labels_Selector_To_string, + + Convert_string_To_fields_Selector, + Convert_fields_Selector_To_string, + + Convert_Pointer_bool_To_bool, + Convert_bool_To_Pointer_bool, + + Convert_Pointer_string_To_string, + Convert_string_To_Pointer_string, + + Convert_Pointer_int64_To_int, + Convert_int_To_Pointer_int64, + + Convert_Pointer_int32_To_int32, + Convert_int32_To_Pointer_int32, + + Convert_Pointer_int64_To_int64, + Convert_int64_To_Pointer_int64, + + Convert_Pointer_float64_To_float64, + Convert_float64_To_Pointer_float64, + + Convert_Map_string_To_string_To_v1_LabelSelector, + Convert_v1_LabelSelector_To_Map_string_To_string, + + Convert_Slice_string_To_Slice_int32, + + Convert_Slice_string_To_v1_DeletionPropagation, + ) +} + +func Convert_Pointer_float64_To_float64(in **float64, out *float64, s conversion.Scope) error { + if *in == nil { + *out = 0 + return nil + } + *out = float64(**in) + return nil +} + +func Convert_float64_To_Pointer_float64(in *float64, out **float64, s conversion.Scope) error { + temp := float64(*in) + *out = &temp + return nil +} + +func Convert_Pointer_int32_To_int32(in **int32, out *int32, s conversion.Scope) error { + if *in == nil { + *out = 0 + return nil + } + *out = int32(**in) + return nil +} + +func Convert_int32_To_Pointer_int32(in *int32, out **int32, s conversion.Scope) error { + temp := int32(*in) + *out = &temp + return nil +} + +func Convert_Pointer_int64_To_int64(in **int64, out *int64, s conversion.Scope) error { + if *in == nil { + *out = 0 + return nil + } + *out = int64(**in) + return nil +} + +func Convert_int64_To_Pointer_int64(in *int64, out **int64, s conversion.Scope) error { + temp := int64(*in) + *out = &temp + return nil +} + +func Convert_Pointer_int64_To_int(in **int64, out *int, s conversion.Scope) error { + if *in == nil { + *out = 0 + return nil + } + *out = int(**in) + return nil +} + +func Convert_int_To_Pointer_int64(in *int, out **int64, s conversion.Scope) error { + temp := int64(*in) + *out = &temp + return nil +} + +func Convert_Pointer_string_To_string(in **string, out *string, s conversion.Scope) error { + if *in == nil { + *out = "" + return nil + } + *out = **in + return nil +} + +func Convert_string_To_Pointer_string(in *string, out **string, s conversion.Scope) error { + if in == nil { + stringVar := "" + *out = &stringVar + return nil + } + *out = in + return nil +} + +func Convert_Pointer_bool_To_bool(in **bool, out *bool, s conversion.Scope) error { + if *in == nil { + *out = false + return nil + } + *out = **in + return nil +} + +func Convert_bool_To_Pointer_bool(in *bool, out **bool, s conversion.Scope) error { + if in == nil { + boolVar := false + *out = &boolVar + return nil + } + *out = in + return nil +} + +// +k8s:conversion-fn=drop +func Convert_v1_TypeMeta_To_v1_TypeMeta(in, out *TypeMeta, s conversion.Scope) error { + // These values are explicitly not copied + //out.APIVersion = in.APIVersion + //out.Kind = in.Kind + return nil +} + +// +k8s:conversion-fn=copy-only +func Convert_v1_ListMeta_To_v1_ListMeta(in, out *ListMeta, s conversion.Scope) error { + *out = *in + return nil +} + +// +k8s:conversion-fn=copy-only +func Convert_intstr_IntOrString_To_intstr_IntOrString(in, out *intstr.IntOrString, s conversion.Scope) error { + *out = *in + return nil +} + +// +k8s:conversion-fn=copy-only +func Convert_v1_Time_To_v1_Time(in *Time, out *Time, s conversion.Scope) error { + // Cannot deep copy these, because time.Time has unexported fields. + *out = *in + return nil +} + +// +k8s:conversion-fn=copy-only +func Convert_v1_MicroTime_To_v1_MicroTime(in *MicroTime, out *MicroTime, s conversion.Scope) error { + // Cannot deep copy these, because time.Time has unexported fields. + *out = *in + return nil +} + +func Convert_Pointer_v1_Duration_To_v1_Duration(in **Duration, out *Duration, s conversion.Scope) error { + if *in == nil { + *out = Duration{} // zero duration + return nil + } + *out = **in // copy + return nil +} + +func Convert_v1_Duration_To_Pointer_v1_Duration(in *Duration, out **Duration, s conversion.Scope) error { + temp := *in //copy + *out = &temp + return nil +} + +// Convert_Slice_string_To_v1_Time allows converting a URL query parameter value +func Convert_Slice_string_To_v1_Time(input *[]string, out *Time, s conversion.Scope) error { + str := "" + if len(*input) > 0 { + str = (*input)[0] + } + return out.UnmarshalQueryParameter(str) +} + +func Convert_string_To_labels_Selector(in *string, out *labels.Selector, s conversion.Scope) error { + selector, err := labels.Parse(*in) + if err != nil { + return err + } + *out = selector + return nil +} + +func Convert_string_To_fields_Selector(in *string, out *fields.Selector, s conversion.Scope) error { + selector, err := fields.ParseSelector(*in) + if err != nil { + return err + } + *out = selector + return nil +} + +func Convert_labels_Selector_To_string(in *labels.Selector, out *string, s conversion.Scope) error { + if *in == nil { + return nil + } + *out = (*in).String() + return nil +} + +func Convert_fields_Selector_To_string(in *fields.Selector, out *string, s conversion.Scope) error { + if *in == nil { + return nil + } + *out = (*in).String() + return nil +} + +// +k8s:conversion-fn=copy-only +func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out *resource.Quantity, s conversion.Scope) error { + *out = *in + return nil +} + +func Convert_Map_string_To_string_To_v1_LabelSelector(in *map[string]string, out *LabelSelector, s conversion.Scope) error { + if in == nil { + return nil + } + for labelKey, labelValue := range *in { + AddLabelToSelector(out, labelKey, labelValue) + } + return nil +} + +func Convert_v1_LabelSelector_To_Map_string_To_string(in *LabelSelector, out *map[string]string, s conversion.Scope) error { + var err error + *out, err = LabelSelectorAsMap(in) + return err +} + +// Convert_Slice_string_To_Slice_int32 converts multiple query parameters or +// a single query parameter with a comma delimited value to multiple int32. +// This is used for port forwarding which needs the ports as int32. +func Convert_Slice_string_To_Slice_int32(in *[]string, out *[]int32, s conversion.Scope) error { + for _, s := range *in { + for _, v := range strings.Split(s, ",") { + x, err := strconv.ParseUint(v, 10, 16) + if err != nil { + return fmt.Errorf("cannot convert to []int32: %v", err) + } + *out = append(*out, int32(x)) + } + } + return nil +} + +// Convert_Slice_string_To_v1_DeletionPropagation allows converting a URL query parameter propagationPolicy +func Convert_Slice_string_To_v1_DeletionPropagation(input *[]string, out *DeletionPropagation, s conversion.Scope) error { + if len(*input) > 0 { + *out = DeletionPropagation((*input)[0]) + } else { + *out = "" + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go new file mode 100644 index 000000000..dbaa87c87 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=meta.k8s.io + +package v1 // import "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go new file mode 100644 index 000000000..babe8a8b5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go @@ -0,0 +1,60 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "time" +) + +// Duration is a wrapper around time.Duration which supports correct +// marshaling to YAML and JSON. In particular, it marshals into strings, which +// can be used as map keys in json. +type Duration struct { + time.Duration `protobuf:"varint,1,opt,name=duration,casttype=time.Duration"` +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (d *Duration) UnmarshalJSON(b []byte) error { + var str string + err := json.Unmarshal(b, &str) + if err != nil { + return err + } + + pd, err := time.ParseDuration(str) + if err != nil { + return err + } + d.Duration = pd + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (d Duration) MarshalJSON() ([]byte, error) { + return json.Marshal(d.Duration.String()) +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Duration) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ Duration) OpenAPISchemaFormat() string { return "" } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go new file mode 100644 index 000000000..4fa6f3157 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -0,0 +1,8256 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto + + It has these top-level messages: + APIGroup + APIGroupList + APIResource + APIResourceList + APIVersions + CreateOptions + DeleteOptions + Duration + ExportOptions + GetOptions + GroupKind + GroupResource + GroupVersion + GroupVersionForDiscovery + GroupVersionKind + GroupVersionResource + Initializer + Initializers + LabelSelector + LabelSelectorRequirement + List + ListMeta + ListOptions + MicroTime + ObjectMeta + OwnerReference + Patch + Preconditions + RootPaths + ServerAddressByClientCIDR + Status + StatusCause + StatusDetails + Time + Timestamp + TypeMeta + UpdateOptions + Verbs + WatchEvent +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime" + +import time "time" +import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *APIGroup) Reset() { *m = APIGroup{} } +func (*APIGroup) ProtoMessage() {} +func (*APIGroup) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *APIGroupList) Reset() { *m = APIGroupList{} } +func (*APIGroupList) ProtoMessage() {} +func (*APIGroupList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *APIResource) Reset() { *m = APIResource{} } +func (*APIResource) ProtoMessage() {} +func (*APIResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *APIResourceList) Reset() { *m = APIResourceList{} } +func (*APIResourceList) ProtoMessage() {} +func (*APIResourceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *APIVersions) Reset() { *m = APIVersions{} } +func (*APIVersions) ProtoMessage() {} +func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *CreateOptions) Reset() { *m = CreateOptions{} } +func (*CreateOptions) ProtoMessage() {} +func (*CreateOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } +func (*DeleteOptions) ProtoMessage() {} +func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func (m *Duration) Reset() { *m = Duration{} } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } + +func (m *ExportOptions) Reset() { *m = ExportOptions{} } +func (*ExportOptions) ProtoMessage() {} +func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + +func (m *GetOptions) Reset() { *m = GetOptions{} } +func (*GetOptions) ProtoMessage() {} +func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } + +func (m *GroupKind) Reset() { *m = GroupKind{} } +func (*GroupKind) ProtoMessage() {} +func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *GroupResource) Reset() { *m = GroupResource{} } +func (*GroupResource) ProtoMessage() {} +func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *GroupVersion) Reset() { *m = GroupVersion{} } +func (*GroupVersion) ProtoMessage() {} +func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } +func (*GroupVersionForDiscovery) ProtoMessage() {} +func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{13} +} + +func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } +func (*GroupVersionKind) ProtoMessage() {} +func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } + +func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } +func (*GroupVersionResource) ProtoMessage() {} +func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } + +func (m *Initializer) Reset() { *m = Initializer{} } +func (*Initializer) ProtoMessage() {} +func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } + +func (m *Initializers) Reset() { *m = Initializers{} } +func (*Initializers) ProtoMessage() {} +func (*Initializers) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } + +func (m *LabelSelector) Reset() { *m = LabelSelector{} } +func (*LabelSelector) ProtoMessage() {} +func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } + +func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } +func (*LabelSelectorRequirement) ProtoMessage() {} +func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{19} +} + +func (m *List) Reset() { *m = List{} } +func (*List) ProtoMessage() {} +func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } + +func (m *ListMeta) Reset() { *m = ListMeta{} } +func (*ListMeta) ProtoMessage() {} +func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } + +func (m *ListOptions) Reset() { *m = ListOptions{} } +func (*ListOptions) ProtoMessage() {} +func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } + +func (m *MicroTime) Reset() { *m = MicroTime{} } +func (*MicroTime) ProtoMessage() {} +func (*MicroTime) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } + +func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } +func (*ObjectMeta) ProtoMessage() {} +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } + +func (m *OwnerReference) Reset() { *m = OwnerReference{} } +func (*OwnerReference) ProtoMessage() {} +func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } + +func (m *Patch) Reset() { *m = Patch{} } +func (*Patch) ProtoMessage() {} +func (*Patch) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } + +func (m *Preconditions) Reset() { *m = Preconditions{} } +func (*Preconditions) ProtoMessage() {} +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } + +func (m *RootPaths) Reset() { *m = RootPaths{} } +func (*RootPaths) ProtoMessage() {} +func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } + +func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } +func (*ServerAddressByClientCIDR) ProtoMessage() {} +func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{29} +} + +func (m *Status) Reset() { *m = Status{} } +func (*Status) ProtoMessage() {} +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } + +func (m *StatusCause) Reset() { *m = StatusCause{} } +func (*StatusCause) ProtoMessage() {} +func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } + +func (m *StatusDetails) Reset() { *m = StatusDetails{} } +func (*StatusDetails) ProtoMessage() {} +func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } + +func (m *Time) Reset() { *m = Time{} } +func (*Time) ProtoMessage() {} +func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } + +func (m *TypeMeta) Reset() { *m = TypeMeta{} } +func (*TypeMeta) ProtoMessage() {} +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } + +func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } +func (*UpdateOptions) ProtoMessage() {} +func (*UpdateOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } + +func (m *Verbs) Reset() { *m = Verbs{} } +func (*Verbs) ProtoMessage() {} +func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } + +func (m *WatchEvent) Reset() { *m = WatchEvent{} } +func (*WatchEvent) ProtoMessage() {} +func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } + +func init() { + proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") + proto.RegisterType((*APIGroupList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroupList") + proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource") + proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList") + proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions") + proto.RegisterType((*CreateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.CreateOptions") + proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") + proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") + proto.RegisterType((*ExportOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ExportOptions") + proto.RegisterType((*GetOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GetOptions") + proto.RegisterType((*GroupKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind") + proto.RegisterType((*GroupResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupResource") + proto.RegisterType((*GroupVersion)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersion") + proto.RegisterType((*GroupVersionForDiscovery)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery") + proto.RegisterType((*GroupVersionKind)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind") + proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource") + proto.RegisterType((*Initializer)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Initializer") + proto.RegisterType((*Initializers)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Initializers") + proto.RegisterType((*LabelSelector)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector") + proto.RegisterType((*LabelSelectorRequirement)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement") + proto.RegisterType((*List)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.List") + proto.RegisterType((*ListMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta") + proto.RegisterType((*ListOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ListOptions") + proto.RegisterType((*MicroTime)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime") + proto.RegisterType((*ObjectMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta") + proto.RegisterType((*OwnerReference)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference") + proto.RegisterType((*Patch)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Patch") + proto.RegisterType((*Preconditions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Preconditions") + proto.RegisterType((*RootPaths)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.RootPaths") + proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR") + proto.RegisterType((*Status)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Status") + proto.RegisterType((*StatusCause)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusCause") + proto.RegisterType((*StatusDetails)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.StatusDetails") + proto.RegisterType((*Time)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Time") + proto.RegisterType((*Timestamp)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Timestamp") + proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta") + proto.RegisterType((*UpdateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.UpdateOptions") + proto.RegisterType((*Verbs)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Verbs") + proto.RegisterType((*WatchEvent)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.WatchEvent") +} +func (m *APIGroup) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIGroup) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if len(m.Versions) > 0 { + for _, msg := range m.Versions { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.PreferredVersion.Size())) + n1, err := m.PreferredVersion.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if len(m.ServerAddressByClientCIDRs) > 0 { + for _, msg := range m.ServerAddressByClientCIDRs { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *APIGroupList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIGroupList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for _, msg := range m.Groups { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *APIResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIResource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x10 + i++ + if m.Namespaced { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + if m.Verbs != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Verbs.Size())) + n2, err := m.Verbs.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if len(m.ShortNames) > 0 { + for _, s := range m.ShortNames { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SingularName))) + i += copy(dAtA[i:], m.SingularName) + if len(m.Categories) > 0 { + for _, s := range m.Categories { + dAtA[i] = 0x3a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x4a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + dAtA[i] = 0x52 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.StorageVersionHash))) + i += copy(dAtA[i:], m.StorageVersionHash) + return i, nil +} + +func (m *APIResourceList) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIResourceList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupVersion))) + i += copy(dAtA[i:], m.GroupVersion) + if len(m.APIResources) > 0 { + for _, msg := range m.APIResources { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *APIVersions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *APIVersions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Versions) > 0 { + for _, s := range m.Versions { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if len(m.ServerAddressByClientCIDRs) > 0 { + for _, msg := range m.ServerAddressByClientCIDRs { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *CreateOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CreateOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *DeleteOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeleteOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.GracePeriodSeconds != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.GracePeriodSeconds)) + } + if m.Preconditions != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Preconditions.Size())) + n3, err := m.Preconditions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.OrphanDependents != nil { + dAtA[i] = 0x18 + i++ + if *m.OrphanDependents { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.PropagationPolicy != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PropagationPolicy))) + i += copy(dAtA[i:], *m.PropagationPolicy) + } + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *Duration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Duration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Duration)) + return i, nil +} + +func (m *ExportOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + if m.Export { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if m.Exact { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} + +func (m *GetOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i += copy(dAtA[i:], m.ResourceVersion) + return i, nil +} + +func (m *GroupKind) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupKind) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + return i, nil +} + +func (m *GroupResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupResource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i += copy(dAtA[i:], m.Resource) + return i, nil +} + +func (m *GroupVersion) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupVersion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + return i, nil +} + +func (m *GroupVersionForDiscovery) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupVersionForDiscovery) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupVersion))) + i += copy(dAtA[i:], m.GroupVersion) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + return i, nil +} + +func (m *GroupVersionKind) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupVersionKind) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + return i, nil +} + +func (m *GroupVersionResource) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GroupVersionResource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i += copy(dAtA[i:], m.Resource) + return i, nil +} + +func (m *Initializer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Initializer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + return i, nil +} + +func (m *Initializers) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Initializers) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Pending) > 0 { + for _, msg := range m.Pending { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Result != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Result.Size())) + n4, err := m.Result.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func (m *LabelSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LabelSelector) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MatchLabels) > 0 { + keysForMatchLabels := make([]string, 0, len(m.MatchLabels)) + for k := range m.MatchLabels { + keysForMatchLabels = append(keysForMatchLabels, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) + for _, k := range keysForMatchLabels { + dAtA[i] = 0xa + i++ + v := m.MatchLabels[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.MatchExpressions) > 0 { + for _, msg := range m.MatchExpressions { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *LabelSelectorRequirement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LabelSelectorRequirement) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator))) + i += copy(dAtA[i:], m.Operator) + if len(m.Values) > 0 { + for _, s := range m.Values { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *List) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *List) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ListMeta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListMeta) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink))) + i += copy(dAtA[i:], m.SelfLink) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i += copy(dAtA[i:], m.ResourceVersion) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Continue))) + i += copy(dAtA[i:], m.Continue) + return i, nil +} + +func (m *ListOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector))) + i += copy(dAtA[i:], m.LabelSelector) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldSelector))) + i += copy(dAtA[i:], m.FieldSelector) + dAtA[i] = 0x18 + i++ + if m.Watch { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i += copy(dAtA[i:], m.ResourceVersion) + if m.TimeoutSeconds != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) + } + dAtA[i] = 0x38 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Limit)) + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Continue))) + i += copy(dAtA[i:], m.Continue) + return i, nil +} + +func (m *ObjectMeta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ObjectMeta) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.GenerateName))) + i += copy(dAtA[i:], m.GenerateName) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i += copy(dAtA[i:], m.Namespace) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink))) + i += copy(dAtA[i:], m.SelfLink) + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i += copy(dAtA[i:], m.UID) + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i += copy(dAtA[i:], m.ResourceVersion) + dAtA[i] = 0x38 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.CreationTimestamp.Size())) + n6, err := m.CreationTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + if m.DeletionTimestamp != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.DeletionTimestamp.Size())) + n7, err := m.DeletionTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.DeletionGracePeriodSeconds != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + keysForLabels := make([]string, 0, len(m.Labels)) + for k := range m.Labels { + keysForLabels = append(keysForLabels, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + for _, k := range keysForLabels { + dAtA[i] = 0x5a + i++ + v := m.Labels[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.Annotations) > 0 { + keysForAnnotations := make([]string, 0, len(m.Annotations)) + for k := range m.Annotations { + keysForAnnotations = append(keysForAnnotations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + for _, k := range keysForAnnotations { + dAtA[i] = 0x62 + i++ + v := m.Annotations[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.OwnerReferences) > 0 { + for _, msg := range m.OwnerReferences { + dAtA[i] = 0x6a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + dAtA[i] = 0x72 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + dAtA[i] = 0x7a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterName))) + i += copy(dAtA[i:], m.ClusterName) + if m.Initializers != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Initializers.Size())) + n8, err := m.Initializers.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} + +func (m *OwnerReference) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OwnerReference) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i += copy(dAtA[i:], m.UID) + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i += copy(dAtA[i:], m.APIVersion) + if m.Controller != nil { + dAtA[i] = 0x30 + i++ + if *m.Controller { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.BlockOwnerDeletion != nil { + dAtA[i] = 0x38 + i++ + if *m.BlockOwnerDeletion { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Patch) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Patch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *Preconditions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Preconditions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.UID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UID))) + i += copy(dAtA[i:], *m.UID) + } + return i, nil +} + +func (m *RootPaths) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RootPaths) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *ServerAddressByClientCIDR) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServerAddressByClientCIDR) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientCIDR))) + i += copy(dAtA[i:], m.ClientCIDR) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServerAddress))) + i += copy(dAtA[i:], m.ServerAddress) + return i, nil +} + +func (m *Status) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Status) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n9, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) + i += copy(dAtA[i:], m.Status) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) + i += copy(dAtA[i:], m.Reason) + if m.Details != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Details.Size())) + n10, err := m.Details.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + dAtA[i] = 0x30 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Code)) + return i, nil +} + +func (m *StatusCause) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatusCause) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) + i += copy(dAtA[i:], m.Message) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Field))) + i += copy(dAtA[i:], m.Field) + return i, nil +} + +func (m *StatusDetails) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatusDetails) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + if len(m.Causes) > 0 { + for _, msg := range m.Causes { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + dAtA[i] = 0x28 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.RetryAfterSeconds)) + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i += copy(dAtA[i:], m.UID) + return i, nil +} + +func (m *Timestamp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Seconds)) + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Nanos)) + return i, nil +} + +func (m *TypeMeta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i += copy(dAtA[i:], m.APIVersion) + return i, nil +} + +func (m *UpdateOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m Verbs) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m Verbs) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *WatchEvent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WatchEvent) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size())) + n11, err := m.Object.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + return i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *APIGroup) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Versions) > 0 { + for _, e := range m.Versions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = m.PreferredVersion.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.ServerAddressByClientCIDRs) > 0 { + for _, e := range m.ServerAddressByClientCIDRs { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIGroupList) Size() (n int) { + var l int + _ = l + if len(m.Groups) > 0 { + for _, e := range m.Groups { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIResource) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + if m.Verbs != nil { + l = m.Verbs.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.ShortNames) > 0 { + for _, s := range m.ShortNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.SingularName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Categories) > 0 { + for _, s := range m.Categories { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.StorageVersionHash) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *APIResourceList) Size() (n int) { + var l int + _ = l + l = len(m.GroupVersion) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.APIResources) > 0 { + for _, e := range m.APIResources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *APIVersions) Size() (n int) { + var l int + _ = l + if len(m.Versions) > 0 { + for _, s := range m.Versions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ServerAddressByClientCIDRs) > 0 { + for _, e := range m.ServerAddressByClientCIDRs { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *CreateOptions) Size() (n int) { + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *DeleteOptions) Size() (n int) { + var l int + _ = l + if m.GracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds)) + } + if m.Preconditions != nil { + l = m.Preconditions.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.OrphanDependents != nil { + n += 2 + } + if m.PropagationPolicy != nil { + l = len(*m.PropagationPolicy) + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *Duration) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Duration)) + return n +} + +func (m *ExportOptions) Size() (n int) { + var l int + _ = l + n += 2 + n += 2 + return n +} + +func (m *GetOptions) Size() (n int) { + var l int + _ = l + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *GroupKind) Size() (n int) { + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *GroupResource) Size() (n int) { + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *GroupVersion) Size() (n int) { + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *GroupVersionForDiscovery) Size() (n int) { + var l int + _ = l + l = len(m.GroupVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *GroupVersionKind) Size() (n int) { + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *GroupVersionResource) Size() (n int) { + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Version) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Initializer) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Initializers) Size() (n int) { + var l int + _ = l + if len(m.Pending) > 0 { + for _, e := range m.Pending { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.Result != nil { + l = m.Result.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *LabelSelector) Size() (n int) { + var l int + _ = l + if len(m.MatchLabels) > 0 { + for k, v := range m.MatchLabels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.MatchExpressions) > 0 { + for _, e := range m.MatchExpressions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *LabelSelectorRequirement) Size() (n int) { + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Operator) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *List) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ListMeta) Size() (n int) { + var l int + _ = l + l = len(m.SelfLink) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Continue) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ListOptions) Size() (n int) { + var l int + _ = l + l = len(m.LabelSelector) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FieldSelector) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + if m.TimeoutSeconds != nil { + n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) + } + n += 1 + sovGenerated(uint64(m.Limit)) + l = len(m.Continue) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *ObjectMeta) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.GenerateName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.SelfLink) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + l = m.CreationTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DeletionTimestamp != nil { + l = m.DeletionTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.DeletionGracePeriodSeconds != nil { + n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds)) + } + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if len(m.OwnerReferences) > 0 { + for _, e := range m.OwnerReferences { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Finalizers) > 0 { + for _, s := range m.Finalizers { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.ClusterName) + n += 1 + l + sovGenerated(uint64(l)) + if m.Initializers != nil { + l = m.Initializers.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *OwnerReference) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + if m.Controller != nil { + n += 2 + } + if m.BlockOwnerDeletion != nil { + n += 2 + } + return n +} + +func (m *Patch) Size() (n int) { + var l int + _ = l + return n +} + +func (m *Preconditions) Size() (n int) { + var l int + _ = l + if m.UID != nil { + l = len(*m.UID) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *RootPaths) Size() (n int) { + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ServerAddressByClientCIDR) Size() (n int) { + var l int + _ = l + l = len(m.ClientCIDR) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ServerAddress) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Status) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Status) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + if m.Details != nil { + l = m.Details.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + n += 1 + sovGenerated(uint64(m.Code)) + return n +} + +func (m *StatusCause) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Field) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *StatusDetails) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Causes) > 0 { + for _, e := range m.Causes { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 1 + sovGenerated(uint64(m.RetryAfterSeconds)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Timestamp) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Seconds)) + n += 1 + sovGenerated(uint64(m.Nanos)) + return n +} + +func (m *TypeMeta) Size() (n int) { + var l int + _ = l + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *UpdateOptions) Size() (n int) { + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m Verbs) Size() (n int) { + var l int + _ = l + if len(m) > 0 { + for _, s := range m { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *WatchEvent) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Object.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *APIGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&APIGroup{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`, + `PreferredVersion:` + strings.Replace(strings.Replace(this.PreferredVersion.String(), "GroupVersionForDiscovery", "GroupVersionForDiscovery", 1), `&`, ``, 1) + `,`, + `ServerAddressByClientCIDRs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ServerAddressByClientCIDRs), "ServerAddressByClientCIDR", "ServerAddressByClientCIDR", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *APIGroupList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&APIGroupList{`, + `Groups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Groups), "APIGroup", "APIGroup", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *APIResource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&APIResource{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Namespaced:` + fmt.Sprintf("%v", this.Namespaced) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Verbs:` + strings.Replace(fmt.Sprintf("%v", this.Verbs), "Verbs", "Verbs", 1) + `,`, + `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, + `SingularName:` + fmt.Sprintf("%v", this.SingularName) + `,`, + `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `StorageVersionHash:` + fmt.Sprintf("%v", this.StorageVersionHash) + `,`, + `}`, + }, "") + return s +} +func (this *APIResourceList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&APIResourceList{`, + `GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`, + `APIResources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.APIResources), "APIResource", "APIResource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CreateOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateOptions{`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, + `}`, + }, "") + return s +} +func (this *DeleteOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeleteOptions{`, + `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`, + `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`, + `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, + `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, + `}`, + }, "") + return s +} +func (this *Duration) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Duration{`, + `Duration:` + fmt.Sprintf("%v", this.Duration) + `,`, + `}`, + }, "") + return s +} +func (this *ExportOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExportOptions{`, + `Export:` + fmt.Sprintf("%v", this.Export) + `,`, + `Exact:` + fmt.Sprintf("%v", this.Exact) + `,`, + `}`, + }, "") + return s +} +func (this *GetOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GetOptions{`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `}`, + }, "") + return s +} +func (this *GroupVersionForDiscovery) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GroupVersionForDiscovery{`, + `GroupVersion:` + fmt.Sprintf("%v", this.GroupVersion) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `}`, + }, "") + return s +} +func (this *Initializer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Initializer{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *Initializers) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Initializers{`, + `Pending:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Pending), "Initializer", "Initializer", 1), `&`, ``, 1) + `,`, + `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "Status", 1) + `,`, + `}`, + }, "") + return s +} +func (this *LabelSelector) String() string { + if this == nil { + return "nil" + } + keysForMatchLabels := make([]string, 0, len(this.MatchLabels)) + for k := range this.MatchLabels { + keysForMatchLabels = append(keysForMatchLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMatchLabels) + mapStringForMatchLabels := "map[string]string{" + for _, k := range keysForMatchLabels { + mapStringForMatchLabels += fmt.Sprintf("%v: %v,", k, this.MatchLabels[k]) + } + mapStringForMatchLabels += "}" + s := strings.Join([]string{`&LabelSelector{`, + `MatchLabels:` + mapStringForMatchLabels + `,`, + `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "LabelSelectorRequirement", "LabelSelectorRequirement", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *LabelSelectorRequirement) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LabelSelectorRequirement{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, + `Values:` + fmt.Sprintf("%v", this.Values) + `,`, + `}`, + }, "") + return s +} +func (this *List) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&List{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListMeta) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListMeta{`, + `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Continue:` + fmt.Sprintf("%v", this.Continue) + `,`, + `}`, + }, "") + return s +} +func (this *ListOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListOptions{`, + `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, + `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`, + `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, + `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, + `Continue:` + fmt.Sprintf("%v", this.Continue) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectMeta) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&ObjectMeta{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "Time", 1), `&`, ``, 1) + `,`, + `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "Time", 1) + `,`, + `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "OwnerReference", 1), `&`, ``, 1) + `,`, + `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, + `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, + `Initializers:` + strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializers", "Initializers", 1) + `,`, + `}`, + }, "") + return s +} +func (this *OwnerReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OwnerReference{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Controller:` + valueToStringGenerated(this.Controller) + `,`, + `BlockOwnerDeletion:` + valueToStringGenerated(this.BlockOwnerDeletion) + `,`, + `}`, + }, "") + return s +} +func (this *Patch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Patch{`, + `}`, + }, "") + return s +} +func (this *Preconditions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Preconditions{`, + `UID:` + valueToStringGenerated(this.UID) + `,`, + `}`, + }, "") + return s +} +func (this *RootPaths) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RootPaths{`, + `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, + `}`, + }, "") + return s +} +func (this *ServerAddressByClientCIDR) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServerAddressByClientCIDR{`, + `ClientCIDR:` + fmt.Sprintf("%v", this.ClientCIDR) + `,`, + `ServerAddress:` + fmt.Sprintf("%v", this.ServerAddress) + `,`, + `}`, + }, "") + return s +} +func (this *Status) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Status{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "ListMeta", 1), `&`, ``, 1) + `,`, + `Status:` + fmt.Sprintf("%v", this.Status) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, + `Details:` + strings.Replace(fmt.Sprintf("%v", this.Details), "StatusDetails", "StatusDetails", 1) + `,`, + `Code:` + fmt.Sprintf("%v", this.Code) + `,`, + `}`, + }, "") + return s +} +func (this *StatusCause) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusCause{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Message:` + fmt.Sprintf("%v", this.Message) + `,`, + `Field:` + fmt.Sprintf("%v", this.Field) + `,`, + `}`, + }, "") + return s +} +func (this *StatusDetails) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusDetails{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Causes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Causes), "StatusCause", "StatusCause", 1), `&`, ``, 1) + `,`, + `RetryAfterSeconds:` + fmt.Sprintf("%v", this.RetryAfterSeconds) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `}`, + }, "") + return s +} +func (this *Timestamp) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timestamp{`, + `Seconds:` + fmt.Sprintf("%v", this.Seconds) + `,`, + `Nanos:` + fmt.Sprintf("%v", this.Nanos) + `,`, + `}`, + }, "") + return s +} +func (this *TypeMeta) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TypeMeta{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `}`, + }, "") + return s +} +func (this *UpdateOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateOptions{`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, + `}`, + }, "") + return s +} +func (this *WatchEvent) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WatchEvent{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *APIGroup) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Versions = append(m.Versions, GroupVersionForDiscovery{}) + if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PreferredVersion", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PreferredVersion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerAddressByClientCIDRs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{}) + if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIGroupList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIGroupList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIGroupList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, APIGroup{}) + if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespaced", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Namespaced = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Verbs == nil { + m.Verbs = Verbs{} + } + if err := m.Verbs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SingularName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SingularName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StorageVersionHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StorageVersionHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIResourceList) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIResourceList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIResourceList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIResources = append(m.APIResources, APIResource{}) + if err := m.APIResources[len(m.APIResources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *APIVersions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: APIVersions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: APIVersions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Versions = append(m.Versions, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerAddressByClientCIDRs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerAddressByClientCIDRs = append(m.ServerAddressByClientCIDRs, ServerAddressByClientCIDR{}) + if err := m.ServerAddressByClientCIDRs[len(m.ServerAddressByClientCIDRs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeleteOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeleteOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.GracePeriodSeconds = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Preconditions == nil { + m.Preconditions = &Preconditions{} + } + if err := m.Preconditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.OrphanDependents = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := DeletionPropagation(dAtA[iNdEx:postIndex]) + m.PropagationPolicy = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Duration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Duration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + m.Duration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Duration |= (time.Duration(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Export", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Export = bool(v != 0) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exact", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Exact = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupKind) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupKind: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupKind: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupVersion) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupVersion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupVersion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupVersionForDiscovery) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupVersionForDiscovery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupVersionForDiscovery: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GroupVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GroupVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupVersionKind: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupVersionKind: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupVersionResource) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GroupVersionResource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupVersionResource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Initializer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Initializer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Initializer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Initializers) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Initializers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Initializers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pending", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pending = append(m.Pending, Initializer{}) + if err := m.Pending[len(m.Pending)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Result == nil { + m.Result = &Status{} + } + if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LabelSelector) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LabelSelector: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LabelSelector: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchLabels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MatchLabels == nil { + m.MatchLabels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MatchLabels[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchExpressions = append(m.MatchExpressions, LabelSelectorRequirement{}) + if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LabelSelectorRequirement) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LabelSelectorRequirement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LabelSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = LabelSelectorOperator(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *List) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: List: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: List: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, k8s_io_apimachinery_pkg_runtime.RawExtension{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListMeta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelfLink = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Continue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Continue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LabelSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldSelector = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Watch = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TimeoutSeconds = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) + } + m.Limit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Limit |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Continue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Continue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectMeta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ObjectMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenerateName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SelfLink = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) + } + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Generation |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CreationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeletionTimestamp == nil { + m.DeletionTimestamp = &Time{} + } + if err := m.DeletionTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DeletionGracePeriodSeconds = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Annotations[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerReferences = append(m.OwnerReferences, OwnerReference{}) + if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Finalizers = append(m.Finalizers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClusterName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Initializers == nil { + m.Initializers = &Initializers{} + } + if err := m.Initializers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OwnerReference) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OwnerReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OwnerReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Controller = &b + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockOwnerDeletion", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.BlockOwnerDeletion = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Patch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Patch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Patch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Preconditions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Preconditions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Preconditions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + m.UID = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RootPaths) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RootPaths: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RootPaths: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServerAddressByClientCIDR) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServerAddressByClientCIDR: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServerAddressByClientCIDR: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClientCIDR", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClientCIDR = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ServerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Status) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Status: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = StatusReason(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Details == nil { + m.Details = &StatusDetails{} + } + if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusCause) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusCause: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusCause: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = CauseType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatusDetails) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusDetails: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusDetails: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Causes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Causes = append(m.Causes, StatusCause{}) + if err := m.Causes[len(m.Causes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RetryAfterSeconds", wireType) + } + m.RetryAfterSeconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RetryAfterSeconds |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timestamp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TypeMeta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateOptions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Verbs) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Verbs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Verbs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + *m = append(*m, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WatchEvent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WatchEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WatchEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 2453 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x23, 0x49, + 0xf5, 0x4f, 0xdb, 0xb1, 0x63, 0x3f, 0xc7, 0xf9, 0xa8, 0x9d, 0xfd, 0xff, 0xbd, 0x91, 0x88, 0xb3, + 0xbd, 0x68, 0x95, 0x85, 0x59, 0x9b, 0x64, 0x61, 0x35, 0x0c, 0x30, 0x90, 0x8e, 0x33, 0x43, 0xd8, + 0xc9, 0xc4, 0xaa, 0xec, 0x0c, 0x62, 0x18, 0x21, 0x3a, 0xdd, 0x15, 0xa7, 0x49, 0xbb, 0xdb, 0x5b, + 0xd5, 0xce, 0x8c, 0xe1, 0xc0, 0x1e, 0x40, 0x80, 0x84, 0xd0, 0x1c, 0x39, 0xa1, 0x1d, 0xc1, 0x85, + 0x2b, 0x27, 0x4e, 0x9c, 0x90, 0x98, 0xe3, 0x4a, 0x5c, 0xf6, 0x80, 0xac, 0x9d, 0x70, 0xe0, 0x84, + 0xb8, 0xe7, 0x80, 0x50, 0x55, 0x57, 0x77, 0x57, 0xdb, 0xf1, 0xa4, 0xcd, 0x2c, 0x88, 0x53, 0xdc, + 0xef, 0xe3, 0xf7, 0x5e, 0x55, 0xbd, 0xfa, 0xd5, 0xab, 0x0a, 0xec, 0x9d, 0x5c, 0x63, 0x0d, 0xc7, + 0x6f, 0x9e, 0xf4, 0x0f, 0x09, 0xf5, 0x48, 0x40, 0x58, 0xf3, 0x94, 0x78, 0xb6, 0x4f, 0x9b, 0x52, + 0x61, 0xf6, 0x9c, 0xae, 0x69, 0x1d, 0x3b, 0x1e, 0xa1, 0x83, 0x66, 0xef, 0xa4, 0xc3, 0x05, 0xac, + 0xd9, 0x25, 0x81, 0xd9, 0x3c, 0xdd, 0x68, 0x76, 0x88, 0x47, 0xa8, 0x19, 0x10, 0xbb, 0xd1, 0xa3, + 0x7e, 0xe0, 0xa3, 0x4f, 0x87, 0x5e, 0x0d, 0xd5, 0xab, 0xd1, 0x3b, 0xe9, 0x70, 0x01, 0x6b, 0x70, + 0xaf, 0xc6, 0xe9, 0xc6, 0xca, 0x9b, 0x1d, 0x27, 0x38, 0xee, 0x1f, 0x36, 0x2c, 0xbf, 0xdb, 0xec, + 0xf8, 0x1d, 0xbf, 0x29, 0x9c, 0x0f, 0xfb, 0x47, 0xe2, 0x4b, 0x7c, 0x88, 0x5f, 0x21, 0xe8, 0xca, + 0xc4, 0x54, 0x68, 0xdf, 0x0b, 0x9c, 0x2e, 0x19, 0xcd, 0x62, 0xe5, 0xed, 0xcb, 0x1c, 0x98, 0x75, + 0x4c, 0xba, 0xe6, 0xa8, 0x9f, 0xfe, 0xa7, 0x3c, 0x94, 0xb6, 0xda, 0xbb, 0xb7, 0xa8, 0xdf, 0xef, + 0xa1, 0x35, 0x98, 0xf5, 0xcc, 0x2e, 0xa9, 0x69, 0x6b, 0xda, 0x7a, 0xd9, 0x98, 0x7f, 0x3a, 0xac, + 0xcf, 0x9c, 0x0d, 0xeb, 0xb3, 0x77, 0xcc, 0x2e, 0xc1, 0x42, 0x83, 0x5c, 0x28, 0x9d, 0x12, 0xca, + 0x1c, 0xdf, 0x63, 0xb5, 0xdc, 0x5a, 0x7e, 0xbd, 0xb2, 0x79, 0xa3, 0x91, 0x65, 0xfc, 0x0d, 0x11, + 0xe0, 0x5e, 0xe8, 0x7a, 0xd3, 0xa7, 0x2d, 0x87, 0x59, 0xfe, 0x29, 0xa1, 0x03, 0x63, 0x49, 0x46, + 0x29, 0x49, 0x25, 0xc3, 0x71, 0x04, 0xf4, 0x23, 0x0d, 0x96, 0x7a, 0x94, 0x1c, 0x11, 0x4a, 0x89, + 0x2d, 0xf5, 0xb5, 0xfc, 0x9a, 0xf6, 0x09, 0x84, 0xad, 0xc9, 0xb0, 0x4b, 0xed, 0x11, 0x7c, 0x3c, + 0x16, 0x11, 0xfd, 0x5a, 0x83, 0x15, 0x46, 0xe8, 0x29, 0xa1, 0x5b, 0xb6, 0x4d, 0x09, 0x63, 0xc6, + 0x60, 0xdb, 0x75, 0x88, 0x17, 0x6c, 0xef, 0xb6, 0x30, 0xab, 0xcd, 0x8a, 0x79, 0xf8, 0x6a, 0xb6, + 0x84, 0x0e, 0x26, 0xe1, 0x18, 0xba, 0xcc, 0x68, 0x65, 0xa2, 0x09, 0xc3, 0xcf, 0x49, 0x43, 0x3f, + 0x82, 0xf9, 0x68, 0x21, 0x6f, 0x3b, 0x2c, 0x40, 0xf7, 0xa0, 0xd8, 0xe1, 0x1f, 0xac, 0xa6, 0x89, + 0x04, 0x1b, 0xd9, 0x12, 0x8c, 0x30, 0x8c, 0x05, 0x99, 0x4f, 0x51, 0x7c, 0x32, 0x2c, 0xd1, 0xf4, + 0x9f, 0xcd, 0x42, 0x65, 0xab, 0xbd, 0x8b, 0x09, 0xf3, 0xfb, 0xd4, 0x22, 0x19, 0x8a, 0x66, 0x13, + 0x80, 0xff, 0x65, 0x3d, 0xd3, 0x22, 0x76, 0x2d, 0xb7, 0xa6, 0xad, 0x97, 0x0c, 0x24, 0xed, 0xe0, + 0x4e, 0xac, 0xc1, 0x8a, 0x15, 0x47, 0x3d, 0x71, 0x3c, 0x5b, 0xac, 0xb6, 0x82, 0xfa, 0x8e, 0xe3, + 0xd9, 0x58, 0x68, 0xd0, 0x6d, 0x28, 0x9c, 0x12, 0x7a, 0xc8, 0xe7, 0x9f, 0x17, 0xc4, 0x67, 0xb3, + 0x0d, 0xef, 0x1e, 0x77, 0x31, 0xca, 0x67, 0xc3, 0x7a, 0x41, 0xfc, 0xc4, 0x21, 0x08, 0x6a, 0x00, + 0xb0, 0x63, 0x9f, 0x06, 0x22, 0x9d, 0x5a, 0x61, 0x2d, 0xbf, 0x5e, 0x36, 0x16, 0x78, 0x7e, 0x07, + 0xb1, 0x14, 0x2b, 0x16, 0xe8, 0x1a, 0xcc, 0x33, 0xc7, 0xeb, 0xf4, 0x5d, 0x93, 0x72, 0x41, 0xad, + 0x28, 0xf2, 0xbc, 0x22, 0xf3, 0x9c, 0x3f, 0x50, 0x74, 0x38, 0x65, 0xc9, 0x23, 0x59, 0x66, 0x40, + 0x3a, 0x3e, 0x75, 0x08, 0xab, 0xcd, 0x25, 0x91, 0xb6, 0x63, 0x29, 0x56, 0x2c, 0xd0, 0x6b, 0x50, + 0x10, 0x33, 0x5f, 0x2b, 0x89, 0x10, 0x55, 0x19, 0xa2, 0x20, 0x96, 0x05, 0x87, 0x3a, 0xf4, 0x06, + 0xcc, 0xc9, 0x5d, 0x53, 0x2b, 0x0b, 0xb3, 0x45, 0x69, 0x36, 0x17, 0x95, 0x75, 0xa4, 0x47, 0xdf, + 0x00, 0xc4, 0x02, 0x9f, 0x9a, 0x1d, 0x22, 0x55, 0x5f, 0x37, 0xd9, 0x71, 0x0d, 0x84, 0xd7, 0x8a, + 0xf4, 0x42, 0x07, 0x63, 0x16, 0xf8, 0x02, 0x2f, 0xfd, 0x77, 0x1a, 0x2c, 0x2a, 0xb5, 0x20, 0xea, + 0xee, 0x1a, 0xcc, 0x77, 0x94, 0x5d, 0x27, 0xeb, 0x22, 0x9e, 0x19, 0x75, 0x47, 0xe2, 0x94, 0x25, + 0x22, 0x50, 0xa6, 0x12, 0x29, 0x62, 0x97, 0x8d, 0xcc, 0x45, 0x1b, 0xe5, 0x90, 0x44, 0x52, 0x84, + 0x0c, 0x27, 0xc8, 0xfa, 0xdf, 0x34, 0x51, 0xc0, 0x11, 0xdf, 0xa0, 0x75, 0x85, 0xd3, 0x34, 0xb1, + 0x1c, 0xf3, 0x13, 0xf8, 0xe8, 0x12, 0x22, 0xc8, 0xfd, 0x4f, 0x10, 0xc1, 0xf5, 0xd2, 0x2f, 0x3f, + 0xa8, 0xcf, 0xbc, 0xff, 0x97, 0xb5, 0x19, 0xfd, 0x2d, 0xa8, 0x6e, 0x53, 0x62, 0x06, 0x64, 0xbf, + 0x17, 0x88, 0x01, 0xe8, 0x50, 0xb4, 0xe9, 0x00, 0xf7, 0x3d, 0x39, 0x50, 0xe0, 0xfb, 0xbb, 0x25, + 0x24, 0x58, 0x6a, 0xf4, 0x9f, 0xe4, 0xa1, 0xda, 0x22, 0x2e, 0x49, 0xbc, 0x6e, 0x02, 0xea, 0x50, + 0xd3, 0x22, 0x6d, 0x42, 0x1d, 0xdf, 0x3e, 0x20, 0x96, 0xef, 0xd9, 0x4c, 0xac, 0x6b, 0xde, 0xf8, + 0x3f, 0x5e, 0x2d, 0xb7, 0xc6, 0xb4, 0xf8, 0x02, 0x0f, 0xe4, 0x42, 0xb5, 0x47, 0xc5, 0x6f, 0x27, + 0x90, 0x27, 0x08, 0xdf, 0xb9, 0x6f, 0x65, 0x9b, 0xb0, 0xb6, 0xea, 0x6a, 0x2c, 0x9f, 0x0d, 0xeb, + 0xd5, 0x94, 0x08, 0xa7, 0xc1, 0xd1, 0xd7, 0x60, 0xc9, 0xa7, 0xbd, 0x63, 0xd3, 0x6b, 0x91, 0x1e, + 0xf1, 0x6c, 0xe2, 0x05, 0x4c, 0xb0, 0x49, 0xc9, 0xb8, 0xc2, 0x79, 0x7f, 0x7f, 0x44, 0x87, 0xc7, + 0xac, 0xd1, 0x7d, 0x58, 0xee, 0x51, 0xbf, 0x67, 0x76, 0x4c, 0x8e, 0xd8, 0xf6, 0x5d, 0xc7, 0x1a, + 0x08, 0xb6, 0x29, 0x1b, 0x57, 0xcf, 0x86, 0xf5, 0xe5, 0xf6, 0xa8, 0xf2, 0x7c, 0x58, 0x7f, 0x49, + 0x4c, 0x1d, 0x97, 0x24, 0x4a, 0x3c, 0x0e, 0xa3, 0xac, 0x44, 0x61, 0xe2, 0x4a, 0xec, 0x42, 0xa9, + 0xd5, 0xa7, 0xc2, 0x0b, 0x7d, 0x05, 0x4a, 0xb6, 0xfc, 0x2d, 0x67, 0xfe, 0xd5, 0xe8, 0xe0, 0x8c, + 0x6c, 0xce, 0x87, 0xf5, 0x2a, 0x3f, 0xea, 0x1b, 0x91, 0x00, 0xc7, 0x2e, 0xfa, 0x03, 0xa8, 0xee, + 0x3c, 0xea, 0xf9, 0x34, 0x88, 0xd6, 0xf4, 0x75, 0x28, 0x12, 0x21, 0x10, 0x68, 0xa5, 0x84, 0xed, + 0x43, 0x33, 0x2c, 0xb5, 0x9c, 0x7d, 0xc8, 0x23, 0xd3, 0x0a, 0x24, 0x6d, 0xc7, 0xec, 0xb3, 0xc3, + 0x85, 0x38, 0xd4, 0xe9, 0xfb, 0x00, 0xb7, 0x48, 0x0c, 0xbd, 0x05, 0x8b, 0xd1, 0x66, 0x4b, 0x73, + 0xc0, 0xff, 0x4b, 0xe7, 0x45, 0x9c, 0x56, 0xe3, 0x51, 0x7b, 0xfd, 0x01, 0x94, 0x05, 0x4f, 0x70, + 0xba, 0x4f, 0x08, 0x50, 0x7b, 0x0e, 0x01, 0x46, 0xe7, 0x45, 0x6e, 0xd2, 0x79, 0xa1, 0x6c, 0x0b, + 0x17, 0xaa, 0xa1, 0x6f, 0x74, 0x84, 0x65, 0x8a, 0x70, 0x15, 0x4a, 0x51, 0x9a, 0x32, 0x4a, 0xdc, + 0xba, 0x44, 0x40, 0x38, 0xb6, 0x50, 0xa2, 0x1d, 0x43, 0x8a, 0xf3, 0xb2, 0x05, 0x53, 0xf8, 0x3c, + 0xf7, 0x7c, 0x3e, 0x57, 0x22, 0xfd, 0x10, 0x6a, 0x93, 0xfa, 0x9d, 0x17, 0x60, 0xe5, 0xec, 0xa9, + 0xe8, 0xbf, 0xd0, 0x60, 0x49, 0x45, 0xca, 0xbe, 0x7c, 0xd9, 0x83, 0x5c, 0xde, 0x19, 0x28, 0x33, + 0xf2, 0x2b, 0x0d, 0xae, 0xa4, 0x86, 0x36, 0xd5, 0x8a, 0x4f, 0x91, 0x94, 0x5a, 0x1c, 0xf9, 0x29, + 0x8a, 0xa3, 0x09, 0x95, 0x5d, 0xcf, 0x09, 0x1c, 0xd3, 0x75, 0xbe, 0x4f, 0xe8, 0xe5, 0xbd, 0x94, + 0xfe, 0x07, 0x0d, 0xe6, 0x15, 0x0f, 0x86, 0x1e, 0xc0, 0x1c, 0x27, 0x2c, 0xc7, 0xeb, 0xc8, 0x3e, + 0x2f, 0xe3, 0x91, 0xa9, 0x80, 0x24, 0xe3, 0x6a, 0x87, 0x48, 0x38, 0x82, 0x44, 0x6d, 0x28, 0x52, + 0xc2, 0xfa, 0x6e, 0x20, 0xb9, 0xfa, 0x6a, 0xc6, 0xc3, 0x2d, 0x30, 0x83, 0x3e, 0x0b, 0x49, 0x0d, + 0x0b, 0x7f, 0x2c, 0x71, 0xf4, 0x3f, 0xe7, 0xa0, 0x7a, 0xdb, 0x3c, 0x24, 0xee, 0x01, 0x71, 0x89, + 0x15, 0xf8, 0x14, 0xfd, 0x00, 0x2a, 0x5d, 0x33, 0xb0, 0x8e, 0x85, 0x34, 0xea, 0x56, 0x5b, 0xd9, + 0x02, 0xa5, 0x90, 0x1a, 0x7b, 0x09, 0xcc, 0x8e, 0x17, 0xd0, 0x81, 0xf1, 0x92, 0x1c, 0x58, 0x45, + 0xd1, 0x60, 0x35, 0x9a, 0xb8, 0x62, 0x88, 0xef, 0x9d, 0x47, 0x3d, 0x7e, 0x94, 0x4e, 0x7f, 0xb3, + 0x49, 0xa5, 0x80, 0xc9, 0x7b, 0x7d, 0x87, 0x92, 0x2e, 0xf1, 0x82, 0xe4, 0x8a, 0xb1, 0x37, 0x82, + 0x8f, 0xc7, 0x22, 0xae, 0xdc, 0x80, 0xa5, 0xd1, 0xe4, 0xd1, 0x12, 0xe4, 0x4f, 0xc8, 0x20, 0xac, + 0x05, 0xcc, 0x7f, 0xa2, 0x2b, 0x50, 0x38, 0x35, 0xdd, 0xbe, 0xe4, 0x1f, 0x1c, 0x7e, 0x5c, 0xcf, + 0x5d, 0xd3, 0xf4, 0xdf, 0x68, 0x50, 0x9b, 0x94, 0x08, 0xfa, 0x94, 0x02, 0x64, 0x54, 0x64, 0x56, + 0xf9, 0x77, 0xc8, 0x20, 0x44, 0xdd, 0x81, 0x92, 0xdf, 0xe3, 0x97, 0x42, 0x9f, 0xca, 0x3a, 0x7f, + 0x23, 0xaa, 0xdd, 0x7d, 0x29, 0x3f, 0x1f, 0xd6, 0x5f, 0x4e, 0xc1, 0x47, 0x0a, 0x1c, 0xbb, 0xf2, + 0x13, 0x4d, 0xe4, 0xc3, 0x4f, 0xd9, 0xf8, 0x44, 0xbb, 0x27, 0x24, 0x58, 0x6a, 0xf4, 0xdf, 0x6b, + 0x30, 0x2b, 0x9a, 0xc4, 0x07, 0x50, 0xe2, 0xf3, 0x67, 0x9b, 0x81, 0x29, 0xf2, 0xca, 0x7c, 0x3d, + 0xe1, 0xde, 0x7b, 0x24, 0x30, 0x93, 0xfd, 0x15, 0x49, 0x70, 0x8c, 0x88, 0x30, 0x14, 0x9c, 0x80, + 0x74, 0xa3, 0x85, 0x7c, 0x73, 0x22, 0xb4, 0xbc, 0x1c, 0x37, 0xb0, 0xf9, 0x70, 0xe7, 0x51, 0x40, + 0x3c, 0xbe, 0x18, 0x09, 0x19, 0xec, 0x72, 0x0c, 0x1c, 0x42, 0xe9, 0xbf, 0xd5, 0x20, 0x0e, 0xc5, + 0xb7, 0x3b, 0x23, 0xee, 0xd1, 0x6d, 0xc7, 0x3b, 0x91, 0xd3, 0x1a, 0xa7, 0x73, 0x20, 0xe5, 0x38, + 0xb6, 0xb8, 0xe8, 0x40, 0xcc, 0x4d, 0x77, 0x20, 0xf2, 0x80, 0x96, 0xef, 0x05, 0x8e, 0xd7, 0x1f, + 0xe3, 0x97, 0x6d, 0x29, 0xc7, 0xb1, 0x85, 0xfe, 0xcf, 0x1c, 0x54, 0x78, 0xae, 0xd1, 0x89, 0xfc, + 0x25, 0xa8, 0xba, 0xea, 0xea, 0xc9, 0x9c, 0x5f, 0x96, 0x10, 0xe9, 0xfd, 0x88, 0xd3, 0xb6, 0xdc, + 0xf9, 0xc8, 0x21, 0xae, 0x1d, 0x3b, 0xe7, 0xd2, 0xce, 0x37, 0x55, 0x25, 0x4e, 0xdb, 0x72, 0x9e, + 0x7d, 0xc8, 0xeb, 0x5a, 0x76, 0x5e, 0xf1, 0xd4, 0x7e, 0x93, 0x0b, 0x71, 0xa8, 0xbb, 0x68, 0x7e, + 0x66, 0xa7, 0x9c, 0x9f, 0xeb, 0xb0, 0xc0, 0x17, 0xd2, 0xef, 0x07, 0x51, 0x7b, 0x5a, 0x10, 0x4d, + 0x12, 0x3a, 0x1b, 0xd6, 0x17, 0xde, 0x4d, 0x69, 0xf0, 0x88, 0x25, 0xcf, 0xd1, 0x75, 0xba, 0x4e, + 0x50, 0x9b, 0x13, 0x2e, 0x71, 0x8e, 0xb7, 0xb9, 0x10, 0x87, 0xba, 0xd4, 0x02, 0x94, 0x2e, 0x5d, + 0x80, 0xf7, 0xa0, 0xbc, 0xe7, 0x58, 0xd4, 0xe7, 0x91, 0xf9, 0x31, 0xc2, 0x52, 0x3d, 0x73, 0x4c, + 0xb7, 0x51, 0x46, 0x91, 0x9e, 0xa7, 0xe2, 0x99, 0x9e, 0x1f, 0x76, 0xc6, 0x85, 0x24, 0x95, 0x3b, + 0x5c, 0x88, 0x43, 0xdd, 0xf5, 0x2b, 0xfc, 0xf4, 0xf8, 0xe9, 0x93, 0xfa, 0xcc, 0xe3, 0x27, 0xf5, + 0x99, 0x0f, 0x9e, 0xc8, 0x93, 0xe4, 0xef, 0x00, 0xb0, 0x7f, 0xf8, 0x3d, 0x62, 0x85, 0x15, 0x7a, + 0xf9, 0xad, 0x9c, 0x77, 0x04, 0xf2, 0x31, 0x48, 0xdc, 0x60, 0x73, 0x23, 0x1d, 0x81, 0xa2, 0xc3, + 0x29, 0x4b, 0xd4, 0x84, 0x72, 0x7c, 0x53, 0x97, 0xd5, 0xb8, 0x2c, 0xdd, 0xca, 0xf1, 0x75, 0x1e, + 0x27, 0x36, 0xa9, 0xed, 0x32, 0x7b, 0xe9, 0x76, 0x31, 0x20, 0xdf, 0x77, 0x6c, 0xb1, 0x80, 0x65, + 0xe3, 0x73, 0x11, 0x5d, 0xdd, 0xdd, 0x6d, 0x9d, 0x0f, 0xeb, 0xaf, 0x4e, 0x7a, 0xe6, 0x0a, 0x06, + 0x3d, 0xc2, 0x1a, 0x77, 0x77, 0x5b, 0x98, 0x3b, 0x5f, 0x54, 0x52, 0xc5, 0x29, 0x4b, 0x6a, 0x13, + 0x40, 0x8e, 0x9a, 0x7b, 0x87, 0xb5, 0x11, 0xbf, 0x5a, 0xdc, 0x8a, 0x35, 0x58, 0xb1, 0x42, 0x0c, + 0x96, 0x2d, 0x7e, 0xe1, 0x72, 0x7c, 0x8f, 0x2f, 0x3d, 0x0b, 0xcc, 0x6e, 0x78, 0x6f, 0xaf, 0x6c, + 0x7e, 0x26, 0x1b, 0xbf, 0x71, 0x37, 0xe3, 0x15, 0x19, 0x66, 0x79, 0x7b, 0x14, 0x0c, 0x8f, 0xe3, + 0x23, 0x1f, 0x96, 0x6d, 0x79, 0xe9, 0x48, 0x82, 0x96, 0xa7, 0x0e, 0xfa, 0x32, 0x0f, 0xd8, 0x1a, + 0x05, 0xc2, 0xe3, 0xd8, 0xe8, 0x3b, 0xb0, 0x12, 0x09, 0xc7, 0x6f, 0x7e, 0xe2, 0x25, 0x21, 0x6f, + 0xac, 0xf2, 0x0b, 0x6c, 0x6b, 0xa2, 0x15, 0x7e, 0x0e, 0x02, 0xb2, 0xa1, 0xe8, 0x86, 0xbd, 0x40, + 0x45, 0xf0, 0xf7, 0x97, 0xb3, 0x8d, 0x22, 0xa9, 0xfe, 0x86, 0xda, 0x03, 0xc4, 0x37, 0x1b, 0x79, + 0xfc, 0x4b, 0x6c, 0xf4, 0x08, 0x2a, 0xa6, 0xe7, 0xf9, 0x81, 0x19, 0xde, 0x45, 0xe7, 0x45, 0xa8, + 0xad, 0xa9, 0x43, 0x6d, 0x25, 0x18, 0x23, 0x3d, 0x87, 0xa2, 0xc1, 0x6a, 0x28, 0xf4, 0x10, 0x16, + 0xfd, 0x87, 0x1e, 0xa1, 0x98, 0x1c, 0x11, 0x4a, 0x3c, 0x8b, 0xb0, 0x5a, 0x55, 0x44, 0xff, 0x7c, + 0xc6, 0xe8, 0x29, 0xe7, 0xa4, 0xa4, 0xd3, 0x72, 0x86, 0x47, 0xa3, 0xa0, 0x06, 0xc0, 0x91, 0xe3, + 0xc9, 0xce, 0xb1, 0xb6, 0x90, 0x3c, 0x3d, 0xdd, 0x8c, 0xa5, 0x58, 0xb1, 0x40, 0x5f, 0x80, 0x8a, + 0xe5, 0xf6, 0x59, 0x40, 0xc2, 0x37, 0xae, 0x45, 0xb1, 0x83, 0xe2, 0xf1, 0x6d, 0x27, 0x2a, 0xac, + 0xda, 0xa1, 0x63, 0x98, 0x77, 0x94, 0x16, 0xb5, 0xb6, 0x24, 0x6a, 0x71, 0x73, 0xea, 0xbe, 0x94, + 0x19, 0x4b, 0x9c, 0x89, 0x54, 0x09, 0x4e, 0x21, 0xaf, 0x7c, 0x11, 0x2a, 0xff, 0x66, 0xc7, 0xc4, + 0x3b, 0xae, 0xd1, 0xa5, 0x9b, 0xaa, 0xe3, 0xfa, 0x63, 0x0e, 0x16, 0xd2, 0x13, 0x1e, 0xdf, 0x4c, + 0xb4, 0x89, 0x6f, 0x96, 0x11, 0x2b, 0xe7, 0x27, 0xb2, 0xb2, 0x24, 0xbf, 0xd9, 0x17, 0x21, 0xbf, + 0x4d, 0x00, 0xb3, 0xe7, 0x44, 0xbc, 0x17, 0xf2, 0x68, 0xcc, 0x5c, 0xc9, 0xcb, 0x17, 0x56, 0xac, + 0xc4, 0xab, 0xa4, 0xef, 0x05, 0xd4, 0x77, 0x5d, 0x42, 0x05, 0x57, 0x96, 0xe4, 0xab, 0x64, 0x2c, + 0xc5, 0x8a, 0x05, 0xba, 0x09, 0xe8, 0xd0, 0xf5, 0xad, 0x13, 0x31, 0x05, 0xd1, 0x3e, 0x17, 0x2c, + 0x59, 0x0a, 0xdf, 0x84, 0x8c, 0x31, 0x2d, 0xbe, 0xc0, 0x43, 0x9f, 0x83, 0x42, 0x9b, 0x37, 0x01, + 0xfa, 0x3e, 0xa4, 0x9f, 0x73, 0xd0, 0x8d, 0x70, 0x26, 0xb4, 0xf8, 0xbd, 0x65, 0xba, 0x59, 0xd0, + 0xaf, 0x42, 0x19, 0xfb, 0x7e, 0xd0, 0x36, 0x83, 0x63, 0x86, 0xea, 0x50, 0xe8, 0xf1, 0x1f, 0xf2, + 0xdd, 0x4b, 0xbc, 0xff, 0x0a, 0x0d, 0x0e, 0xe5, 0xfa, 0xcf, 0x35, 0x78, 0x65, 0xe2, 0x7b, 0x1b, + 0x9f, 0x51, 0x2b, 0xfe, 0x92, 0x29, 0xc5, 0x33, 0x9a, 0xd8, 0x61, 0xc5, 0x8a, 0xf7, 0x4d, 0xa9, + 0x47, 0xba, 0xd1, 0xbe, 0x29, 0x15, 0x0d, 0xa7, 0x6d, 0xf5, 0x7f, 0xe4, 0xa0, 0x18, 0x5e, 0xa2, + 0xfe, 0xc3, 0xad, 0xf2, 0xeb, 0x50, 0x64, 0x22, 0x8e, 0x4c, 0x2f, 0x66, 0xcb, 0x30, 0x3a, 0x96, + 0x5a, 0xde, 0xc4, 0x74, 0x09, 0x63, 0x66, 0x27, 0x2a, 0xde, 0xb8, 0x89, 0xd9, 0x0b, 0xc5, 0x38, + 0xd2, 0xa3, 0xb7, 0xf9, 0x9d, 0xd1, 0x64, 0x71, 0x17, 0xb7, 0x1a, 0x41, 0x62, 0x21, 0x3d, 0x1f, + 0xd6, 0xe7, 0x25, 0xb8, 0xf8, 0xc6, 0xd2, 0x1a, 0xdd, 0x87, 0x39, 0x9b, 0x04, 0xa6, 0xe3, 0x86, + 0xcd, 0x5b, 0xe6, 0x87, 0xc1, 0x10, 0xac, 0x15, 0xba, 0x1a, 0x15, 0x9e, 0x93, 0xfc, 0xc0, 0x11, + 0x20, 0xdf, 0x78, 0x96, 0x6f, 0x87, 0xcf, 0xf4, 0x85, 0x64, 0xe3, 0x6d, 0xfb, 0x36, 0xc1, 0x42, + 0xa3, 0x3f, 0xd6, 0xa0, 0x12, 0x22, 0x6d, 0x9b, 0x7d, 0x46, 0xd0, 0x46, 0x3c, 0x8a, 0x70, 0xb9, + 0xa3, 0x33, 0x79, 0xf6, 0xdd, 0x41, 0x8f, 0x9c, 0x0f, 0xeb, 0x65, 0x61, 0xc6, 0x3f, 0xe2, 0x01, + 0x28, 0x73, 0x94, 0xbb, 0x64, 0x8e, 0x5e, 0x83, 0x82, 0x68, 0x94, 0xe5, 0x64, 0xc6, 0x8d, 0x9e, + 0x68, 0xa6, 0x71, 0xa8, 0xd3, 0x3f, 0xce, 0x41, 0x35, 0x35, 0xb8, 0x0c, 0x5d, 0x5d, 0xfc, 0xb0, + 0x91, 0xcb, 0xf0, 0x58, 0x36, 0xf9, 0x9f, 0x2b, 0xdf, 0x82, 0xa2, 0xc5, 0xc7, 0x17, 0xfd, 0x77, + 0x6b, 0x63, 0x9a, 0xa5, 0x10, 0x33, 0x93, 0x54, 0x92, 0xf8, 0x64, 0x58, 0x02, 0xa2, 0x5b, 0xb0, + 0x4c, 0x49, 0x40, 0x07, 0x5b, 0x47, 0x01, 0xa1, 0x6a, 0xb7, 0x5e, 0x48, 0xfa, 0x1e, 0x3c, 0x6a, + 0x80, 0xc7, 0x7d, 0x22, 0xaa, 0x2c, 0xbe, 0x00, 0x55, 0xea, 0x2e, 0xcc, 0xfe, 0x17, 0x7b, 0xf4, + 0x6f, 0x43, 0x39, 0xe9, 0xa2, 0x3e, 0xe1, 0x90, 0xfa, 0x77, 0xa1, 0xc4, 0xab, 0x31, 0xea, 0xfe, + 0x2f, 0x39, 0x89, 0xd2, 0x67, 0x44, 0x2e, 0xcb, 0x19, 0xa1, 0xbf, 0x05, 0xd5, 0xbb, 0x3d, 0x7b, + 0xca, 0x7f, 0x27, 0x6c, 0x42, 0xf8, 0x8f, 0x36, 0x4e, 0xc1, 0xe1, 0xa5, 0x5c, 0xa1, 0x60, 0xf5, + 0x86, 0xad, 0xbc, 0x8a, 0xfd, 0x58, 0x03, 0x10, 0x37, 0xc4, 0x9d, 0x53, 0xe2, 0x05, 0x7c, 0x34, + 0x7c, 0xd9, 0x46, 0x47, 0x23, 0xf6, 0x9e, 0xd0, 0xa0, 0xbb, 0x50, 0xf4, 0x45, 0x4b, 0x26, 0x9f, + 0xa9, 0xa6, 0xbc, 0xf1, 0xc7, 0xa5, 0x1a, 0xf6, 0x75, 0x58, 0x82, 0x19, 0xeb, 0x4f, 0x9f, 0xad, + 0xce, 0x7c, 0xf8, 0x6c, 0x75, 0xe6, 0xa3, 0x67, 0xab, 0x33, 0xef, 0x9f, 0xad, 0x6a, 0x4f, 0xcf, + 0x56, 0xb5, 0x0f, 0xcf, 0x56, 0xb5, 0x8f, 0xce, 0x56, 0xb5, 0x8f, 0xcf, 0x56, 0xb5, 0xc7, 0x7f, + 0x5d, 0x9d, 0xb9, 0x9f, 0x3b, 0xdd, 0xf8, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x3d, 0xb9, + 0xdd, 0x54, 0x20, 0x00, 0x00, +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto new file mode 100644 index 000000000..47d8495f1 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -0,0 +1,879 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apimachinery.pkg.apis.meta.v1; + +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// APIGroup contains the name, the supported versions, and the preferred version +// of a group. +message APIGroup { + // name is the name of the group. + optional string name = 1; + + // versions are the versions supported in this group. + repeated GroupVersionForDiscovery versions = 2; + + // preferredVersion is the version preferred by the API server, which + // probably is the storage version. + // +optional + optional GroupVersionForDiscovery preferredVersion = 3; + + // a map of client CIDR to server address that is serving this group. + // This is to help clients reach servers in the most network-efficient way possible. + // Clients can use the appropriate server address as per the CIDR that they match. + // In case of multiple matches, clients should use the longest matching CIDR. + // The server returns only those CIDRs that it thinks that the client can match. + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +optional + repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; +} + +// APIGroupList is a list of APIGroup, to allow clients to discover the API at +// /apis. +message APIGroupList { + // groups is a list of APIGroup. + repeated APIGroup groups = 1; +} + +// APIResource specifies the name of a resource and whether it is namespaced. +message APIResource { + // name is the plural name of the resource. + optional string name = 1; + + // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. + // The singularName is more correct for reporting status on a single item and both singular and plural are allowed + // from the kubectl CLI interface. + optional string singularName = 6; + + // namespaced indicates if a resource is namespaced or not. + optional bool namespaced = 2; + + // group is the preferred group of the resource. Empty implies the group of the containing resource list. + // For subresources, this may have a different value, for example: Scale". + optional string group = 8; + + // version is the preferred version of the resource. Empty implies the version of the containing resource list + // For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". + optional string version = 9; + + // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') + optional string kind = 3; + + // verbs is a list of supported kube verbs (this includes get, list, watch, create, + // update, patch, delete, deletecollection, and proxy) + optional Verbs verbs = 4; + + // shortNames is a list of suggested short names of the resource. + repeated string shortNames = 5; + + // categories is a list of the grouped resources this resource belongs to (e.g. 'all') + repeated string categories = 7; + + // The hash value of the storage version, the version this resource is + // converted to when written to the data store. Value must be treated + // as opaque by clients. Only equality comparison on the value is valid. + // This is an alpha feature and may change or be removed in the future. + // The field is populated by the apiserver only if the + // StorageVersionHash feature gate is enabled. + // This field will remain optional even if it graduates. + // +optional + optional string storageVersionHash = 10; +} + +// APIResourceList is a list of APIResource, it is used to expose the name of the +// resources supported in a specific group and version, and if the resource +// is namespaced. +message APIResourceList { + // groupVersion is the group and version this APIResourceList is for. + optional string groupVersion = 1; + + // resources contains the name of the resources and if they are namespaced. + repeated APIResource resources = 2; +} + +// APIVersions lists the versions that are available, to allow clients to +// discover the API at /api, which is the root path of the legacy v1 API. +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +message APIVersions { + // versions are the api versions that are available. + repeated string versions = 1; + + // a map of client CIDR to server address that is serving this group. + // This is to help clients reach servers in the most network-efficient way possible. + // Clients can use the appropriate server address as per the CIDR that they match. + // In case of multiple matches, clients should use the longest matching CIDR. + // The server returns only those CIDRs that it thinks that the client can match. + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; +} + +// CreateOptions may be provided when creating an API object. +message CreateOptions { + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + repeated string dryRun = 1; +} + +// DeleteOptions may be provided when deleting an API object. +message DeleteOptions { + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + // +optional + optional int64 gracePeriodSeconds = 1; + + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + // +optional + optional Preconditions preconditions = 2; + + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + // +optional + optional bool orphanDependents = 3; + + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - + // allow the garbage collector to delete the dependents in the background; + // 'Foreground' - a cascading policy that deletes all dependents in the + // foreground. + // +optional + optional string propagationPolicy = 4; + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + repeated string dryRun = 5; +} + +// Duration is a wrapper around time.Duration which supports correct +// marshaling to YAML and JSON. In particular, it marshals into strings, which +// can be used as map keys in json. +message Duration { + optional int64 duration = 1; +} + +// ExportOptions is the query options to the standard REST get call. +message ExportOptions { + // Should this value be exported. Export strips fields that a user can not specify. + optional bool export = 1; + + // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. + optional bool exact = 2; +} + +// GetOptions is the standard query options to the standard REST get call. +message GetOptions { + // When specified: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + optional string resourceVersion = 1; +} + +// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +message GroupKind { + optional string group = 1; + + optional string kind = 2; +} + +// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +message GroupResource { + optional string group = 1; + + optional string resource = 2; +} + +// GroupVersion contains the "group" and the "version", which uniquely identifies the API. +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +message GroupVersion { + optional string group = 1; + + optional string version = 2; +} + +// GroupVersion contains the "group/version" and "version" string of a version. +// It is made a struct to keep extensibility. +message GroupVersionForDiscovery { + // groupVersion specifies the API group and version in the form "group/version" + optional string groupVersion = 1; + + // version specifies the version in the form of "version". This is to save + // the clients the trouble of splitting the GroupVersion. + optional string version = 2; +} + +// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion +// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +message GroupVersionKind { + optional string group = 1; + + optional string version = 2; + + optional string kind = 3; +} + +// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion +// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +message GroupVersionResource { + optional string group = 1; + + optional string version = 2; + + optional string resource = 3; +} + +// Initializer is information about an initializer that has not yet completed. +message Initializer { + // name of the process that is responsible for initializing this object. + optional string name = 1; +} + +// Initializers tracks the progress of initialization. +message Initializers { + // Pending is a list of initializers that must execute in order before this object is visible. + // When the last pending initializer is removed, and no failing result is set, the initializers + // struct will be set to nil and the object is considered as initialized and visible to all + // clients. + // +patchMergeKey=name + // +patchStrategy=merge + repeated Initializer pending = 1; + + // If result is set with the Failure field, the object will be persisted to storage and then deleted, + // ensuring that other clients can observe the deletion. + optional Status result = 2; +} + +// A label selector is a label query over a set of resources. The result of matchLabels and +// matchExpressions are ANDed. An empty label selector matches all objects. A null +// label selector matches no objects. +message LabelSelector { + // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + // map is equivalent to an element of matchExpressions, whose key field is "key", the + // operator is "In", and the values array contains only "value". The requirements are ANDed. + // +optional + map matchLabels = 1; + + // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional + repeated LabelSelectorRequirement matchExpressions = 2; +} + +// A label selector requirement is a selector that contains values, a key, and an operator that +// relates the key and values. +message LabelSelectorRequirement { + // key is the label key that the selector applies to. + // +patchMergeKey=key + // +patchStrategy=merge + optional string key = 1; + + // operator represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists and DoesNotExist. + optional string operator = 2; + + // values is an array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. This array is replaced during a strategic + // merge patch. + // +optional + repeated string values = 3; +} + +// List holds a list of objects, which may not be known by the server. +message List { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + optional ListMeta metadata = 1; + + // List of objects + repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; +} + +// ListMeta describes metadata that synthetic resources must have, including lists and +// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. +message ListMeta { + // selfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + optional string selfLink = 1; + + // String that identifies the server's internal version of this object that + // can be used by clients to determine when objects have changed. + // Value must be treated as opaque by clients and passed unmodified back to the server. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + optional string resourceVersion = 2; + + // continue may be set if the user set a limit on the number of items returned, and indicates that + // the server has more data available. The value is opaque and may be used to issue another request + // to the endpoint that served this list to retrieve the next set of available objects. Continuing a + // consistent list may not be possible if the server configuration has changed or more than a few + // minutes have passed. The resourceVersion field returned when using this continue value will be + // identical to the value in the first response, unless you have received this token from an error + // message. + optional string continue = 3; +} + +// ListOptions is the query options to a standard REST list call. +message ListOptions { + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + optional string labelSelector = 1; + + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + optional string fieldSelector = 2; + + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + optional bool watch = 3; + + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + optional string resourceVersion = 4; + + // Timeout for the list/watch call. + // This limits the duration of the call, regardless of any activity or inactivity. + // +optional + optional int64 timeoutSeconds = 5; + + // limit is a maximum number of responses to return for a list call. If more items exist, the + // server will set the `continue` field on the list metadata to a value that can be used with the + // same initial query to retrieve the next set of results. Setting a limit may return fewer than + // the requested amount of items (up to zero items) in the event all requested objects are + // filtered out and clients should only use the presence of the continue field to determine whether + // more results are available. Servers may choose not to support the limit argument and will return + // all of the available results. If limit is specified and the continue field is empty, clients may + // assume that no more results are available. This field is not supported if watch is true. + // + // The server guarantees that the objects returned when using continue will be identical to issuing + // a single list call without a limit - that is, no objects created, modified, or deleted after the + // first request is issued will be included in any subsequent continued requests. This is sometimes + // referred to as a consistent snapshot, and ensures that a client that is using limit to receive + // smaller chunks of a very large result can ensure they see all possible objects. If objects are + // updated during a chunked list the version of the object that was present at the time the first list + // result was calculated is returned. + optional int64 limit = 7; + + // The continue option should be set when retrieving more results from the server. Since this value is + // server defined, clients may only use the continue value from a previous query result with identical + // query parameters (except for the value of continue) and the server may reject a continue value it + // does not recognize. If the specified continue value is no longer valid whether due to expiration + // (generally five to fifteen minutes) or a configuration change on the server, the server will + // respond with a 410 ResourceExpired error together with a continue token. If the client needs a + // consistent list, it must restart their list without the continue field. Otherwise, the client may + // send another list request with the token received with the 410 error, the server will respond with + // a list starting from the next key, but from the latest snapshot, which is inconsistent from the + // previous list results - objects that are created, modified, or deleted after the first list request + // will be included in the response, as long as their keys are after the "next key". + // + // This field is not supported when watch is true. Clients may start a watch from the last + // resourceVersion value returned by the server and not miss any modifications. + optional string continue = 8; +} + +// MicroTime is version of Time with microsecond level precision. +// +// +protobuf.options.marshal=false +// +protobuf.as=Timestamp +// +protobuf.options.(gogoproto.goproto_stringer)=false +message MicroTime { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + optional int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + optional int32 nanos = 2; +} + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +message ObjectMeta { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + optional string name = 1; + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + // +optional + optional string generateName = 2; + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + optional string namespace = 3; + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + optional string selfLink = 4; + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + optional string uid = 5; + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + optional string resourceVersion = 6; + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + optional int64 generation = 7; + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional Time creationTimestamp = 8; + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field, once the + // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + // Once the deletionTimestamp is set, this value may not be unset or be set further into the + // future, although it may be shortened or the resource may be deleted prior to this time. + // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + // by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + // remove the pod from the API. In the presence of network partitions, this object may still + // exist after this timestamp, until an administrator or automated process can determine the + // resource is fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional Time deletionTimestamp = 9; + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + optional int64 deletionGracePeriodSeconds = 10; + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + map labels = 11; + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + map annotations = 12; + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + // +patchMergeKey=uid + // +patchStrategy=merge + repeated OwnerReference ownerReferences = 13; + + // An initializer is a controller which enforces some system invariant at object creation time. + // This field is a list of initializers that have not yet acted on this object. If nil or empty, + // this object has been completely initialized. Otherwise, the object is considered uninitialized + // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to + // observe uninitialized objects. + // + // When an object is created, the system will populate this list with the current set of initializers. + // Only privileged users may set or modify this list. Once it is empty, it may not be modified further + // by any user. + // + // DEPRECATED - initializers are an alpha field and will be removed in v1.15. + optional Initializers initializers = 16; + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + // +patchStrategy=merge + repeated string finalizers = 14; + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + optional string clusterName = 15; +} + +// OwnerReference contains enough information to let you identify an owning +// object. An owning object must be in the same namespace as the dependent, or +// be cluster-scoped, so there is no namespace field. +message OwnerReference { + // API version of the referent. + optional string apiVersion = 5; + + // Kind of the referent. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + optional string kind = 1; + + // Name of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + optional string name = 3; + + // UID of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + optional string uid = 4; + + // If true, this reference points to the managing controller. + // +optional + optional bool controller = 6; + + // If true, AND if the owner has the "foregroundDeletion" finalizer, then + // the owner cannot be deleted from the key-value store until this + // reference is removed. + // Defaults to false. + // To set this field, a user needs "delete" permission of the owner, + // otherwise 422 (Unprocessable Entity) will be returned. + // +optional + optional bool blockOwnerDeletion = 7; +} + +// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. +message Patch { +} + +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +message Preconditions { + // Specifies the target UID. + // +optional + optional string uid = 1; +} + +// RootPaths lists the paths available at root. +// For example: "/healthz", "/apis". +message RootPaths { + // paths are the paths available at root. + repeated string paths = 1; +} + +// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. +message ServerAddressByClientCIDR { + // The CIDR with which clients can match their IP to figure out the server address that they should use. + optional string clientCIDR = 1; + + // Address of this server, suitable for a client that matches the above CIDR. + // This can be a hostname, hostname:port, IP or IP:port. + optional string serverAddress = 2; +} + +// Status is a return value for calls that don't return other objects. +message Status { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + optional ListMeta metadata = 1; + + // Status of the operation. + // One of: "Success" or "Failure". + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // +optional + optional string status = 2; + + // A human-readable description of the status of this operation. + // +optional + optional string message = 3; + + // A machine-readable description of why this operation is in the + // "Failure" status. If this value is empty there + // is no information available. A Reason clarifies an HTTP status + // code but does not override it. + // +optional + optional string reason = 4; + + // Extended data associated with the reason. Each reason may define its + // own extended details. This field is optional and the data returned + // is not guaranteed to conform to any schema except that defined by + // the reason type. + // +optional + optional StatusDetails details = 5; + + // Suggested HTTP return code for this status, 0 if not set. + // +optional + optional int32 code = 6; +} + +// StatusCause provides more information about an api.Status failure, including +// cases when multiple errors are encountered. +message StatusCause { + // A machine-readable description of the cause of the error. If this value is + // empty there is no information available. + // +optional + optional string reason = 1; + + // A human-readable description of the cause of the error. This field may be + // presented as-is to a reader. + // +optional + optional string message = 2; + + // The field of the resource that has caused this error, as named by its JSON + // serialization. May include dot and postfix notation for nested attributes. + // Arrays are zero-indexed. Fields may appear more than once in an array of + // causes due to fields having multiple errors. + // Optional. + // + // Examples: + // "name" - the field "name" on the current resource + // "items[0].name" - the field "name" on the first array entry in "items" + // +optional + optional string field = 3; +} + +// StatusDetails is a set of additional properties that MAY be set by the +// server to provide additional information about a response. The Reason +// field of a Status object defines what attributes will be set. Clients +// must ignore fields that do not match the defined type of each attribute, +// and should assume that any attribute may be empty, invalid, or under +// defined. +message StatusDetails { + // The name attribute of the resource associated with the status StatusReason + // (when there is a single name which can be described). + // +optional + optional string name = 1; + + // The group attribute of the resource associated with the status StatusReason. + // +optional + optional string group = 2; + + // The kind attribute of the resource associated with the status StatusReason. + // On some operations may differ from the requested resource Kind. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + optional string kind = 3; + + // UID of the resource. + // (when there is a single resource which can be described). + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + optional string uid = 6; + + // The Causes array includes more details associated with the StatusReason + // failure. Not all StatusReasons may provide detailed causes. + // +optional + repeated StatusCause causes = 4; + + // If specified, the time in seconds before the operation should be retried. Some errors may indicate + // the client must take an alternate action - for those errors this field may indicate how long to wait + // before taking the alternate action. + // +optional + optional int32 retryAfterSeconds = 5; +} + +// Time is a wrapper around time.Time which supports correct +// marshaling to YAML and JSON. Wrappers are provided for many +// of the factory methods that the time package offers. +// +// +protobuf.options.marshal=false +// +protobuf.as=Timestamp +// +protobuf.options.(gogoproto.goproto_stringer)=false +message Time { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + optional int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + optional int32 nanos = 2; +} + +// Timestamp is a struct that is equivalent to Time, but intended for +// protobuf marshalling/unmarshalling. It is generated into a serialization +// that matches Time. Do not use in Go structs. +message Timestamp { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + optional int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + optional int32 nanos = 2; +} + +// TypeMeta describes an individual object in an API response or request +// with strings representing the type of the object and its API schema version. +// Structures that are versioned or persisted should inline TypeMeta. +// +// +k8s:deepcopy-gen=false +message TypeMeta { + // Kind is a string value representing the REST resource this object represents. + // Servers may infer this from the endpoint the client submits requests to. + // Cannot be updated. + // In CamelCase. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + optional string kind = 1; + + // APIVersion defines the versioned schema of this representation of an object. + // Servers should convert recognized schemas to the latest internal value, and + // may reject unrecognized values. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources + // +optional + optional string apiVersion = 2; +} + +// UpdateOptions may be provided when updating an API object. +message UpdateOptions { + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + repeated string dryRun = 1; +} + +// Verbs masks the value so protobuf can generate +// +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +message Verbs { + // items, if empty, will result in an empty slice + + repeated string items = 1; +} + +// Event represents a single event to a watched resource. +// +// +protobuf=true +// +k8s:deepcopy-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +message WatchEvent { + optional string type = 1; + + // Object is: + // * If Type is Added or Modified: the new state of the object. + // * If Type is Deleted: the state of the object immediately before deletion. + // * If Type is Error: *Status is recommended; other types may make sense + // depending on context. + optional k8s.io.apimachinery.pkg.runtime.RawExtension object = 2; +} + diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go new file mode 100644 index 000000000..bd4c6d9b5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/group_version.go @@ -0,0 +1,148 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupResource struct { + Group string `json:"group" protobuf:"bytes,1,opt,name=group"` + Resource string `json:"resource" protobuf:"bytes,2,opt,name=resource"` +} + +func (gr *GroupResource) String() string { + if len(gr.Group) == 0 { + return gr.Resource + } + return gr.Resource + "." + gr.Group +} + +// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion +// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupVersionResource struct { + Group string `json:"group" protobuf:"bytes,1,opt,name=group"` + Version string `json:"version" protobuf:"bytes,2,opt,name=version"` + Resource string `json:"resource" protobuf:"bytes,3,opt,name=resource"` +} + +func (gvr *GroupVersionResource) String() string { + return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "") +} + +// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupKind struct { + Group string `json:"group" protobuf:"bytes,1,opt,name=group"` + Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"` +} + +func (gk *GroupKind) String() string { + if len(gk.Group) == 0 { + return gk.Kind + } + return gk.Kind + "." + gk.Group +} + +// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion +// to avoid automatic coersion. It doesn't use a GroupVersion to avoid custom marshalling +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupVersionKind struct { + Group string `json:"group" protobuf:"bytes,1,opt,name=group"` + Version string `json:"version" protobuf:"bytes,2,opt,name=version"` + Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"` +} + +func (gvk GroupVersionKind) String() string { + return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind +} + +// GroupVersion contains the "group" and the "version", which uniquely identifies the API. +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +type GroupVersion struct { + Group string `json:"group" protobuf:"bytes,1,opt,name=group"` + Version string `json:"version" protobuf:"bytes,2,opt,name=version"` +} + +// Empty returns true if group and version are empty +func (gv GroupVersion) Empty() bool { + return len(gv.Group) == 0 && len(gv.Version) == 0 +} + +// String puts "group" and "version" into a single "group/version" string. For the legacy v1 +// it returns "v1". +func (gv GroupVersion) String() string { + // special case the internal apiVersion for the legacy kube types + if gv.Empty() { + return "" + } + + // special case of "v1" for backward compatibility + if len(gv.Group) == 0 && gv.Version == "v1" { + return gv.Version + } + if len(gv.Group) > 0 { + return gv.Group + "/" + gv.Version + } + return gv.Version +} + +// MarshalJSON implements the json.Marshaller interface. +func (gv GroupVersion) MarshalJSON() ([]byte, error) { + s := gv.String() + if strings.Count(s, "/") > 1 { + return []byte{}, fmt.Errorf("illegal GroupVersion %v: contains more than one /", s) + } + return json.Marshal(s) +} + +func (gv *GroupVersion) unmarshal(value []byte) error { + var s string + if err := json.Unmarshal(value, &s); err != nil { + return err + } + parsed, err := schema.ParseGroupVersion(s) + if err != nil { + return err + } + gv.Group, gv.Version = parsed.Group, parsed.Version + return nil +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (gv *GroupVersion) UnmarshalJSON(value []byte) error { + return gv.unmarshal(value) +} + +// UnmarshalTEXT implements the Ugorji's encoding.TextUnmarshaler interface. +func (gv *GroupVersion) UnmarshalText(value []byte) error { + return gv.unmarshal(value) +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go new file mode 100644 index 000000000..604129ea1 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/helpers.go @@ -0,0 +1,246 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/types" +) + +// LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements +// labels.Selector +// Note: This function should be kept in sync with the selector methods in pkg/labels/selector.go +func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) { + if ps == nil { + return labels.Nothing(), nil + } + if len(ps.MatchLabels)+len(ps.MatchExpressions) == 0 { + return labels.Everything(), nil + } + selector := labels.NewSelector() + for k, v := range ps.MatchLabels { + r, err := labels.NewRequirement(k, selection.Equals, []string{v}) + if err != nil { + return nil, err + } + selector = selector.Add(*r) + } + for _, expr := range ps.MatchExpressions { + var op selection.Operator + switch expr.Operator { + case LabelSelectorOpIn: + op = selection.In + case LabelSelectorOpNotIn: + op = selection.NotIn + case LabelSelectorOpExists: + op = selection.Exists + case LabelSelectorOpDoesNotExist: + op = selection.DoesNotExist + default: + return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator) + } + r, err := labels.NewRequirement(expr.Key, op, append([]string(nil), expr.Values...)) + if err != nil { + return nil, err + } + selector = selector.Add(*r) + } + return selector, nil +} + +// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the +// original structure of a label selector. Operators that cannot be converted into plain +// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in +// an error. +func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) { + if ps == nil { + return nil, nil + } + selector := map[string]string{} + for k, v := range ps.MatchLabels { + selector[k] = v + } + for _, expr := range ps.MatchExpressions { + switch expr.Operator { + case LabelSelectorOpIn: + if len(expr.Values) != 1 { + return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator) + } + // Should we do anything in case this will override a previous key-value pair? + selector[expr.Key] = expr.Values[0] + case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist: + return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator) + default: + return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator) + } + } + return selector, nil +} + +// ParseToLabelSelector parses a string representing a selector into a LabelSelector object. +// Note: This function should be kept in sync with the parser in pkg/labels/selector.go +func ParseToLabelSelector(selector string) (*LabelSelector, error) { + reqs, err := labels.ParseToRequirements(selector) + if err != nil { + return nil, fmt.Errorf("couldn't parse the selector string \"%s\": %v", selector, err) + } + + labelSelector := &LabelSelector{ + MatchLabels: map[string]string{}, + MatchExpressions: []LabelSelectorRequirement{}, + } + for _, req := range reqs { + var op LabelSelectorOperator + switch req.Operator() { + case selection.Equals, selection.DoubleEquals: + vals := req.Values() + if vals.Len() != 1 { + return nil, fmt.Errorf("equals operator must have exactly one value") + } + val, ok := vals.PopAny() + if !ok { + return nil, fmt.Errorf("equals operator has exactly one value but it cannot be retrieved") + } + labelSelector.MatchLabels[req.Key()] = val + continue + case selection.In: + op = LabelSelectorOpIn + case selection.NotIn: + op = LabelSelectorOpNotIn + case selection.Exists: + op = LabelSelectorOpExists + case selection.DoesNotExist: + op = LabelSelectorOpDoesNotExist + case selection.GreaterThan, selection.LessThan: + // Adding a separate case for these operators to indicate that this is deliberate + return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator()) + default: + return nil, fmt.Errorf("%q is not a valid label selector operator", req.Operator()) + } + labelSelector.MatchExpressions = append(labelSelector.MatchExpressions, LabelSelectorRequirement{ + Key: req.Key(), + Operator: op, + Values: req.Values().List(), + }) + } + return labelSelector, nil +} + +// SetAsLabelSelector converts the labels.Set object into a LabelSelector api object. +func SetAsLabelSelector(ls labels.Set) *LabelSelector { + if ls == nil { + return nil + } + + selector := &LabelSelector{ + MatchLabels: make(map[string]string), + } + for label, value := range ls { + selector.MatchLabels[label] = value + } + + return selector +} + +// FormatLabelSelector convert labelSelector into plain string +func FormatLabelSelector(labelSelector *LabelSelector) string { + selector, err := LabelSelectorAsSelector(labelSelector) + if err != nil { + return "" + } + + l := selector.String() + if len(l) == 0 { + l = "" + } + return l +} + +func ExtractGroupVersions(l *APIGroupList) []string { + var groupVersions []string + for _, g := range l.Groups { + for _, gv := range g.Versions { + groupVersions = append(groupVersions, gv.GroupVersion) + } + } + return groupVersions +} + +// HasAnnotation returns a bool if passed in annotation exists +func HasAnnotation(obj ObjectMeta, ann string) bool { + _, found := obj.Annotations[ann] + return found +} + +// SetMetaDataAnnotation sets the annotation and value +func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) { + if obj.Annotations == nil { + obj.Annotations = make(map[string]string) + } + obj.Annotations[ann] = value +} + +// SingleObject returns a ListOptions for watching a single object. +func SingleObject(meta ObjectMeta) ListOptions { + return ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", meta.Name).String(), + ResourceVersion: meta.ResourceVersion, + } +} + +// NewDeleteOptions returns a DeleteOptions indicating the resource should +// be deleted within the specified grace period. Use zero to indicate +// immediate deletion. If you would prefer to use the default grace period, +// use &metav1.DeleteOptions{} directly. +func NewDeleteOptions(grace int64) *DeleteOptions { + return &DeleteOptions{GracePeriodSeconds: &grace} +} + +// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set. +func NewPreconditionDeleteOptions(uid string) *DeleteOptions { + u := types.UID(uid) + p := Preconditions{UID: &u} + return &DeleteOptions{Preconditions: &p} +} + +// NewUIDPreconditions returns a Preconditions with UID set. +func NewUIDPreconditions(uid string) *Preconditions { + u := types.UID(uid) + return &Preconditions{UID: &u} +} + +// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values. +func HasObjectMetaSystemFieldValues(meta Object) bool { + return !meta.GetCreationTimestamp().Time.IsZero() || + len(meta.GetUID()) != 0 +} + +// ResetObjectMetaForStatus forces the meta fields for a status update to match the meta fields +// for a pre-existing object. This is opt-in for new objects with Status subresource. +func ResetObjectMetaForStatus(meta, existingMeta Object) { + meta.SetDeletionTimestamp(existingMeta.GetDeletionTimestamp()) + meta.SetGeneration(existingMeta.GetGeneration()) + meta.SetSelfLink(existingMeta.GetSelfLink()) + meta.SetLabels(existingMeta.GetLabels()) + meta.SetAnnotations(existingMeta.GetAnnotations()) + meta.SetFinalizers(existingMeta.GetFinalizers()) + meta.SetOwnerReferences(existingMeta.GetOwnerReferences()) +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go new file mode 100644 index 000000000..9b45145da --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/labels.go @@ -0,0 +1,55 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// Clones the given selector and returns a new selector with the given key and value added. +// Returns the given selector, if labelKey is empty. +func CloneSelectorAndAddLabel(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { + if labelKey == "" { + // Don't need to add a label. + return selector + } + + // Clone. + newSelector := selector.DeepCopy() + + if newSelector.MatchLabels == nil { + newSelector.MatchLabels = make(map[string]string) + } + + newSelector.MatchLabels[labelKey] = labelValue + + return newSelector +} + +// AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels. +func AddLabelToSelector(selector *LabelSelector, labelKey, labelValue string) *LabelSelector { + if labelKey == "" { + // Don't need to add a label. + return selector + } + if selector.MatchLabels == nil { + selector.MatchLabels = make(map[string]string) + } + selector.MatchLabels[labelKey] = labelValue + return selector +} + +// SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels +func SelectorHasLabel(selector *LabelSelector, labelKey string) bool { + return len(selector.MatchLabels[labelKey]) > 0 +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go new file mode 100644 index 000000000..ee1447541 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -0,0 +1,170 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" +) + +// TODO: move this, Object, List, and Type to a different package +type ObjectMetaAccessor interface { + GetObjectMeta() Object +} + +// Object lets you work with object metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field (Name, UID, Namespace on lists) will be a no-op and return +// a default value. +type Object interface { + GetNamespace() string + SetNamespace(namespace string) + GetName() string + SetName(name string) + GetGenerateName() string + SetGenerateName(name string) + GetUID() types.UID + SetUID(uid types.UID) + GetResourceVersion() string + SetResourceVersion(version string) + GetGeneration() int64 + SetGeneration(generation int64) + GetSelfLink() string + SetSelfLink(selfLink string) + GetCreationTimestamp() Time + SetCreationTimestamp(timestamp Time) + GetDeletionTimestamp() *Time + SetDeletionTimestamp(timestamp *Time) + GetDeletionGracePeriodSeconds() *int64 + SetDeletionGracePeriodSeconds(*int64) + GetLabels() map[string]string + SetLabels(labels map[string]string) + GetAnnotations() map[string]string + SetAnnotations(annotations map[string]string) + GetInitializers() *Initializers + SetInitializers(initializers *Initializers) + GetFinalizers() []string + SetFinalizers(finalizers []string) + GetOwnerReferences() []OwnerReference + SetOwnerReferences([]OwnerReference) + GetClusterName() string + SetClusterName(clusterName string) +} + +// ListMetaAccessor retrieves the list interface from an object +type ListMetaAccessor interface { + GetListMeta() ListInterface +} + +// Common lets you work with core metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field will be a no-op and return a default value. +// TODO: move this, and TypeMeta and ListMeta, to a different package +type Common interface { + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) +} + +// ListInterface lets you work with list metadata from any of the versioned or +// internal API objects. Attempting to set or retrieve a field on an object that does +// not support that field will be a no-op and return a default value. +// TODO: move this, and TypeMeta and ListMeta, to a different package +type ListInterface interface { + GetResourceVersion() string + SetResourceVersion(version string) + GetSelfLink() string + SetSelfLink(selfLink string) + GetContinue() string + SetContinue(c string) +} + +// Type exposes the type and APIVersion of versioned or internal API objects. +// TODO: move this, and TypeMeta and ListMeta, to a different package +type Type interface { + GetAPIVersion() string + SetAPIVersion(version string) + GetKind() string + SetKind(kind string) +} + +func (meta *ListMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ListMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ListMeta) GetSelfLink() string { return meta.SelfLink } +func (meta *ListMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } +func (meta *ListMeta) GetContinue() string { return meta.Continue } +func (meta *ListMeta) SetContinue(c string) { meta.Continue = c } + +func (obj *TypeMeta) GetObjectKind() schema.ObjectKind { return obj } + +// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta +func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) { + obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() +} + +// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta +func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +} + +func (obj *ListMeta) GetListMeta() ListInterface { return obj } + +func (obj *ObjectMeta) GetObjectMeta() Object { return obj } + +// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows +// fast, direct access to metadata fields for API objects. +func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } +func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } +func (meta *ObjectMeta) GetName() string { return meta.Name } +func (meta *ObjectMeta) SetName(name string) { meta.Name = name } +func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } +func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } +func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } +func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } +func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } +func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } +func (meta *ObjectMeta) GetGeneration() int64 { return meta.Generation } +func (meta *ObjectMeta) SetGeneration(generation int64) { meta.Generation = generation } +func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } +func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } +func (meta *ObjectMeta) GetCreationTimestamp() Time { return meta.CreationTimestamp } +func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp Time) { + meta.CreationTimestamp = creationTimestamp +} +func (meta *ObjectMeta) GetDeletionTimestamp() *Time { return meta.DeletionTimestamp } +func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *Time) { + meta.DeletionTimestamp = deletionTimestamp +} +func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds } +func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) { + meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds +} +func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } +func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } +func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } +func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } +func (meta *ObjectMeta) GetInitializers() *Initializers { return meta.Initializers } +func (meta *ObjectMeta) SetInitializers(initializers *Initializers) { meta.Initializers = initializers } +func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } +func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } +func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference { return meta.OwnerReferences } +func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) { + meta.OwnerReferences = references +} +func (meta *ObjectMeta) GetClusterName() string { return meta.ClusterName } +func (meta *ObjectMeta) SetClusterName(clusterName string) { meta.ClusterName = clusterName } diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go new file mode 100644 index 000000000..6f6c5111b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go @@ -0,0 +1,183 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "time" + + "github.com/google/gofuzz" +) + +const RFC3339Micro = "2006-01-02T15:04:05.000000Z07:00" + +// MicroTime is version of Time with microsecond level precision. +// +// +protobuf.options.marshal=false +// +protobuf.as=Timestamp +// +protobuf.options.(gogoproto.goproto_stringer)=false +type MicroTime struct { + time.Time `protobuf:"-"` +} + +// DeepCopy returns a deep-copy of the MicroTime value. The underlying time.Time +// type is effectively immutable in the time API, so it is safe to +// copy-by-assign, despite the presence of (unexported) Pointer fields. +func (t *MicroTime) DeepCopyInto(out *MicroTime) { + *out = *t +} + +// String returns the representation of the time. +func (t MicroTime) String() string { + return t.Time.String() +} + +// NewMicroTime returns a wrapped instance of the provided time +func NewMicroTime(time time.Time) MicroTime { + return MicroTime{time} +} + +// DateMicro returns the MicroTime corresponding to the supplied parameters +// by wrapping time.Date. +func DateMicro(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) MicroTime { + return MicroTime{time.Date(year, month, day, hour, min, sec, nsec, loc)} +} + +// NowMicro returns the current local time. +func NowMicro() MicroTime { + return MicroTime{time.Now()} +} + +// IsZero returns true if the value is nil or time is zero. +func (t *MicroTime) IsZero() bool { + if t == nil { + return true + } + return t.Time.IsZero() +} + +// Before reports whether the time instant t is before u. +func (t *MicroTime) Before(u *MicroTime) bool { + return t.Time.Before(u.Time) +} + +// Equal reports whether the time instant t is equal to u. +func (t *MicroTime) Equal(u *MicroTime) bool { + return t.Time.Equal(u.Time) +} + +// BeforeTime reports whether the time instant t is before second-lever precision u. +func (t *MicroTime) BeforeTime(u *Time) bool { + return t.Time.Before(u.Time) +} + +// EqualTime reports whether the time instant t is equal to second-lever precision u. +func (t *MicroTime) EqualTime(u *Time) bool { + return t.Time.Equal(u.Time) +} + +// UnixMicro returns the local time corresponding to the given Unix time +// by wrapping time.Unix. +func UnixMicro(sec int64, nsec int64) MicroTime { + return MicroTime{time.Unix(sec, nsec)} +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (t *MicroTime) UnmarshalJSON(b []byte) error { + if len(b) == 4 && string(b) == "null" { + t.Time = time.Time{} + return nil + } + + var str string + err := json.Unmarshal(b, &str) + if err != nil { + return err + } + + pt, err := time.Parse(RFC3339Micro, str) + if err != nil { + return err + } + + t.Time = pt.Local() + return nil +} + +// UnmarshalQueryParameter converts from a URL query parameter value to an object +func (t *MicroTime) UnmarshalQueryParameter(str string) error { + if len(str) == 0 { + t.Time = time.Time{} + return nil + } + // Tolerate requests from older clients that used JSON serialization to build query params + if len(str) == 4 && str == "null" { + t.Time = time.Time{} + return nil + } + + pt, err := time.Parse(RFC3339Micro, str) + if err != nil { + return err + } + + t.Time = pt.Local() + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (t MicroTime) MarshalJSON() ([]byte, error) { + if t.IsZero() { + // Encode unset/nil objects as JSON's "null". + return []byte("null"), nil + } + + return json.Marshal(t.UTC().Format(RFC3339Micro)) +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ MicroTime) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ MicroTime) OpenAPISchemaFormat() string { return "date-time" } + +// MarshalQueryParameter converts to a URL query parameter value +func (t MicroTime) MarshalQueryParameter() (string, error) { + if t.IsZero() { + // Encode unset/nil objects as an empty string + return "", nil + } + + return t.UTC().Format(RFC3339Micro), nil +} + +// Fuzz satisfies fuzz.Interface. +func (t *MicroTime) Fuzz(c fuzz.Continue) { + if t == nil { + return + } + // Allow for about 1000 years of randomness. Accurate to a tenth of + // micro second. Leave off nanoseconds because JSON doesn't + // represent them so they can't round-trip properly. + t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60), 1000*c.Rand.Int63n(1000000)) +} + +var _ fuzz.Interface = &MicroTime{} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go new file mode 100644 index 000000000..14841be51 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time_proto.go @@ -0,0 +1,72 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "time" +) + +// Timestamp is declared in time_proto.go + +// Timestamp returns the Time as a new Timestamp value. +func (m *MicroTime) ProtoMicroTime() *Timestamp { + if m == nil { + return &Timestamp{} + } + return &Timestamp{ + Seconds: m.Time.Unix(), + Nanos: int32(m.Time.Nanosecond()), + } +} + +// Size implements the protobuf marshalling interface. +func (m *MicroTime) Size() (n int) { + if m == nil || m.Time.IsZero() { + return 0 + } + return m.ProtoMicroTime().Size() +} + +// Reset implements the protobuf marshalling interface. +func (m *MicroTime) Unmarshal(data []byte) error { + if len(data) == 0 { + m.Time = time.Time{} + return nil + } + p := Timestamp{} + if err := p.Unmarshal(data); err != nil { + return err + } + m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local() + return nil +} + +// Marshal implements the protobuf marshalling interface. +func (m *MicroTime) Marshal() (data []byte, err error) { + if m == nil || m.Time.IsZero() { + return nil, nil + } + return m.ProtoMicroTime().Marshal() +} + +// MarshalTo implements the protobuf marshalling interface. +func (m *MicroTime) MarshalTo(data []byte) (int, error) { + if m == nil || m.Time.IsZero() { + return 0, nil + } + return m.ProtoMicroTime().MarshalTo(data) +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go new file mode 100644 index 000000000..0827729d0 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/register.go @@ -0,0 +1,97 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +// GroupName is the group name for this API. +const GroupName = "meta.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Unversioned is group version for unversioned API objects +// TODO: this should be v1 probably +var Unversioned = schema.GroupVersion{Group: "", Version: "v1"} + +// WatchEventKind is name reserved for serializing watch events. +const WatchEventKind = "WatchEvent" + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// AddToGroupVersion registers common meta types into schemas. +func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) { + scheme.AddKnownTypeWithName(groupVersion.WithKind(WatchEventKind), &WatchEvent{}) + scheme.AddKnownTypeWithName( + schema.GroupVersion{Group: groupVersion.Group, Version: runtime.APIVersionInternal}.WithKind(WatchEventKind), + &InternalEvent{}, + ) + // Supports legacy code paths, most callers should use metav1.ParameterCodec for now + scheme.AddKnownTypes(groupVersion, + &ListOptions{}, + &ExportOptions{}, + &GetOptions{}, + &DeleteOptions{}, + &CreateOptions{}, + &UpdateOptions{}, + ) + utilruntime.Must(scheme.AddConversionFuncs( + Convert_v1_WatchEvent_To_watch_Event, + Convert_v1_InternalEvent_To_v1_WatchEvent, + Convert_watch_Event_To_v1_WatchEvent, + Convert_v1_WatchEvent_To_v1_InternalEvent, + )) + // Register Unversioned types under their own special group + scheme.AddUnversionedTypes(Unversioned, + &Status{}, + &APIVersions{}, + &APIGroupList{}, + &APIGroup{}, + &APIResourceList{}, + ) + + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + utilruntime.Must(AddConversionFuncs(scheme)) + utilruntime.Must(RegisterDefaults(scheme)) +} + +// scheme is the registry for the common types that adhere to the meta v1 API spec. +var scheme = runtime.NewScheme() + +// ParameterCodec knows about query parameters used with the meta v1 API spec. +var ParameterCodec = runtime.NewParameterCodec(scheme) + +func init() { + scheme.AddUnversionedTypes(SchemeGroupVersion, + &ListOptions{}, + &ExportOptions{}, + &GetOptions{}, + &DeleteOptions{}, + &CreateOptions{}, + &UpdateOptions{}, + ) + + // register manually. This usually goes through the SchemeBuilder, which we cannot use here. + utilruntime.Must(RegisterDefaults(scheme)) +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go new file mode 100644 index 000000000..efff656e1 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time.go @@ -0,0 +1,185 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "encoding/json" + "time" + + "github.com/google/gofuzz" +) + +// Time is a wrapper around time.Time which supports correct +// marshaling to YAML and JSON. Wrappers are provided for many +// of the factory methods that the time package offers. +// +// +protobuf.options.marshal=false +// +protobuf.as=Timestamp +// +protobuf.options.(gogoproto.goproto_stringer)=false +type Time struct { + time.Time `protobuf:"-"` +} + +// DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time +// type is effectively immutable in the time API, so it is safe to +// copy-by-assign, despite the presence of (unexported) Pointer fields. +func (t *Time) DeepCopyInto(out *Time) { + *out = *t +} + +// String returns the representation of the time. +func (t Time) String() string { + return t.Time.String() +} + +// NewTime returns a wrapped instance of the provided time +func NewTime(time time.Time) Time { + return Time{time} +} + +// Date returns the Time corresponding to the supplied parameters +// by wrapping time.Date. +func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time { + return Time{time.Date(year, month, day, hour, min, sec, nsec, loc)} +} + +// Now returns the current local time. +func Now() Time { + return Time{time.Now()} +} + +// IsZero returns true if the value is nil or time is zero. +func (t *Time) IsZero() bool { + if t == nil { + return true + } + return t.Time.IsZero() +} + +// Before reports whether the time instant t is before u. +func (t *Time) Before(u *Time) bool { + return t.Time.Before(u.Time) +} + +// Equal reports whether the time instant t is equal to u. +func (t *Time) Equal(u *Time) bool { + if t == nil && u == nil { + return true + } + if t != nil && u != nil { + return t.Time.Equal(u.Time) + } + return false +} + +// Unix returns the local time corresponding to the given Unix time +// by wrapping time.Unix. +func Unix(sec int64, nsec int64) Time { + return Time{time.Unix(sec, nsec)} +} + +// Rfc3339Copy returns a copy of the Time at second-level precision. +func (t Time) Rfc3339Copy() Time { + copied, _ := time.Parse(time.RFC3339, t.Format(time.RFC3339)) + return Time{copied} +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (t *Time) UnmarshalJSON(b []byte) error { + if len(b) == 4 && string(b) == "null" { + t.Time = time.Time{} + return nil + } + + var str string + err := json.Unmarshal(b, &str) + if err != nil { + return err + } + + pt, err := time.Parse(time.RFC3339, str) + if err != nil { + return err + } + + t.Time = pt.Local() + return nil +} + +// UnmarshalQueryParameter converts from a URL query parameter value to an object +func (t *Time) UnmarshalQueryParameter(str string) error { + if len(str) == 0 { + t.Time = time.Time{} + return nil + } + // Tolerate requests from older clients that used JSON serialization to build query params + if len(str) == 4 && str == "null" { + t.Time = time.Time{} + return nil + } + + pt, err := time.Parse(time.RFC3339, str) + if err != nil { + return err + } + + t.Time = pt.Local() + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (t Time) MarshalJSON() ([]byte, error) { + if t.IsZero() { + // Encode unset/nil objects as JSON's "null". + return []byte("null"), nil + } + + return json.Marshal(t.UTC().Format(time.RFC3339)) +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ Time) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ Time) OpenAPISchemaFormat() string { return "date-time" } + +// MarshalQueryParameter converts to a URL query parameter value +func (t Time) MarshalQueryParameter() (string, error) { + if t.IsZero() { + // Encode unset/nil objects as an empty string + return "", nil + } + + return t.UTC().Format(time.RFC3339), nil +} + +// Fuzz satisfies fuzz.Interface. +func (t *Time) Fuzz(c fuzz.Continue) { + if t == nil { + return + } + // Allow for about 1000 years of randomness. Leave off nanoseconds + // because JSON doesn't represent them so they can't round-trip + // properly. + t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60), 0) +} + +var _ fuzz.Interface = &Time{} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go new file mode 100644 index 000000000..ed72186b4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/time_proto.go @@ -0,0 +1,92 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "time" +) + +// Timestamp is a struct that is equivalent to Time, but intended for +// protobuf marshalling/unmarshalling. It is generated into a serialization +// that matches Time. Do not use in Go structs. +type Timestamp struct { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `json:"seconds" protobuf:"varint,1,opt,name=seconds"` + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. This field may be limited in precision depending on context. + Nanos int32 `json:"nanos" protobuf:"varint,2,opt,name=nanos"` +} + +// Timestamp returns the Time as a new Timestamp value. +func (m *Time) ProtoTime() *Timestamp { + if m == nil { + return &Timestamp{} + } + return &Timestamp{ + Seconds: m.Time.Unix(), + // leaving this here for the record. our JSON only handled seconds, so this results in writes by + // protobuf clients storing values that aren't read by json clients, which results in unexpected + // field mutation, which fails various validation and equality code. + // Nanos: int32(m.Time.Nanosecond()), + } +} + +// Size implements the protobuf marshalling interface. +func (m *Time) Size() (n int) { + if m == nil || m.Time.IsZero() { + return 0 + } + return m.ProtoTime().Size() +} + +// Reset implements the protobuf marshalling interface. +func (m *Time) Unmarshal(data []byte) error { + if len(data) == 0 { + m.Time = time.Time{} + return nil + } + p := Timestamp{} + if err := p.Unmarshal(data); err != nil { + return err + } + // leaving this here for the record. our JSON only handled seconds, so this results in writes by + // protobuf clients storing values that aren't read by json clients, which results in unexpected + // field mutation, which fails various validation and equality code. + // m.Time = time.Unix(p.Seconds, int64(p.Nanos)).Local() + m.Time = time.Unix(p.Seconds, int64(0)).Local() + return nil +} + +// Marshal implements the protobuf marshalling interface. +func (m *Time) Marshal() (data []byte, err error) { + if m == nil || m.Time.IsZero() { + return nil, nil + } + return m.ProtoTime().Marshal() +} + +// MarshalTo implements the protobuf marshalling interface. +func (m *Time) MarshalTo(data []byte) (int, error) { + if m == nil || m.Time.IsZero() { + return 0, nil + } + return m.ProtoTime().MarshalTo(data) +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go new file mode 100644 index 000000000..f390bf02f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -0,0 +1,1011 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package v1 contains API types that are common to all versions. +// +// The package contains two categories of types: +// - external (serialized) types that lack their own version (e.g TypeMeta) +// - internal (never-serialized) types that are needed by several different +// api groups, and so live here, to avoid duplication and/or import loops +// (e.g. LabelSelector). +// In the future, we will probably move these categories of objects into +// separate packages. +package v1 + +import ( + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" +) + +// TypeMeta describes an individual object in an API response or request +// with strings representing the type of the object and its API schema version. +// Structures that are versioned or persisted should inline TypeMeta. +// +// +k8s:deepcopy-gen=false +type TypeMeta struct { + // Kind is a string value representing the REST resource this object represents. + // Servers may infer this from the endpoint the client submits requests to. + // Cannot be updated. + // In CamelCase. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` + + // APIVersion defines the versioned schema of this representation of an object. + // Servers should convert recognized schemas to the latest internal value, and + // may reject unrecognized values. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` +} + +// ListMeta describes metadata that synthetic resources must have, including lists and +// various status objects. A resource may have only one of {ObjectMeta, ListMeta}. +type ListMeta struct { + // selfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,1,opt,name=selfLink"` + + // String that identifies the server's internal version of this object that + // can be used by clients to determine when objects have changed. + // Value must be treated as opaque by clients and passed unmodified back to the server. + // Populated by the system. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` + + // continue may be set if the user set a limit on the number of items returned, and indicates that + // the server has more data available. The value is opaque and may be used to issue another request + // to the endpoint that served this list to retrieve the next set of available objects. Continuing a + // consistent list may not be possible if the server configuration has changed or more than a few + // minutes have passed. The resourceVersion field returned when using this continue value will be + // identical to the value in the first response, unless you have received this token from an error + // message. + Continue string `json:"continue,omitempty" protobuf:"bytes,3,opt,name=continue"` +} + +// These are internal finalizer values for Kubernetes-like APIs, must be qualified name unless defined here +const ( + FinalizerOrphanDependents string = "orphan" + FinalizerDeleteDependents string = "foregroundDeletion" +) + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects +// users must create. +type ObjectMeta struct { + // Name must be unique within a namespace. Is required when creating resources, although + // some resources may allow a client to request the generation of an appropriate name + // automatically. Name is primarily intended for creation idempotence and configuration + // definition. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + + // GenerateName is an optional prefix, used by the server, to generate a unique + // name ONLY IF the Name field has not been provided. + // If this field is used, the name returned to the client will be different + // than the name passed. This value will also be combined with a unique suffix. + // The provided value has the same validation rules as the Name field, + // and may be truncated by the length of the suffix required to make the value + // unique on the server. + // + // If this field is specified and the generated name exists, the server will + // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + // ServerTimeout indicating a unique name could not be found in the time allotted, and the client + // should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency + // +optional + GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` + + // Namespace defines the space within each name must be unique. An empty namespace is + // equivalent to the "default" namespace, but "default" is the canonical representation. + // Not all objects are required to be scoped to a namespace - the value of this field for + // those objects will be empty. + // + // Must be a DNS_LABEL. + // Cannot be updated. + // More info: http://kubernetes.io/docs/user-guide/namespaces + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` + + // SelfLink is a URL representing this object. + // Populated by the system. + // Read-only. + // +optional + SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` + + // UID is the unique in time and space value for this object. It is typically generated by + // the server on successful creation of a resource and is not allowed to change on PUT + // operations. + // + // Populated by the system. + // Read-only. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` + + // An opaque value that represents the internal version of this object that can + // be used by clients to determine when objects have changed. May be used for optimistic + // concurrency, change detection, and the watch operation on a resource or set of resources. + // Clients must treat these values as opaque and passed unmodified back to the server. + // They may only be valid for a particular resource or set of resources. + // + // Populated by the system. + // Read-only. + // Value must be treated as opaque by clients and . + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` + + // A sequence number representing a specific generation of the desired state. + // Populated by the system. Read-only. + // +optional + Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` + + // CreationTimestamp is a timestamp representing the server time when this object was + // created. It is not guaranteed to be set in happens-before order across separate operations. + // Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. + // Read-only. + // Null for lists. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + CreationTimestamp Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + // field is set by the server when a graceful deletion is requested by the user, and is not + // directly settable by a client. The resource is expected to be deleted (no longer visible + // from resource lists, and not reachable by name) after the time in this field, once the + // finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + // Once the deletionTimestamp is set, this value may not be unset or be set further into the + // future, although it may be shortened or the resource may be deleted prior to this time. + // For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + // by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + // the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + // remove the pod from the API. In the presence of network partitions, this object may still + // exist after this timestamp, until an administrator or automated process can determine the + // resource is fully terminated. + // If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. + // Read-only. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + DeletionTimestamp *Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` + + // Number of seconds allowed for this object to gracefully terminate before + // it will be removed from the system. Only set when deletionTimestamp is also set. + // May only be shortened. + // Read-only. + // +optional + DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` + + // Map of string keys and values that can be used to organize and categorize + // (scope and select) objects. May match selectors of replication controllers + // and services. + // More info: http://kubernetes.io/docs/user-guide/labels + // +optional + Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` + + // Annotations is an unstructured key value map stored with a resource that may be + // set by external tools to store and retrieve arbitrary metadata. They are not + // queryable and should be preserved when modifying objects. + // More info: http://kubernetes.io/docs/user-guide/annotations + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` + + // List of objects depended by this object. If ALL objects in the list have + // been deleted, this object will be garbage collected. If this object is managed by a controller, + // then an entry in this list will point to this controller, with the controller field set to true. + // There cannot be more than one managing controller. + // +optional + // +patchMergeKey=uid + // +patchStrategy=merge + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` + + // An initializer is a controller which enforces some system invariant at object creation time. + // This field is a list of initializers that have not yet acted on this object. If nil or empty, + // this object has been completely initialized. Otherwise, the object is considered uninitialized + // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to + // observe uninitialized objects. + // + // When an object is created, the system will populate this list with the current set of initializers. + // Only privileged users may set or modify this list. Once it is empty, it may not be modified further + // by any user. + // + // DEPRECATED - initializers are an alpha field and will be removed in v1.15. + Initializers *Initializers `json:"initializers,omitempty" protobuf:"bytes,16,opt,name=initializers"` + + // Must be empty before the object is deleted from the registry. Each entry + // is an identifier for the responsible component that will remove the entry + // from the list. If the deletionTimestamp of the object is non-nil, entries + // in this list can only be removed. + // +optional + // +patchStrategy=merge + Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` + + // The name of the cluster which the object belongs to. + // This is used to distinguish resources with same name and namespace in different clusters. + // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + // +optional + ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` +} + +// Initializers tracks the progress of initialization. +type Initializers struct { + // Pending is a list of initializers that must execute in order before this object is visible. + // When the last pending initializer is removed, and no failing result is set, the initializers + // struct will be set to nil and the object is considered as initialized and visible to all + // clients. + // +patchMergeKey=name + // +patchStrategy=merge + Pending []Initializer `json:"pending" protobuf:"bytes,1,rep,name=pending" patchStrategy:"merge" patchMergeKey:"name"` + // If result is set with the Failure field, the object will be persisted to storage and then deleted, + // ensuring that other clients can observe the deletion. + Result *Status `json:"result,omitempty" protobuf:"bytes,2,opt,name=result"` +} + +// Initializer is information about an initializer that has not yet completed. +type Initializer struct { + // name of the process that is responsible for initializing this object. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` +} + +const ( + // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients + NamespaceDefault string = "default" + // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces + NamespaceAll string = "" + // NamespaceNone is the argument for a context when there is no namespace. + NamespaceNone string = "" + // NamespaceSystem is the system namespace where we place system components. + NamespaceSystem string = "kube-system" + // NamespacePublic is the namespace where we place public info (ConfigMaps) + NamespacePublic string = "kube-public" +) + +// OwnerReference contains enough information to let you identify an owning +// object. An owning object must be in the same namespace as the dependent, or +// be cluster-scoped, so there is no namespace field. +type OwnerReference struct { + // API version of the referent. + APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` + // Kind of the referent. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` + // Name of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name" protobuf:"bytes,3,opt,name=name"` + // UID of the referent. + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // If true, this reference points to the managing controller. + // +optional + Controller *bool `json:"controller,omitempty" protobuf:"varint,6,opt,name=controller"` + // If true, AND if the owner has the "foregroundDeletion" finalizer, then + // the owner cannot be deleted from the key-value store until this + // reference is removed. + // Defaults to false. + // To set this field, a user needs "delete" permission of the owner, + // otherwise 422 (Unprocessable Entity) will be returned. + // +optional + BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty" protobuf:"varint,7,opt,name=blockOwnerDeletion"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ListOptions is the query options to a standard REST list call. +type ListOptions struct { + TypeMeta `json:",inline"` + + // A selector to restrict the list of returned objects by their labels. + // Defaults to everything. + // +optional + LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` + // A selector to restrict the list of returned objects by their fields. + // Defaults to everything. + // +optional + FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` + + // +k8s:deprecated=includeUninitialized,protobuf=6 + + // Watch for changes to the described resources and return them as a stream of + // add, update, and remove notifications. Specify resourceVersion. + // +optional + Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` + // When specified with a watch call, shows changes that occur after that particular version of a resource. + // Defaults to changes from the beginning of history. + // When specified for list: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` + // Timeout for the list/watch call. + // This limits the duration of the call, regardless of any activity or inactivity. + // +optional + TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` + + // limit is a maximum number of responses to return for a list call. If more items exist, the + // server will set the `continue` field on the list metadata to a value that can be used with the + // same initial query to retrieve the next set of results. Setting a limit may return fewer than + // the requested amount of items (up to zero items) in the event all requested objects are + // filtered out and clients should only use the presence of the continue field to determine whether + // more results are available. Servers may choose not to support the limit argument and will return + // all of the available results. If limit is specified and the continue field is empty, clients may + // assume that no more results are available. This field is not supported if watch is true. + // + // The server guarantees that the objects returned when using continue will be identical to issuing + // a single list call without a limit - that is, no objects created, modified, or deleted after the + // first request is issued will be included in any subsequent continued requests. This is sometimes + // referred to as a consistent snapshot, and ensures that a client that is using limit to receive + // smaller chunks of a very large result can ensure they see all possible objects. If objects are + // updated during a chunked list the version of the object that was present at the time the first list + // result was calculated is returned. + Limit int64 `json:"limit,omitempty" protobuf:"varint,7,opt,name=limit"` + // The continue option should be set when retrieving more results from the server. Since this value is + // server defined, clients may only use the continue value from a previous query result with identical + // query parameters (except for the value of continue) and the server may reject a continue value it + // does not recognize. If the specified continue value is no longer valid whether due to expiration + // (generally five to fifteen minutes) or a configuration change on the server, the server will + // respond with a 410 ResourceExpired error together with a continue token. If the client needs a + // consistent list, it must restart their list without the continue field. Otherwise, the client may + // send another list request with the token received with the 410 error, the server will respond with + // a list starting from the next key, but from the latest snapshot, which is inconsistent from the + // previous list results - objects that are created, modified, or deleted after the first list request + // will be included in the response, as long as their keys are after the "next key". + // + // This field is not supported when watch is true. Clients may start a watch from the last + // resourceVersion value returned by the server and not miss any modifications. + Continue string `json:"continue,omitempty" protobuf:"bytes,8,opt,name=continue"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExportOptions is the query options to the standard REST get call. +type ExportOptions struct { + TypeMeta `json:",inline"` + // Should this value be exported. Export strips fields that a user can not specify. + Export bool `json:"export" protobuf:"varint,1,opt,name=export"` + // Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. + Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// GetOptions is the standard query options to the standard REST get call. +type GetOptions struct { + TypeMeta `json:",inline"` + // When specified: + // - if unset, then the result is returned from remote storage based on quorum-read flag; + // - if it's 0, then we simply return what we currently have in cache, no guarantee; + // - if set to non zero, then the result is at least as fresh as given rv. + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,1,opt,name=resourceVersion"` + // +k8s:deprecated=includeUninitialized,protobuf=2 +} + +// DeletionPropagation decides if a deletion will propagate to the dependents of +// the object, and how the garbage collector will handle the propagation. +type DeletionPropagation string + +const ( + // Orphans the dependents. + DeletePropagationOrphan DeletionPropagation = "Orphan" + // Deletes the object from the key-value store, the garbage collector will + // delete the dependents in the background. + DeletePropagationBackground DeletionPropagation = "Background" + // The object exists in the key-value store until the garbage collector + // deletes all the dependents whose ownerReference.blockOwnerDeletion=true + // from the key-value store. API sever will put the "foregroundDeletion" + // finalizer on the object, and sets its deletionTimestamp. This policy is + // cascading, i.e., the dependents will be deleted with Foreground. + DeletePropagationForeground DeletionPropagation = "Foreground" +) + +const ( + // DryRunAll means to complete all processing stages, but don't + // persist changes to storage. + DryRunAll = "All" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DeleteOptions may be provided when deleting an API object. +type DeleteOptions struct { + TypeMeta `json:",inline"` + + // The duration in seconds before the object should be deleted. Value must be non-negative integer. + // The value zero indicates delete immediately. If this value is nil, the default grace period for the + // specified type will be used. + // Defaults to a per object value if not specified. zero means delete immediately. + // +optional + GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` + + // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be + // returned. + // +optional + Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"` + + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. + // Should the dependent objects be orphaned. If true/false, the "orphan" + // finalizer will be added to/removed from the object's finalizers list. + // Either this field or PropagationPolicy may be set, but not both. + // +optional + OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"` + + // Whether and how garbage collection will be performed. + // Either this field or OrphanDependents may be set, but not both. + // The default policy is decided by the existing finalizer set in the + // metadata.finalizers and the resource-specific default policy. + // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - + // allow the garbage collector to delete the dependents in the background; + // 'Foreground' - a cascading policy that deletes all dependents in the + // foreground. + // +optional + PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CreateOptions may be provided when creating an API object. +type CreateOptions struct { + TypeMeta `json:",inline"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + // +k8s:deprecated=includeUninitialized,protobuf=2 +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// UpdateOptions may be provided when updating an API object. +type UpdateOptions struct { + TypeMeta `json:",inline"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` +} + +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +type Preconditions struct { + // Specifies the target UID. + // +optional + UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Status is a return value for calls that don't return other objects. +type Status struct { + TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Status of the operation. + // One of: "Success" or "Failure". + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // +optional + Status string `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` + // A human-readable description of the status of this operation. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` + // A machine-readable description of why this operation is in the + // "Failure" status. If this value is empty there + // is no information available. A Reason clarifies an HTTP status + // code but does not override it. + // +optional + Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason,casttype=StatusReason"` + // Extended data associated with the reason. Each reason may define its + // own extended details. This field is optional and the data returned + // is not guaranteed to conform to any schema except that defined by + // the reason type. + // +optional + Details *StatusDetails `json:"details,omitempty" protobuf:"bytes,5,opt,name=details"` + // Suggested HTTP return code for this status, 0 if not set. + // +optional + Code int32 `json:"code,omitempty" protobuf:"varint,6,opt,name=code"` +} + +// StatusDetails is a set of additional properties that MAY be set by the +// server to provide additional information about a response. The Reason +// field of a Status object defines what attributes will be set. Clients +// must ignore fields that do not match the defined type of each attribute, +// and should assume that any attribute may be empty, invalid, or under +// defined. +type StatusDetails struct { + // The name attribute of the resource associated with the status StatusReason + // (when there is a single name which can be described). + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + // The group attribute of the resource associated with the status StatusReason. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` + // The kind attribute of the resource associated with the status StatusReason. + // On some operations may differ from the requested resource Kind. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"` + // UID of the resource. + // (when there is a single resource which can be described). + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // The Causes array includes more details associated with the StatusReason + // failure. Not all StatusReasons may provide detailed causes. + // +optional + Causes []StatusCause `json:"causes,omitempty" protobuf:"bytes,4,rep,name=causes"` + // If specified, the time in seconds before the operation should be retried. Some errors may indicate + // the client must take an alternate action - for those errors this field may indicate how long to wait + // before taking the alternate action. + // +optional + RetryAfterSeconds int32 `json:"retryAfterSeconds,omitempty" protobuf:"varint,5,opt,name=retryAfterSeconds"` +} + +// Values of Status.Status +const ( + StatusSuccess = "Success" + StatusFailure = "Failure" +) + +// StatusReason is an enumeration of possible failure causes. Each StatusReason +// must map to a single HTTP status code, but multiple reasons may map +// to the same HTTP status code. +// TODO: move to apiserver +type StatusReason string + +const ( + // StatusReasonUnknown means the server has declined to indicate a specific reason. + // The details field may contain other information about this error. + // Status code 500. + StatusReasonUnknown StatusReason = "" + + // StatusReasonUnauthorized means the server can be reached and understood the request, but requires + // the user to present appropriate authorization credentials (identified by the WWW-Authenticate header) + // in order for the action to be completed. If the user has specified credentials on the request, the + // server considers them insufficient. + // Status code 401 + StatusReasonUnauthorized StatusReason = "Unauthorized" + + // StatusReasonForbidden means the server can be reached and understood the request, but refuses + // to take any further action. It is the result of the server being configured to deny access for some reason + // to the requested resource by the client. + // Details (optional): + // "kind" string - the kind attribute of the forbidden resource + // on some operations may differ from the requested + // resource. + // "id" string - the identifier of the forbidden resource + // Status code 403 + StatusReasonForbidden StatusReason = "Forbidden" + + // StatusReasonNotFound means one or more resources required for this operation + // could not be found. + // Details (optional): + // "kind" string - the kind attribute of the missing resource + // on some operations may differ from the requested + // resource. + // "id" string - the identifier of the missing resource + // Status code 404 + StatusReasonNotFound StatusReason = "NotFound" + + // StatusReasonAlreadyExists means the resource you are creating already exists. + // Details (optional): + // "kind" string - the kind attribute of the conflicting resource + // "id" string - the identifier of the conflicting resource + // Status code 409 + StatusReasonAlreadyExists StatusReason = "AlreadyExists" + + // StatusReasonConflict means the requested operation cannot be completed + // due to a conflict in the operation. The client may need to alter the + // request. Each resource may define custom details that indicate the + // nature of the conflict. + // Status code 409 + StatusReasonConflict StatusReason = "Conflict" + + // StatusReasonGone means the item is no longer available at the server and no + // forwarding address is known. + // Status code 410 + StatusReasonGone StatusReason = "Gone" + + // StatusReasonInvalid means the requested create or update operation cannot be + // completed due to invalid data provided as part of the request. The client may + // need to alter the request. When set, the client may use the StatusDetails + // message field as a summary of the issues encountered. + // Details (optional): + // "kind" string - the kind attribute of the invalid resource + // "id" string - the identifier of the invalid resource + // "causes" - one or more StatusCause entries indicating the data in the + // provided resource that was invalid. The code, message, and + // field attributes will be set. + // Status code 422 + StatusReasonInvalid StatusReason = "Invalid" + + // StatusReasonServerTimeout means the server can be reached and understood the request, + // but cannot complete the action in a reasonable time. The client should retry the request. + // This is may be due to temporary server load or a transient communication issue with + // another server. Status code 500 is used because the HTTP spec provides no suitable + // server-requested client retry and the 5xx class represents actionable errors. + // Details (optional): + // "kind" string - the kind attribute of the resource being acted on. + // "id" string - the operation that is being attempted. + // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried + // Status code 500 + StatusReasonServerTimeout StatusReason = "ServerTimeout" + + // StatusReasonTimeout means that the request could not be completed within the given time. + // Clients can get this response only when they specified a timeout param in the request, + // or if the server cannot complete the operation within a reasonable amount of time. + // The request might succeed with an increased value of timeout param. The client *should* + // wait at least the number of seconds specified by the retryAfterSeconds field. + // Details (optional): + // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried + // Status code 504 + StatusReasonTimeout StatusReason = "Timeout" + + // StatusReasonTooManyRequests means the server experienced too many requests within a + // given window and that the client must wait to perform the action again. A client may + // always retry the request that led to this error, although the client should wait at least + // the number of seconds specified by the retryAfterSeconds field. + // Details (optional): + // "retryAfterSeconds" int32 - the number of seconds before the operation should be retried + // Status code 429 + StatusReasonTooManyRequests StatusReason = "TooManyRequests" + + // StatusReasonBadRequest means that the request itself was invalid, because the request + // doesn't make any sense, for example deleting a read-only object. This is different than + // StatusReasonInvalid above which indicates that the API call could possibly succeed, but the + // data was invalid. API calls that return BadRequest can never succeed. + StatusReasonBadRequest StatusReason = "BadRequest" + + // StatusReasonMethodNotAllowed means that the action the client attempted to perform on the + // resource was not supported by the code - for instance, attempting to delete a resource that + // can only be created. API calls that return MethodNotAllowed can never succeed. + StatusReasonMethodNotAllowed StatusReason = "MethodNotAllowed" + + // StatusReasonNotAcceptable means that the accept types indicated by the client were not acceptable + // to the server - for instance, attempting to receive protobuf for a resource that supports only json and yaml. + // API calls that return NotAcceptable can never succeed. + // Status code 406 + StatusReasonNotAcceptable StatusReason = "NotAcceptable" + + // StatusReasonUnsupportedMediaType means that the content type sent by the client is not acceptable + // to the server - for instance, attempting to send protobuf for a resource that supports only json and yaml. + // API calls that return UnsupportedMediaType can never succeed. + // Status code 415 + StatusReasonUnsupportedMediaType StatusReason = "UnsupportedMediaType" + + // StatusReasonInternalError indicates that an internal error occurred, it is unexpected + // and the outcome of the call is unknown. + // Details (optional): + // "causes" - The original error + // Status code 500 + StatusReasonInternalError StatusReason = "InternalError" + + // StatusReasonExpired indicates that the request is invalid because the content you are requesting + // has expired and is no longer available. It is typically associated with watches that can't be + // serviced. + // Status code 410 (gone) + StatusReasonExpired StatusReason = "Expired" + + // StatusReasonServiceUnavailable means that the request itself was valid, + // but the requested service is unavailable at this time. + // Retrying the request after some time might succeed. + // Status code 503 + StatusReasonServiceUnavailable StatusReason = "ServiceUnavailable" +) + +// StatusCause provides more information about an api.Status failure, including +// cases when multiple errors are encountered. +type StatusCause struct { + // A machine-readable description of the cause of the error. If this value is + // empty there is no information available. + // +optional + Type CauseType `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason,casttype=CauseType"` + // A human-readable description of the cause of the error. This field may be + // presented as-is to a reader. + // +optional + Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` + // The field of the resource that has caused this error, as named by its JSON + // serialization. May include dot and postfix notation for nested attributes. + // Arrays are zero-indexed. Fields may appear more than once in an array of + // causes due to fields having multiple errors. + // Optional. + // + // Examples: + // "name" - the field "name" on the current resource + // "items[0].name" - the field "name" on the first array entry in "items" + // +optional + Field string `json:"field,omitempty" protobuf:"bytes,3,opt,name=field"` +} + +// CauseType is a machine readable value providing more detail about what +// occurred in a status response. An operation may have multiple causes for a +// status (whether Failure or Success). +type CauseType string + +const ( + // CauseTypeFieldValueNotFound is used to report failure to find a requested value + // (e.g. looking up an ID). + CauseTypeFieldValueNotFound CauseType = "FieldValueNotFound" + // CauseTypeFieldValueRequired is used to report required values that are not + // provided (e.g. empty strings, null values, or empty arrays). + CauseTypeFieldValueRequired CauseType = "FieldValueRequired" + // CauseTypeFieldValueDuplicate is used to report collisions of values that must be + // unique (e.g. unique IDs). + CauseTypeFieldValueDuplicate CauseType = "FieldValueDuplicate" + // CauseTypeFieldValueInvalid is used to report malformed values (e.g. failed regex + // match). + CauseTypeFieldValueInvalid CauseType = "FieldValueInvalid" + // CauseTypeFieldValueNotSupported is used to report valid (as per formatting rules) + // values that can not be handled (e.g. an enumerated string). + CauseTypeFieldValueNotSupported CauseType = "FieldValueNotSupported" + // CauseTypeUnexpectedServerResponse is used to report when the server responded to the client + // without the expected return type. The presence of this cause indicates the error may be + // due to an intervening proxy or the server software malfunctioning. + CauseTypeUnexpectedServerResponse CauseType = "UnexpectedServerResponse" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// List holds a list of objects, which may not be known by the server. +type List struct { + TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + // +optional + ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // List of objects + Items []runtime.RawExtension `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// APIVersions lists the versions that are available, to allow clients to +// discover the API at /api, which is the root path of the legacy v1 API. +// +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type APIVersions struct { + TypeMeta `json:",inline"` + // versions are the api versions that are available. + Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"` + // a map of client CIDR to server address that is serving this group. + // This is to help clients reach servers in the most network-efficient way possible. + // Clients can use the appropriate server address as per the CIDR that they match. + // In case of multiple matches, clients should use the longest matching CIDR. + // The server returns only those CIDRs that it thinks that the client can match. + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIGroupList is a list of APIGroup, to allow clients to discover the API at +// /apis. +type APIGroupList struct { + TypeMeta `json:",inline"` + // groups is a list of APIGroup. + Groups []APIGroup `json:"groups" protobuf:"bytes,1,rep,name=groups"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIGroup contains the name, the supported versions, and the preferred version +// of a group. +type APIGroup struct { + TypeMeta `json:",inline"` + // name is the name of the group. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // versions are the versions supported in this group. + Versions []GroupVersionForDiscovery `json:"versions" protobuf:"bytes,2,rep,name=versions"` + // preferredVersion is the version preferred by the API server, which + // probably is the storage version. + // +optional + PreferredVersion GroupVersionForDiscovery `json:"preferredVersion,omitempty" protobuf:"bytes,3,opt,name=preferredVersion"` + // a map of client CIDR to server address that is serving this group. + // This is to help clients reach servers in the most network-efficient way possible. + // Clients can use the appropriate server address as per the CIDR that they match. + // In case of multiple matches, clients should use the longest matching CIDR. + // The server returns only those CIDRs that it thinks that the client can match. + // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. + // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +optional + ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` +} + +// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. +type ServerAddressByClientCIDR struct { + // The CIDR with which clients can match their IP to figure out the server address that they should use. + ClientCIDR string `json:"clientCIDR" protobuf:"bytes,1,opt,name=clientCIDR"` + // Address of this server, suitable for a client that matches the above CIDR. + // This can be a hostname, hostname:port, IP or IP:port. + ServerAddress string `json:"serverAddress" protobuf:"bytes,2,opt,name=serverAddress"` +} + +// GroupVersion contains the "group/version" and "version" string of a version. +// It is made a struct to keep extensibility. +type GroupVersionForDiscovery struct { + // groupVersion specifies the API group and version in the form "group/version" + GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` + // version specifies the version in the form of "version". This is to save + // the clients the trouble of splitting the GroupVersion. + Version string `json:"version" protobuf:"bytes,2,opt,name=version"` +} + +// APIResource specifies the name of a resource and whether it is namespaced. +type APIResource struct { + // name is the plural name of the resource. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. + // The singularName is more correct for reporting status on a single item and both singular and plural are allowed + // from the kubectl CLI interface. + SingularName string `json:"singularName" protobuf:"bytes,6,opt,name=singularName"` + // namespaced indicates if a resource is namespaced or not. + Namespaced bool `json:"namespaced" protobuf:"varint,2,opt,name=namespaced"` + // group is the preferred group of the resource. Empty implies the group of the containing resource list. + // For subresources, this may have a different value, for example: Scale". + Group string `json:"group,omitempty" protobuf:"bytes,8,opt,name=group"` + // version is the preferred version of the resource. Empty implies the version of the containing resource list + // For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". + Version string `json:"version,omitempty" protobuf:"bytes,9,opt,name=version"` + // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') + Kind string `json:"kind" protobuf:"bytes,3,opt,name=kind"` + // verbs is a list of supported kube verbs (this includes get, list, watch, create, + // update, patch, delete, deletecollection, and proxy) + Verbs Verbs `json:"verbs" protobuf:"bytes,4,opt,name=verbs"` + // shortNames is a list of suggested short names of the resource. + ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,5,rep,name=shortNames"` + // categories is a list of the grouped resources this resource belongs to (e.g. 'all') + Categories []string `json:"categories,omitempty" protobuf:"bytes,7,rep,name=categories"` + // The hash value of the storage version, the version this resource is + // converted to when written to the data store. Value must be treated + // as opaque by clients. Only equality comparison on the value is valid. + // This is an alpha feature and may change or be removed in the future. + // The field is populated by the apiserver only if the + // StorageVersionHash feature gate is enabled. + // This field will remain optional even if it graduates. + // +optional + StorageVersionHash string `json:"storageVersionHash,omitempty" protobuf:"bytes,10,opt,name=storageVersionHash"` +} + +// Verbs masks the value so protobuf can generate +// +// +protobuf.nullable=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +type Verbs []string + +func (vs Verbs) String() string { + return fmt.Sprintf("%v", []string(vs)) +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// APIResourceList is a list of APIResource, it is used to expose the name of the +// resources supported in a specific group and version, and if the resource +// is namespaced. +type APIResourceList struct { + TypeMeta `json:",inline"` + // groupVersion is the group and version this APIResourceList is for. + GroupVersion string `json:"groupVersion" protobuf:"bytes,1,opt,name=groupVersion"` + // resources contains the name of the resources and if they are namespaced. + APIResources []APIResource `json:"resources" protobuf:"bytes,2,rep,name=resources"` +} + +// RootPaths lists the paths available at root. +// For example: "/healthz", "/apis". +type RootPaths struct { + // paths are the paths available at root. + Paths []string `json:"paths" protobuf:"bytes,1,rep,name=paths"` +} + +// TODO: remove me when watch is refactored +func LabelSelectorQueryParam(version string) string { + return "labelSelector" +} + +// TODO: remove me when watch is refactored +func FieldSelectorQueryParam(version string) string { + return "fieldSelector" +} + +// String returns available api versions as a human-friendly version string. +func (apiVersions APIVersions) String() string { + return strings.Join(apiVersions.Versions, ",") +} + +func (apiVersions APIVersions) GoString() string { + return apiVersions.String() +} + +// Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. +type Patch struct{} + +// Note: +// There are two different styles of label selectors used in versioned types: +// an older style which is represented as just a string in versioned types, and a +// newer style that is structured. LabelSelector is an internal representation for the +// latter style. + +// A label selector is a label query over a set of resources. The result of matchLabels and +// matchExpressions are ANDed. An empty label selector matches all objects. A null +// label selector matches no objects. +type LabelSelector struct { + // matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + // map is equivalent to an element of matchExpressions, whose key field is "key", the + // operator is "In", and the values array contains only "value". The requirements are ANDed. + // +optional + MatchLabels map[string]string `json:"matchLabels,omitempty" protobuf:"bytes,1,rep,name=matchLabels"` + // matchExpressions is a list of label selector requirements. The requirements are ANDed. + // +optional + MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,2,rep,name=matchExpressions"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that +// relates the key and values. +type LabelSelectorRequirement struct { + // key is the label key that the selector applies to. + // +patchMergeKey=key + // +patchStrategy=merge + Key string `json:"key" patchStrategy:"merge" patchMergeKey:"key" protobuf:"bytes,1,opt,name=key"` + // operator represents a key's relationship to a set of values. + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator LabelSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=LabelSelectorOperator"` + // values is an array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. This array is replaced during a strategic + // merge patch. + // +optional + Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` +} + +// A label selector operator is the set of operators that can be used in a selector requirement. +type LabelSelectorOperator string + +const ( + LabelSelectorOpIn LabelSelectorOperator = "In" + LabelSelectorOpNotIn LabelSelectorOperator = "NotIn" + LabelSelectorOpExists LabelSelectorOperator = "Exists" + LabelSelectorOpDoesNotExist LabelSelectorOperator = "DoesNotExist" +) diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go new file mode 100644 index 000000000..14a17f1bf --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -0,0 +1,348 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_APIGroup = map[string]string{ + "": "APIGroup contains the name, the supported versions, and the preferred version of a group.", + "name": "name is the name of the group.", + "versions": "versions are the versions supported in this group.", + "preferredVersion": "preferredVersion is the version preferred by the API server, which probably is the storage version.", + "serverAddressByClientCIDRs": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", +} + +func (APIGroup) SwaggerDoc() map[string]string { + return map_APIGroup +} + +var map_APIGroupList = map[string]string{ + "": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + "groups": "groups is a list of APIGroup.", +} + +func (APIGroupList) SwaggerDoc() map[string]string { + return map_APIGroupList +} + +var map_APIResource = map[string]string{ + "": "APIResource specifies the name of a resource and whether it is namespaced.", + "name": "name is the plural name of the resource.", + "singularName": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "namespaced": "namespaced indicates if a resource is namespaced or not.", + "group": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", + "version": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "kind": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "verbs": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "shortNames": "shortNames is a list of suggested short names of the resource.", + "categories": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "storageVersionHash": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", +} + +func (APIResource) SwaggerDoc() map[string]string { + return map_APIResource +} + +var map_APIResourceList = map[string]string{ + "": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "groupVersion": "groupVersion is the group and version this APIResourceList is for.", + "resources": "resources contains the name of the resources and if they are namespaced.", +} + +func (APIResourceList) SwaggerDoc() map[string]string { + return map_APIResourceList +} + +var map_APIVersions = map[string]string{ + "": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + "versions": "versions are the api versions that are available.", + "serverAddressByClientCIDRs": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", +} + +func (APIVersions) SwaggerDoc() map[string]string { + return map_APIVersions +} + +var map_CreateOptions = map[string]string{ + "": "CreateOptions may be provided when creating an API object.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", +} + +func (CreateOptions) SwaggerDoc() map[string]string { + return map_CreateOptions +} + +var map_DeleteOptions = map[string]string{ + "": "DeleteOptions may be provided when deleting an API object.", + "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", +} + +func (DeleteOptions) SwaggerDoc() map[string]string { + return map_DeleteOptions +} + +var map_ExportOptions = map[string]string{ + "": "ExportOptions is the query options to the standard REST get call.", + "export": "Should this value be exported. Export strips fields that a user can not specify.", + "exact": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", +} + +func (ExportOptions) SwaggerDoc() map[string]string { + return map_ExportOptions +} + +var map_GetOptions = map[string]string{ + "": "GetOptions is the standard query options to the standard REST get call.", + "resourceVersion": "When specified: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", +} + +func (GetOptions) SwaggerDoc() map[string]string { + return map_GetOptions +} + +var map_GroupVersionForDiscovery = map[string]string{ + "": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + "groupVersion": "groupVersion specifies the API group and version in the form \"group/version\"", + "version": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", +} + +func (GroupVersionForDiscovery) SwaggerDoc() map[string]string { + return map_GroupVersionForDiscovery +} + +var map_Initializer = map[string]string{ + "": "Initializer is information about an initializer that has not yet completed.", + "name": "name of the process that is responsible for initializing this object.", +} + +func (Initializer) SwaggerDoc() map[string]string { + return map_Initializer +} + +var map_Initializers = map[string]string{ + "": "Initializers tracks the progress of initialization.", + "pending": "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", + "result": "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", +} + +func (Initializers) SwaggerDoc() map[string]string { + return map_Initializers +} + +var map_LabelSelector = map[string]string{ + "": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "matchLabels": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "matchExpressions": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", +} + +func (LabelSelector) SwaggerDoc() map[string]string { + return map_LabelSelector +} + +var map_LabelSelectorRequirement = map[string]string{ + "": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "key": "key is the label key that the selector applies to.", + "operator": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "values": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", +} + +func (LabelSelectorRequirement) SwaggerDoc() map[string]string { + return map_LabelSelectorRequirement +} + +var map_List = map[string]string{ + "": "List holds a list of objects, which may not be known by the server.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "items": "List of objects", +} + +func (List) SwaggerDoc() map[string]string { + return map_List +} + +var map_ListMeta = map[string]string{ + "": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "selfLink": "selfLink is a URL representing this object. Populated by the system. Read-only.", + "resourceVersion": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "continue": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", +} + +func (ListMeta) SwaggerDoc() map[string]string { + return map_ListMeta +} + +var map_ListOptions = map[string]string{ + "": "ListOptions is the query options to a standard REST list call.", + "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", +} + +func (ListOptions) SwaggerDoc() map[string]string { + return map_ListOptions +} + +var map_ObjectMeta = map[string]string{ + "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", + "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.\n\nDEPRECATED - initializers are an alpha field and will be removed in v1.15.", + "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", +} + +func (ObjectMeta) SwaggerDoc() map[string]string { + return map_ObjectMeta +} + +var map_OwnerReference = map[string]string{ + "": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + "apiVersion": "API version of the referent.", + "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "controller": "If true, this reference points to the managing controller.", + "blockOwnerDeletion": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", +} + +func (OwnerReference) SwaggerDoc() map[string]string { + return map_OwnerReference +} + +var map_Patch = map[string]string{ + "": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", +} + +func (Patch) SwaggerDoc() map[string]string { + return map_Patch +} + +var map_Preconditions = map[string]string{ + "": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "uid": "Specifies the target UID.", +} + +func (Preconditions) SwaggerDoc() map[string]string { + return map_Preconditions +} + +var map_RootPaths = map[string]string{ + "": "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", + "paths": "paths are the paths available at root.", +} + +func (RootPaths) SwaggerDoc() map[string]string { + return map_RootPaths +} + +var map_ServerAddressByClientCIDR = map[string]string{ + "": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + "clientCIDR": "The CIDR with which clients can match their IP to figure out the server address that they should use.", + "serverAddress": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", +} + +func (ServerAddressByClientCIDR) SwaggerDoc() map[string]string { + return map_ServerAddressByClientCIDR +} + +var map_Status = map[string]string{ + "": "Status is a return value for calls that don't return other objects.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "status": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "message": "A human-readable description of the status of this operation.", + "reason": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + "details": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + "code": "Suggested HTTP return code for this status, 0 if not set.", +} + +func (Status) SwaggerDoc() map[string]string { + return map_Status +} + +var map_StatusCause = map[string]string{ + "": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "reason": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + "message": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + "field": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", +} + +func (StatusCause) SwaggerDoc() map[string]string { + return map_StatusCause +} + +var map_StatusDetails = map[string]string{ + "": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "name": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + "group": "The group attribute of the resource associated with the status StatusReason.", + "kind": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "uid": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "causes": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + "retryAfterSeconds": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", +} + +func (StatusDetails) SwaggerDoc() map[string]string { + return map_StatusDetails +} + +var map_TypeMeta = map[string]string{ + "": "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", + "kind": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "apiVersion": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", +} + +func (TypeMeta) SwaggerDoc() map[string]string { + return map_TypeMeta +} + +var map_UpdateOptions = map[string]string{ + "": "UpdateOptions may be provided when updating an API object.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", +} + +func (UpdateOptions) SwaggerDoc() map[string]string { + return map_UpdateOptions +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go new file mode 100644 index 000000000..58f077380 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go @@ -0,0 +1,89 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/watch" +) + +// Event represents a single event to a watched resource. +// +// +protobuf=true +// +k8s:deepcopy-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type WatchEvent struct { + Type string `json:"type" protobuf:"bytes,1,opt,name=type"` + + // Object is: + // * If Type is Added or Modified: the new state of the object. + // * If Type is Deleted: the state of the object immediately before deletion. + // * If Type is Error: *Status is recommended; other types may make sense + // depending on context. + Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"` +} + +func Convert_watch_Event_To_v1_WatchEvent(in *watch.Event, out *WatchEvent, s conversion.Scope) error { + out.Type = string(in.Type) + switch t := in.Object.(type) { + case *runtime.Unknown: + // TODO: handle other fields on Unknown and detect type + out.Object.Raw = t.Raw + case nil: + default: + out.Object.Object = in.Object + } + return nil +} + +func Convert_v1_InternalEvent_To_v1_WatchEvent(in *InternalEvent, out *WatchEvent, s conversion.Scope) error { + return Convert_watch_Event_To_v1_WatchEvent((*watch.Event)(in), out, s) +} + +func Convert_v1_WatchEvent_To_watch_Event(in *WatchEvent, out *watch.Event, s conversion.Scope) error { + out.Type = watch.EventType(in.Type) + if in.Object.Object != nil { + out.Object = in.Object.Object + } else if in.Object.Raw != nil { + // TODO: handle other fields on Unknown and detect type + out.Object = &runtime.Unknown{ + Raw: in.Object.Raw, + ContentType: runtime.ContentTypeJSON, + } + } + return nil +} + +func Convert_v1_WatchEvent_To_v1_InternalEvent(in *WatchEvent, out *InternalEvent, s conversion.Scope) error { + return Convert_v1_WatchEvent_To_watch_Event(in, (*watch.Event)(out), s) +} + +// InternalEvent makes watch.Event versioned +// +protobuf=false +type InternalEvent watch.Event + +func (e *InternalEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (e *WatchEvent) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (e *InternalEvent) DeepCopyObject() runtime.Object { + if c := e.DeepCopy(); c != nil { + return c + } else { + return nil + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..10845993e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -0,0 +1,961 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIGroup) DeepCopyInto(out *APIGroup) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]GroupVersionForDiscovery, len(*in)) + copy(*out, *in) + } + out.PreferredVersion = in.PreferredVersion + if in.ServerAddressByClientCIDRs != nil { + in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs + *out = make([]ServerAddressByClientCIDR, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroup. +func (in *APIGroup) DeepCopy() *APIGroup { + if in == nil { + return nil + } + out := new(APIGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIGroupList) DeepCopyInto(out *APIGroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Groups != nil { + in, out := &in.Groups, &out.Groups + *out = make([]APIGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIGroupList. +func (in *APIGroupList) DeepCopy() *APIGroupList { + if in == nil { + return nil + } + out := new(APIGroupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIGroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIResource) DeepCopyInto(out *APIResource) { + *out = *in + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make(Verbs, len(*in)) + copy(*out, *in) + } + if in.ShortNames != nil { + in, out := &in.ShortNames, &out.ShortNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Categories != nil { + in, out := &in.Categories, &out.Categories + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResource. +func (in *APIResource) DeepCopy() *APIResource { + if in == nil { + return nil + } + out := new(APIResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIResourceList) DeepCopyInto(out *APIResourceList) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.APIResources != nil { + in, out := &in.APIResources, &out.APIResources + *out = make([]APIResource, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIResourceList. +func (in *APIResourceList) DeepCopy() *APIResourceList { + if in == nil { + return nil + } + out := new(APIResourceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIResourceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *APIVersions) DeepCopyInto(out *APIVersions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ServerAddressByClientCIDRs != nil { + in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs + *out = make([]ServerAddressByClientCIDR, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersions. +func (in *APIVersions) DeepCopy() *APIVersions { + if in == nil { + return nil + } + out := new(APIVersions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *APIVersions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CreateOptions) DeepCopyInto(out *CreateOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CreateOptions. +func (in *CreateOptions) DeepCopy() *CreateOptions { + if in == nil { + return nil + } + out := new(CreateOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CreateOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeleteOptions) DeepCopyInto(out *DeleteOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.GracePeriodSeconds != nil { + in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Preconditions != nil { + in, out := &in.Preconditions, &out.Preconditions + *out = new(Preconditions) + (*in).DeepCopyInto(*out) + } + if in.OrphanDependents != nil { + in, out := &in.OrphanDependents, &out.OrphanDependents + *out = new(bool) + **out = **in + } + if in.PropagationPolicy != nil { + in, out := &in.PropagationPolicy, &out.PropagationPolicy + *out = new(DeletionPropagation) + **out = **in + } + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteOptions. +func (in *DeleteOptions) DeepCopy() *DeleteOptions { + if in == nil { + return nil + } + out := new(DeleteOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeleteOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Duration) DeepCopyInto(out *Duration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Duration. +func (in *Duration) DeepCopy() *Duration { + if in == nil { + return nil + } + out := new(Duration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExportOptions) DeepCopyInto(out *ExportOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportOptions. +func (in *ExportOptions) DeepCopy() *ExportOptions { + if in == nil { + return nil + } + out := new(ExportOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExportOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GetOptions) DeepCopyInto(out *GetOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GetOptions. +func (in *GetOptions) DeepCopy() *GetOptions { + if in == nil { + return nil + } + out := new(GetOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GetOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupKind) DeepCopyInto(out *GroupKind) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupKind. +func (in *GroupKind) DeepCopy() *GroupKind { + if in == nil { + return nil + } + out := new(GroupKind) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResource) DeepCopyInto(out *GroupResource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResource. +func (in *GroupResource) DeepCopy() *GroupResource { + if in == nil { + return nil + } + out := new(GroupResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupVersion) DeepCopyInto(out *GroupVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersion. +func (in *GroupVersion) DeepCopy() *GroupVersion { + if in == nil { + return nil + } + out := new(GroupVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupVersionForDiscovery) DeepCopyInto(out *GroupVersionForDiscovery) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionForDiscovery. +func (in *GroupVersionForDiscovery) DeepCopy() *GroupVersionForDiscovery { + if in == nil { + return nil + } + out := new(GroupVersionForDiscovery) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionKind. +func (in *GroupVersionKind) DeepCopy() *GroupVersionKind { + if in == nil { + return nil + } + out := new(GroupVersionKind) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupVersionResource) DeepCopyInto(out *GroupVersionResource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource. +func (in *GroupVersionResource) DeepCopy() *GroupVersionResource { + if in == nil { + return nil + } + out := new(GroupVersionResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Initializer) DeepCopyInto(out *Initializer) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializer. +func (in *Initializer) DeepCopy() *Initializer { + if in == nil { + return nil + } + out := new(Initializer) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Initializers) DeepCopyInto(out *Initializers) { + *out = *in + if in.Pending != nil { + in, out := &in.Pending, &out.Pending + *out = make([]Initializer, len(*in)) + copy(*out, *in) + } + if in.Result != nil { + in, out := &in.Result, &out.Result + *out = new(Status) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Initializers. +func (in *Initializers) DeepCopy() *Initializers { + if in == nil { + return nil + } + out := new(Initializers) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalEvent) DeepCopyInto(out *InternalEvent) { + *out = *in + if in.Object != nil { + out.Object = in.Object.DeepCopyObject() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalEvent. +func (in *InternalEvent) DeepCopy() *InternalEvent { + if in == nil { + return nil + } + out := new(InternalEvent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LabelSelector) DeepCopyInto(out *LabelSelector) { + *out = *in + if in.MatchLabels != nil { + in, out := &in.MatchLabels, &out.MatchLabels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.MatchExpressions != nil { + in, out := &in.MatchExpressions, &out.MatchExpressions + *out = make([]LabelSelectorRequirement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelector. +func (in *LabelSelector) DeepCopy() *LabelSelector { + if in == nil { + return nil + } + out := new(LabelSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LabelSelectorRequirement) DeepCopyInto(out *LabelSelectorRequirement) { + *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelSelectorRequirement. +func (in *LabelSelectorRequirement) DeepCopy() *LabelSelectorRequirement { + if in == nil { + return nil + } + out := new(LabelSelectorRequirement) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *List) DeepCopyInto(out *List) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]runtime.RawExtension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new List. +func (in *List) DeepCopy() *List { + if in == nil { + return nil + } + out := new(List) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *List) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ListMeta) DeepCopyInto(out *ListMeta) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListMeta. +func (in *ListMeta) DeepCopy() *ListMeta { + if in == nil { + return nil + } + out := new(ListMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ListOptions) DeepCopyInto(out *ListOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.TimeoutSeconds != nil { + in, out := &in.TimeoutSeconds, &out.TimeoutSeconds + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListOptions. +func (in *ListOptions) DeepCopy() *ListOptions { + if in == nil { + return nil + } + out := new(ListOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ListOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MicroTime. +func (in *MicroTime) DeepCopy() *MicroTime { + if in == nil { + return nil + } + out := new(MicroTime) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { + *out = *in + in.CreationTimestamp.DeepCopyInto(&out.CreationTimestamp) + if in.DeletionTimestamp != nil { + in, out := &in.DeletionTimestamp, &out.DeletionTimestamp + *out = (*in).DeepCopy() + } + if in.DeletionGracePeriodSeconds != nil { + in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds + *out = new(int64) + **out = **in + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.OwnerReferences != nil { + in, out := &in.OwnerReferences, &out.OwnerReferences + *out = make([]OwnerReference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Initializers != nil { + in, out := &in.Initializers, &out.Initializers + *out = new(Initializers) + (*in).DeepCopyInto(*out) + } + if in.Finalizers != nil { + in, out := &in.Finalizers, &out.Finalizers + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta. +func (in *ObjectMeta) DeepCopy() *ObjectMeta { + if in == nil { + return nil + } + out := new(ObjectMeta) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OwnerReference) DeepCopyInto(out *OwnerReference) { + *out = *in + if in.Controller != nil { + in, out := &in.Controller, &out.Controller + *out = new(bool) + **out = **in + } + if in.BlockOwnerDeletion != nil { + in, out := &in.BlockOwnerDeletion, &out.BlockOwnerDeletion + *out = new(bool) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnerReference. +func (in *OwnerReference) DeepCopy() *OwnerReference { + if in == nil { + return nil + } + out := new(OwnerReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Patch) DeepCopyInto(out *Patch) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Patch. +func (in *Patch) DeepCopy() *Patch { + if in == nil { + return nil + } + out := new(Patch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Preconditions) DeepCopyInto(out *Preconditions) { + *out = *in + if in.UID != nil { + in, out := &in.UID, &out.UID + *out = new(types.UID) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preconditions. +func (in *Preconditions) DeepCopy() *Preconditions { + if in == nil { + return nil + } + out := new(Preconditions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RootPaths) DeepCopyInto(out *RootPaths) { + *out = *in + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootPaths. +func (in *RootPaths) DeepCopy() *RootPaths { + if in == nil { + return nil + } + out := new(RootPaths) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServerAddressByClientCIDR) DeepCopyInto(out *ServerAddressByClientCIDR) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerAddressByClientCIDR. +func (in *ServerAddressByClientCIDR) DeepCopy() *ServerAddressByClientCIDR { + if in == nil { + return nil + } + out := new(ServerAddressByClientCIDR) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Status) DeepCopyInto(out *Status) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Details != nil { + in, out := &in.Details, &out.Details + *out = new(StatusDetails) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status. +func (in *Status) DeepCopy() *Status { + if in == nil { + return nil + } + out := new(Status) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Status) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StatusCause) DeepCopyInto(out *StatusCause) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCause. +func (in *StatusCause) DeepCopy() *StatusCause { + if in == nil { + return nil + } + out := new(StatusCause) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StatusDetails) DeepCopyInto(out *StatusDetails) { + *out = *in + if in.Causes != nil { + in, out := &in.Causes, &out.Causes + *out = make([]StatusCause, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusDetails. +func (in *StatusDetails) DeepCopy() *StatusDetails { + if in == nil { + return nil + } + out := new(StatusDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time. +func (in *Time) DeepCopy() *Time { + if in == nil { + return nil + } + out := new(Time) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Timestamp) DeepCopyInto(out *Timestamp) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timestamp. +func (in *Timestamp) DeepCopy() *Timestamp { + if in == nil { + return nil + } + out := new(Timestamp) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateOptions) DeepCopyInto(out *UpdateOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateOptions. +func (in *UpdateOptions) DeepCopy() *UpdateOptions { + if in == nil { + return nil + } + out := new(UpdateOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UpdateOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Verbs) DeepCopyInto(out *Verbs) { + { + in := &in + *out = make(Verbs, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Verbs. +func (in Verbs) DeepCopy() Verbs { + if in == nil { + return nil + } + out := new(Verbs) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WatchEvent) DeepCopyInto(out *WatchEvent) { + *out = *in + in.Object.DeepCopyInto(&out.Object) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WatchEvent. +func (in *WatchEvent) DeepCopy() *WatchEvent { + if in == nil { + return nil + } + out := new(WatchEvent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *WatchEvent) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go new file mode 100644 index 000000000..cce2e603a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go new file mode 100644 index 000000000..bc615dc3a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go @@ -0,0 +1,898 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "fmt" + "reflect" +) + +type typePair struct { + source reflect.Type + dest reflect.Type +} + +type typeNamePair struct { + fieldType reflect.Type + fieldName string +} + +// DebugLogger allows you to get debugging messages if necessary. +type DebugLogger interface { + Logf(format string, args ...interface{}) +} + +type NameFunc func(t reflect.Type) string + +var DefaultNameFunc = func(t reflect.Type) string { return t.Name() } + +// ConversionFunc converts the object a into the object b, reusing arrays or objects +// or pointers if necessary. It should return an error if the object cannot be converted +// or if some data is invalid. If you do not wish a and b to share fields or nested +// objects, you must copy a before calling this function. +type ConversionFunc func(a, b interface{}, scope Scope) error + +// Converter knows how to convert one type to another. +type Converter struct { + // Map from the conversion pair to a function which can + // do the conversion. + conversionFuncs ConversionFuncs + generatedConversionFuncs ConversionFuncs + + // Set of conversions that should be treated as a no-op + ignoredConversions map[typePair]struct{} + + // This is a map from a source field type and name, to a list of destination + // field type and name. + structFieldDests map[typeNamePair][]typeNamePair + + // Allows for the opposite lookup of structFieldDests. So that SourceFromDest + // copy flag also works. So this is a map of destination field name, to potential + // source field name and type to look for. + structFieldSources map[typeNamePair][]typeNamePair + + // Map from an input type to a function which can apply a key name mapping + inputFieldMappingFuncs map[reflect.Type]FieldMappingFunc + + // Map from an input type to a set of default conversion flags. + inputDefaultFlags map[reflect.Type]FieldMatchingFlags + + // If non-nil, will be called to print helpful debugging info. Quite verbose. + Debug DebugLogger + + // nameFunc is called to retrieve the name of a type; this name is used for the + // purpose of deciding whether two types match or not (i.e., will we attempt to + // do a conversion). The default returns the go type name. + nameFunc func(t reflect.Type) string +} + +// NewConverter creates a new Converter object. +func NewConverter(nameFn NameFunc) *Converter { + c := &Converter{ + conversionFuncs: NewConversionFuncs(), + generatedConversionFuncs: NewConversionFuncs(), + ignoredConversions: make(map[typePair]struct{}), + nameFunc: nameFn, + structFieldDests: make(map[typeNamePair][]typeNamePair), + structFieldSources: make(map[typeNamePair][]typeNamePair), + + inputFieldMappingFuncs: make(map[reflect.Type]FieldMappingFunc), + inputDefaultFlags: make(map[reflect.Type]FieldMatchingFlags), + } + c.RegisterConversionFunc(Convert_Slice_byte_To_Slice_byte) + return c +} + +// WithConversions returns a Converter that is a copy of c but with the additional +// fns merged on top. +func (c *Converter) WithConversions(fns ConversionFuncs) *Converter { + copied := *c + copied.conversionFuncs = c.conversionFuncs.Merge(fns) + return &copied +} + +// DefaultMeta returns the conversion FieldMappingFunc and meta for a given type. +func (c *Converter) DefaultMeta(t reflect.Type) (FieldMatchingFlags, *Meta) { + return c.inputDefaultFlags[t], &Meta{ + KeyNameMapping: c.inputFieldMappingFuncs[t], + } +} + +// Convert_Slice_byte_To_Slice_byte prevents recursing into every byte +func Convert_Slice_byte_To_Slice_byte(in *[]byte, out *[]byte, s Scope) error { + if *in == nil { + *out = nil + return nil + } + *out = make([]byte, len(*in)) + copy(*out, *in) + return nil +} + +// Scope is passed to conversion funcs to allow them to continue an ongoing conversion. +// If multiple converters exist in the system, Scope will allow you to use the correct one +// from a conversion function--that is, the one your conversion function was called by. +type Scope interface { + // Call Convert to convert sub-objects. Note that if you call it with your own exact + // parameters, you'll run out of stack space before anything useful happens. + Convert(src, dest interface{}, flags FieldMatchingFlags) error + + // DefaultConvert performs the default conversion, without calling a conversion func + // on the current stack frame. This makes it safe to call from a conversion func. + DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error + + // SrcTags and DestTags contain the struct tags that src and dest had, respectively. + // If the enclosing object was not a struct, then these will contain no tags, of course. + SrcTag() reflect.StructTag + DestTag() reflect.StructTag + + // Flags returns the flags with which the conversion was started. + Flags() FieldMatchingFlags + + // Meta returns any information originally passed to Convert. + Meta() *Meta +} + +// FieldMappingFunc can convert an input field value into different values, depending on +// the value of the source or destination struct tags. +type FieldMappingFunc func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string) + +func NewConversionFuncs() ConversionFuncs { + return ConversionFuncs{ + fns: make(map[typePair]reflect.Value), + untyped: make(map[typePair]ConversionFunc), + } +} + +type ConversionFuncs struct { + fns map[typePair]reflect.Value + untyped map[typePair]ConversionFunc +} + +// Add adds the provided conversion functions to the lookup table - they must have the signature +// `func(type1, type2, Scope) error`. Functions are added in the order passed and will override +// previously registered pairs. +func (c ConversionFuncs) Add(fns ...interface{}) error { + for _, fn := range fns { + fv := reflect.ValueOf(fn) + ft := fv.Type() + if err := verifyConversionFunctionSignature(ft); err != nil { + return err + } + c.fns[typePair{ft.In(0).Elem(), ft.In(1).Elem()}] = fv + } + return nil +} + +// AddUntyped adds the provided conversion function to the lookup table for the types that are +// supplied as a and b. a and b must be pointers or an error is returned. This method overwrites +// previously defined functions. +func (c ConversionFuncs) AddUntyped(a, b interface{}, fn ConversionFunc) error { + tA, tB := reflect.TypeOf(a), reflect.TypeOf(b) + if tA.Kind() != reflect.Ptr { + return fmt.Errorf("the type %T must be a pointer to register as an untyped conversion", a) + } + if tB.Kind() != reflect.Ptr { + return fmt.Errorf("the type %T must be a pointer to register as an untyped conversion", b) + } + c.untyped[typePair{tA, tB}] = fn + return nil +} + +// Merge returns a new ConversionFuncs that contains all conversions from +// both other and c, with other conversions taking precedence. +func (c ConversionFuncs) Merge(other ConversionFuncs) ConversionFuncs { + merged := NewConversionFuncs() + for k, v := range c.fns { + merged.fns[k] = v + } + for k, v := range other.fns { + merged.fns[k] = v + } + for k, v := range c.untyped { + merged.untyped[k] = v + } + for k, v := range other.untyped { + merged.untyped[k] = v + } + return merged +} + +// Meta is supplied by Scheme, when it calls Convert. +type Meta struct { + // KeyNameMapping is an optional function which may map the listed key (field name) + // into a source and destination value. + KeyNameMapping FieldMappingFunc + // Context is an optional field that callers may use to pass info to conversion functions. + Context interface{} +} + +// scope contains information about an ongoing conversion. +type scope struct { + converter *Converter + meta *Meta + flags FieldMatchingFlags + + // srcStack & destStack are separate because they may not have a 1:1 + // relationship. + srcStack scopeStack + destStack scopeStack +} + +type scopeStackElem struct { + tag reflect.StructTag + value reflect.Value + key string +} + +type scopeStack []scopeStackElem + +func (s *scopeStack) pop() { + n := len(*s) + *s = (*s)[:n-1] +} + +func (s *scopeStack) push(e scopeStackElem) { + *s = append(*s, e) +} + +func (s *scopeStack) top() *scopeStackElem { + return &(*s)[len(*s)-1] +} + +func (s scopeStack) describe() string { + desc := "" + if len(s) > 1 { + desc = "(" + s[1].value.Type().String() + ")" + } + for i, v := range s { + if i < 2 { + // First layer on stack is not real; second is handled specially above. + continue + } + if v.key == "" { + desc += fmt.Sprintf(".%v", v.value.Type()) + } else { + desc += fmt.Sprintf(".%v", v.key) + } + } + return desc +} + +// Formats src & dest as indices for printing. +func (s *scope) setIndices(src, dest int) { + s.srcStack.top().key = fmt.Sprintf("[%v]", src) + s.destStack.top().key = fmt.Sprintf("[%v]", dest) +} + +// Formats src & dest as map keys for printing. +func (s *scope) setKeys(src, dest interface{}) { + s.srcStack.top().key = fmt.Sprintf(`["%v"]`, src) + s.destStack.top().key = fmt.Sprintf(`["%v"]`, dest) +} + +// Convert continues a conversion. +func (s *scope) Convert(src, dest interface{}, flags FieldMatchingFlags) error { + return s.converter.Convert(src, dest, flags, s.meta) +} + +// DefaultConvert continues a conversion, performing a default conversion (no conversion func) +// for the current stack frame. +func (s *scope) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags) error { + return s.converter.DefaultConvert(src, dest, flags, s.meta) +} + +// SrcTag returns the tag of the struct containing the current source item, if any. +func (s *scope) SrcTag() reflect.StructTag { + return s.srcStack.top().tag +} + +// DestTag returns the tag of the struct containing the current dest item, if any. +func (s *scope) DestTag() reflect.StructTag { + return s.destStack.top().tag +} + +// Flags returns the flags with which the current conversion was started. +func (s *scope) Flags() FieldMatchingFlags { + return s.flags +} + +// Meta returns the meta object that was originally passed to Convert. +func (s *scope) Meta() *Meta { + return s.meta +} + +// describe prints the path to get to the current (source, dest) values. +func (s *scope) describe() (src, dest string) { + return s.srcStack.describe(), s.destStack.describe() +} + +// error makes an error that includes information about where we were in the objects +// we were asked to convert. +func (s *scope) errorf(message string, args ...interface{}) error { + srcPath, destPath := s.describe() + where := fmt.Sprintf("converting %v to %v: ", srcPath, destPath) + return fmt.Errorf(where+message, args...) +} + +// Verifies whether a conversion function has a correct signature. +func verifyConversionFunctionSignature(ft reflect.Type) error { + if ft.Kind() != reflect.Func { + return fmt.Errorf("expected func, got: %v", ft) + } + if ft.NumIn() != 3 { + return fmt.Errorf("expected three 'in' params, got: %v", ft) + } + if ft.NumOut() != 1 { + return fmt.Errorf("expected one 'out' param, got: %v", ft) + } + if ft.In(0).Kind() != reflect.Ptr { + return fmt.Errorf("expected pointer arg for 'in' param 0, got: %v", ft) + } + if ft.In(1).Kind() != reflect.Ptr { + return fmt.Errorf("expected pointer arg for 'in' param 1, got: %v", ft) + } + scopeType := Scope(nil) + if e, a := reflect.TypeOf(&scopeType).Elem(), ft.In(2); e != a { + return fmt.Errorf("expected '%v' arg for 'in' param 2, got '%v' (%v)", e, a, ft) + } + var forErrorType error + // This convolution is necessary, otherwise TypeOf picks up on the fact + // that forErrorType is nil. + errorType := reflect.TypeOf(&forErrorType).Elem() + if ft.Out(0) != errorType { + return fmt.Errorf("expected error return, got: %v", ft) + } + return nil +} + +// RegisterConversionFunc registers a conversion func with the +// Converter. conversionFunc must take three parameters: a pointer to the input +// type, a pointer to the output type, and a conversion.Scope (which should be +// used if recursive conversion calls are desired). It must return an error. +// +// Example: +// c.RegisterConversionFunc( +// func(in *Pod, out *v1.Pod, s Scope) error { +// // conversion logic... +// return nil +// }) +// DEPRECATED: Will be removed in favor of RegisterUntypedConversionFunc +func (c *Converter) RegisterConversionFunc(conversionFunc interface{}) error { + return c.conversionFuncs.Add(conversionFunc) +} + +// Similar to RegisterConversionFunc, but registers conversion function that were +// automatically generated. +// DEPRECATED: Will be removed in favor of RegisterGeneratedUntypedConversionFunc +func (c *Converter) RegisterGeneratedConversionFunc(conversionFunc interface{}) error { + return c.generatedConversionFuncs.Add(conversionFunc) +} + +// RegisterUntypedConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (c *Converter) RegisterUntypedConversionFunc(a, b interface{}, fn ConversionFunc) error { + return c.conversionFuncs.AddUntyped(a, b, fn) +} + +// RegisterGeneratedUntypedConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (c *Converter) RegisterGeneratedUntypedConversionFunc(a, b interface{}, fn ConversionFunc) error { + return c.generatedConversionFuncs.AddUntyped(a, b, fn) +} + +// RegisterIgnoredConversion registers a "no-op" for conversion, where any requested +// conversion between from and to is ignored. +func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error { + typeFrom := reflect.TypeOf(from) + typeTo := reflect.TypeOf(to) + if reflect.TypeOf(from).Kind() != reflect.Ptr { + return fmt.Errorf("expected pointer arg for 'from' param 0, got: %v", typeFrom) + } + if typeTo.Kind() != reflect.Ptr { + return fmt.Errorf("expected pointer arg for 'to' param 1, got: %v", typeTo) + } + c.ignoredConversions[typePair{typeFrom.Elem(), typeTo.Elem()}] = struct{}{} + return nil +} + +// RegisterInputDefaults registers a field name mapping function, used when converting +// from maps to structs. Inputs to the conversion methods are checked for this type and a mapping +// applied automatically if the input matches in. A set of default flags for the input conversion +// may also be provided, which will be used when no explicit flags are requested. +func (c *Converter) RegisterInputDefaults(in interface{}, fn FieldMappingFunc, defaultFlags FieldMatchingFlags) error { + fv := reflect.ValueOf(in) + ft := fv.Type() + if ft.Kind() != reflect.Ptr { + return fmt.Errorf("expected pointer 'in' argument, got: %v", ft) + } + c.inputFieldMappingFuncs[ft] = fn + c.inputDefaultFlags[ft] = defaultFlags + return nil +} + +// FieldMatchingFlags contains a list of ways in which struct fields could be +// copied. These constants may be | combined. +type FieldMatchingFlags int + +const ( + // Loop through destination fields, search for matching source + // field to copy it from. Source fields with no corresponding + // destination field will be ignored. If SourceToDest is + // specified, this flag is ignored. If neither is specified, + // or no flags are passed, this flag is the default. + DestFromSource FieldMatchingFlags = 0 + // Loop through source fields, search for matching dest field + // to copy it into. Destination fields with no corresponding + // source field will be ignored. + SourceToDest FieldMatchingFlags = 1 << iota + // Don't treat it as an error if the corresponding source or + // dest field can't be found. + IgnoreMissingFields + // Don't require type names to match. + AllowDifferentFieldTypeNames +) + +// IsSet returns true if the given flag or combination of flags is set. +func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool { + if flag == DestFromSource { + // The bit logic doesn't work on the default value. + return f&SourceToDest != SourceToDest + } + return f&flag == flag +} + +// Convert will translate src to dest if it knows how. Both must be pointers. +// If no conversion func is registered and the default copying mechanism +// doesn't work on this type pair, an error will be returned. +// Read the comments on the various FieldMatchingFlags constants to understand +// what the 'flags' parameter does. +// 'meta' is given to allow you to pass information to conversion functions, +// it is not used by Convert() other than storing it in the scope. +// Not safe for objects with cyclic references! +func (c *Converter) Convert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { + return c.doConversion(src, dest, flags, meta, c.convert) +} + +// DefaultConvert will translate src to dest if it knows how. Both must be pointers. +// No conversion func is used. If the default copying mechanism +// doesn't work on this type pair, an error will be returned. +// Read the comments on the various FieldMatchingFlags constants to understand +// what the 'flags' parameter does. +// 'meta' is given to allow you to pass information to conversion functions, +// it is not used by DefaultConvert() other than storing it in the scope. +// Not safe for objects with cyclic references! +func (c *Converter) DefaultConvert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { + return c.doConversion(src, dest, flags, meta, c.defaultConvert) +} + +type conversionFunc func(sv, dv reflect.Value, scope *scope) error + +func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags, meta *Meta, f conversionFunc) error { + pair := typePair{reflect.TypeOf(src), reflect.TypeOf(dest)} + scope := &scope{ + converter: c, + flags: flags, + meta: meta, + } + if fn, ok := c.conversionFuncs.untyped[pair]; ok { + return fn(src, dest, scope) + } + if fn, ok := c.generatedConversionFuncs.untyped[pair]; ok { + return fn(src, dest, scope) + } + // TODO: consider everything past this point deprecated - we want to support only point to point top level + // conversions + + dv, err := EnforcePtr(dest) + if err != nil { + return err + } + if !dv.CanAddr() && !dv.CanSet() { + return fmt.Errorf("can't write to dest") + } + sv, err := EnforcePtr(src) + if err != nil { + return err + } + // Leave something on the stack, so that calls to struct tag getters never fail. + scope.srcStack.push(scopeStackElem{}) + scope.destStack.push(scopeStackElem{}) + return f(sv, dv, scope) +} + +// callCustom calls 'custom' with sv & dv. custom must be a conversion function. +func (c *Converter) callCustom(sv, dv, custom reflect.Value, scope *scope) error { + if !sv.CanAddr() { + sv2 := reflect.New(sv.Type()) + sv2.Elem().Set(sv) + sv = sv2 + } else { + sv = sv.Addr() + } + if !dv.CanAddr() { + if !dv.CanSet() { + return scope.errorf("can't addr or set dest.") + } + dvOrig := dv + dv := reflect.New(dvOrig.Type()) + defer func() { dvOrig.Set(dv) }() + } else { + dv = dv.Addr() + } + args := []reflect.Value{sv, dv, reflect.ValueOf(scope)} + ret := custom.Call(args)[0].Interface() + // This convolution is necessary because nil interfaces won't convert + // to errors. + if ret == nil { + return nil + } + return ret.(error) +} + +// convert recursively copies sv into dv, calling an appropriate conversion function if +// one is registered. +func (c *Converter) convert(sv, dv reflect.Value, scope *scope) error { + dt, st := dv.Type(), sv.Type() + pair := typePair{st, dt} + + // ignore conversions of this type + if _, ok := c.ignoredConversions[pair]; ok { + if c.Debug != nil { + c.Debug.Logf("Ignoring conversion of '%v' to '%v'", st, dt) + } + return nil + } + + // Convert sv to dv. + if fv, ok := c.conversionFuncs.fns[pair]; ok { + if c.Debug != nil { + c.Debug.Logf("Calling custom conversion of '%v' to '%v'", st, dt) + } + return c.callCustom(sv, dv, fv, scope) + } + if fv, ok := c.generatedConversionFuncs.fns[pair]; ok { + if c.Debug != nil { + c.Debug.Logf("Calling generated conversion of '%v' to '%v'", st, dt) + } + return c.callCustom(sv, dv, fv, scope) + } + + return c.defaultConvert(sv, dv, scope) +} + +// defaultConvert recursively copies sv into dv. no conversion function is called +// for the current stack frame (but conversion functions may be called for nested objects) +func (c *Converter) defaultConvert(sv, dv reflect.Value, scope *scope) error { + dt, st := dv.Type(), sv.Type() + + if !dv.CanSet() { + return scope.errorf("Cannot set dest. (Tried to deep copy something with unexported fields?)") + } + + if !scope.flags.IsSet(AllowDifferentFieldTypeNames) && c.nameFunc(dt) != c.nameFunc(st) { + return scope.errorf( + "type names don't match (%v, %v), and no conversion 'func (%v, %v) error' registered.", + c.nameFunc(st), c.nameFunc(dt), st, dt) + } + + switch st.Kind() { + case reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface, reflect.Struct: + // Don't copy these via assignment/conversion! + default: + // This should handle all simple types. + if st.AssignableTo(dt) { + dv.Set(sv) + return nil + } + if st.ConvertibleTo(dt) { + dv.Set(sv.Convert(dt)) + return nil + } + } + + if c.Debug != nil { + c.Debug.Logf("Trying to convert '%v' to '%v'", st, dt) + } + + scope.srcStack.push(scopeStackElem{value: sv}) + scope.destStack.push(scopeStackElem{value: dv}) + defer scope.srcStack.pop() + defer scope.destStack.pop() + + switch dv.Kind() { + case reflect.Struct: + return c.convertKV(toKVValue(sv), toKVValue(dv), scope) + case reflect.Slice: + if sv.IsNil() { + // Don't make a zero-length slice. + dv.Set(reflect.Zero(dt)) + return nil + } + dv.Set(reflect.MakeSlice(dt, sv.Len(), sv.Cap())) + for i := 0; i < sv.Len(); i++ { + scope.setIndices(i, i) + if err := c.convert(sv.Index(i), dv.Index(i), scope); err != nil { + return err + } + } + case reflect.Ptr: + if sv.IsNil() { + // Don't copy a nil ptr! + dv.Set(reflect.Zero(dt)) + return nil + } + dv.Set(reflect.New(dt.Elem())) + switch st.Kind() { + case reflect.Ptr, reflect.Interface: + return c.convert(sv.Elem(), dv.Elem(), scope) + default: + return c.convert(sv, dv.Elem(), scope) + } + case reflect.Map: + if sv.IsNil() { + // Don't copy a nil ptr! + dv.Set(reflect.Zero(dt)) + return nil + } + dv.Set(reflect.MakeMap(dt)) + for _, sk := range sv.MapKeys() { + dk := reflect.New(dt.Key()).Elem() + if err := c.convert(sk, dk, scope); err != nil { + return err + } + dkv := reflect.New(dt.Elem()).Elem() + scope.setKeys(sk.Interface(), dk.Interface()) + // TODO: sv.MapIndex(sk) may return a value with CanAddr() == false, + // because a map[string]struct{} does not allow a pointer reference. + // Calling a custom conversion function defined for the map value + // will panic. Example is PodInfo map[string]ContainerStatus. + if err := c.convert(sv.MapIndex(sk), dkv, scope); err != nil { + return err + } + dv.SetMapIndex(dk, dkv) + } + case reflect.Interface: + if sv.IsNil() { + // Don't copy a nil interface! + dv.Set(reflect.Zero(dt)) + return nil + } + tmpdv := reflect.New(sv.Elem().Type()).Elem() + if err := c.convert(sv.Elem(), tmpdv, scope); err != nil { + return err + } + dv.Set(reflect.ValueOf(tmpdv.Interface())) + return nil + default: + return scope.errorf("couldn't copy '%v' into '%v'; didn't understand types", st, dt) + } + return nil +} + +var stringType = reflect.TypeOf("") + +func toKVValue(v reflect.Value) kvValue { + switch v.Kind() { + case reflect.Struct: + return structAdaptor(v) + case reflect.Map: + if v.Type().Key().AssignableTo(stringType) { + return stringMapAdaptor(v) + } + } + + return nil +} + +// kvValue lets us write the same conversion logic to work with both maps +// and structs. Only maps with string keys make sense for this. +type kvValue interface { + // returns all keys, as a []string. + keys() []string + // Will just return "" for maps. + tagOf(key string) reflect.StructTag + // Will return the zero Value if the key doesn't exist. + value(key string) reflect.Value + // Maps require explicit setting-- will do nothing for structs. + // Returns false on failure. + confirmSet(key string, v reflect.Value) bool +} + +type stringMapAdaptor reflect.Value + +func (a stringMapAdaptor) len() int { + return reflect.Value(a).Len() +} + +func (a stringMapAdaptor) keys() []string { + v := reflect.Value(a) + keys := make([]string, v.Len()) + for i, v := range v.MapKeys() { + if v.IsNil() { + continue + } + switch t := v.Interface().(type) { + case string: + keys[i] = t + } + } + return keys +} + +func (a stringMapAdaptor) tagOf(key string) reflect.StructTag { + return "" +} + +func (a stringMapAdaptor) value(key string) reflect.Value { + return reflect.Value(a).MapIndex(reflect.ValueOf(key)) +} + +func (a stringMapAdaptor) confirmSet(key string, v reflect.Value) bool { + return true +} + +type structAdaptor reflect.Value + +func (a structAdaptor) len() int { + v := reflect.Value(a) + return v.Type().NumField() +} + +func (a structAdaptor) keys() []string { + v := reflect.Value(a) + t := v.Type() + keys := make([]string, t.NumField()) + for i := range keys { + keys[i] = t.Field(i).Name + } + return keys +} + +func (a structAdaptor) tagOf(key string) reflect.StructTag { + v := reflect.Value(a) + field, ok := v.Type().FieldByName(key) + if ok { + return field.Tag + } + return "" +} + +func (a structAdaptor) value(key string) reflect.Value { + v := reflect.Value(a) + return v.FieldByName(key) +} + +func (a structAdaptor) confirmSet(key string, v reflect.Value) bool { + return true +} + +// convertKV can convert things that consist of key/value pairs, like structs +// and some maps. +func (c *Converter) convertKV(skv, dkv kvValue, scope *scope) error { + if skv == nil || dkv == nil { + // TODO: add keys to stack to support really understandable error messages. + return fmt.Errorf("Unable to convert %#v to %#v", skv, dkv) + } + + lister := dkv + if scope.flags.IsSet(SourceToDest) { + lister = skv + } + + var mapping FieldMappingFunc + if scope.meta != nil && scope.meta.KeyNameMapping != nil { + mapping = scope.meta.KeyNameMapping + } + + for _, key := range lister.keys() { + if found, err := c.checkField(key, skv, dkv, scope); found { + if err != nil { + return err + } + continue + } + stag := skv.tagOf(key) + dtag := dkv.tagOf(key) + skey := key + dkey := key + if mapping != nil { + skey, dkey = scope.meta.KeyNameMapping(key, stag, dtag) + } + + df := dkv.value(dkey) + sf := skv.value(skey) + if !df.IsValid() || !sf.IsValid() { + switch { + case scope.flags.IsSet(IgnoreMissingFields): + // No error. + case scope.flags.IsSet(SourceToDest): + return scope.errorf("%v not present in dest", dkey) + default: + return scope.errorf("%v not present in src", skey) + } + continue + } + scope.srcStack.top().key = skey + scope.srcStack.top().tag = stag + scope.destStack.top().key = dkey + scope.destStack.top().tag = dtag + if err := c.convert(sf, df, scope); err != nil { + return err + } + } + return nil +} + +// checkField returns true if the field name matches any of the struct +// field copying rules. The error should be ignored if it returns false. +func (c *Converter) checkField(fieldName string, skv, dkv kvValue, scope *scope) (bool, error) { + replacementMade := false + if scope.flags.IsSet(DestFromSource) { + df := dkv.value(fieldName) + if !df.IsValid() { + return false, nil + } + destKey := typeNamePair{df.Type(), fieldName} + // Check each of the potential source (type, name) pairs to see if they're + // present in sv. + for _, potentialSourceKey := range c.structFieldSources[destKey] { + sf := skv.value(potentialSourceKey.fieldName) + if !sf.IsValid() { + continue + } + if sf.Type() == potentialSourceKey.fieldType { + // Both the source's name and type matched, so copy. + scope.srcStack.top().key = potentialSourceKey.fieldName + scope.destStack.top().key = fieldName + if err := c.convert(sf, df, scope); err != nil { + return true, err + } + dkv.confirmSet(fieldName, df) + replacementMade = true + } + } + return replacementMade, nil + } + + sf := skv.value(fieldName) + if !sf.IsValid() { + return false, nil + } + srcKey := typeNamePair{sf.Type(), fieldName} + // Check each of the potential dest (type, name) pairs to see if they're + // present in dv. + for _, potentialDestKey := range c.structFieldDests[srcKey] { + df := dkv.value(potentialDestKey.fieldName) + if !df.IsValid() { + continue + } + if df.Type() == potentialDestKey.fieldType { + // Both the dest's name and type matched, so copy. + scope.srcStack.top().key = fieldName + scope.destStack.top().key = potentialDestKey.fieldName + if err := c.convert(sf, df, scope); err != nil { + return true, err + } + dkv.confirmSet(potentialDestKey.fieldName, df) + replacementMade = true + } + } + return replacementMade, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go b/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go new file mode 100644 index 000000000..f21abe1e5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/deep_equal.go @@ -0,0 +1,36 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "k8s.io/apimachinery/third_party/forked/golang/reflect" +) + +// The code for this type must be located in third_party, since it forks from +// go std lib. But for convenience, we expose the type here, too. +type Equalities struct { + reflect.Equalities +} + +// For convenience, panics on errors +func EqualitiesOrDie(funcs ...interface{}) Equalities { + e := Equalities{reflect.Equalities{}} + if err := e.AddFuncs(funcs...); err != nil { + panic(err) + } + return e +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go new file mode 100644 index 000000000..7415d8164 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/doc.go @@ -0,0 +1,24 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package conversion provides go object versioning. +// +// Specifically, conversion provides a way for you to define multiple versions +// of the same object. You may write functions which implement conversion logic, +// but for the fields which did not change, copying is automated. This makes it +// easy to modify the structures you use in memory without affecting the format +// you store on disk or respond to in your external API calls. +package conversion // import "k8s.io/apimachinery/pkg/conversion" diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/helper.go b/vendor/k8s.io/apimachinery/pkg/conversion/helper.go new file mode 100644 index 000000000..4ebc1ebc5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/helper.go @@ -0,0 +1,39 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "fmt" + "reflect" +) + +// EnforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value +// of the dereferenced pointer, ensuring that it is settable/addressable. +// Returns an error if this is not possible. +func EnforcePtr(obj interface{}) (reflect.Value, error) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + if v.Kind() == reflect.Invalid { + return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind") + } + return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type()) + } + if v.IsNil() { + return reflect.Value{}, fmt.Errorf("expected pointer, but got nil") + } + return v.Elem(), nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go new file mode 100644 index 000000000..b3804aa42 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go @@ -0,0 +1,198 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package queryparams + +import ( + "fmt" + "net/url" + "reflect" + "strings" +) + +// Marshaler converts an object to a query parameter string representation +type Marshaler interface { + MarshalQueryParameter() (string, error) +} + +// Unmarshaler converts a string representation to an object +type Unmarshaler interface { + UnmarshalQueryParameter(string) error +} + +func jsonTag(field reflect.StructField) (string, bool) { + structTag := field.Tag.Get("json") + if len(structTag) == 0 { + return "", false + } + parts := strings.Split(structTag, ",") + tag := parts[0] + if tag == "-" { + tag = "" + } + omitempty := false + parts = parts[1:] + for _, part := range parts { + if part == "omitempty" { + omitempty = true + break + } + } + return tag, omitempty +} + +func formatValue(value interface{}) string { + return fmt.Sprintf("%v", value) +} + +func isPointerKind(kind reflect.Kind) bool { + return kind == reflect.Ptr +} + +func isStructKind(kind reflect.Kind) bool { + return kind == reflect.Struct +} + +func isValueKind(kind reflect.Kind) bool { + switch kind { + case reflect.String, reflect.Bool, reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, + reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, + reflect.Float64, reflect.Complex64, reflect.Complex128: + return true + default: + return false + } +} + +func zeroValue(value reflect.Value) bool { + return reflect.DeepEqual(reflect.Zero(value.Type()).Interface(), value.Interface()) +} + +func customMarshalValue(value reflect.Value) (reflect.Value, bool) { + // Return unless we implement a custom query marshaler + if !value.CanInterface() { + return reflect.Value{}, false + } + + marshaler, ok := value.Interface().(Marshaler) + if !ok { + if !isPointerKind(value.Kind()) && value.CanAddr() { + marshaler, ok = value.Addr().Interface().(Marshaler) + if !ok { + return reflect.Value{}, false + } + } else { + return reflect.Value{}, false + } + } + + // Don't invoke functions on nil pointers + // If the type implements MarshalQueryParameter, AND the tag is not omitempty, AND the value is a nil pointer, "" seems like a reasonable response + if isPointerKind(value.Kind()) && zeroValue(value) { + return reflect.ValueOf(""), true + } + + // Get the custom marshalled value + v, err := marshaler.MarshalQueryParameter() + if err != nil { + return reflect.Value{}, false + } + return reflect.ValueOf(v), true +} + +func addParam(values url.Values, tag string, omitempty bool, value reflect.Value) { + if omitempty && zeroValue(value) { + return + } + val := "" + iValue := fmt.Sprintf("%v", value.Interface()) + + if iValue != "" { + val = iValue + } + values.Add(tag, val) +} + +func addListOfParams(values url.Values, tag string, omitempty bool, list reflect.Value) { + for i := 0; i < list.Len(); i++ { + addParam(values, tag, omitempty, list.Index(i)) + } +} + +// Convert takes an object and converts it to a url.Values object using JSON tags as +// parameter names. Only top-level simple values, arrays, and slices are serialized. +// Embedded structs, maps, etc. will not be serialized. +func Convert(obj interface{}) (url.Values, error) { + result := url.Values{} + if obj == nil { + return result, nil + } + var sv reflect.Value + switch reflect.TypeOf(obj).Kind() { + case reflect.Ptr, reflect.Interface: + sv = reflect.ValueOf(obj).Elem() + default: + return nil, fmt.Errorf("expecting a pointer or interface") + } + st := sv.Type() + if !isStructKind(st.Kind()) { + return nil, fmt.Errorf("expecting a pointer to a struct") + } + + // Check all object fields + convertStruct(result, st, sv) + + return result, nil +} + +func convertStruct(result url.Values, st reflect.Type, sv reflect.Value) { + for i := 0; i < st.NumField(); i++ { + field := sv.Field(i) + tag, omitempty := jsonTag(st.Field(i)) + if len(tag) == 0 { + continue + } + ft := field.Type() + + kind := ft.Kind() + if isPointerKind(kind) { + ft = ft.Elem() + kind = ft.Kind() + if !field.IsNil() { + field = reflect.Indirect(field) + // If the field is non-nil, it should be added to params + // and the omitempty should be overwite to false + omitempty = false + } + } + + switch { + case isValueKind(kind): + addParam(result, tag, omitempty, field) + case kind == reflect.Array || kind == reflect.Slice: + if isValueKind(ft.Elem().Kind()) { + addListOfParams(result, tag, omitempty, field) + } + case isStructKind(kind) && !(zeroValue(field) && omitempty): + if marshalValue, ok := customMarshalValue(field); ok { + addParam(result, tag, omitempty, marshalValue) + } else { + convertStruct(result, ft, field) + } + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go new file mode 100644 index 000000000..7b763de6f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package queryparams provides conversion from versioned +// runtime objects to URL query values +package queryparams // import "k8s.io/apimachinery/pkg/conversion/queryparams" diff --git a/vendor/k8s.io/apimachinery/pkg/fields/doc.go b/vendor/k8s.io/apimachinery/pkg/fields/doc.go new file mode 100644 index 000000000..c39b8039a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/fields/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fields implements a simple field system, parsing and matching +// selectors with sets of fields. +package fields // import "k8s.io/apimachinery/pkg/fields" diff --git a/vendor/k8s.io/apimachinery/pkg/fields/fields.go b/vendor/k8s.io/apimachinery/pkg/fields/fields.go new file mode 100644 index 000000000..623b27e95 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/fields/fields.go @@ -0,0 +1,62 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fields + +import ( + "sort" + "strings" +) + +// Fields allows you to present fields independently from their storage. +type Fields interface { + // Has returns whether the provided field exists. + Has(field string) (exists bool) + + // Get returns the value for the provided field. + Get(field string) (value string) +} + +// Set is a map of field:value. It implements Fields. +type Set map[string]string + +// String returns all fields listed as a human readable string. +// Conveniently, exactly the format that ParseSelector takes. +func (ls Set) String() string { + selector := make([]string, 0, len(ls)) + for key, value := range ls { + selector = append(selector, key+"="+value) + } + // Sort for determinism. + sort.StringSlice(selector).Sort() + return strings.Join(selector, ",") +} + +// Has returns whether the provided field exists in the map. +func (ls Set) Has(field string) bool { + _, exists := ls[field] + return exists +} + +// Get returns the value in the map for the provided field. +func (ls Set) Get(field string) string { + return ls[field] +} + +// AsSelector converts fields into a selectors. +func (ls Set) AsSelector() Selector { + return SelectorFromSet(ls) +} diff --git a/vendor/k8s.io/apimachinery/pkg/fields/requirements.go b/vendor/k8s.io/apimachinery/pkg/fields/requirements.go new file mode 100644 index 000000000..70d94ded8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/fields/requirements.go @@ -0,0 +1,30 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fields + +import "k8s.io/apimachinery/pkg/selection" + +// Requirements is AND of all requirements. +type Requirements []Requirement + +// Requirement contains a field, a value, and an operator that relates the field and value. +// This is currently for reading internal selection information of field selector. +type Requirement struct { + Operator selection.Operator + Field string + Value string +} diff --git a/vendor/k8s.io/apimachinery/pkg/fields/selector.go b/vendor/k8s.io/apimachinery/pkg/fields/selector.go new file mode 100644 index 000000000..e3e4453b6 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/fields/selector.go @@ -0,0 +1,476 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fields + +import ( + "bytes" + "fmt" + "sort" + "strings" + + "k8s.io/apimachinery/pkg/selection" +) + +// Selector represents a field selector. +type Selector interface { + // Matches returns true if this selector matches the given set of fields. + Matches(Fields) bool + + // Empty returns true if this selector does not restrict the selection space. + Empty() bool + + // RequiresExactMatch allows a caller to introspect whether a given selector + // requires a single specific field to be set, and if so returns the value it + // requires. + RequiresExactMatch(field string) (value string, found bool) + + // Transform returns a new copy of the selector after TransformFunc has been + // applied to the entire selector, or an error if fn returns an error. + // If for a given requirement both field and value are transformed to empty + // string, the requirement is skipped. + Transform(fn TransformFunc) (Selector, error) + + // Requirements converts this interface to Requirements to expose + // more detailed selection information. + Requirements() Requirements + + // String returns a human readable string that represents this selector. + String() string + + // Make a deep copy of the selector. + DeepCopySelector() Selector +} + +type nothingSelector struct{} + +func (n nothingSelector) Matches(_ Fields) bool { return false } +func (n nothingSelector) Empty() bool { return false } +func (n nothingSelector) String() string { return "" } +func (n nothingSelector) Requirements() Requirements { return nil } +func (n nothingSelector) DeepCopySelector() Selector { return n } +func (n nothingSelector) RequiresExactMatch(field string) (value string, found bool) { return "", false } +func (n nothingSelector) Transform(fn TransformFunc) (Selector, error) { return n, nil } + +// Nothing returns a selector that matches no fields +func Nothing() Selector { + return nothingSelector{} +} + +// Everything returns a selector that matches all fields. +func Everything() Selector { + return andTerm{} +} + +type hasTerm struct { + field, value string +} + +func (t *hasTerm) Matches(ls Fields) bool { + return ls.Get(t.field) == t.value +} + +func (t *hasTerm) Empty() bool { + return false +} + +func (t *hasTerm) RequiresExactMatch(field string) (value string, found bool) { + if t.field == field { + return t.value, true + } + return "", false +} + +func (t *hasTerm) Transform(fn TransformFunc) (Selector, error) { + field, value, err := fn(t.field, t.value) + if err != nil { + return nil, err + } + if len(field) == 0 && len(value) == 0 { + return Everything(), nil + } + return &hasTerm{field, value}, nil +} + +func (t *hasTerm) Requirements() Requirements { + return []Requirement{{ + Field: t.field, + Operator: selection.Equals, + Value: t.value, + }} +} + +func (t *hasTerm) String() string { + return fmt.Sprintf("%v=%v", t.field, EscapeValue(t.value)) +} + +func (t *hasTerm) DeepCopySelector() Selector { + if t == nil { + return nil + } + out := new(hasTerm) + *out = *t + return out +} + +type notHasTerm struct { + field, value string +} + +func (t *notHasTerm) Matches(ls Fields) bool { + return ls.Get(t.field) != t.value +} + +func (t *notHasTerm) Empty() bool { + return false +} + +func (t *notHasTerm) RequiresExactMatch(field string) (value string, found bool) { + return "", false +} + +func (t *notHasTerm) Transform(fn TransformFunc) (Selector, error) { + field, value, err := fn(t.field, t.value) + if err != nil { + return nil, err + } + if len(field) == 0 && len(value) == 0 { + return Everything(), nil + } + return ¬HasTerm{field, value}, nil +} + +func (t *notHasTerm) Requirements() Requirements { + return []Requirement{{ + Field: t.field, + Operator: selection.NotEquals, + Value: t.value, + }} +} + +func (t *notHasTerm) String() string { + return fmt.Sprintf("%v!=%v", t.field, EscapeValue(t.value)) +} + +func (t *notHasTerm) DeepCopySelector() Selector { + if t == nil { + return nil + } + out := new(notHasTerm) + *out = *t + return out +} + +type andTerm []Selector + +func (t andTerm) Matches(ls Fields) bool { + for _, q := range t { + if !q.Matches(ls) { + return false + } + } + return true +} + +func (t andTerm) Empty() bool { + if t == nil { + return true + } + if len([]Selector(t)) == 0 { + return true + } + for i := range t { + if !t[i].Empty() { + return false + } + } + return true +} + +func (t andTerm) RequiresExactMatch(field string) (string, bool) { + if t == nil || len([]Selector(t)) == 0 { + return "", false + } + for i := range t { + if value, found := t[i].RequiresExactMatch(field); found { + return value, found + } + } + return "", false +} + +func (t andTerm) Transform(fn TransformFunc) (Selector, error) { + next := make([]Selector, 0, len([]Selector(t))) + for _, s := range []Selector(t) { + n, err := s.Transform(fn) + if err != nil { + return nil, err + } + if !n.Empty() { + next = append(next, n) + } + } + return andTerm(next), nil +} + +func (t andTerm) Requirements() Requirements { + reqs := make([]Requirement, 0, len(t)) + for _, s := range []Selector(t) { + rs := s.Requirements() + reqs = append(reqs, rs...) + } + return reqs +} + +func (t andTerm) String() string { + var terms []string + for _, q := range t { + terms = append(terms, q.String()) + } + return strings.Join(terms, ",") +} + +func (t andTerm) DeepCopySelector() Selector { + if t == nil { + return nil + } + out := make([]Selector, len(t)) + for i := range t { + out[i] = t[i].DeepCopySelector() + } + return andTerm(out) +} + +// SelectorFromSet returns a Selector which will match exactly the given Set. A +// nil Set is considered equivalent to Everything(). +func SelectorFromSet(ls Set) Selector { + if ls == nil { + return Everything() + } + items := make([]Selector, 0, len(ls)) + for field, value := range ls { + items = append(items, &hasTerm{field: field, value: value}) + } + if len(items) == 1 { + return items[0] + } + return andTerm(items) +} + +// valueEscaper prefixes \,= characters with a backslash +var valueEscaper = strings.NewReplacer( + // escape \ characters + `\`, `\\`, + // then escape , and = characters to allow unambiguous parsing of the value in a fieldSelector + `,`, `\,`, + `=`, `\=`, +) + +// EscapeValue escapes an arbitrary literal string for use as a fieldSelector value +func EscapeValue(s string) string { + return valueEscaper.Replace(s) +} + +// InvalidEscapeSequence indicates an error occurred unescaping a field selector +type InvalidEscapeSequence struct { + sequence string +} + +func (i InvalidEscapeSequence) Error() string { + return fmt.Sprintf("invalid field selector: invalid escape sequence: %s", i.sequence) +} + +// UnescapedRune indicates an error occurred unescaping a field selector +type UnescapedRune struct { + r rune +} + +func (i UnescapedRune) Error() string { + return fmt.Sprintf("invalid field selector: unescaped character in value: %v", i.r) +} + +// UnescapeValue unescapes a fieldSelector value and returns the original literal value. +// May return the original string if it contains no escaped or special characters. +func UnescapeValue(s string) (string, error) { + // if there's no escaping or special characters, just return to avoid allocation + if !strings.ContainsAny(s, `\,=`) { + return s, nil + } + + v := bytes.NewBuffer(make([]byte, 0, len(s))) + inSlash := false + for _, c := range s { + if inSlash { + switch c { + case '\\', ',', '=': + // omit the \ for recognized escape sequences + v.WriteRune(c) + default: + // error on unrecognized escape sequences + return "", InvalidEscapeSequence{sequence: string([]rune{'\\', c})} + } + inSlash = false + continue + } + + switch c { + case '\\': + inSlash = true + case ',', '=': + // unescaped , and = characters are not allowed in field selector values + return "", UnescapedRune{r: c} + default: + v.WriteRune(c) + } + } + + // Ending with a single backslash is an invalid sequence + if inSlash { + return "", InvalidEscapeSequence{sequence: "\\"} + } + + return v.String(), nil +} + +// ParseSelectorOrDie takes a string representing a selector and returns an +// object suitable for matching, or panic when an error occur. +func ParseSelectorOrDie(s string) Selector { + selector, err := ParseSelector(s) + if err != nil { + panic(err) + } + return selector +} + +// ParseSelector takes a string representing a selector and returns an +// object suitable for matching, or an error. +func ParseSelector(selector string) (Selector, error) { + return parseSelector(selector, + func(lhs, rhs string) (newLhs, newRhs string, err error) { + return lhs, rhs, nil + }) +} + +// ParseAndTransformSelector parses the selector and runs them through the given TransformFunc. +func ParseAndTransformSelector(selector string, fn TransformFunc) (Selector, error) { + return parseSelector(selector, fn) +} + +// TransformFunc transforms selectors. +type TransformFunc func(field, value string) (newField, newValue string, err error) + +// splitTerms returns the comma-separated terms contained in the given fieldSelector. +// Backslash-escaped commas are treated as data instead of delimiters, and are included in the returned terms, with the leading backslash preserved. +func splitTerms(fieldSelector string) []string { + if len(fieldSelector) == 0 { + return nil + } + + terms := make([]string, 0, 1) + startIndex := 0 + inSlash := false + for i, c := range fieldSelector { + switch { + case inSlash: + inSlash = false + case c == '\\': + inSlash = true + case c == ',': + terms = append(terms, fieldSelector[startIndex:i]) + startIndex = i + 1 + } + } + + terms = append(terms, fieldSelector[startIndex:]) + + return terms +} + +const ( + notEqualOperator = "!=" + doubleEqualOperator = "==" + equalOperator = "=" +) + +// termOperators holds the recognized operators supported in fieldSelectors. +// doubleEqualOperator and equal are equivalent, but doubleEqualOperator is checked first +// to avoid leaving a leading = character on the rhs value. +var termOperators = []string{notEqualOperator, doubleEqualOperator, equalOperator} + +// splitTerm returns the lhs, operator, and rhs parsed from the given term, along with an indicator of whether the parse was successful. +// no escaping of special characters is supported in the lhs value, so the first occurrence of a recognized operator is used as the split point. +// the literal rhs is returned, and the caller is responsible for applying any desired unescaping. +func splitTerm(term string) (lhs, op, rhs string, ok bool) { + for i := range term { + remaining := term[i:] + for _, op := range termOperators { + if strings.HasPrefix(remaining, op) { + return term[0:i], op, term[i+len(op):], true + } + } + } + return "", "", "", false +} + +func parseSelector(selector string, fn TransformFunc) (Selector, error) { + parts := splitTerms(selector) + sort.StringSlice(parts).Sort() + var items []Selector + for _, part := range parts { + if part == "" { + continue + } + lhs, op, rhs, ok := splitTerm(part) + if !ok { + return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part) + } + unescapedRHS, err := UnescapeValue(rhs) + if err != nil { + return nil, err + } + switch op { + case notEqualOperator: + items = append(items, ¬HasTerm{field: lhs, value: unescapedRHS}) + case doubleEqualOperator: + items = append(items, &hasTerm{field: lhs, value: unescapedRHS}) + case equalOperator: + items = append(items, &hasTerm{field: lhs, value: unescapedRHS}) + default: + return nil, fmt.Errorf("invalid selector: '%s'; can't understand '%s'", selector, part) + } + } + if len(items) == 1 { + return items[0].Transform(fn) + } + return andTerm(items).Transform(fn) +} + +// OneTermEqualSelector returns an object that matches objects where one field/field equals one value. +// Cannot return an error. +func OneTermEqualSelector(k, v string) Selector { + return &hasTerm{field: k, value: v} +} + +// OneTermNotEqualSelector returns an object that matches objects where one field/field does not equal one value. +// Cannot return an error. +func OneTermNotEqualSelector(k, v string) Selector { + return ¬HasTerm{field: k, value: v} +} + +// AndSelectors creates a selector that is the logical AND of all the given selectors +func AndSelectors(selectors ...Selector) Selector { + return andTerm(selectors) +} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/doc.go b/vendor/k8s.io/apimachinery/pkg/labels/doc.go new file mode 100644 index 000000000..82de0051b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/labels/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package labels implements a simple label system, parsing and matching +// selectors with sets of labels. +package labels // import "k8s.io/apimachinery/pkg/labels" diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/labels/labels.go new file mode 100644 index 000000000..32db4d96f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/labels/labels.go @@ -0,0 +1,181 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package labels + +import ( + "fmt" + "sort" + "strings" +) + +// Labels allows you to present labels independently from their storage. +type Labels interface { + // Has returns whether the provided label exists. + Has(label string) (exists bool) + + // Get returns the value for the provided label. + Get(label string) (value string) +} + +// Set is a map of label:value. It implements Labels. +type Set map[string]string + +// String returns all labels listed as a human readable string. +// Conveniently, exactly the format that ParseSelector takes. +func (ls Set) String() string { + selector := make([]string, 0, len(ls)) + for key, value := range ls { + selector = append(selector, key+"="+value) + } + // Sort for determinism. + sort.StringSlice(selector).Sort() + return strings.Join(selector, ",") +} + +// Has returns whether the provided label exists in the map. +func (ls Set) Has(label string) bool { + _, exists := ls[label] + return exists +} + +// Get returns the value in the map for the provided label. +func (ls Set) Get(label string) string { + return ls[label] +} + +// AsSelector converts labels into a selectors. +func (ls Set) AsSelector() Selector { + return SelectorFromSet(ls) +} + +// AsSelectorPreValidated converts labels into a selector, but +// assumes that labels are already validated and thus don't +// preform any validation. +// According to our measurements this is significantly faster +// in codepaths that matter at high scale. +func (ls Set) AsSelectorPreValidated() Selector { + return SelectorFromValidatedSet(ls) +} + +// FormatLabels convert label map into plain string +func FormatLabels(labelMap map[string]string) string { + l := Set(labelMap).String() + if l == "" { + l = "" + } + return l +} + +// Conflicts takes 2 maps and returns true if there a key match between +// the maps but the value doesn't match, and returns false in other cases +func Conflicts(labels1, labels2 Set) bool { + small := labels1 + big := labels2 + if len(labels2) < len(labels1) { + small = labels2 + big = labels1 + } + + for k, v := range small { + if val, match := big[k]; match { + if val != v { + return true + } + } + } + + return false +} + +// Merge combines given maps, and does not check for any conflicts +// between the maps. In case of conflicts, second map (labels2) wins +func Merge(labels1, labels2 Set) Set { + mergedMap := Set{} + + for k, v := range labels1 { + mergedMap[k] = v + } + for k, v := range labels2 { + mergedMap[k] = v + } + return mergedMap +} + +// Equals returns true if the given maps are equal +func Equals(labels1, labels2 Set) bool { + if len(labels1) != len(labels2) { + return false + } + + for k, v := range labels1 { + value, ok := labels2[k] + if !ok { + return false + } + if value != v { + return false + } + } + return true +} + +// AreLabelsInWhiteList verifies if the provided label list +// is in the provided whitelist and returns true, otherwise false. +func AreLabelsInWhiteList(labels, whitelist Set) bool { + if len(whitelist) == 0 { + return true + } + + for k, v := range labels { + value, ok := whitelist[k] + if !ok { + return false + } + if value != v { + return false + } + } + return true +} + +// ConvertSelectorToLabelsMap converts selector string to labels map +// and validates keys and values +func ConvertSelectorToLabelsMap(selector string) (Set, error) { + labelsMap := Set{} + + if len(selector) == 0 { + return labelsMap, nil + } + + labels := strings.Split(selector, ",") + for _, label := range labels { + l := strings.Split(label, "=") + if len(l) != 2 { + return labelsMap, fmt.Errorf("invalid selector: %s", l) + } + key := strings.TrimSpace(l[0]) + if err := validateLabelKey(key); err != nil { + return labelsMap, err + } + value := strings.TrimSpace(l[1]) + if err := validateLabelValue(value); err != nil { + return labelsMap, err + } + labelsMap[key] = value + } + return labelsMap, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go new file mode 100644 index 000000000..f5a088893 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go @@ -0,0 +1,891 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package labels + +import ( + "bytes" + "fmt" + "sort" + "strconv" + "strings" + + "k8s.io/apimachinery/pkg/selection" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/klog" +) + +// Requirements is AND of all requirements. +type Requirements []Requirement + +// Selector represents a label selector. +type Selector interface { + // Matches returns true if this selector matches the given set of labels. + Matches(Labels) bool + + // Empty returns true if this selector does not restrict the selection space. + Empty() bool + + // String returns a human readable string that represents this selector. + String() string + + // Add adds requirements to the Selector + Add(r ...Requirement) Selector + + // Requirements converts this interface into Requirements to expose + // more detailed selection information. + // If there are querying parameters, it will return converted requirements and selectable=true. + // If this selector doesn't want to select anything, it will return selectable=false. + Requirements() (requirements Requirements, selectable bool) + + // Make a deep copy of the selector. + DeepCopySelector() Selector +} + +// Everything returns a selector that matches all labels. +func Everything() Selector { + return internalSelector{} +} + +type nothingSelector struct{} + +func (n nothingSelector) Matches(_ Labels) bool { return false } +func (n nothingSelector) Empty() bool { return false } +func (n nothingSelector) String() string { return "" } +func (n nothingSelector) Add(_ ...Requirement) Selector { return n } +func (n nothingSelector) Requirements() (Requirements, bool) { return nil, false } +func (n nothingSelector) DeepCopySelector() Selector { return n } + +// Nothing returns a selector that matches no labels +func Nothing() Selector { + return nothingSelector{} +} + +// NewSelector returns a nil selector +func NewSelector() Selector { + return internalSelector(nil) +} + +type internalSelector []Requirement + +func (s internalSelector) DeepCopy() internalSelector { + if s == nil { + return nil + } + result := make([]Requirement, len(s)) + for i := range s { + s[i].DeepCopyInto(&result[i]) + } + return result +} + +func (s internalSelector) DeepCopySelector() Selector { + return s.DeepCopy() +} + +// ByKey sorts requirements by key to obtain deterministic parser +type ByKey []Requirement + +func (a ByKey) Len() int { return len(a) } + +func (a ByKey) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + +func (a ByKey) Less(i, j int) bool { return a[i].key < a[j].key } + +// Requirement contains values, a key, and an operator that relates the key and values. +// The zero value of Requirement is invalid. +// Requirement implements both set based match and exact match +// Requirement should be initialized via NewRequirement constructor for creating a valid Requirement. +// +k8s:deepcopy-gen=true +type Requirement struct { + key string + operator selection.Operator + // In huge majority of cases we have at most one value here. + // It is generally faster to operate on a single-element slice + // than on a single-element map, so we have a slice here. + strValues []string +} + +// NewRequirement is the constructor for a Requirement. +// If any of these rules is violated, an error is returned: +// (1) The operator can only be In, NotIn, Equals, DoubleEquals, NotEquals, Exists, or DoesNotExist. +// (2) If the operator is In or NotIn, the values set must be non-empty. +// (3) If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value. +// (4) If the operator is Exists or DoesNotExist, the value set must be empty. +// (5) If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer. +// (6) The key is invalid due to its length, or sequence +// of characters. See validateLabelKey for more details. +// +// The empty string is a valid value in the input values set. +func NewRequirement(key string, op selection.Operator, vals []string) (*Requirement, error) { + if err := validateLabelKey(key); err != nil { + return nil, err + } + switch op { + case selection.In, selection.NotIn: + if len(vals) == 0 { + return nil, fmt.Errorf("for 'in', 'notin' operators, values set can't be empty") + } + case selection.Equals, selection.DoubleEquals, selection.NotEquals: + if len(vals) != 1 { + return nil, fmt.Errorf("exact-match compatibility requires one single value") + } + case selection.Exists, selection.DoesNotExist: + if len(vals) != 0 { + return nil, fmt.Errorf("values set must be empty for exists and does not exist") + } + case selection.GreaterThan, selection.LessThan: + if len(vals) != 1 { + return nil, fmt.Errorf("for 'Gt', 'Lt' operators, exactly one value is required") + } + for i := range vals { + if _, err := strconv.ParseInt(vals[i], 10, 64); err != nil { + return nil, fmt.Errorf("for 'Gt', 'Lt' operators, the value must be an integer") + } + } + default: + return nil, fmt.Errorf("operator '%v' is not recognized", op) + } + + for i := range vals { + if err := validateLabelValue(vals[i]); err != nil { + return nil, err + } + } + return &Requirement{key: key, operator: op, strValues: vals}, nil +} + +func (r *Requirement) hasValue(value string) bool { + for i := range r.strValues { + if r.strValues[i] == value { + return true + } + } + return false +} + +// Matches returns true if the Requirement matches the input Labels. +// There is a match in the following cases: +// (1) The operator is Exists and Labels has the Requirement's key. +// (2) The operator is In, Labels has the Requirement's key and Labels' +// value for that key is in Requirement's value set. +// (3) The operator is NotIn, Labels has the Requirement's key and +// Labels' value for that key is not in Requirement's value set. +// (4) The operator is DoesNotExist or NotIn and Labels does not have the +// Requirement's key. +// (5) The operator is GreaterThanOperator or LessThanOperator, and Labels has +// the Requirement's key and the corresponding value satisfies mathematical inequality. +func (r *Requirement) Matches(ls Labels) bool { + switch r.operator { + case selection.In, selection.Equals, selection.DoubleEquals: + if !ls.Has(r.key) { + return false + } + return r.hasValue(ls.Get(r.key)) + case selection.NotIn, selection.NotEquals: + if !ls.Has(r.key) { + return true + } + return !r.hasValue(ls.Get(r.key)) + case selection.Exists: + return ls.Has(r.key) + case selection.DoesNotExist: + return !ls.Has(r.key) + case selection.GreaterThan, selection.LessThan: + if !ls.Has(r.key) { + return false + } + lsValue, err := strconv.ParseInt(ls.Get(r.key), 10, 64) + if err != nil { + klog.V(10).Infof("ParseInt failed for value %+v in label %+v, %+v", ls.Get(r.key), ls, err) + return false + } + + // There should be only one strValue in r.strValues, and can be converted to a integer. + if len(r.strValues) != 1 { + klog.V(10).Infof("Invalid values count %+v of requirement %#v, for 'Gt', 'Lt' operators, exactly one value is required", len(r.strValues), r) + return false + } + + var rValue int64 + for i := range r.strValues { + rValue, err = strconv.ParseInt(r.strValues[i], 10, 64) + if err != nil { + klog.V(10).Infof("ParseInt failed for value %+v in requirement %#v, for 'Gt', 'Lt' operators, the value must be an integer", r.strValues[i], r) + return false + } + } + return (r.operator == selection.GreaterThan && lsValue > rValue) || (r.operator == selection.LessThan && lsValue < rValue) + default: + return false + } +} + +// Key returns requirement key +func (r *Requirement) Key() string { + return r.key +} + +// Operator returns requirement operator +func (r *Requirement) Operator() selection.Operator { + return r.operator +} + +// Values returns requirement values +func (r *Requirement) Values() sets.String { + ret := sets.String{} + for i := range r.strValues { + ret.Insert(r.strValues[i]) + } + return ret +} + +// Empty returns true if the internalSelector doesn't restrict selection space +func (lsel internalSelector) Empty() bool { + if lsel == nil { + return true + } + return len(lsel) == 0 +} + +// String returns a human-readable string that represents this +// Requirement. If called on an invalid Requirement, an error is +// returned. See NewRequirement for creating a valid Requirement. +func (r *Requirement) String() string { + var buffer bytes.Buffer + if r.operator == selection.DoesNotExist { + buffer.WriteString("!") + } + buffer.WriteString(r.key) + + switch r.operator { + case selection.Equals: + buffer.WriteString("=") + case selection.DoubleEquals: + buffer.WriteString("==") + case selection.NotEquals: + buffer.WriteString("!=") + case selection.In: + buffer.WriteString(" in ") + case selection.NotIn: + buffer.WriteString(" notin ") + case selection.GreaterThan: + buffer.WriteString(">") + case selection.LessThan: + buffer.WriteString("<") + case selection.Exists, selection.DoesNotExist: + return buffer.String() + } + + switch r.operator { + case selection.In, selection.NotIn: + buffer.WriteString("(") + } + if len(r.strValues) == 1 { + buffer.WriteString(r.strValues[0]) + } else { // only > 1 since == 0 prohibited by NewRequirement + // normalizes value order on output, without mutating the in-memory selector representation + // also avoids normalization when it is not required, and ensures we do not mutate shared data + buffer.WriteString(strings.Join(safeSort(r.strValues), ",")) + } + + switch r.operator { + case selection.In, selection.NotIn: + buffer.WriteString(")") + } + return buffer.String() +} + +// safeSort sort input strings without modification +func safeSort(in []string) []string { + if sort.StringsAreSorted(in) { + return in + } + out := make([]string, len(in)) + copy(out, in) + sort.Strings(out) + return out +} + +// Add adds requirements to the selector. It copies the current selector returning a new one +func (lsel internalSelector) Add(reqs ...Requirement) Selector { + var sel internalSelector + for ix := range lsel { + sel = append(sel, lsel[ix]) + } + for _, r := range reqs { + sel = append(sel, r) + } + sort.Sort(ByKey(sel)) + return sel +} + +// Matches for a internalSelector returns true if all +// its Requirements match the input Labels. If any +// Requirement does not match, false is returned. +func (lsel internalSelector) Matches(l Labels) bool { + for ix := range lsel { + if matches := lsel[ix].Matches(l); !matches { + return false + } + } + return true +} + +func (lsel internalSelector) Requirements() (Requirements, bool) { return Requirements(lsel), true } + +// String returns a comma-separated string of all +// the internalSelector Requirements' human-readable strings. +func (lsel internalSelector) String() string { + var reqs []string + for ix := range lsel { + reqs = append(reqs, lsel[ix].String()) + } + return strings.Join(reqs, ",") +} + +// Token represents constant definition for lexer token +type Token int + +const ( + // ErrorToken represents scan error + ErrorToken Token = iota + // EndOfStringToken represents end of string + EndOfStringToken + // ClosedParToken represents close parenthesis + ClosedParToken + // CommaToken represents the comma + CommaToken + // DoesNotExistToken represents logic not + DoesNotExistToken + // DoubleEqualsToken represents double equals + DoubleEqualsToken + // EqualsToken represents equal + EqualsToken + // GreaterThanToken represents greater than + GreaterThanToken + // IdentifierToken represents identifier, e.g. keys and values + IdentifierToken + // InToken represents in + InToken + // LessThanToken represents less than + LessThanToken + // NotEqualsToken represents not equal + NotEqualsToken + // NotInToken represents not in + NotInToken + // OpenParToken represents open parenthesis + OpenParToken +) + +// string2token contains the mapping between lexer Token and token literal +// (except IdentifierToken, EndOfStringToken and ErrorToken since it makes no sense) +var string2token = map[string]Token{ + ")": ClosedParToken, + ",": CommaToken, + "!": DoesNotExistToken, + "==": DoubleEqualsToken, + "=": EqualsToken, + ">": GreaterThanToken, + "in": InToken, + "<": LessThanToken, + "!=": NotEqualsToken, + "notin": NotInToken, + "(": OpenParToken, +} + +// ScannedItem contains the Token and the literal produced by the lexer. +type ScannedItem struct { + tok Token + literal string +} + +// isWhitespace returns true if the rune is a space, tab, or newline. +func isWhitespace(ch byte) bool { + return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n' +} + +// isSpecialSymbol detect if the character ch can be an operator +func isSpecialSymbol(ch byte) bool { + switch ch { + case '=', '!', '(', ')', ',', '>', '<': + return true + } + return false +} + +// Lexer represents the Lexer struct for label selector. +// It contains necessary informationt to tokenize the input string +type Lexer struct { + // s stores the string to be tokenized + s string + // pos is the position currently tokenized + pos int +} + +// read return the character currently lexed +// increment the position and check the buffer overflow +func (l *Lexer) read() (b byte) { + b = 0 + if l.pos < len(l.s) { + b = l.s[l.pos] + l.pos++ + } + return b +} + +// unread 'undoes' the last read character +func (l *Lexer) unread() { + l.pos-- +} + +// scanIDOrKeyword scans string to recognize literal token (for example 'in') or an identifier. +func (l *Lexer) scanIDOrKeyword() (tok Token, lit string) { + var buffer []byte +IdentifierLoop: + for { + switch ch := l.read(); { + case ch == 0: + break IdentifierLoop + case isSpecialSymbol(ch) || isWhitespace(ch): + l.unread() + break IdentifierLoop + default: + buffer = append(buffer, ch) + } + } + s := string(buffer) + if val, ok := string2token[s]; ok { // is a literal token? + return val, s + } + return IdentifierToken, s // otherwise is an identifier +} + +// scanSpecialSymbol scans string starting with special symbol. +// special symbol identify non literal operators. "!=", "==", "=" +func (l *Lexer) scanSpecialSymbol() (Token, string) { + lastScannedItem := ScannedItem{} + var buffer []byte +SpecialSymbolLoop: + for { + switch ch := l.read(); { + case ch == 0: + break SpecialSymbolLoop + case isSpecialSymbol(ch): + buffer = append(buffer, ch) + if token, ok := string2token[string(buffer)]; ok { + lastScannedItem = ScannedItem{tok: token, literal: string(buffer)} + } else if lastScannedItem.tok != 0 { + l.unread() + break SpecialSymbolLoop + } + default: + l.unread() + break SpecialSymbolLoop + } + } + if lastScannedItem.tok == 0 { + return ErrorToken, fmt.Sprintf("error expected: keyword found '%s'", buffer) + } + return lastScannedItem.tok, lastScannedItem.literal +} + +// skipWhiteSpaces consumes all blank characters +// returning the first non blank character +func (l *Lexer) skipWhiteSpaces(ch byte) byte { + for { + if !isWhitespace(ch) { + return ch + } + ch = l.read() + } +} + +// Lex returns a pair of Token and the literal +// literal is meaningfull only for IdentifierToken token +func (l *Lexer) Lex() (tok Token, lit string) { + switch ch := l.skipWhiteSpaces(l.read()); { + case ch == 0: + return EndOfStringToken, "" + case isSpecialSymbol(ch): + l.unread() + return l.scanSpecialSymbol() + default: + l.unread() + return l.scanIDOrKeyword() + } +} + +// Parser data structure contains the label selector parser data structure +type Parser struct { + l *Lexer + scannedItems []ScannedItem + position int +} + +// ParserContext represents context during parsing: +// some literal for example 'in' and 'notin' can be +// recognized as operator for example 'x in (a)' but +// it can be recognized as value for example 'value in (in)' +type ParserContext int + +const ( + // KeyAndOperator represents key and operator + KeyAndOperator ParserContext = iota + // Values represents values + Values +) + +// lookahead func returns the current token and string. No increment of current position +func (p *Parser) lookahead(context ParserContext) (Token, string) { + tok, lit := p.scannedItems[p.position].tok, p.scannedItems[p.position].literal + if context == Values { + switch tok { + case InToken, NotInToken: + tok = IdentifierToken + } + } + return tok, lit +} + +// consume returns current token and string. Increments the position +func (p *Parser) consume(context ParserContext) (Token, string) { + p.position++ + tok, lit := p.scannedItems[p.position-1].tok, p.scannedItems[p.position-1].literal + if context == Values { + switch tok { + case InToken, NotInToken: + tok = IdentifierToken + } + } + return tok, lit +} + +// scan runs through the input string and stores the ScannedItem in an array +// Parser can now lookahead and consume the tokens +func (p *Parser) scan() { + for { + token, literal := p.l.Lex() + p.scannedItems = append(p.scannedItems, ScannedItem{token, literal}) + if token == EndOfStringToken { + break + } + } +} + +// parse runs the left recursive descending algorithm +// on input string. It returns a list of Requirement objects. +func (p *Parser) parse() (internalSelector, error) { + p.scan() // init scannedItems + + var requirements internalSelector + for { + tok, lit := p.lookahead(Values) + switch tok { + case IdentifierToken, DoesNotExistToken: + r, err := p.parseRequirement() + if err != nil { + return nil, fmt.Errorf("unable to parse requirement: %v", err) + } + requirements = append(requirements, *r) + t, l := p.consume(Values) + switch t { + case EndOfStringToken: + return requirements, nil + case CommaToken: + t2, l2 := p.lookahead(Values) + if t2 != IdentifierToken && t2 != DoesNotExistToken { + return nil, fmt.Errorf("found '%s', expected: identifier after ','", l2) + } + default: + return nil, fmt.Errorf("found '%s', expected: ',' or 'end of string'", l) + } + case EndOfStringToken: + return requirements, nil + default: + return nil, fmt.Errorf("found '%s', expected: !, identifier, or 'end of string'", lit) + } + } +} + +func (p *Parser) parseRequirement() (*Requirement, error) { + key, operator, err := p.parseKeyAndInferOperator() + if err != nil { + return nil, err + } + if operator == selection.Exists || operator == selection.DoesNotExist { // operator found lookahead set checked + return NewRequirement(key, operator, []string{}) + } + operator, err = p.parseOperator() + if err != nil { + return nil, err + } + var values sets.String + switch operator { + case selection.In, selection.NotIn: + values, err = p.parseValues() + case selection.Equals, selection.DoubleEquals, selection.NotEquals, selection.GreaterThan, selection.LessThan: + values, err = p.parseExactValue() + } + if err != nil { + return nil, err + } + return NewRequirement(key, operator, values.List()) + +} + +// parseKeyAndInferOperator parse literals. +// in case of no operator '!, in, notin, ==, =, !=' are found +// the 'exists' operator is inferred +func (p *Parser) parseKeyAndInferOperator() (string, selection.Operator, error) { + var operator selection.Operator + tok, literal := p.consume(Values) + if tok == DoesNotExistToken { + operator = selection.DoesNotExist + tok, literal = p.consume(Values) + } + if tok != IdentifierToken { + err := fmt.Errorf("found '%s', expected: identifier", literal) + return "", "", err + } + if err := validateLabelKey(literal); err != nil { + return "", "", err + } + if t, _ := p.lookahead(Values); t == EndOfStringToken || t == CommaToken { + if operator != selection.DoesNotExist { + operator = selection.Exists + } + } + return literal, operator, nil +} + +// parseOperator return operator and eventually matchType +// matchType can be exact +func (p *Parser) parseOperator() (op selection.Operator, err error) { + tok, lit := p.consume(KeyAndOperator) + switch tok { + // DoesNotExistToken shouldn't be here because it's a unary operator, not a binary operator + case InToken: + op = selection.In + case EqualsToken: + op = selection.Equals + case DoubleEqualsToken: + op = selection.DoubleEquals + case GreaterThanToken: + op = selection.GreaterThan + case LessThanToken: + op = selection.LessThan + case NotInToken: + op = selection.NotIn + case NotEqualsToken: + op = selection.NotEquals + default: + return "", fmt.Errorf("found '%s', expected: '=', '!=', '==', 'in', notin'", lit) + } + return op, nil +} + +// parseValues parses the values for set based matching (x,y,z) +func (p *Parser) parseValues() (sets.String, error) { + tok, lit := p.consume(Values) + if tok != OpenParToken { + return nil, fmt.Errorf("found '%s' expected: '('", lit) + } + tok, lit = p.lookahead(Values) + switch tok { + case IdentifierToken, CommaToken: + s, err := p.parseIdentifiersList() // handles general cases + if err != nil { + return s, err + } + if tok, _ = p.consume(Values); tok != ClosedParToken { + return nil, fmt.Errorf("found '%s', expected: ')'", lit) + } + return s, nil + case ClosedParToken: // handles "()" + p.consume(Values) + return sets.NewString(""), nil + default: + return nil, fmt.Errorf("found '%s', expected: ',', ')' or identifier", lit) + } +} + +// parseIdentifiersList parses a (possibly empty) list of +// of comma separated (possibly empty) identifiers +func (p *Parser) parseIdentifiersList() (sets.String, error) { + s := sets.NewString() + for { + tok, lit := p.consume(Values) + switch tok { + case IdentifierToken: + s.Insert(lit) + tok2, lit2 := p.lookahead(Values) + switch tok2 { + case CommaToken: + continue + case ClosedParToken: + return s, nil + default: + return nil, fmt.Errorf("found '%s', expected: ',' or ')'", lit2) + } + case CommaToken: // handled here since we can have "(," + if s.Len() == 0 { + s.Insert("") // to handle (, + } + tok2, _ := p.lookahead(Values) + if tok2 == ClosedParToken { + s.Insert("") // to handle ,) Double "" removed by StringSet + return s, nil + } + if tok2 == CommaToken { + p.consume(Values) + s.Insert("") // to handle ,, Double "" removed by StringSet + } + default: // it can be operator + return s, fmt.Errorf("found '%s', expected: ',', or identifier", lit) + } + } +} + +// parseExactValue parses the only value for exact match style +func (p *Parser) parseExactValue() (sets.String, error) { + s := sets.NewString() + tok, lit := p.lookahead(Values) + if tok == EndOfStringToken || tok == CommaToken { + s.Insert("") + return s, nil + } + tok, lit = p.consume(Values) + if tok == IdentifierToken { + s.Insert(lit) + return s, nil + } + return nil, fmt.Errorf("found '%s', expected: identifier", lit) +} + +// Parse takes a string representing a selector and returns a selector +// object, or an error. This parsing function differs from ParseSelector +// as they parse different selectors with different syntaxes. +// The input will cause an error if it does not follow this form: +// +// ::= | "," +// ::= [!] KEY [ | ] +// ::= "" | +// ::= | +// ::= "notin" +// ::= "in" +// ::= "(" ")" +// ::= VALUE | VALUE "," +// ::= ["="|"=="|"!="] VALUE +// +// KEY is a sequence of one or more characters following [ DNS_SUBDOMAIN "/" ] DNS_LABEL. Max length is 63 characters. +// VALUE is a sequence of zero or more characters "([A-Za-z0-9_-\.])". Max length is 63 characters. +// Delimiter is white space: (' ', '\t') +// Example of valid syntax: +// "x in (foo,,baz),y,z notin ()" +// +// Note: +// (1) Inclusion - " in " - denotes that the KEY exists and is equal to any of the +// VALUEs in its requirement +// (2) Exclusion - " notin " - denotes that the KEY is not equal to any +// of the VALUEs in its requirement or does not exist +// (3) The empty string is a valid VALUE +// (4) A requirement with just a KEY - as in "y" above - denotes that +// the KEY exists and can be any VALUE. +// (5) A requirement with just !KEY requires that the KEY not exist. +// +func Parse(selector string) (Selector, error) { + parsedSelector, err := parse(selector) + if err == nil { + return parsedSelector, nil + } + return nil, err +} + +// parse parses the string representation of the selector and returns the internalSelector struct. +// The callers of this method can then decide how to return the internalSelector struct to their +// callers. This function has two callers now, one returns a Selector interface and the other +// returns a list of requirements. +func parse(selector string) (internalSelector, error) { + p := &Parser{l: &Lexer{s: selector, pos: 0}} + items, err := p.parse() + if err != nil { + return nil, err + } + sort.Sort(ByKey(items)) // sort to grant determistic parsing + return internalSelector(items), err +} + +func validateLabelKey(k string) error { + if errs := validation.IsQualifiedName(k); len(errs) != 0 { + return fmt.Errorf("invalid label key %q: %s", k, strings.Join(errs, "; ")) + } + return nil +} + +func validateLabelValue(v string) error { + if errs := validation.IsValidLabelValue(v); len(errs) != 0 { + return fmt.Errorf("invalid label value: %q: %s", v, strings.Join(errs, "; ")) + } + return nil +} + +// SelectorFromSet returns a Selector which will match exactly the given Set. A +// nil and empty Sets are considered equivalent to Everything(). +func SelectorFromSet(ls Set) Selector { + if ls == nil || len(ls) == 0 { + return internalSelector{} + } + var requirements internalSelector + for label, value := range ls { + r, err := NewRequirement(label, selection.Equals, []string{value}) + if err == nil { + requirements = append(requirements, *r) + } else { + //TODO: double check errors when input comes from serialization? + return internalSelector{} + } + } + // sort to have deterministic string representation + sort.Sort(ByKey(requirements)) + return requirements +} + +// SelectorFromValidatedSet returns a Selector which will match exactly the given Set. +// A nil and empty Sets are considered equivalent to Everything(). +// It assumes that Set is already validated and doesn't do any validation. +func SelectorFromValidatedSet(ls Set) Selector { + if ls == nil || len(ls) == 0 { + return internalSelector{} + } + var requirements internalSelector + for label, value := range ls { + requirements = append(requirements, Requirement{key: label, operator: selection.Equals, strValues: []string{value}}) + } + // sort to have deterministic string representation + sort.Sort(ByKey(requirements)) + return requirements +} + +// ParseToRequirements takes a string representing a selector and returns a list of +// requirements. This function is suitable for those callers that perform additional +// processing on selector requirements. +// See the documentation for Parse() function for more details. +// TODO: Consider exporting the internalSelector type instead. +func ParseToRequirements(selector string) ([]Requirement, error) { + return parse(selector) +} diff --git a/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go new file mode 100644 index 000000000..4d482947f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go @@ -0,0 +1,42 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package labels + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Requirement) DeepCopyInto(out *Requirement) { + *out = *in + if in.strValues != nil { + in, out := &in.strValues, &out.strValues + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Requirement. +func (in *Requirement) DeepCopy() *Requirement { + if in == nil { + return nil + } + out := new(Requirement) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/codec.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go new file mode 100644 index 000000000..284e32bc3 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec.go @@ -0,0 +1,332 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "bytes" + "encoding/base64" + "fmt" + "io" + "net/url" + "reflect" + + "k8s.io/apimachinery/pkg/conversion/queryparams" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// codec binds an encoder and decoder. +type codec struct { + Encoder + Decoder +} + +// NewCodec creates a Codec from an Encoder and Decoder. +func NewCodec(e Encoder, d Decoder) Codec { + return codec{e, d} +} + +// Encode is a convenience wrapper for encoding to a []byte from an Encoder +func Encode(e Encoder, obj Object) ([]byte, error) { + // TODO: reuse buffer + buf := &bytes.Buffer{} + if err := e.Encode(obj, buf); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +// Decode is a convenience wrapper for decoding data into an Object. +func Decode(d Decoder, data []byte) (Object, error) { + obj, _, err := d.Decode(data, nil, nil) + return obj, err +} + +// DecodeInto performs a Decode into the provided object. +func DecodeInto(d Decoder, data []byte, into Object) error { + out, gvk, err := d.Decode(data, nil, into) + if err != nil { + return err + } + if out != into { + return fmt.Errorf("unable to decode %s into %v", gvk, reflect.TypeOf(into)) + } + return nil +} + +// EncodeOrDie is a version of Encode which will panic instead of returning an error. For tests. +func EncodeOrDie(e Encoder, obj Object) string { + bytes, err := Encode(e, obj) + if err != nil { + panic(err) + } + return string(bytes) +} + +// UseOrCreateObject returns obj if the canonical ObjectKind returned by the provided typer matches gvk, or +// invokes the ObjectCreator to instantiate a new gvk. Returns an error if the typer cannot find the object. +func UseOrCreateObject(t ObjectTyper, c ObjectCreater, gvk schema.GroupVersionKind, obj Object) (Object, error) { + if obj != nil { + kinds, _, err := t.ObjectKinds(obj) + if err != nil { + return nil, err + } + for _, kind := range kinds { + if gvk == kind { + return obj, nil + } + } + } + return c.New(gvk) +} + +// NoopEncoder converts an Decoder to a Serializer or Codec for code that expects them but only uses decoding. +type NoopEncoder struct { + Decoder +} + +var _ Serializer = NoopEncoder{} + +func (n NoopEncoder) Encode(obj Object, w io.Writer) error { + return fmt.Errorf("encoding is not allowed for this codec: %v", reflect.TypeOf(n.Decoder)) +} + +// NoopDecoder converts an Encoder to a Serializer or Codec for code that expects them but only uses encoding. +type NoopDecoder struct { + Encoder +} + +var _ Serializer = NoopDecoder{} + +func (n NoopDecoder) Decode(data []byte, gvk *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { + return nil, nil, fmt.Errorf("decoding is not allowed for this codec: %v", reflect.TypeOf(n.Encoder)) +} + +// NewParameterCodec creates a ParameterCodec capable of transforming url values into versioned objects and back. +func NewParameterCodec(scheme *Scheme) ParameterCodec { + return ¶meterCodec{ + typer: scheme, + convertor: scheme, + creator: scheme, + defaulter: scheme, + } +} + +// parameterCodec implements conversion to and from query parameters and objects. +type parameterCodec struct { + typer ObjectTyper + convertor ObjectConvertor + creator ObjectCreater + defaulter ObjectDefaulter +} + +var _ ParameterCodec = ¶meterCodec{} + +// DecodeParameters converts the provided url.Values into an object of type From with the kind of into, and then +// converts that object to into (if necessary). Returns an error if the operation cannot be completed. +func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error { + if len(parameters) == 0 { + return nil + } + targetGVKs, _, err := c.typer.ObjectKinds(into) + if err != nil { + return err + } + for i := range targetGVKs { + if targetGVKs[i].GroupVersion() == from { + if err := c.convertor.Convert(¶meters, into, nil); err != nil { + return err + } + // in the case where we going into the same object we're receiving, default on the outbound object + if c.defaulter != nil { + c.defaulter.Default(into) + } + return nil + } + } + + input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind)) + if err != nil { + return err + } + if err := c.convertor.Convert(¶meters, input, nil); err != nil { + return err + } + // if we have defaulter, default the input before converting to output + if c.defaulter != nil { + c.defaulter.Default(input) + } + return c.convertor.Convert(input, into, nil) +} + +// EncodeParameters converts the provided object into the to version, then converts that object to url.Values. +// Returns an error if conversion is not possible. +func (c *parameterCodec) EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) { + gvks, _, err := c.typer.ObjectKinds(obj) + if err != nil { + return nil, err + } + gvk := gvks[0] + if to != gvk.GroupVersion() { + out, err := c.convertor.ConvertToVersion(obj, to) + if err != nil { + return nil, err + } + obj = out + } + return queryparams.Convert(obj) +} + +type base64Serializer struct { + Encoder + Decoder +} + +func NewBase64Serializer(e Encoder, d Decoder) Serializer { + return &base64Serializer{e, d} +} + +func (s base64Serializer) Encode(obj Object, stream io.Writer) error { + e := base64.NewEncoder(base64.StdEncoding, stream) + err := s.Encoder.Encode(obj, e) + e.Close() + return err +} + +func (s base64Serializer) Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { + out := make([]byte, base64.StdEncoding.DecodedLen(len(data))) + n, err := base64.StdEncoding.Decode(out, data) + if err != nil { + return nil, nil, err + } + return s.Decoder.Decode(out[:n], defaults, into) +} + +// SerializerInfoForMediaType returns the first info in types that has a matching media type (which cannot +// include media-type parameters), or the first info with an empty media type, or false if no type matches. +func SerializerInfoForMediaType(types []SerializerInfo, mediaType string) (SerializerInfo, bool) { + for _, info := range types { + if info.MediaType == mediaType { + return info, true + } + } + for _, info := range types { + if len(info.MediaType) == 0 { + return info, true + } + } + return SerializerInfo{}, false +} + +var ( + // InternalGroupVersioner will always prefer the internal version for a given group version kind. + InternalGroupVersioner GroupVersioner = internalGroupVersioner{} + // DisabledGroupVersioner will reject all kinds passed to it. + DisabledGroupVersioner GroupVersioner = disabledGroupVersioner{} +) + +type internalGroupVersioner struct{} + +// KindForGroupVersionKinds returns an internal Kind if one is found, or converts the first provided kind to the internal version. +func (internalGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { + for _, kind := range kinds { + if kind.Version == APIVersionInternal { + return kind, true + } + } + for _, kind := range kinds { + return schema.GroupVersionKind{Group: kind.Group, Version: APIVersionInternal, Kind: kind.Kind}, true + } + return schema.GroupVersionKind{}, false +} + +type disabledGroupVersioner struct{} + +// KindForGroupVersionKinds returns false for any input. +func (disabledGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { + return schema.GroupVersionKind{}, false +} + +// GroupVersioners implements GroupVersioner and resolves to the first exact match for any kind. +type GroupVersioners []GroupVersioner + +// KindForGroupVersionKinds returns the first match of any of the group versioners, or false if no match occurred. +func (gvs GroupVersioners) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { + for _, gv := range gvs { + target, ok := gv.KindForGroupVersionKinds(kinds) + if !ok { + continue + } + return target, true + } + return schema.GroupVersionKind{}, false +} + +// Assert that schema.GroupVersion and GroupVersions implement GroupVersioner +var _ GroupVersioner = schema.GroupVersion{} +var _ GroupVersioner = schema.GroupVersions{} +var _ GroupVersioner = multiGroupVersioner{} + +type multiGroupVersioner struct { + target schema.GroupVersion + acceptedGroupKinds []schema.GroupKind + coerce bool +} + +// NewMultiGroupVersioner returns the provided group version for any kind that matches one of the provided group kinds. +// Kind may be empty in the provided group kind, in which case any kind will match. +func NewMultiGroupVersioner(gv schema.GroupVersion, groupKinds ...schema.GroupKind) GroupVersioner { + if len(groupKinds) == 0 || (len(groupKinds) == 1 && groupKinds[0].Group == gv.Group) { + return gv + } + return multiGroupVersioner{target: gv, acceptedGroupKinds: groupKinds} +} + +// NewCoercingMultiGroupVersioner returns the provided group version for any incoming kind. +// Incoming kinds that match the provided groupKinds are preferred. +// Kind may be empty in the provided group kind, in which case any kind will match. +// Examples: +// gv=mygroup/__internal, groupKinds=mygroup/Foo, anothergroup/Bar +// KindForGroupVersionKinds(yetanother/v1/Baz, anothergroup/v1/Bar) -> mygroup/__internal/Bar (matched preferred group/kind) +// +// gv=mygroup/__internal, groupKinds=mygroup, anothergroup +// KindForGroupVersionKinds(yetanother/v1/Baz, anothergroup/v1/Bar) -> mygroup/__internal/Bar (matched preferred group) +// +// gv=mygroup/__internal, groupKinds=mygroup, anothergroup +// KindForGroupVersionKinds(yetanother/v1/Baz, yetanother/v1/Bar) -> mygroup/__internal/Baz (no preferred group/kind match, uses first kind in list) +func NewCoercingMultiGroupVersioner(gv schema.GroupVersion, groupKinds ...schema.GroupKind) GroupVersioner { + return multiGroupVersioner{target: gv, acceptedGroupKinds: groupKinds, coerce: true} +} + +// KindForGroupVersionKinds returns the target group version if any kind matches any of the original group kinds. It will +// use the originating kind where possible. +func (v multiGroupVersioner) KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (schema.GroupVersionKind, bool) { + for _, src := range kinds { + for _, kind := range v.acceptedGroupKinds { + if kind.Group != src.Group { + continue + } + if len(kind.Kind) > 0 && kind.Kind != src.Kind { + continue + } + return v.target.WithKind(src.Kind), true + } + } + if v.coerce && len(kinds) > 0 { + return v.target.WithKind(kinds[0].Kind), true + } + return schema.GroupVersionKind{}, false +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go new file mode 100644 index 000000000..510444a4d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/codec_check.go @@ -0,0 +1,48 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" + "reflect" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// CheckCodec makes sure that the codec can encode objects like internalType, +// decode all of the external types listed, and also decode them into the given +// object. (Will modify internalObject.) (Assumes JSON serialization.) +// TODO: verify that the correct external version is chosen on encode... +func CheckCodec(c Codec, internalType Object, externalTypes ...schema.GroupVersionKind) error { + if _, err := Encode(c, internalType); err != nil { + return fmt.Errorf("Internal type not encodable: %v", err) + } + for _, et := range externalTypes { + exBytes := []byte(fmt.Sprintf(`{"kind":"%v","apiVersion":"%v"}`, et.Kind, et.GroupVersion().String())) + obj, err := Decode(c, exBytes) + if err != nil { + return fmt.Errorf("external type %s not interpretable: %v", et, err) + } + if reflect.TypeOf(obj) != reflect.TypeOf(internalType) { + return fmt.Errorf("decode of external type %s produced: %#v", et, obj) + } + if err = DecodeInto(c, exBytes, internalType); err != nil { + return fmt.Errorf("external type %s not convertible to internal type: %v", et, err) + } + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go new file mode 100644 index 000000000..08d2abfe6 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/conversion.go @@ -0,0 +1,113 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package runtime defines conversions between generic types and structs to map query strings +// to struct objects. +package runtime + +import ( + "fmt" + "reflect" + "strconv" + "strings" + + "k8s.io/apimachinery/pkg/conversion" +) + +// DefaultMetaV1FieldSelectorConversion auto-accepts metav1 values for name and namespace. +// A cluster scoped resource specifying namespace empty works fine and specifying a particular +// namespace will return no results, as expected. +func DefaultMetaV1FieldSelectorConversion(label, value string) (string, string, error) { + switch label { + case "metadata.name": + return label, value, nil + case "metadata.namespace": + return label, value, nil + default: + return "", "", fmt.Errorf("%q is not a known field selector: only %q, %q", label, "metadata.name", "metadata.namespace") + } +} + +// JSONKeyMapper uses the struct tags on a conversion to determine the key value for +// the other side. Use when mapping from a map[string]* to a struct or vice versa. +func JSONKeyMapper(key string, sourceTag, destTag reflect.StructTag) (string, string) { + if s := destTag.Get("json"); len(s) > 0 { + return strings.SplitN(s, ",", 2)[0], key + } + if s := sourceTag.Get("json"); len(s) > 0 { + return key, strings.SplitN(s, ",", 2)[0] + } + return key, key +} + +// DefaultStringConversions are helpers for converting []string and string to real values. +var DefaultStringConversions = []interface{}{ + Convert_Slice_string_To_string, + Convert_Slice_string_To_int, + Convert_Slice_string_To_bool, + Convert_Slice_string_To_int64, +} + +func Convert_Slice_string_To_string(input *[]string, out *string, s conversion.Scope) error { + if len(*input) == 0 { + *out = "" + } + *out = (*input)[0] + return nil +} + +func Convert_Slice_string_To_int(input *[]string, out *int, s conversion.Scope) error { + if len(*input) == 0 { + *out = 0 + } + str := (*input)[0] + i, err := strconv.Atoi(str) + if err != nil { + return err + } + *out = i + return nil +} + +// Convert_Slice_string_To_bool will convert a string parameter to boolean. +// Only the absence of a value, a value of "false", or a value of "0" resolve to false. +// Any other value (including empty string) resolves to true. +func Convert_Slice_string_To_bool(input *[]string, out *bool, s conversion.Scope) error { + if len(*input) == 0 { + *out = false + return nil + } + switch strings.ToLower((*input)[0]) { + case "false", "0": + *out = false + default: + *out = true + } + return nil +} + +func Convert_Slice_string_To_int64(input *[]string, out *int64, s conversion.Scope) error { + if len(*input) == 0 { + *out = 0 + } + str := (*input)[0] + i, err := strconv.ParseInt(str, 10, 64) + if err != nil { + return err + } + *out = i + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/converter.go b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go new file mode 100644 index 000000000..dff56e034 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/converter.go @@ -0,0 +1,805 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "bytes" + encodingjson "encoding/json" + "fmt" + "math" + "os" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/util/json" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + + "k8s.io/klog" +) + +// UnstructuredConverter is an interface for converting between interface{} +// and map[string]interface representation. +type UnstructuredConverter interface { + ToUnstructured(obj interface{}) (map[string]interface{}, error) + FromUnstructured(u map[string]interface{}, obj interface{}) error +} + +type structField struct { + structType reflect.Type + field int +} + +type fieldInfo struct { + name string + nameValue reflect.Value + omitempty bool +} + +type fieldsCacheMap map[structField]*fieldInfo + +type fieldsCache struct { + sync.Mutex + value atomic.Value +} + +func newFieldsCache() *fieldsCache { + cache := &fieldsCache{} + cache.value.Store(make(fieldsCacheMap)) + return cache +} + +var ( + marshalerType = reflect.TypeOf(new(encodingjson.Marshaler)).Elem() + unmarshalerType = reflect.TypeOf(new(encodingjson.Unmarshaler)).Elem() + mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{}) + stringType = reflect.TypeOf(string("")) + int64Type = reflect.TypeOf(int64(0)) + float64Type = reflect.TypeOf(float64(0)) + boolType = reflect.TypeOf(bool(false)) + fieldCache = newFieldsCache() + + // DefaultUnstructuredConverter performs unstructured to Go typed object conversions. + DefaultUnstructuredConverter = &unstructuredConverter{ + mismatchDetection: parseBool(os.Getenv("KUBE_PATCH_CONVERSION_DETECTOR")), + comparison: conversion.EqualitiesOrDie( + func(a, b time.Time) bool { + return a.UTC() == b.UTC() + }, + ), + } +) + +func parseBool(key string) bool { + if len(key) == 0 { + return false + } + value, err := strconv.ParseBool(key) + if err != nil { + utilruntime.HandleError(fmt.Errorf("Couldn't parse '%s' as bool for unstructured mismatch detection", key)) + } + return value +} + +// unstructuredConverter knows how to convert between interface{} and +// Unstructured in both ways. +type unstructuredConverter struct { + // If true, we will be additionally running conversion via json + // to ensure that the result is true. + // This is supposed to be set only in tests. + mismatchDetection bool + // comparison is the default test logic used to compare + comparison conversion.Equalities +} + +// NewTestUnstructuredConverter creates an UnstructuredConverter that accepts JSON typed maps and translates them +// to Go types via reflection. It performs mismatch detection automatically and is intended for use by external +// test tools. Use DefaultUnstructuredConverter if you do not explicitly need mismatch detection. +func NewTestUnstructuredConverter(comparison conversion.Equalities) UnstructuredConverter { + return &unstructuredConverter{ + mismatchDetection: true, + comparison: comparison, + } +} + +// FromUnstructured converts an object from map[string]interface{} representation into a concrete type. +// It uses encoding/json/Unmarshaler if object implements it or reflection if not. +func (c *unstructuredConverter) FromUnstructured(u map[string]interface{}, obj interface{}) error { + t := reflect.TypeOf(obj) + value := reflect.ValueOf(obj) + if t.Kind() != reflect.Ptr || value.IsNil() { + return fmt.Errorf("FromUnstructured requires a non-nil pointer to an object, got %v", t) + } + err := fromUnstructured(reflect.ValueOf(u), value.Elem()) + if c.mismatchDetection { + newObj := reflect.New(t.Elem()).Interface() + newErr := fromUnstructuredViaJSON(u, newObj) + if (err != nil) != (newErr != nil) { + klog.Fatalf("FromUnstructured unexpected error for %v: error: %v", u, err) + } + if err == nil && !c.comparison.DeepEqual(obj, newObj) { + klog.Fatalf("FromUnstructured mismatch\nobj1: %#v\nobj2: %#v", obj, newObj) + } + } + return err +} + +func fromUnstructuredViaJSON(u map[string]interface{}, obj interface{}) error { + data, err := json.Marshal(u) + if err != nil { + return err + } + return json.Unmarshal(data, obj) +} + +func fromUnstructured(sv, dv reflect.Value) error { + sv = unwrapInterface(sv) + if !sv.IsValid() { + dv.Set(reflect.Zero(dv.Type())) + return nil + } + st, dt := sv.Type(), dv.Type() + + switch dt.Kind() { + case reflect.Map, reflect.Slice, reflect.Ptr, reflect.Struct, reflect.Interface: + // Those require non-trivial conversion. + default: + // This should handle all simple types. + if st.AssignableTo(dt) { + dv.Set(sv) + return nil + } + // We cannot simply use "ConvertibleTo", as JSON doesn't support conversions + // between those four groups: bools, integers, floats and string. We need to + // do the same. + if st.ConvertibleTo(dt) { + switch st.Kind() { + case reflect.String: + switch dt.Kind() { + case reflect.String: + dv.Set(sv.Convert(dt)) + return nil + } + case reflect.Bool: + switch dt.Kind() { + case reflect.Bool: + dv.Set(sv.Convert(dt)) + return nil + } + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + switch dt.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + dv.Set(sv.Convert(dt)) + return nil + } + case reflect.Float32, reflect.Float64: + switch dt.Kind() { + case reflect.Float32, reflect.Float64: + dv.Set(sv.Convert(dt)) + return nil + } + if sv.Float() == math.Trunc(sv.Float()) { + dv.Set(sv.Convert(dt)) + return nil + } + } + return fmt.Errorf("cannot convert %s to %s", st.String(), dt.String()) + } + } + + // Check if the object has a custom JSON marshaller/unmarshaller. + if reflect.PtrTo(dt).Implements(unmarshalerType) { + data, err := json.Marshal(sv.Interface()) + if err != nil { + return fmt.Errorf("error encoding %s to json: %v", st.String(), err) + } + unmarshaler := dv.Addr().Interface().(encodingjson.Unmarshaler) + return unmarshaler.UnmarshalJSON(data) + } + + switch dt.Kind() { + case reflect.Map: + return mapFromUnstructured(sv, dv) + case reflect.Slice: + return sliceFromUnstructured(sv, dv) + case reflect.Ptr: + return pointerFromUnstructured(sv, dv) + case reflect.Struct: + return structFromUnstructured(sv, dv) + case reflect.Interface: + return interfaceFromUnstructured(sv, dv) + default: + return fmt.Errorf("unrecognized type: %v", dt.Kind()) + } +} + +func fieldInfoFromField(structType reflect.Type, field int) *fieldInfo { + fieldCacheMap := fieldCache.value.Load().(fieldsCacheMap) + if info, ok := fieldCacheMap[structField{structType, field}]; ok { + return info + } + + // Cache miss - we need to compute the field name. + info := &fieldInfo{} + typeField := structType.Field(field) + jsonTag := typeField.Tag.Get("json") + if len(jsonTag) == 0 { + // Make the first character lowercase. + if typeField.Name == "" { + info.name = typeField.Name + } else { + info.name = strings.ToLower(typeField.Name[:1]) + typeField.Name[1:] + } + } else { + items := strings.Split(jsonTag, ",") + info.name = items[0] + for i := range items { + if items[i] == "omitempty" { + info.omitempty = true + } + } + } + info.nameValue = reflect.ValueOf(info.name) + + fieldCache.Lock() + defer fieldCache.Unlock() + fieldCacheMap = fieldCache.value.Load().(fieldsCacheMap) + newFieldCacheMap := make(fieldsCacheMap) + for k, v := range fieldCacheMap { + newFieldCacheMap[k] = v + } + newFieldCacheMap[structField{structType, field}] = info + fieldCache.value.Store(newFieldCacheMap) + return info +} + +func unwrapInterface(v reflect.Value) reflect.Value { + for v.Kind() == reflect.Interface { + v = v.Elem() + } + return v +} + +func mapFromUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + if st.Kind() != reflect.Map { + return fmt.Errorf("cannot restore map from %v", st.Kind()) + } + + if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) { + return fmt.Errorf("cannot copy map with non-assignable keys: %v %v", st.Key(), dt.Key()) + } + + if sv.IsNil() { + dv.Set(reflect.Zero(dt)) + return nil + } + dv.Set(reflect.MakeMap(dt)) + for _, key := range sv.MapKeys() { + value := reflect.New(dt.Elem()).Elem() + if val := unwrapInterface(sv.MapIndex(key)); val.IsValid() { + if err := fromUnstructured(val, value); err != nil { + return err + } + } else { + value.Set(reflect.Zero(dt.Elem())) + } + if st.Key().AssignableTo(dt.Key()) { + dv.SetMapIndex(key, value) + } else { + dv.SetMapIndex(key.Convert(dt.Key()), value) + } + } + return nil +} + +func sliceFromUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + if st.Kind() == reflect.String && dt.Elem().Kind() == reflect.Uint8 { + // We store original []byte representation as string. + // This conversion is allowed, but we need to be careful about + // marshaling data appropriately. + if len(sv.Interface().(string)) > 0 { + marshalled, err := json.Marshal(sv.Interface()) + if err != nil { + return fmt.Errorf("error encoding %s to json: %v", st, err) + } + // TODO: Is this Unmarshal needed? + var data []byte + err = json.Unmarshal(marshalled, &data) + if err != nil { + return fmt.Errorf("error decoding from json: %v", err) + } + dv.SetBytes(data) + } else { + dv.Set(reflect.Zero(dt)) + } + return nil + } + if st.Kind() != reflect.Slice { + return fmt.Errorf("cannot restore slice from %v", st.Kind()) + } + + if sv.IsNil() { + dv.Set(reflect.Zero(dt)) + return nil + } + dv.Set(reflect.MakeSlice(dt, sv.Len(), sv.Cap())) + for i := 0; i < sv.Len(); i++ { + if err := fromUnstructured(sv.Index(i), dv.Index(i)); err != nil { + return err + } + } + return nil +} + +func pointerFromUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + + if st.Kind() == reflect.Ptr && sv.IsNil() { + dv.Set(reflect.Zero(dt)) + return nil + } + dv.Set(reflect.New(dt.Elem())) + switch st.Kind() { + case reflect.Ptr, reflect.Interface: + return fromUnstructured(sv.Elem(), dv.Elem()) + default: + return fromUnstructured(sv, dv.Elem()) + } +} + +func structFromUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + if st.Kind() != reflect.Map { + return fmt.Errorf("cannot restore struct from: %v", st.Kind()) + } + + for i := 0; i < dt.NumField(); i++ { + fieldInfo := fieldInfoFromField(dt, i) + fv := dv.Field(i) + + if len(fieldInfo.name) == 0 { + // This field is inlined. + if err := fromUnstructured(sv, fv); err != nil { + return err + } + } else { + value := unwrapInterface(sv.MapIndex(fieldInfo.nameValue)) + if value.IsValid() { + if err := fromUnstructured(value, fv); err != nil { + return err + } + } else { + fv.Set(reflect.Zero(fv.Type())) + } + } + } + return nil +} + +func interfaceFromUnstructured(sv, dv reflect.Value) error { + // TODO: Is this conversion safe? + dv.Set(sv) + return nil +} + +// ToUnstructured converts an object into map[string]interface{} representation. +// It uses encoding/json/Marshaler if object implements it or reflection if not. +func (c *unstructuredConverter) ToUnstructured(obj interface{}) (map[string]interface{}, error) { + var u map[string]interface{} + var err error + if unstr, ok := obj.(Unstructured); ok { + u = unstr.UnstructuredContent() + } else { + t := reflect.TypeOf(obj) + value := reflect.ValueOf(obj) + if t.Kind() != reflect.Ptr || value.IsNil() { + return nil, fmt.Errorf("ToUnstructured requires a non-nil pointer to an object, got %v", t) + } + u = map[string]interface{}{} + err = toUnstructured(value.Elem(), reflect.ValueOf(&u).Elem()) + } + if c.mismatchDetection { + newUnstr := map[string]interface{}{} + newErr := toUnstructuredViaJSON(obj, &newUnstr) + if (err != nil) != (newErr != nil) { + klog.Fatalf("ToUnstructured unexpected error for %v: error: %v; newErr: %v", obj, err, newErr) + } + if err == nil && !c.comparison.DeepEqual(u, newUnstr) { + klog.Fatalf("ToUnstructured mismatch\nobj1: %#v\nobj2: %#v", u, newUnstr) + } + } + if err != nil { + return nil, err + } + return u, nil +} + +// DeepCopyJSON deep copies the passed value, assuming it is a valid JSON representation i.e. only contains +// types produced by json.Unmarshal() and also int64. +// bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number and nil +func DeepCopyJSON(x map[string]interface{}) map[string]interface{} { + return DeepCopyJSONValue(x).(map[string]interface{}) +} + +// DeepCopyJSONValue deep copies the passed value, assuming it is a valid JSON representation i.e. only contains +// types produced by json.Unmarshal() and also int64. +// bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number and nil +func DeepCopyJSONValue(x interface{}) interface{} { + switch x := x.(type) { + case map[string]interface{}: + if x == nil { + // Typed nil - an interface{} that contains a type map[string]interface{} with a value of nil + return x + } + clone := make(map[string]interface{}, len(x)) + for k, v := range x { + clone[k] = DeepCopyJSONValue(v) + } + return clone + case []interface{}: + if x == nil { + // Typed nil - an interface{} that contains a type []interface{} with a value of nil + return x + } + clone := make([]interface{}, len(x)) + for i, v := range x { + clone[i] = DeepCopyJSONValue(v) + } + return clone + case string, int64, bool, float64, nil, encodingjson.Number: + return x + default: + panic(fmt.Errorf("cannot deep copy %T", x)) + } +} + +func toUnstructuredViaJSON(obj interface{}, u *map[string]interface{}) error { + data, err := json.Marshal(obj) + if err != nil { + return err + } + return json.Unmarshal(data, u) +} + +var ( + nullBytes = []byte("null") + trueBytes = []byte("true") + falseBytes = []byte("false") +) + +func getMarshaler(v reflect.Value) (encodingjson.Marshaler, bool) { + // Check value receivers if v is not a pointer and pointer receivers if v is a pointer + if v.Type().Implements(marshalerType) { + return v.Interface().(encodingjson.Marshaler), true + } + // Check pointer receivers if v is not a pointer + if v.Kind() != reflect.Ptr && v.CanAddr() { + v = v.Addr() + if v.Type().Implements(marshalerType) { + return v.Interface().(encodingjson.Marshaler), true + } + } + return nil, false +} + +func toUnstructured(sv, dv reflect.Value) error { + // Check if the object has a custom JSON marshaller/unmarshaller. + if marshaler, ok := getMarshaler(sv); ok { + if sv.Kind() == reflect.Ptr && sv.IsNil() { + // We're done - we don't need to store anything. + return nil + } + + data, err := marshaler.MarshalJSON() + if err != nil { + return err + } + switch { + case len(data) == 0: + return fmt.Errorf("error decoding from json: empty value") + + case bytes.Equal(data, nullBytes): + // We're done - we don't need to store anything. + + case bytes.Equal(data, trueBytes): + dv.Set(reflect.ValueOf(true)) + + case bytes.Equal(data, falseBytes): + dv.Set(reflect.ValueOf(false)) + + case data[0] == '"': + var result string + err := json.Unmarshal(data, &result) + if err != nil { + return fmt.Errorf("error decoding string from json: %v", err) + } + dv.Set(reflect.ValueOf(result)) + + case data[0] == '{': + result := make(map[string]interface{}) + err := json.Unmarshal(data, &result) + if err != nil { + return fmt.Errorf("error decoding object from json: %v", err) + } + dv.Set(reflect.ValueOf(result)) + + case data[0] == '[': + result := make([]interface{}, 0) + err := json.Unmarshal(data, &result) + if err != nil { + return fmt.Errorf("error decoding array from json: %v", err) + } + dv.Set(reflect.ValueOf(result)) + + default: + var ( + resultInt int64 + resultFloat float64 + err error + ) + if err = json.Unmarshal(data, &resultInt); err == nil { + dv.Set(reflect.ValueOf(resultInt)) + } else if err = json.Unmarshal(data, &resultFloat); err == nil { + dv.Set(reflect.ValueOf(resultFloat)) + } else { + return fmt.Errorf("error decoding number from json: %v", err) + } + } + + return nil + } + + st, dt := sv.Type(), dv.Type() + switch st.Kind() { + case reflect.String: + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + dv.Set(reflect.New(stringType)) + } + dv.Set(reflect.ValueOf(sv.String())) + return nil + case reflect.Bool: + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + dv.Set(reflect.New(boolType)) + } + dv.Set(reflect.ValueOf(sv.Bool())) + return nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + dv.Set(reflect.New(int64Type)) + } + dv.Set(reflect.ValueOf(sv.Int())) + return nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + uVal := sv.Uint() + if uVal > math.MaxInt64 { + return fmt.Errorf("unsigned value %d does not fit into int64 (overflow)", uVal) + } + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + dv.Set(reflect.New(int64Type)) + } + dv.Set(reflect.ValueOf(int64(uVal))) + return nil + case reflect.Float32, reflect.Float64: + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + dv.Set(reflect.New(float64Type)) + } + dv.Set(reflect.ValueOf(sv.Float())) + return nil + case reflect.Map: + return mapToUnstructured(sv, dv) + case reflect.Slice: + return sliceToUnstructured(sv, dv) + case reflect.Ptr: + return pointerToUnstructured(sv, dv) + case reflect.Struct: + return structToUnstructured(sv, dv) + case reflect.Interface: + return interfaceToUnstructured(sv, dv) + default: + return fmt.Errorf("unrecognized type: %v", st.Kind()) + } +} + +func mapToUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + if sv.IsNil() { + dv.Set(reflect.Zero(dt)) + return nil + } + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + if st.Key().Kind() == reflect.String { + switch st.Elem().Kind() { + // TODO It should be possible to reuse the slice for primitive types. + // However, it is panicing in the following form. + // case reflect.String, reflect.Bool, + // reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + // reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + // sv.Set(sv) + // return nil + default: + // We need to do a proper conversion. + } + } + dv.Set(reflect.MakeMap(mapStringInterfaceType)) + dv = dv.Elem() + dt = dv.Type() + } + if dt.Kind() != reflect.Map { + return fmt.Errorf("cannot convert struct to: %v", dt.Kind()) + } + + if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) { + return fmt.Errorf("cannot copy map with non-assignable keys: %v %v", st.Key(), dt.Key()) + } + + for _, key := range sv.MapKeys() { + value := reflect.New(dt.Elem()).Elem() + if err := toUnstructured(sv.MapIndex(key), value); err != nil { + return err + } + if st.Key().AssignableTo(dt.Key()) { + dv.SetMapIndex(key, value) + } else { + dv.SetMapIndex(key.Convert(dt.Key()), value) + } + } + return nil +} + +func sliceToUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + if sv.IsNil() { + dv.Set(reflect.Zero(dt)) + return nil + } + if st.Elem().Kind() == reflect.Uint8 { + dv.Set(reflect.New(stringType)) + data, err := json.Marshal(sv.Bytes()) + if err != nil { + return err + } + var result string + if err = json.Unmarshal(data, &result); err != nil { + return err + } + dv.Set(reflect.ValueOf(result)) + return nil + } + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + switch st.Elem().Kind() { + // TODO It should be possible to reuse the slice for primitive types. + // However, it is panicing in the following form. + // case reflect.String, reflect.Bool, + // reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + // reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + // sv.Set(sv) + // return nil + default: + // We need to do a proper conversion. + dv.Set(reflect.MakeSlice(reflect.SliceOf(dt), sv.Len(), sv.Cap())) + dv = dv.Elem() + dt = dv.Type() + } + } + if dt.Kind() != reflect.Slice { + return fmt.Errorf("cannot convert slice to: %v", dt.Kind()) + } + for i := 0; i < sv.Len(); i++ { + if err := toUnstructured(sv.Index(i), dv.Index(i)); err != nil { + return err + } + } + return nil +} + +func pointerToUnstructured(sv, dv reflect.Value) error { + if sv.IsNil() { + // We're done - we don't need to store anything. + return nil + } + return toUnstructured(sv.Elem(), dv) +} + +func isZero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Map, reflect.Slice: + // TODO: It seems that 0-len maps are ignored in it. + return v.IsNil() || v.Len() == 0 + case reflect.Ptr, reflect.Interface: + return v.IsNil() + } + return false +} + +func structToUnstructured(sv, dv reflect.Value) error { + st, dt := sv.Type(), dv.Type() + if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { + dv.Set(reflect.MakeMap(mapStringInterfaceType)) + dv = dv.Elem() + dt = dv.Type() + } + if dt.Kind() != reflect.Map { + return fmt.Errorf("cannot convert struct to: %v", dt.Kind()) + } + realMap := dv.Interface().(map[string]interface{}) + + for i := 0; i < st.NumField(); i++ { + fieldInfo := fieldInfoFromField(st, i) + fv := sv.Field(i) + + if fieldInfo.name == "-" { + // This field should be skipped. + continue + } + if fieldInfo.omitempty && isZero(fv) { + // omitempty fields should be ignored. + continue + } + if len(fieldInfo.name) == 0 { + // This field is inlined. + if err := toUnstructured(fv, dv); err != nil { + return err + } + continue + } + switch fv.Type().Kind() { + case reflect.String: + realMap[fieldInfo.name] = fv.String() + case reflect.Bool: + realMap[fieldInfo.name] = fv.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + realMap[fieldInfo.name] = fv.Int() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + realMap[fieldInfo.name] = fv.Uint() + case reflect.Float32, reflect.Float64: + realMap[fieldInfo.name] = fv.Float() + default: + subv := reflect.New(dt.Elem()).Elem() + if err := toUnstructured(fv, subv); err != nil { + return err + } + dv.SetMapIndex(fieldInfo.nameValue, subv) + } + } + return nil +} + +func interfaceToUnstructured(sv, dv reflect.Value) error { + if !sv.IsValid() || sv.IsNil() { + dv.Set(reflect.Zero(dv.Type())) + return nil + } + return toUnstructured(sv.Elem(), dv) +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/doc.go b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go new file mode 100644 index 000000000..89feb4010 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/doc.go @@ -0,0 +1,51 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package runtime includes helper functions for working with API objects +// that follow the kubernetes API object conventions, which are: +// +// 0. Your API objects have a common metadata struct member, TypeMeta. +// +// 1. Your code refers to an internal set of API objects. +// +// 2. In a separate package, you have an external set of API objects. +// +// 3. The external set is considered to be versioned, and no breaking +// changes are ever made to it (fields may be added but not changed +// or removed). +// +// 4. As your api evolves, you'll make an additional versioned package +// with every major change. +// +// 5. Versioned packages have conversion functions which convert to +// and from the internal version. +// +// 6. You'll continue to support older versions according to your +// deprecation policy, and you can easily provide a program/library +// to update old versions into new versions because of 5. +// +// 7. All of your serializations and deserializations are handled in a +// centralized place. +// +// Package runtime provides a conversion helper to make 5 easy, and the +// Encode/Decode/DecodeInto trio to accomplish 7. You can also register +// additional "codecs" which use a version of your choice. It's +// recommended that you register your types with runtime in your +// package's init function. +// +// As a bonus, a few common types useful from all api objects and versions +// are provided in types.go. +package runtime // import "k8s.io/apimachinery/pkg/runtime" diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go new file mode 100644 index 000000000..db11eb8bc --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/embedded.go @@ -0,0 +1,142 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "errors" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type encodable struct { + E Encoder `json:"-"` + obj Object + versions []schema.GroupVersion +} + +func (e encodable) GetObjectKind() schema.ObjectKind { return e.obj.GetObjectKind() } +func (e encodable) DeepCopyObject() Object { + out := e + out.obj = e.obj.DeepCopyObject() + copy(out.versions, e.versions) + return out +} + +// NewEncodable creates an object that will be encoded with the provided codec on demand. +// Provided as a convenience for test cases dealing with internal objects. +func NewEncodable(e Encoder, obj Object, versions ...schema.GroupVersion) Object { + if _, ok := obj.(*Unknown); ok { + return obj + } + return encodable{e, obj, versions} +} + +func (e encodable) UnmarshalJSON(in []byte) error { + return errors.New("runtime.encodable cannot be unmarshalled from JSON") +} + +// Marshal may get called on pointers or values, so implement MarshalJSON on value. +// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go +func (e encodable) MarshalJSON() ([]byte, error) { + return Encode(e.E, e.obj) +} + +// NewEncodableList creates an object that will be encoded with the provided codec on demand. +// Provided as a convenience for test cases dealing with internal objects. +func NewEncodableList(e Encoder, objects []Object, versions ...schema.GroupVersion) []Object { + out := make([]Object, len(objects)) + for i := range objects { + if _, ok := objects[i].(*Unknown); ok { + out[i] = objects[i] + continue + } + out[i] = NewEncodable(e, objects[i], versions...) + } + return out +} + +func (e *Unknown) UnmarshalJSON(in []byte) error { + if e == nil { + return errors.New("runtime.Unknown: UnmarshalJSON on nil pointer") + } + e.TypeMeta = TypeMeta{} + e.Raw = append(e.Raw[0:0], in...) + e.ContentEncoding = "" + e.ContentType = ContentTypeJSON + return nil +} + +// Marshal may get called on pointers or values, so implement MarshalJSON on value. +// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go +func (e Unknown) MarshalJSON() ([]byte, error) { + // If ContentType is unset, we assume this is JSON. + if e.ContentType != "" && e.ContentType != ContentTypeJSON { + return nil, errors.New("runtime.Unknown: MarshalJSON on non-json data") + } + if e.Raw == nil { + return []byte("null"), nil + } + return e.Raw, nil +} + +func Convert_runtime_Object_To_runtime_RawExtension(in *Object, out *RawExtension, s conversion.Scope) error { + if in == nil { + out.Raw = []byte("null") + return nil + } + obj := *in + if unk, ok := obj.(*Unknown); ok { + if unk.Raw != nil { + out.Raw = unk.Raw + return nil + } + obj = out.Object + } + if obj == nil { + out.Raw = nil + return nil + } + out.Object = obj + return nil +} + +func Convert_runtime_RawExtension_To_runtime_Object(in *RawExtension, out *Object, s conversion.Scope) error { + if in.Object != nil { + *out = in.Object + return nil + } + data := in.Raw + if len(data) == 0 || (len(data) == 4 && string(data) == "null") { + *out = nil + return nil + } + *out = &Unknown{ + Raw: data, + // TODO: Set ContentEncoding and ContentType appropriately. + // Currently we set ContentTypeJSON to make tests passing. + ContentType: ContentTypeJSON, + } + return nil +} + +func DefaultEmbeddedConversions() []interface{} { + return []interface{}{ + Convert_runtime_Object_To_runtime_RawExtension, + Convert_runtime_RawExtension_To_runtime_Object, + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/error.go b/vendor/k8s.io/apimachinery/pkg/runtime/error.go new file mode 100644 index 000000000..322b0313d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/error.go @@ -0,0 +1,122 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" + "reflect" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type notRegisteredErr struct { + schemeName string + gvk schema.GroupVersionKind + target GroupVersioner + t reflect.Type +} + +func NewNotRegisteredErrForKind(schemeName string, gvk schema.GroupVersionKind) error { + return ¬RegisteredErr{schemeName: schemeName, gvk: gvk} +} + +func NewNotRegisteredErrForType(schemeName string, t reflect.Type) error { + return ¬RegisteredErr{schemeName: schemeName, t: t} +} + +func NewNotRegisteredErrForTarget(schemeName string, t reflect.Type, target GroupVersioner) error { + return ¬RegisteredErr{schemeName: schemeName, t: t, target: target} +} + +func NewNotRegisteredGVKErrForTarget(schemeName string, gvk schema.GroupVersionKind, target GroupVersioner) error { + return ¬RegisteredErr{schemeName: schemeName, gvk: gvk, target: target} +} + +func (k *notRegisteredErr) Error() string { + if k.t != nil && k.target != nil { + return fmt.Sprintf("%v is not suitable for converting to %q in scheme %q", k.t, k.target, k.schemeName) + } + nullGVK := schema.GroupVersionKind{} + if k.gvk != nullGVK && k.target != nil { + return fmt.Sprintf("%q is not suitable for converting to %q in scheme %q", k.gvk.GroupVersion(), k.target, k.schemeName) + } + if k.t != nil { + return fmt.Sprintf("no kind is registered for the type %v in scheme %q", k.t, k.schemeName) + } + if len(k.gvk.Kind) == 0 { + return fmt.Sprintf("no version %q has been registered in scheme %q", k.gvk.GroupVersion(), k.schemeName) + } + if k.gvk.Version == APIVersionInternal { + return fmt.Sprintf("no kind %q is registered for the internal version of group %q in scheme %q", k.gvk.Kind, k.gvk.Group, k.schemeName) + } + + return fmt.Sprintf("no kind %q is registered for version %q in scheme %q", k.gvk.Kind, k.gvk.GroupVersion(), k.schemeName) +} + +// IsNotRegisteredError returns true if the error indicates the provided +// object or input data is not registered. +func IsNotRegisteredError(err error) bool { + if err == nil { + return false + } + _, ok := err.(*notRegisteredErr) + return ok +} + +type missingKindErr struct { + data string +} + +func NewMissingKindErr(data string) error { + return &missingKindErr{data} +} + +func (k *missingKindErr) Error() string { + return fmt.Sprintf("Object 'Kind' is missing in '%s'", k.data) +} + +// IsMissingKind returns true if the error indicates that the provided object +// is missing a 'Kind' field. +func IsMissingKind(err error) bool { + if err == nil { + return false + } + _, ok := err.(*missingKindErr) + return ok +} + +type missingVersionErr struct { + data string +} + +func NewMissingVersionErr(data string) error { + return &missingVersionErr{data} +} + +func (k *missingVersionErr) Error() string { + return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data) +} + +// IsMissingVersion returns true if the error indicates that the provided object +// is missing a 'Version' field. +func IsMissingVersion(err error) bool { + if err == nil { + return false + } + _, ok := err.(*missingVersionErr) + return ok +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/extension.go b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go new file mode 100644 index 000000000..9056397fa --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/extension.go @@ -0,0 +1,51 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "bytes" + "encoding/json" + "errors" +) + +func (re *RawExtension) UnmarshalJSON(in []byte) error { + if re == nil { + return errors.New("runtime.RawExtension: UnmarshalJSON on nil pointer") + } + if !bytes.Equal(in, []byte("null")) { + re.Raw = append(re.Raw[0:0], in...) + } + return nil +} + +// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value. +// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go +func (re RawExtension) MarshalJSON() ([]byte, error) { + if re.Raw == nil { + // TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which + // expect to call json.Marshal on arbitrary versioned objects (even those not in + // the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with + // kubectl get on objects not in the scheme needs to be updated to ensure that the + // objects that are not part of the scheme are correctly put into the right form. + if re.Object != nil { + return json.Marshal(re.Object) + } + return []byte("null"), nil + } + // TODO: Check whether ContentType is actually JSON before returning it. + return re.Raw, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go new file mode 100644 index 000000000..9b15989c8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -0,0 +1,753 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto + +/* + Package runtime is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto + + It has these top-level messages: + RawExtension + TypeMeta + Unknown +*/ +package runtime + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *RawExtension) Reset() { *m = RawExtension{} } +func (*RawExtension) ProtoMessage() {} +func (*RawExtension) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *TypeMeta) Reset() { *m = TypeMeta{} } +func (*TypeMeta) ProtoMessage() {} +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *Unknown) Reset() { *m = Unknown{} } +func (*Unknown) ProtoMessage() {} +func (*Unknown) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func init() { + proto.RegisterType((*RawExtension)(nil), "k8s.io.apimachinery.pkg.runtime.RawExtension") + proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.runtime.TypeMeta") + proto.RegisterType((*Unknown)(nil), "k8s.io.apimachinery.pkg.runtime.Unknown") +} +func (m *RawExtension) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RawExtension) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Raw != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) + i += copy(dAtA[i:], m.Raw) + } + return i, nil +} + +func (m *TypeMeta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i += copy(dAtA[i:], m.APIVersion) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) + i += copy(dAtA[i:], m.Kind) + return i, nil +} + +func (m *Unknown) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Unknown) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.TypeMeta.Size())) + n1, err := m.TypeMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.Raw != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) + i += copy(dAtA[i:], m.Raw) + } + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentEncoding))) + i += copy(dAtA[i:], m.ContentEncoding) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentType))) + i += copy(dAtA[i:], m.ContentType) + return i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *RawExtension) Size() (n int) { + var l int + _ = l + if m.Raw != nil { + l = len(m.Raw) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *TypeMeta) Size() (n int) { + var l int + _ = l + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Kind) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Unknown) Size() (n int) { + var l int + _ = l + l = m.TypeMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.Raw != nil { + l = len(m.Raw) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.ContentEncoding) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ContentType) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *RawExtension) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RawExtension{`, + `Raw:` + valueToStringGenerated(this.Raw) + `,`, + `}`, + }, "") + return s +} +func (this *TypeMeta) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TypeMeta{`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `}`, + }, "") + return s +} +func (this *Unknown) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unknown{`, + `TypeMeta:` + strings.Replace(strings.Replace(this.TypeMeta.String(), "TypeMeta", "TypeMeta", 1), `&`, ``, 1) + `,`, + `Raw:` + valueToStringGenerated(this.Raw) + `,`, + `ContentEncoding:` + fmt.Sprintf("%v", this.ContentEncoding) + `,`, + `ContentType:` + fmt.Sprintf("%v", this.ContentType) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *RawExtension) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RawExtension: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RawExtension: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) + if m.Raw == nil { + m.Raw = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TypeMeta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TypeMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TypeMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unknown) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Unknown: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unknown: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TypeMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) + if m.Raw == nil { + m.Raw = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContentEncoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContentEncoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContentType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x4f, 0xab, 0x13, 0x31, + 0x14, 0xc5, 0x27, 0xaf, 0x85, 0x3e, 0xd3, 0xc2, 0x93, 0xb8, 0x70, 0x74, 0x91, 0x79, 0x74, 0xe5, + 0x5b, 0xbc, 0x04, 0x1e, 0x08, 0x6e, 0x3b, 0xa5, 0xa0, 0x88, 0x20, 0xc1, 0x3f, 0xe0, 0xca, 0x74, + 0x26, 0x4e, 0xc3, 0xd0, 0x9b, 0x21, 0xcd, 0x38, 0x76, 0xe7, 0x47, 0xf0, 0x63, 0x75, 0xd9, 0x65, + 0x57, 0xc5, 0x8e, 0x1f, 0xc2, 0xad, 0x34, 0x4d, 0x6b, 0xd5, 0x85, 0xbb, 0xe4, 0x9e, 0xf3, 0x3b, + 0xf7, 0x1e, 0xfc, 0xbc, 0x7c, 0xb6, 0x60, 0xda, 0xf0, 0xb2, 0x9e, 0x2a, 0x0b, 0xca, 0xa9, 0x05, + 0xff, 0xac, 0x20, 0x37, 0x96, 0x07, 0x41, 0x56, 0x7a, 0x2e, 0xb3, 0x99, 0x06, 0x65, 0x97, 0xbc, + 0x2a, 0x0b, 0x6e, 0x6b, 0x70, 0x7a, 0xae, 0x78, 0xa1, 0x40, 0x59, 0xe9, 0x54, 0xce, 0x2a, 0x6b, + 0x9c, 0x21, 0xc9, 0x01, 0x60, 0xe7, 0x00, 0xab, 0xca, 0x82, 0x05, 0xe0, 0xf1, 0x6d, 0xa1, 0xdd, + 0xac, 0x9e, 0xb2, 0xcc, 0xcc, 0x79, 0x61, 0x0a, 0xc3, 0x3d, 0x37, 0xad, 0x3f, 0xf9, 0x9f, 0xff, + 0xf8, 0xd7, 0x21, 0x6f, 0x78, 0x83, 0x07, 0x42, 0x36, 0x93, 0x2f, 0x4e, 0xc1, 0x42, 0x1b, 0x20, + 0x8f, 0x70, 0xc7, 0xca, 0x26, 0x46, 0xd7, 0xe8, 0xc9, 0x20, 0xed, 0xb5, 0xdb, 0xa4, 0x23, 0x64, + 0x23, 0xf6, 0xb3, 0xe1, 0x47, 0x7c, 0xf9, 0x66, 0x59, 0xa9, 0x57, 0xca, 0x49, 0x72, 0x87, 0xb1, + 0xac, 0xf4, 0x3b, 0x65, 0xf7, 0x90, 0x77, 0xdf, 0x4b, 0xc9, 0x6a, 0x9b, 0x44, 0xed, 0x36, 0xc1, + 0xa3, 0xd7, 0x2f, 0x82, 0x22, 0xce, 0x5c, 0xe4, 0x1a, 0x77, 0x4b, 0x0d, 0x79, 0x7c, 0xe1, 0xdd, + 0x83, 0xe0, 0xee, 0xbe, 0xd4, 0x90, 0x0b, 0xaf, 0x0c, 0x7f, 0x22, 0xdc, 0x7b, 0x0b, 0x25, 0x98, + 0x06, 0xc8, 0x7b, 0x7c, 0xe9, 0xc2, 0x36, 0x9f, 0xdf, 0xbf, 0xbb, 0x61, 0xff, 0xe9, 0xce, 0x8e, + 0xe7, 0xa5, 0xf7, 0x43, 0xf8, 0xe9, 0x60, 0x71, 0x0a, 0x3b, 0x36, 0xbc, 0xf8, 0xb7, 0x21, 0x19, + 0xe1, 0xab, 0xcc, 0x80, 0x53, 0xe0, 0x26, 0x90, 0x99, 0x5c, 0x43, 0x11, 0x77, 0xfc, 0xb1, 0x0f, + 0x43, 0xde, 0xd5, 0xf8, 0x4f, 0x59, 0xfc, 0xed, 0x27, 0x4f, 0x71, 0x3f, 0x8c, 0xf6, 0xab, 0xe3, + 0xae, 0xc7, 0x1f, 0x04, 0xbc, 0x3f, 0xfe, 0x2d, 0x89, 0x73, 0x5f, 0x7a, 0xbb, 0xda, 0xd1, 0x68, + 0xbd, 0xa3, 0xd1, 0x66, 0x47, 0xa3, 0xaf, 0x2d, 0x45, 0xab, 0x96, 0xa2, 0x75, 0x4b, 0xd1, 0xa6, + 0xa5, 0xe8, 0x7b, 0x4b, 0xd1, 0xb7, 0x1f, 0x34, 0xfa, 0xd0, 0x0b, 0x45, 0x7f, 0x05, 0x00, 0x00, + 0xff, 0xff, 0xe3, 0x33, 0x18, 0x0b, 0x50, 0x02, 0x00, 0x00, +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto new file mode 100644 index 000000000..0e212ec94 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto @@ -0,0 +1,127 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apimachinery.pkg.runtime; + +// Package-wide variables from generator "generated". +option go_package = "runtime"; + +// RawExtension is used to hold extensions in external versions. +// +// To use this, make a field which has RawExtension as its type in your external, versioned +// struct, and Object in your internal struct. You also need to register your +// various plugin types. +// +// // Internal package: +// type MyAPIObject struct { +// runtime.TypeMeta `json:",inline"` +// MyPlugin runtime.Object `json:"myPlugin"` +// } +// type PluginA struct { +// AOption string `json:"aOption"` +// } +// +// // External package: +// type MyAPIObject struct { +// runtime.TypeMeta `json:",inline"` +// MyPlugin runtime.RawExtension `json:"myPlugin"` +// } +// type PluginA struct { +// AOption string `json:"aOption"` +// } +// +// // On the wire, the JSON will look something like this: +// { +// "kind":"MyAPIObject", +// "apiVersion":"v1", +// "myPlugin": { +// "kind":"PluginA", +// "aOption":"foo", +// }, +// } +// +// So what happens? Decode first uses json or yaml to unmarshal the serialized data into +// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. +// The next step is to copy (using pkg/conversion) into the internal struct. The runtime +// package's DefaultScheme has conversion functions installed which will unpack the +// JSON stored in RawExtension, turning it into the correct object type, and storing it +// in the Object. (TODO: In the case where the object is of an unknown type, a +// runtime.Unknown object will be created and stored.) +// +// +k8s:deepcopy-gen=true +// +protobuf=true +// +k8s:openapi-gen=true +message RawExtension { + // Raw is the underlying serialization of this object. + // + // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. + optional bytes raw = 1; +} + +// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, +// like this: +// type MyAwesomeAPIObject struct { +// runtime.TypeMeta `json:",inline"` +// ... // other fields +// } +// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind +// +// TypeMeta is provided here for convenience. You may use it directly from this package or define +// your own with the same fields. +// +// +k8s:deepcopy-gen=false +// +protobuf=true +// +k8s:openapi-gen=true +message TypeMeta { + // +optional + optional string apiVersion = 1; + + // +optional + optional string kind = 2; +} + +// Unknown allows api objects with unknown types to be passed-through. This can be used +// to deal with the API objects from a plug-in. Unknown objects still have functioning +// TypeMeta features-- kind, version, etc. +// TODO: Make this object have easy access to field based accessors and settors for +// metadata and field mutatation. +// +// +k8s:deepcopy-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +protobuf=true +// +k8s:openapi-gen=true +message Unknown { + optional TypeMeta typeMeta = 1; + + // Raw will hold the complete serialized object which couldn't be matched + // with a registered type. Most likely, nothing should be done with this + // except for passing it through the system. + optional bytes raw = 2; + + // ContentEncoding is encoding used to encode 'Raw' data. + // Unspecified means no encoding. + optional string contentEncoding = 3; + + // ContentType is serialization method used to serialize 'Raw'. + // Unspecified means ContentTypeJSON. + optional string contentType = 4; +} + diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/helper.go b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go new file mode 100644 index 000000000..33f11eb10 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/helper.go @@ -0,0 +1,212 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" + "io" + "reflect" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/errors" +) + +// unsafeObjectConvertor implements ObjectConvertor using the unsafe conversion path. +type unsafeObjectConvertor struct { + *Scheme +} + +var _ ObjectConvertor = unsafeObjectConvertor{} + +// ConvertToVersion converts in to the provided outVersion without copying the input first, which +// is only safe if the output object is not mutated or reused. +func (c unsafeObjectConvertor) ConvertToVersion(in Object, outVersion GroupVersioner) (Object, error) { + return c.Scheme.UnsafeConvertToVersion(in, outVersion) +} + +// UnsafeObjectConvertor performs object conversion without copying the object structure, +// for use when the converted object will not be reused or mutated. Primarily for use within +// versioned codecs, which use the external object for serialization but do not return it. +func UnsafeObjectConvertor(scheme *Scheme) ObjectConvertor { + return unsafeObjectConvertor{scheme} +} + +// SetField puts the value of src, into fieldName, which must be a member of v. +// The value of src must be assignable to the field. +func SetField(src interface{}, v reflect.Value, fieldName string) error { + field := v.FieldByName(fieldName) + if !field.IsValid() { + return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface()) + } + srcValue := reflect.ValueOf(src) + if srcValue.Type().AssignableTo(field.Type()) { + field.Set(srcValue) + return nil + } + if srcValue.Type().ConvertibleTo(field.Type()) { + field.Set(srcValue.Convert(field.Type())) + return nil + } + return fmt.Errorf("couldn't assign/convert %v to %v", srcValue.Type(), field.Type()) +} + +// Field puts the value of fieldName, which must be a member of v, into dest, +// which must be a variable to which this field's value can be assigned. +func Field(v reflect.Value, fieldName string, dest interface{}) error { + field := v.FieldByName(fieldName) + if !field.IsValid() { + return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface()) + } + destValue, err := conversion.EnforcePtr(dest) + if err != nil { + return err + } + if field.Type().AssignableTo(destValue.Type()) { + destValue.Set(field) + return nil + } + if field.Type().ConvertibleTo(destValue.Type()) { + destValue.Set(field.Convert(destValue.Type())) + return nil + } + return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), destValue.Type()) +} + +// FieldPtr puts the address of fieldName, which must be a member of v, +// into dest, which must be an address of a variable to which this field's +// address can be assigned. +func FieldPtr(v reflect.Value, fieldName string, dest interface{}) error { + field := v.FieldByName(fieldName) + if !field.IsValid() { + return fmt.Errorf("couldn't find %v field in %#v", fieldName, v.Interface()) + } + v, err := conversion.EnforcePtr(dest) + if err != nil { + return err + } + field = field.Addr() + if field.Type().AssignableTo(v.Type()) { + v.Set(field) + return nil + } + if field.Type().ConvertibleTo(v.Type()) { + v.Set(field.Convert(v.Type())) + return nil + } + return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), v.Type()) +} + +// EncodeList ensures that each object in an array is converted to a Unknown{} in serialized form. +// TODO: accept a content type. +func EncodeList(e Encoder, objects []Object) error { + var errs []error + for i := range objects { + data, err := Encode(e, objects[i]) + if err != nil { + errs = append(errs, err) + continue + } + // TODO: Set ContentEncoding and ContentType. + objects[i] = &Unknown{Raw: data} + } + return errors.NewAggregate(errs) +} + +func decodeListItem(obj *Unknown, decoders []Decoder) (Object, error) { + for _, decoder := range decoders { + // TODO: Decode based on ContentType. + obj, err := Decode(decoder, obj.Raw) + if err != nil { + if IsNotRegisteredError(err) { + continue + } + return nil, err + } + return obj, nil + } + // could not decode, so leave the object as Unknown, but give the decoders the + // chance to set Unknown.TypeMeta if it is available. + for _, decoder := range decoders { + if err := DecodeInto(decoder, obj.Raw, obj); err == nil { + return obj, nil + } + } + return obj, nil +} + +// DecodeList alters the list in place, attempting to decode any objects found in +// the list that have the Unknown type. Any errors that occur are returned +// after the entire list is processed. Decoders are tried in order. +func DecodeList(objects []Object, decoders ...Decoder) []error { + errs := []error(nil) + for i, obj := range objects { + switch t := obj.(type) { + case *Unknown: + decoded, err := decodeListItem(t, decoders) + if err != nil { + errs = append(errs, err) + break + } + objects[i] = decoded + } + } + return errs +} + +// MultiObjectTyper returns the types of objects across multiple schemes in order. +type MultiObjectTyper []ObjectTyper + +var _ ObjectTyper = MultiObjectTyper{} + +func (m MultiObjectTyper) ObjectKinds(obj Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) { + for _, t := range m { + gvks, unversionedType, err = t.ObjectKinds(obj) + if err == nil { + return + } + } + return +} + +func (m MultiObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { + for _, t := range m { + if t.Recognizes(gvk) { + return true + } + } + return false +} + +// SetZeroValue would set the object of objPtr to zero value of its type. +func SetZeroValue(objPtr Object) error { + v, err := conversion.EnforcePtr(objPtr) + if err != nil { + return err + } + v.Set(reflect.Zero(v.Type())) + return nil +} + +// DefaultFramer is valid for any stream that can read objects serially without +// any separation in the stream. +var DefaultFramer = defaultFramer{} + +type defaultFramer struct{} + +func (defaultFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { return r } +func (defaultFramer) NewFrameWriter(w io.Writer) io.Writer { return w } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go new file mode 100644 index 000000000..699ff13e0 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -0,0 +1,252 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "io" + "net/url" + + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const ( + // APIVersionInternal may be used if you are registering a type that should not + // be considered stable or serialized - it is a convention only and has no + // special behavior in this package. + APIVersionInternal = "__internal" +) + +// GroupVersioner refines a set of possible conversion targets into a single option. +type GroupVersioner interface { + // KindForGroupVersionKinds returns a desired target group version kind for the given input, or returns ok false if no + // target is known. In general, if the return target is not in the input list, the caller is expected to invoke + // Scheme.New(target) and then perform a conversion between the current Go type and the destination Go type. + // Sophisticated implementations may use additional information about the input kinds to pick a destination kind. + KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (target schema.GroupVersionKind, ok bool) +} + +// Encoder writes objects to a serialized form +type Encoder interface { + // Encode writes an object to a stream. Implementations may return errors if the versions are + // incompatible, or if no conversion is defined. + Encode(obj Object, w io.Writer) error +} + +// Decoder attempts to load an object from data. +type Decoder interface { + // Decode attempts to deserialize the provided data using either the innate typing of the scheme or the + // default kind, group, and version provided. It returns a decoded object as well as the kind, group, and + // version from the serialized data, or an error. If into is non-nil, it will be used as the target type + // and implementations may choose to use it rather than reallocating an object. However, the object is not + // guaranteed to be populated. The returned object is not guaranteed to match into. If defaults are + // provided, they are applied to the data by default. If no defaults or partial defaults are provided, the + // type of the into may be used to guide conversion decisions. + Decode(data []byte, defaults *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) +} + +// Serializer is the core interface for transforming objects into a serialized format and back. +// Implementations may choose to perform conversion of the object, but no assumptions should be made. +type Serializer interface { + Encoder + Decoder +} + +// Codec is a Serializer that deals with the details of versioning objects. It offers the same +// interface as Serializer, so this is a marker to consumers that care about the version of the objects +// they receive. +type Codec Serializer + +// ParameterCodec defines methods for serializing and deserializing API objects to url.Values and +// performing any necessary conversion. Unlike the normal Codec, query parameters are not self describing +// and the desired version must be specified. +type ParameterCodec interface { + // DecodeParameters takes the given url.Values in the specified group version and decodes them + // into the provided object, or returns an error. + DecodeParameters(parameters url.Values, from schema.GroupVersion, into Object) error + // EncodeParameters encodes the provided object as query parameters or returns an error. + EncodeParameters(obj Object, to schema.GroupVersion) (url.Values, error) +} + +// Framer is a factory for creating readers and writers that obey a particular framing pattern. +type Framer interface { + NewFrameReader(r io.ReadCloser) io.ReadCloser + NewFrameWriter(w io.Writer) io.Writer +} + +// SerializerInfo contains information about a specific serialization format +type SerializerInfo struct { + // MediaType is the value that represents this serializer over the wire. + MediaType string + // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. + EncodesAsText bool + // Serializer is the individual object serializer for this media type. + Serializer Serializer + // PrettySerializer, if set, can serialize this object in a form biased towards + // readability. + PrettySerializer Serializer + // StreamSerializer, if set, describes the streaming serialization format + // for this media type. + StreamSerializer *StreamSerializerInfo +} + +// StreamSerializerInfo contains information about a specific stream serialization format +type StreamSerializerInfo struct { + // EncodesAsText indicates this serializer can be encoded to UTF-8 safely. + EncodesAsText bool + // Serializer is the top level object serializer for this type when streaming + Serializer + // Framer is the factory for retrieving streams that separate objects on the wire + Framer +} + +// NegotiatedSerializer is an interface used for obtaining encoders, decoders, and serializers +// for multiple supported media types. This would commonly be accepted by a server component +// that performs HTTP content negotiation to accept multiple formats. +type NegotiatedSerializer interface { + // SupportedMediaTypes is the media types supported for reading and writing single objects. + SupportedMediaTypes() []SerializerInfo + + // EncoderForVersion returns an encoder that ensures objects being written to the provided + // serializer are in the provided group version. + EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder + // DecoderForVersion returns a decoder that ensures objects being read by the provided + // serializer are in the provided group version by default. + DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder +} + +// StorageSerializer is an interface used for obtaining encoders, decoders, and serializers +// that can read and write data at rest. This would commonly be used by client tools that must +// read files, or server side storage interfaces that persist restful objects. +type StorageSerializer interface { + // SupportedMediaTypes are the media types supported for reading and writing objects. + SupportedMediaTypes() []SerializerInfo + + // UniversalDeserializer returns a Serializer that can read objects in multiple supported formats + // by introspecting the data at rest. + UniversalDeserializer() Decoder + + // EncoderForVersion returns an encoder that ensures objects being written to the provided + // serializer are in the provided group version. + EncoderForVersion(serializer Encoder, gv GroupVersioner) Encoder + // DecoderForVersion returns a decoder that ensures objects being read by the provided + // serializer are in the provided group version by default. + DecoderToVersion(serializer Decoder, gv GroupVersioner) Decoder +} + +// NestedObjectEncoder is an optional interface that objects may implement to be given +// an opportunity to encode any nested Objects / RawExtensions during serialization. +type NestedObjectEncoder interface { + EncodeNestedObjects(e Encoder) error +} + +// NestedObjectDecoder is an optional interface that objects may implement to be given +// an opportunity to decode any nested Objects / RawExtensions during serialization. +type NestedObjectDecoder interface { + DecodeNestedObjects(d Decoder) error +} + +/////////////////////////////////////////////////////////////////////////////// +// Non-codec interfaces + +type ObjectDefaulter interface { + // Default takes an object (must be a pointer) and applies any default values. + // Defaulters may not error. + Default(in Object) +} + +type ObjectVersioner interface { + ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error) +} + +// ObjectConvertor converts an object to a different version. +type ObjectConvertor interface { + // Convert attempts to convert one object into another, or returns an error. This + // method does not mutate the in object, but the in and out object might share data structures, + // i.e. the out object cannot be mutated without mutating the in object as well. + // The context argument will be passed to all nested conversions. + Convert(in, out, context interface{}) error + // ConvertToVersion takes the provided object and converts it the provided version. This + // method does not mutate the in object, but the in and out object might share data structures, + // i.e. the out object cannot be mutated without mutating the in object as well. + // This method is similar to Convert() but handles specific details of choosing the correct + // output version. + ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error) + ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) +} + +// ObjectTyper contains methods for extracting the APIVersion and Kind +// of objects. +type ObjectTyper interface { + // ObjectKinds returns the all possible group,version,kind of the provided object, true if + // the object is unversioned, or an error if the object is not recognized + // (IsNotRegisteredError will return true). + ObjectKinds(Object) ([]schema.GroupVersionKind, bool, error) + // Recognizes returns true if the scheme is able to handle the provided version and kind, + // or more precisely that the provided version is a possible conversion or decoding + // target. + Recognizes(gvk schema.GroupVersionKind) bool +} + +// ObjectCreater contains methods for instantiating an object by kind and version. +type ObjectCreater interface { + New(kind schema.GroupVersionKind) (out Object, err error) +} + +// ResourceVersioner provides methods for setting and retrieving +// the resource version from an API object. +type ResourceVersioner interface { + SetResourceVersion(obj Object, version string) error + ResourceVersion(obj Object) (string, error) +} + +// SelfLinker provides methods for setting and retrieving the SelfLink field of an API object. +type SelfLinker interface { + SetSelfLink(obj Object, selfLink string) error + SelfLink(obj Object) (string, error) + + // Knowing Name is sometimes necessary to use a SelfLinker. + Name(obj Object) (string, error) + // Knowing Namespace is sometimes necessary to use a SelfLinker + Namespace(obj Object) (string, error) +} + +// Object interface must be supported by all API types registered with Scheme. Since objects in a scheme are +// expected to be serialized to the wire, the interface an Object must provide to the Scheme allows +// serializers to set the kind, version, and group the object is represented as. An Object may choose +// to return a no-op ObjectKindAccessor in cases where it is not expected to be serialized. +type Object interface { + GetObjectKind() schema.ObjectKind + DeepCopyObject() Object +} + +// Unstructured objects store values as map[string]interface{}, with only values that can be serialized +// to JSON allowed. +type Unstructured interface { + Object + // UnstructuredContent returns a non-nil map with this object's contents. Values may be + // []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to + // and from JSON. SetUnstructuredContent should be used to mutate the contents. + UnstructuredContent() map[string]interface{} + // SetUnstructuredContent updates the object content to match the provided map. + SetUnstructuredContent(map[string]interface{}) + // IsList returns true if this type is a list or matches the list convention - has an array called "items". + IsList() bool + // EachListItem should pass a single item out of the list as an Object to the provided function. Any + // error should terminate the iteration. If IsList() returns false, this method should return an error + // instead of calling the provided function. + EachListItem(func(Object) error) error +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/register.go b/vendor/k8s.io/apimachinery/pkg/runtime/register.go new file mode 100644 index 000000000..eeb380c3d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/register.go @@ -0,0 +1,61 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import "k8s.io/apimachinery/pkg/runtime/schema" + +// SetGroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta +func (obj *TypeMeta) SetGroupVersionKind(gvk schema.GroupVersionKind) { + obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() +} + +// GroupVersionKind satisfies the ObjectKind interface for all objects that embed TypeMeta +func (obj *TypeMeta) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +} + +func (obj *TypeMeta) GetObjectKind() schema.ObjectKind { return obj } + +// GetObjectKind implements Object for VersionedObjects, returning an empty ObjectKind +// interface if no objects are provided, or the ObjectKind interface of the object in the +// highest array position. +func (obj *VersionedObjects) GetObjectKind() schema.ObjectKind { + last := obj.Last() + if last == nil { + return schema.EmptyObjectKind + } + return last.GetObjectKind() +} + +// First returns the leftmost object in the VersionedObjects array, which is usually the +// object as serialized on the wire. +func (obj *VersionedObjects) First() Object { + if len(obj.Objects) == 0 { + return nil + } + return obj.Objects[0] +} + +// Last is the rightmost object in the VersionedObjects array, which is the object after +// all transformations have been applied. This is the same object that would be returned +// by Decode in a normal invocation (without VersionedObjects in the into argument). +func (obj *VersionedObjects) Last() Object { + if len(obj.Objects) == 0 { + return nil + } + return obj.Objects[len(obj.Objects)-1] +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go new file mode 100644 index 000000000..28a61d5fb --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -0,0 +1,63 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto + +/* +Package schema is a generated protocol buffer package. + +It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto + +It has these top-level messages: +*/ +package schema + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xcc, 0xaf, 0x6e, 0xc3, 0x30, + 0x10, 0xc7, 0x71, 0x9b, 0x0c, 0x0c, 0x0e, 0x0e, 0x1c, 0x1c, 0xda, 0x7c, 0x74, 0xb8, 0x2f, 0x50, + 0x5e, 0xe6, 0x24, 0x57, 0xc7, 0xb2, 0xfc, 0x47, 0x8e, 0x5d, 0xa9, 0xac, 0x8f, 0xd0, 0xc7, 0x0a, + 0x0c, 0x0c, 0x6c, 0xdc, 0x17, 0xa9, 0x64, 0x07, 0x94, 0xdd, 0x4f, 0xa7, 0xcf, 0xf7, 0xf3, 0x68, + 0xfe, 0x27, 0xa1, 0x3d, 0x9a, 0xdc, 0x51, 0x74, 0x94, 0x68, 0xc2, 0x0b, 0xb9, 0xc1, 0x47, 0xdc, + 0x1f, 0x32, 0x68, 0x2b, 0xfb, 0x51, 0x3b, 0x8a, 0x57, 0x0c, 0x46, 0x61, 0xcc, 0x2e, 0x69, 0x4b, + 0x38, 0xf5, 0x23, 0x59, 0x89, 0x8a, 0x1c, 0x45, 0x99, 0x68, 0x10, 0x21, 0xfa, 0xe4, 0xbf, 0x7e, + 0x9a, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0x44, 0x73, 0xdf, 0x7f, 0x4a, 0xa7, 0x31, 0x77, + 0xa2, 0xf7, 0x16, 0x95, 0x57, 0x1e, 0x2b, 0xef, 0xf2, 0xb9, 0xae, 0x3a, 0xea, 0xd5, 0xb2, 0x87, + 0xdf, 0x79, 0x03, 0xb6, 0x6c, 0xc0, 0xd6, 0x0d, 0xd8, 0xad, 0x00, 0x9f, 0x0b, 0xf0, 0xa5, 0x00, + 0x5f, 0x0b, 0xf0, 0x47, 0x01, 0x7e, 0x7f, 0x02, 0x3b, 0x7d, 0xb4, 0xf8, 0x2b, 0x00, 0x00, 0xff, + 0xff, 0xba, 0x7e, 0x65, 0xf4, 0xd6, 0x00, 0x00, 0x00, +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto new file mode 100644 index 000000000..5aeeaa100 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto @@ -0,0 +1,26 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apimachinery.pkg.runtime.schema; + +// Package-wide variables from generator "generated". +option go_package = "schema"; + diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go new file mode 100644 index 000000000..4c67ed598 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go @@ -0,0 +1,300 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package schema + +import ( + "fmt" + "strings" +) + +// ParseResourceArg takes the common style of string which may be either `resource.group.com` or `resource.version.group.com` +// and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended +// but with a knowledge of all GroupVersions, calling code can take a very good guess. If there are only two segments, then +// `*GroupVersionResource` is nil. +// `resource.group.com` -> `group=com, version=group, resource=resource` and `group=group.com, resource=resource` +func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) { + var gvr *GroupVersionResource + if strings.Count(arg, ".") >= 2 { + s := strings.SplitN(arg, ".", 3) + gvr = &GroupVersionResource{Group: s[2], Version: s[1], Resource: s[0]} + } + + return gvr, ParseGroupResource(arg) +} + +// ParseKindArg takes the common style of string which may be either `Kind.group.com` or `Kind.version.group.com` +// and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended +// but with a knowledge of all GroupKinds, calling code can take a very good guess. If there are only two segments, then +// `*GroupVersionResource` is nil. +// `Kind.group.com` -> `group=com, version=group, kind=Kind` and `group=group.com, kind=Kind` +func ParseKindArg(arg string) (*GroupVersionKind, GroupKind) { + var gvk *GroupVersionKind + if strings.Count(arg, ".") >= 2 { + s := strings.SplitN(arg, ".", 3) + gvk = &GroupVersionKind{Group: s[2], Version: s[1], Kind: s[0]} + } + + return gvk, ParseGroupKind(arg) +} + +// GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +type GroupResource struct { + Group string + Resource string +} + +func (gr GroupResource) WithVersion(version string) GroupVersionResource { + return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource} +} + +func (gr GroupResource) Empty() bool { + return len(gr.Group) == 0 && len(gr.Resource) == 0 +} + +func (gr GroupResource) String() string { + if len(gr.Group) == 0 { + return gr.Resource + } + return gr.Resource + "." + gr.Group +} + +func ParseGroupKind(gk string) GroupKind { + i := strings.Index(gk, ".") + if i == -1 { + return GroupKind{Kind: gk} + } + + return GroupKind{Group: gk[i+1:], Kind: gk[:i]} +} + +// ParseGroupResource turns "resource.group" string into a GroupResource struct. Empty strings are allowed +// for each field. +func ParseGroupResource(gr string) GroupResource { + if i := strings.Index(gr, "."); i >= 0 { + return GroupResource{Group: gr[i+1:], Resource: gr[:i]} + } + return GroupResource{Resource: gr} +} + +// GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion +// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling +type GroupVersionResource struct { + Group string + Version string + Resource string +} + +func (gvr GroupVersionResource) Empty() bool { + return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0 +} + +func (gvr GroupVersionResource) GroupResource() GroupResource { + return GroupResource{Group: gvr.Group, Resource: gvr.Resource} +} + +func (gvr GroupVersionResource) GroupVersion() GroupVersion { + return GroupVersion{Group: gvr.Group, Version: gvr.Version} +} + +func (gvr GroupVersionResource) String() string { + return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "") +} + +// GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying +// concepts during lookup stages without having partially valid types +type GroupKind struct { + Group string + Kind string +} + +func (gk GroupKind) Empty() bool { + return len(gk.Group) == 0 && len(gk.Kind) == 0 +} + +func (gk GroupKind) WithVersion(version string) GroupVersionKind { + return GroupVersionKind{Group: gk.Group, Version: version, Kind: gk.Kind} +} + +func (gk GroupKind) String() string { + if len(gk.Group) == 0 { + return gk.Kind + } + return gk.Kind + "." + gk.Group +} + +// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion +// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling +type GroupVersionKind struct { + Group string + Version string + Kind string +} + +// Empty returns true if group, version, and kind are empty +func (gvk GroupVersionKind) Empty() bool { + return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0 +} + +func (gvk GroupVersionKind) GroupKind() GroupKind { + return GroupKind{Group: gvk.Group, Kind: gvk.Kind} +} + +func (gvk GroupVersionKind) GroupVersion() GroupVersion { + return GroupVersion{Group: gvk.Group, Version: gvk.Version} +} + +func (gvk GroupVersionKind) String() string { + return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind +} + +// GroupVersion contains the "group" and the "version", which uniquely identifies the API. +type GroupVersion struct { + Group string + Version string +} + +// Empty returns true if group and version are empty +func (gv GroupVersion) Empty() bool { + return len(gv.Group) == 0 && len(gv.Version) == 0 +} + +// String puts "group" and "version" into a single "group/version" string. For the legacy v1 +// it returns "v1". +func (gv GroupVersion) String() string { + // special case the internal apiVersion for the legacy kube types + if gv.Empty() { + return "" + } + + // special case of "v1" for backward compatibility + if len(gv.Group) == 0 && gv.Version == "v1" { + return gv.Version + } + if len(gv.Group) > 0 { + return gv.Group + "/" + gv.Version + } + return gv.Version +} + +// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false +// if none of the options match the group. It prefers a match to group and version over just group. +// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme. +// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion) +// in fewer places. +func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) { + for _, gvk := range kinds { + if gvk.Group == gv.Group && gvk.Version == gv.Version { + return gvk, true + } + } + for _, gvk := range kinds { + if gvk.Group == gv.Group { + return gv.WithKind(gvk.Kind), true + } + } + return GroupVersionKind{}, false +} + +// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error +// if it cannot parse the string. +func ParseGroupVersion(gv string) (GroupVersion, error) { + // this can be the internal version for the legacy kube types + // TODO once we've cleared the last uses as strings, this special case should be removed. + if (len(gv) == 0) || (gv == "/") { + return GroupVersion{}, nil + } + + switch strings.Count(gv, "/") { + case 0: + return GroupVersion{"", gv}, nil + case 1: + i := strings.Index(gv, "/") + return GroupVersion{gv[:i], gv[i+1:]}, nil + default: + return GroupVersion{}, fmt.Errorf("unexpected GroupVersion string: %v", gv) + } +} + +// WithKind creates a GroupVersionKind based on the method receiver's GroupVersion and the passed Kind. +func (gv GroupVersion) WithKind(kind string) GroupVersionKind { + return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind} +} + +// WithResource creates a GroupVersionResource based on the method receiver's GroupVersion and the passed Resource. +func (gv GroupVersion) WithResource(resource string) GroupVersionResource { + return GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: resource} +} + +// GroupVersions can be used to represent a set of desired group versions. +// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme. +// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion) +// in fewer places. +type GroupVersions []GroupVersion + +// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false +// if none of the options match the group. +func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (GroupVersionKind, bool) { + var targets []GroupVersionKind + for _, gv := range gvs { + target, ok := gv.KindForGroupVersionKinds(kinds) + if !ok { + continue + } + targets = append(targets, target) + } + if len(targets) == 1 { + return targets[0], true + } + if len(targets) > 1 { + return bestMatch(kinds, targets), true + } + return GroupVersionKind{}, false +} + +// bestMatch tries to pick best matching GroupVersionKind and falls back to the first +// found if no exact match exists. +func bestMatch(kinds []GroupVersionKind, targets []GroupVersionKind) GroupVersionKind { + for _, gvk := range targets { + for _, k := range kinds { + if k == gvk { + return k + } + } + } + return targets[0] +} + +// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that +// do not use TypeMeta. +func (gvk GroupVersionKind) ToAPIVersionAndKind() (string, string) { + if gvk.Empty() { + return "", "" + } + return gvk.GroupVersion().String(), gvk.Kind +} + +// FromAPIVersionAndKind returns a GVK representing the provided fields for types that +// do not use TypeMeta. This method exists to support test types and legacy serializations +// that have a distinct group and kind. +// TODO: further reduce usage of this method. +func FromAPIVersionAndKind(apiVersion, kind string) GroupVersionKind { + if gv, err := ParseGroupVersion(apiVersion); err == nil { + return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind} + } + return GroupVersionKind{Kind: kind} +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go new file mode 100644 index 000000000..b57066845 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/interfaces.go @@ -0,0 +1,40 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package schema + +// All objects that are serialized from a Scheme encode their type information. This interface is used +// by serialization to set type information from the Scheme onto the serialized version of an object. +// For objects that cannot be serialized or have unique requirements, this interface may be a no-op. +type ObjectKind interface { + // SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil + // should clear the current setting. + SetGroupVersionKind(kind GroupVersionKind) + // GroupVersionKind returns the stored group, version, and kind of an object, or nil if the object does + // not expose or provide these fields. + GroupVersionKind() GroupVersionKind +} + +// EmptyObjectKind implements the ObjectKind interface as a noop +var EmptyObjectKind = emptyObjectKind{} + +type emptyObjectKind struct{} + +// SetGroupVersionKind implements the ObjectKind interface +func (emptyObjectKind) SetGroupVersionKind(gvk GroupVersionKind) {} + +// GroupVersionKind implements the ObjectKind interface +func (emptyObjectKind) GroupVersionKind() GroupVersionKind { return GroupVersionKind{} } diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go new file mode 100644 index 000000000..fd37e293a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -0,0 +1,754 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" + "net/url" + "reflect" + "strings" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/naming" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" +) + +// Scheme defines methods for serializing and deserializing API objects, a type +// registry for converting group, version, and kind information to and from Go +// schemas, and mappings between Go schemas of different versions. A scheme is the +// foundation for a versioned API and versioned configuration over time. +// +// In a Scheme, a Type is a particular Go struct, a Version is a point-in-time +// identifier for a particular representation of that Type (typically backwards +// compatible), a Kind is the unique name for that Type within the Version, and a +// Group identifies a set of Versions, Kinds, and Types that evolve over time. An +// Unversioned Type is one that is not yet formally bound to a type and is promised +// to be backwards compatible (effectively a "v1" of a Type that does not expect +// to break in the future). +// +// Schemes are not expected to change at runtime and are only threadsafe after +// registration is complete. +type Scheme struct { + // versionMap allows one to figure out the go type of an object with + // the given version and name. + gvkToType map[schema.GroupVersionKind]reflect.Type + + // typeToGroupVersion allows one to find metadata for a given go object. + // The reflect.Type we index by should *not* be a pointer. + typeToGVK map[reflect.Type][]schema.GroupVersionKind + + // unversionedTypes are transformed without conversion in ConvertToVersion. + unversionedTypes map[reflect.Type]schema.GroupVersionKind + + // unversionedKinds are the names of kinds that can be created in the context of any group + // or version + // TODO: resolve the status of unversioned types. + unversionedKinds map[string]reflect.Type + + // Map from version and resource to the corresponding func to convert + // resource field labels in that version to internal version. + fieldLabelConversionFuncs map[schema.GroupVersionKind]FieldLabelConversionFunc + + // defaulterFuncs is an array of interfaces to be called with an object to provide defaulting + // the provided object must be a pointer. + defaulterFuncs map[reflect.Type]func(interface{}) + + // converter stores all registered conversion functions. It also has + // default converting behavior. + converter *conversion.Converter + + // versionPriority is a map of groups to ordered lists of versions for those groups indicating the + // default priorities of these versions as registered in the scheme + versionPriority map[string][]string + + // observedVersions keeps track of the order we've seen versions during type registration + observedVersions []schema.GroupVersion + + // schemeName is the name of this scheme. If you don't specify a name, the stack of the NewScheme caller will be used. + // This is useful for error reporting to indicate the origin of the scheme. + schemeName string +} + +// FieldLabelConversionFunc converts a field selector to internal representation. +type FieldLabelConversionFunc func(label, value string) (internalLabel, internalValue string, err error) + +// NewScheme creates a new Scheme. This scheme is pluggable by default. +func NewScheme() *Scheme { + s := &Scheme{ + gvkToType: map[schema.GroupVersionKind]reflect.Type{}, + typeToGVK: map[reflect.Type][]schema.GroupVersionKind{}, + unversionedTypes: map[reflect.Type]schema.GroupVersionKind{}, + unversionedKinds: map[string]reflect.Type{}, + fieldLabelConversionFuncs: map[schema.GroupVersionKind]FieldLabelConversionFunc{}, + defaulterFuncs: map[reflect.Type]func(interface{}){}, + versionPriority: map[string][]string{}, + schemeName: naming.GetNameFromCallsite(internalPackages...), + } + s.converter = conversion.NewConverter(s.nameFunc) + + utilruntime.Must(s.AddConversionFuncs(DefaultEmbeddedConversions()...)) + + // Enable map[string][]string conversions by default + utilruntime.Must(s.AddConversionFuncs(DefaultStringConversions...)) + utilruntime.Must(s.RegisterInputDefaults(&map[string][]string{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields)) + utilruntime.Must(s.RegisterInputDefaults(&url.Values{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields)) + return s +} + +// nameFunc returns the name of the type that we wish to use to determine when two types attempt +// a conversion. Defaults to the go name of the type if the type is not registered. +func (s *Scheme) nameFunc(t reflect.Type) string { + // find the preferred names for this type + gvks, ok := s.typeToGVK[t] + if !ok { + return t.Name() + } + + for _, gvk := range gvks { + internalGV := gvk.GroupVersion() + internalGV.Version = APIVersionInternal // this is hacky and maybe should be passed in + internalGVK := internalGV.WithKind(gvk.Kind) + + if internalType, exists := s.gvkToType[internalGVK]; exists { + return s.typeToGVK[internalType][0].Kind + } + } + + return gvks[0].Kind +} + +// fromScope gets the input version, desired output version, and desired Scheme +// from a conversion.Scope. +func (s *Scheme) fromScope(scope conversion.Scope) *Scheme { + return s +} + +// Converter allows access to the converter for the scheme +func (s *Scheme) Converter() *conversion.Converter { + return s.converter +} + +// AddUnversionedTypes registers the provided types as "unversioned", which means that they follow special rules. +// Whenever an object of this type is serialized, it is serialized with the provided group version and is not +// converted. Thus unversioned objects are expected to remain backwards compatible forever, as if they were in an +// API group and version that would never be updated. +// +// TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into +// every version with particular schemas. Resolve this method at that point. +func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) { + s.addObservedVersion(version) + s.AddKnownTypes(version, types...) + for _, obj := range types { + t := reflect.TypeOf(obj).Elem() + gvk := version.WithKind(t.Name()) + s.unversionedTypes[t] = gvk + if old, ok := s.unversionedKinds[gvk.Kind]; ok && t != old { + panic(fmt.Sprintf("%v.%v has already been registered as unversioned kind %q - kind name must be unique in scheme %q", old.PkgPath(), old.Name(), gvk, s.schemeName)) + } + s.unversionedKinds[gvk.Kind] = t + } +} + +// AddKnownTypes registers all types passed in 'types' as being members of version 'version'. +// All objects passed to types should be pointers to structs. The name that go reports for +// the struct becomes the "kind" field when encoding. Version may not be empty - use the +// APIVersionInternal constant if you have a type that does not have a formal version. +func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) { + s.addObservedVersion(gv) + for _, obj := range types { + t := reflect.TypeOf(obj) + if t.Kind() != reflect.Ptr { + panic("All types must be pointers to structs.") + } + t = t.Elem() + s.AddKnownTypeWithName(gv.WithKind(t.Name()), obj) + } +} + +// AddKnownTypeWithName is like AddKnownTypes, but it lets you specify what this type should +// be encoded as. Useful for testing when you don't want to make multiple packages to define +// your structs. Version may not be empty - use the APIVersionInternal constant if you have a +// type that does not have a formal version. +func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) { + s.addObservedVersion(gvk.GroupVersion()) + t := reflect.TypeOf(obj) + if len(gvk.Version) == 0 { + panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t)) + } + if t.Kind() != reflect.Ptr { + panic("All types must be pointers to structs.") + } + t = t.Elem() + if t.Kind() != reflect.Struct { + panic("All types must be pointers to structs.") + } + + if oldT, found := s.gvkToType[gvk]; found && oldT != t { + panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v in scheme %q", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name(), s.schemeName)) + } + + s.gvkToType[gvk] = t + + for _, existingGvk := range s.typeToGVK[t] { + if existingGvk == gvk { + return + } + } + s.typeToGVK[t] = append(s.typeToGVK[t], gvk) +} + +// KnownTypes returns the types known for the given version. +func (s *Scheme) KnownTypes(gv schema.GroupVersion) map[string]reflect.Type { + types := make(map[string]reflect.Type) + for gvk, t := range s.gvkToType { + if gv != gvk.GroupVersion() { + continue + } + + types[gvk.Kind] = t + } + return types +} + +// AllKnownTypes returns the all known types. +func (s *Scheme) AllKnownTypes() map[schema.GroupVersionKind]reflect.Type { + return s.gvkToType +} + +// ObjectKinds returns all possible group,version,kind of the go object, true if the +// object is considered unversioned, or an error if it's not a pointer or is unregistered. +func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error) { + // Unstructured objects are always considered to have their declared GVK + if _, ok := obj.(Unstructured); ok { + // we require that the GVK be populated in order to recognize the object + gvk := obj.GetObjectKind().GroupVersionKind() + if len(gvk.Kind) == 0 { + return nil, false, NewMissingKindErr("unstructured object has no kind") + } + if len(gvk.Version) == 0 { + return nil, false, NewMissingVersionErr("unstructured object has no version") + } + return []schema.GroupVersionKind{gvk}, false, nil + } + + v, err := conversion.EnforcePtr(obj) + if err != nil { + return nil, false, err + } + t := v.Type() + + gvks, ok := s.typeToGVK[t] + if !ok { + return nil, false, NewNotRegisteredErrForType(s.schemeName, t) + } + _, unversionedType := s.unversionedTypes[t] + + return gvks, unversionedType, nil +} + +// Recognizes returns true if the scheme is able to handle the provided group,version,kind +// of an object. +func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool { + _, exists := s.gvkToType[gvk] + return exists +} + +func (s *Scheme) IsUnversioned(obj Object) (bool, bool) { + v, err := conversion.EnforcePtr(obj) + if err != nil { + return false, false + } + t := v.Type() + + if _, ok := s.typeToGVK[t]; !ok { + return false, false + } + _, ok := s.unversionedTypes[t] + return ok, true +} + +// New returns a new API object of the given version and name, or an error if it hasn't +// been registered. The version and kind fields must be specified. +func (s *Scheme) New(kind schema.GroupVersionKind) (Object, error) { + if t, exists := s.gvkToType[kind]; exists { + return reflect.New(t).Interface().(Object), nil + } + + if t, exists := s.unversionedKinds[kind.Kind]; exists { + return reflect.New(t).Interface().(Object), nil + } + return nil, NewNotRegisteredErrForKind(s.schemeName, kind) +} + +// Log sets a logger on the scheme. For test purposes only +func (s *Scheme) Log(l conversion.DebugLogger) { + s.converter.Debug = l +} + +// AddIgnoredConversionType identifies a pair of types that should be skipped by +// conversion (because the data inside them is explicitly dropped during +// conversion). +func (s *Scheme) AddIgnoredConversionType(from, to interface{}) error { + return s.converter.RegisterIgnoredConversion(from, to) +} + +// AddConversionFuncs adds functions to the list of conversion functions. The given +// functions should know how to convert between two of your API objects, or their +// sub-objects. We deduce how to call these functions from the types of their two +// parameters; see the comment for Converter.Register. +// +// Note that, if you need to copy sub-objects that didn't change, you can use the +// conversion.Scope object that will be passed to your conversion function. +// Additionally, all conversions started by Scheme will set the SrcVersion and +// DestVersion fields on the Meta object. Example: +// +// s.AddConversionFuncs( +// func(in *InternalObject, out *ExternalObject, scope conversion.Scope) error { +// // You can depend on Meta() being non-nil, and this being set to +// // the source version, e.g., "" +// s.Meta().SrcVersion +// // You can depend on this being set to the destination version, +// // e.g., "v1". +// s.Meta().DestVersion +// // Call scope.Convert to copy sub-fields. +// s.Convert(&in.SubFieldThatMoved, &out.NewLocation.NewName, 0) +// return nil +// }, +// ) +// +// (For more detail about conversion functions, see Converter.Register's comment.) +// +// Also note that the default behavior, if you don't add a conversion function, is to +// sanely copy fields that have the same names and same type names. It's OK if the +// destination type has extra fields, but it must not remove any. So you only need to +// add conversion functions for things with changed/removed fields. +func (s *Scheme) AddConversionFuncs(conversionFuncs ...interface{}) error { + for _, f := range conversionFuncs { + if err := s.converter.RegisterConversionFunc(f); err != nil { + return err + } + } + return nil +} + +// AddConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (s *Scheme) AddConversionFunc(a, b interface{}, fn conversion.ConversionFunc) error { + return s.converter.RegisterUntypedConversionFunc(a, b, fn) +} + +// AddGeneratedConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (s *Scheme) AddGeneratedConversionFunc(a, b interface{}, fn conversion.ConversionFunc) error { + return s.converter.RegisterGeneratedUntypedConversionFunc(a, b, fn) +} + +// AddFieldLabelConversionFunc adds a conversion function to convert field selectors +// of the given kind from the given version to internal version representation. +func (s *Scheme) AddFieldLabelConversionFunc(gvk schema.GroupVersionKind, conversionFunc FieldLabelConversionFunc) error { + s.fieldLabelConversionFuncs[gvk] = conversionFunc + return nil +} + +// RegisterInputDefaults sets the provided field mapping function and field matching +// as the defaults for the provided input type. The fn may be nil, in which case no +// mapping will happen by default. Use this method to register a mechanism for handling +// a specific input type in conversion, such as a map[string]string to structs. +func (s *Scheme) RegisterInputDefaults(in interface{}, fn conversion.FieldMappingFunc, defaultFlags conversion.FieldMatchingFlags) error { + return s.converter.RegisterInputDefaults(in, fn, defaultFlags) +} + +// AddTypeDefaultingFunc registers a function that is passed a pointer to an +// object and can default fields on the object. These functions will be invoked +// when Default() is called. The function will never be called unless the +// defaulted object matches srcType. If this function is invoked twice with the +// same srcType, the fn passed to the later call will be used instead. +func (s *Scheme) AddTypeDefaultingFunc(srcType Object, fn func(interface{})) { + s.defaulterFuncs[reflect.TypeOf(srcType)] = fn +} + +// Default sets defaults on the provided Object. +func (s *Scheme) Default(src Object) { + if fn, ok := s.defaulterFuncs[reflect.TypeOf(src)]; ok { + fn(src) + } +} + +// Convert will attempt to convert in into out. Both must be pointers. For easy +// testing of conversion functions. Returns an error if the conversion isn't +// possible. You can call this with types that haven't been registered (for example, +// a to test conversion of types that are nested within registered types). The +// context interface is passed to the convertor. Convert also supports Unstructured +// types and will convert them intelligently. +func (s *Scheme) Convert(in, out interface{}, context interface{}) error { + unstructuredIn, okIn := in.(Unstructured) + unstructuredOut, okOut := out.(Unstructured) + switch { + case okIn && okOut: + // converting unstructured input to an unstructured output is a straight copy - unstructured + // is a "smart holder" and the contents are passed by reference between the two objects + unstructuredOut.SetUnstructuredContent(unstructuredIn.UnstructuredContent()) + return nil + + case okOut: + // if the output is an unstructured object, use the standard Go type to unstructured + // conversion. The object must not be internal. + obj, ok := in.(Object) + if !ok { + return fmt.Errorf("unable to convert object type %T to Unstructured, must be a runtime.Object", in) + } + gvks, unversioned, err := s.ObjectKinds(obj) + if err != nil { + return err + } + gvk := gvks[0] + + // if no conversion is necessary, convert immediately + if unversioned || gvk.Version != APIVersionInternal { + content, err := DefaultUnstructuredConverter.ToUnstructured(in) + if err != nil { + return err + } + unstructuredOut.SetUnstructuredContent(content) + unstructuredOut.GetObjectKind().SetGroupVersionKind(gvk) + return nil + } + + // attempt to convert the object to an external version first. + target, ok := context.(GroupVersioner) + if !ok { + return fmt.Errorf("unable to convert the internal object type %T to Unstructured without providing a preferred version to convert to", in) + } + // Convert is implicitly unsafe, so we don't need to perform a safe conversion + versioned, err := s.UnsafeConvertToVersion(obj, target) + if err != nil { + return err + } + content, err := DefaultUnstructuredConverter.ToUnstructured(versioned) + if err != nil { + return err + } + unstructuredOut.SetUnstructuredContent(content) + return nil + + case okIn: + // converting an unstructured object to any type is modeled by first converting + // the input to a versioned type, then running standard conversions + typed, err := s.unstructuredToTyped(unstructuredIn) + if err != nil { + return err + } + in = typed + } + + flags, meta := s.generateConvertMeta(in) + meta.Context = context + if flags == 0 { + flags = conversion.AllowDifferentFieldTypeNames + } + return s.converter.Convert(in, out, flags, meta) +} + +// ConvertFieldLabel alters the given field label and value for an kind field selector from +// versioned representation to an unversioned one or returns an error. +func (s *Scheme) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { + conversionFunc, ok := s.fieldLabelConversionFuncs[gvk] + if !ok { + return DefaultMetaV1FieldSelectorConversion(label, value) + } + return conversionFunc(label, value) +} + +// ConvertToVersion attempts to convert an input object to its matching Kind in another +// version within this scheme. Will return an error if the provided version does not +// contain the inKind (or a mapping by name defined with AddKnownTypeWithName). Will also +// return an error if the conversion does not result in a valid Object being +// returned. Passes target down to the conversion methods as the Context on the scope. +func (s *Scheme) ConvertToVersion(in Object, target GroupVersioner) (Object, error) { + return s.convertToVersion(true, in, target) +} + +// UnsafeConvertToVersion will convert in to the provided target if such a conversion is possible, +// but does not guarantee the output object does not share fields with the input object. It attempts to be as +// efficient as possible when doing conversion. +func (s *Scheme) UnsafeConvertToVersion(in Object, target GroupVersioner) (Object, error) { + return s.convertToVersion(false, in, target) +} + +// convertToVersion handles conversion with an optional copy. +func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) (Object, error) { + var t reflect.Type + + if u, ok := in.(Unstructured); ok { + typed, err := s.unstructuredToTyped(u) + if err != nil { + return nil, err + } + + in = typed + // unstructuredToTyped returns an Object, which must be a pointer to a struct. + t = reflect.TypeOf(in).Elem() + + } else { + // determine the incoming kinds with as few allocations as possible. + t = reflect.TypeOf(in) + if t.Kind() != reflect.Ptr { + return nil, fmt.Errorf("only pointer types may be converted: %v", t) + } + t = t.Elem() + if t.Kind() != reflect.Struct { + return nil, fmt.Errorf("only pointers to struct types may be converted: %v", t) + } + } + + kinds, ok := s.typeToGVK[t] + if !ok || len(kinds) == 0 { + return nil, NewNotRegisteredErrForType(s.schemeName, t) + } + + gvk, ok := target.KindForGroupVersionKinds(kinds) + if !ok { + // try to see if this type is listed as unversioned (for legacy support) + // TODO: when we move to server API versions, we should completely remove the unversioned concept + if unversionedKind, ok := s.unversionedTypes[t]; ok { + if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok { + return copyAndSetTargetKind(copy, in, gvk) + } + return copyAndSetTargetKind(copy, in, unversionedKind) + } + return nil, NewNotRegisteredErrForTarget(s.schemeName, t, target) + } + + // target wants to use the existing type, set kind and return (no conversion necessary) + for _, kind := range kinds { + if gvk == kind { + return copyAndSetTargetKind(copy, in, gvk) + } + } + + // type is unversioned, no conversion necessary + if unversionedKind, ok := s.unversionedTypes[t]; ok { + if gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{unversionedKind}); ok { + return copyAndSetTargetKind(copy, in, gvk) + } + return copyAndSetTargetKind(copy, in, unversionedKind) + } + + out, err := s.New(gvk) + if err != nil { + return nil, err + } + + if copy { + in = in.DeepCopyObject() + } + + flags, meta := s.generateConvertMeta(in) + meta.Context = target + if err := s.converter.Convert(in, out, flags, meta); err != nil { + return nil, err + } + + setTargetKind(out, gvk) + return out, nil +} + +// unstructuredToTyped attempts to transform an unstructured object to a typed +// object if possible. It will return an error if conversion is not possible, or the versioned +// Go form of the object. Note that this conversion will lose fields. +func (s *Scheme) unstructuredToTyped(in Unstructured) (Object, error) { + // the type must be something we recognize + gvks, _, err := s.ObjectKinds(in) + if err != nil { + return nil, err + } + typed, err := s.New(gvks[0]) + if err != nil { + return nil, err + } + if err := DefaultUnstructuredConverter.FromUnstructured(in.UnstructuredContent(), typed); err != nil { + return nil, fmt.Errorf("unable to convert unstructured object to %v: %v", gvks[0], err) + } + return typed, nil +} + +// generateConvertMeta constructs the meta value we pass to Convert. +func (s *Scheme) generateConvertMeta(in interface{}) (conversion.FieldMatchingFlags, *conversion.Meta) { + return s.converter.DefaultMeta(reflect.TypeOf(in)) +} + +// copyAndSetTargetKind performs a conditional copy before returning the object, or an error if copy was not successful. +func copyAndSetTargetKind(copy bool, obj Object, kind schema.GroupVersionKind) (Object, error) { + if copy { + obj = obj.DeepCopyObject() + } + setTargetKind(obj, kind) + return obj, nil +} + +// setTargetKind sets the kind on an object, taking into account whether the target kind is the internal version. +func setTargetKind(obj Object, kind schema.GroupVersionKind) { + if kind.Version == APIVersionInternal { + // internal is a special case + // TODO: look at removing the need to special case this + obj.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) + return + } + obj.GetObjectKind().SetGroupVersionKind(kind) +} + +// SetVersionPriority allows specifying a precise order of priority. All specified versions must be in the same group, +// and the specified order overwrites any previously specified order for this group +func (s *Scheme) SetVersionPriority(versions ...schema.GroupVersion) error { + groups := sets.String{} + order := []string{} + for _, version := range versions { + if len(version.Version) == 0 || version.Version == APIVersionInternal { + return fmt.Errorf("internal versions cannot be prioritized: %v", version) + } + + groups.Insert(version.Group) + order = append(order, version.Version) + } + if len(groups) != 1 { + return fmt.Errorf("must register versions for exactly one group: %v", strings.Join(groups.List(), ", ")) + } + + s.versionPriority[groups.List()[0]] = order + return nil +} + +// PrioritizedVersionsForGroup returns versions for a single group in priority order +func (s *Scheme) PrioritizedVersionsForGroup(group string) []schema.GroupVersion { + ret := []schema.GroupVersion{} + for _, version := range s.versionPriority[group] { + ret = append(ret, schema.GroupVersion{Group: group, Version: version}) + } + for _, observedVersion := range s.observedVersions { + if observedVersion.Group != group { + continue + } + found := false + for _, existing := range ret { + if existing == observedVersion { + found = true + break + } + } + if !found { + ret = append(ret, observedVersion) + } + } + + return ret +} + +// PrioritizedVersionsAllGroups returns all known versions in their priority order. Groups are random, but +// versions for a single group are prioritized +func (s *Scheme) PrioritizedVersionsAllGroups() []schema.GroupVersion { + ret := []schema.GroupVersion{} + for group, versions := range s.versionPriority { + for _, version := range versions { + ret = append(ret, schema.GroupVersion{Group: group, Version: version}) + } + } + for _, observedVersion := range s.observedVersions { + found := false + for _, existing := range ret { + if existing == observedVersion { + found = true + break + } + } + if !found { + ret = append(ret, observedVersion) + } + } + return ret +} + +// PreferredVersionAllGroups returns the most preferred version for every group. +// group ordering is random. +func (s *Scheme) PreferredVersionAllGroups() []schema.GroupVersion { + ret := []schema.GroupVersion{} + for group, versions := range s.versionPriority { + for _, version := range versions { + ret = append(ret, schema.GroupVersion{Group: group, Version: version}) + break + } + } + for _, observedVersion := range s.observedVersions { + found := false + for _, existing := range ret { + if existing.Group == observedVersion.Group { + found = true + break + } + } + if !found { + ret = append(ret, observedVersion) + } + } + + return ret +} + +// IsGroupRegistered returns true if types for the group have been registered with the scheme +func (s *Scheme) IsGroupRegistered(group string) bool { + for _, observedVersion := range s.observedVersions { + if observedVersion.Group == group { + return true + } + } + return false +} + +// IsVersionRegistered returns true if types for the version have been registered with the scheme +func (s *Scheme) IsVersionRegistered(version schema.GroupVersion) bool { + for _, observedVersion := range s.observedVersions { + if observedVersion == version { + return true + } + } + + return false +} + +func (s *Scheme) addObservedVersion(version schema.GroupVersion) { + if len(version.Version) == 0 || version.Version == APIVersionInternal { + return + } + for _, observedVersion := range s.observedVersions { + if observedVersion == version { + return + } + } + + s.observedVersions = append(s.observedVersions, version) +} + +func (s *Scheme) Name() string { + return s.schemeName +} + +// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common +// call chains to NewReflector, so they'd be low entropy names for reflectors +var internalPackages = []string{"k8s.io/apimachinery/pkg/runtime/scheme.go"} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go new file mode 100644 index 000000000..944db4818 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme_builder.go @@ -0,0 +1,48 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +// SchemeBuilder collects functions that add things to a scheme. It's to allow +// code to compile without explicitly referencing generated types. You should +// declare one in each package that will have generated deep copy or conversion +// functions. +type SchemeBuilder []func(*Scheme) error + +// AddToScheme applies all the stored functions to the scheme. A non-nil error +// indicates that one function failed and the attempt was abandoned. +func (sb *SchemeBuilder) AddToScheme(s *Scheme) error { + for _, f := range *sb { + if err := f(s); err != nil { + return err + } + } + return nil +} + +// Register adds a scheme setup function to the list. +func (sb *SchemeBuilder) Register(funcs ...func(*Scheme) error) { + for _, f := range funcs { + *sb = append(*sb, f) + } +} + +// NewSchemeBuilder calls Register for you. +func NewSchemeBuilder(funcs ...func(*Scheme) error) SchemeBuilder { + var sb SchemeBuilder + sb.Register(funcs...) + return sb +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go new file mode 100644 index 000000000..5bc642bc8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/swagger_doc_generator.go @@ -0,0 +1,262 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "bytes" + "fmt" + "go/ast" + "go/doc" + "go/parser" + "go/token" + "io" + "reflect" + "strings" +) + +// Pair of strings. We keed the name of fields and the doc +type Pair struct { + Name, Doc string +} + +// KubeTypes is an array to represent all available types in a parsed file. [0] is for the type itself +type KubeTypes []Pair + +func astFrom(filePath string) *doc.Package { + fset := token.NewFileSet() + m := make(map[string]*ast.File) + + f, err := parser.ParseFile(fset, filePath, nil, parser.ParseComments) + if err != nil { + fmt.Println(err) + return nil + } + + m[filePath] = f + apkg, _ := ast.NewPackage(fset, m, nil, nil) + + return doc.New(apkg, "", 0) +} + +func fmtRawDoc(rawDoc string) string { + var buffer bytes.Buffer + delPrevChar := func() { + if buffer.Len() > 0 { + buffer.Truncate(buffer.Len() - 1) // Delete the last " " or "\n" + } + } + + // Ignore all lines after --- + rawDoc = strings.Split(rawDoc, "---")[0] + + for _, line := range strings.Split(rawDoc, "\n") { + line = strings.TrimRight(line, " ") + leading := strings.TrimLeft(line, " ") + switch { + case len(line) == 0: // Keep paragraphs + delPrevChar() + buffer.WriteString("\n\n") + case strings.HasPrefix(leading, "TODO"): // Ignore one line TODOs + case strings.HasPrefix(leading, "+"): // Ignore instructions to the generators + default: + if strings.HasPrefix(line, " ") || strings.HasPrefix(line, "\t") { + delPrevChar() + line = "\n" + line + "\n" // Replace it with newline. This is useful when we have a line with: "Example:\n\tJSON-someting..." + } else { + line += " " + } + buffer.WriteString(line) + } + } + + postDoc := strings.TrimRight(buffer.String(), "\n") + postDoc = strings.Replace(postDoc, "\\\"", "\"", -1) // replace user's \" to " + postDoc = strings.Replace(postDoc, "\"", "\\\"", -1) // Escape " + postDoc = strings.Replace(postDoc, "\n", "\\n", -1) + postDoc = strings.Replace(postDoc, "\t", "\\t", -1) + + return postDoc +} + +// fieldName returns the name of the field as it should appear in JSON format +// "-" indicates that this field is not part of the JSON representation +func fieldName(field *ast.Field) string { + jsonTag := "" + if field.Tag != nil { + jsonTag = reflect.StructTag(field.Tag.Value[1 : len(field.Tag.Value)-1]).Get("json") // Delete first and last quotation + if strings.Contains(jsonTag, "inline") { + return "-" + } + } + + jsonTag = strings.Split(jsonTag, ",")[0] // This can return "-" + if jsonTag == "" { + if field.Names != nil { + return field.Names[0].Name + } + return field.Type.(*ast.Ident).Name + } + return jsonTag +} + +// A buffer of lines that will be written. +type bufferedLine struct { + line string + indentation int +} + +type buffer struct { + lines []bufferedLine +} + +func newBuffer() *buffer { + return &buffer{ + lines: make([]bufferedLine, 0), + } +} + +func (b *buffer) addLine(line string, indent int) { + b.lines = append(b.lines, bufferedLine{line, indent}) +} + +func (b *buffer) flushLines(w io.Writer) error { + for _, line := range b.lines { + indentation := strings.Repeat("\t", line.indentation) + fullLine := fmt.Sprintf("%s%s", indentation, line.line) + if _, err := io.WriteString(w, fullLine); err != nil { + return err + } + } + return nil +} + +func writeFuncHeader(b *buffer, structName string, indent int) { + s := fmt.Sprintf("var map_%s = map[string]string {\n", structName) + b.addLine(s, indent) +} + +func writeFuncFooter(b *buffer, structName string, indent int) { + b.addLine("}\n", indent) // Closes the map definition + + s := fmt.Sprintf("func (%s) SwaggerDoc() map[string]string {\n", structName) + b.addLine(s, indent) + s = fmt.Sprintf("return map_%s\n", structName) + b.addLine(s, indent+1) + b.addLine("}\n", indent) // Closes the function definition +} + +func writeMapBody(b *buffer, kubeType []Pair, indent int) { + format := "\"%s\": \"%s\",\n" + for _, pair := range kubeType { + s := fmt.Sprintf(format, pair.Name, pair.Doc) + b.addLine(s, indent+2) + } +} + +// ParseDocumentationFrom gets all types' documentation and returns them as an +// array. Each type is again represented as an array (we have to use arrays as we +// need to be sure for the order of the fields). This function returns fields and +// struct definitions that have no documentation as {name, ""}. +func ParseDocumentationFrom(src string) []KubeTypes { + var docForTypes []KubeTypes + + pkg := astFrom(src) + + for _, kubType := range pkg.Types { + if structType, ok := kubType.Decl.Specs[0].(*ast.TypeSpec).Type.(*ast.StructType); ok { + var ks KubeTypes + ks = append(ks, Pair{kubType.Name, fmtRawDoc(kubType.Doc)}) + + for _, field := range structType.Fields.List { + if n := fieldName(field); n != "-" { + fieldDoc := fmtRawDoc(field.Doc.Text()) + ks = append(ks, Pair{n, fieldDoc}) + } + } + docForTypes = append(docForTypes, ks) + } + } + + return docForTypes +} + +// WriteSwaggerDocFunc writes a declaration of a function as a string. This function is used in +// Swagger as a documentation source for structs and theirs fields +func WriteSwaggerDocFunc(kubeTypes []KubeTypes, w io.Writer) error { + for _, kubeType := range kubeTypes { + structName := kubeType[0].Name + kubeType[0].Name = "" + + // Ignore empty documentation + docfulTypes := make(KubeTypes, 0, len(kubeType)) + for _, pair := range kubeType { + if pair.Doc != "" { + docfulTypes = append(docfulTypes, pair) + } + } + + if len(docfulTypes) == 0 { + continue // If no fields and the struct have documentation, skip the function definition + } + + indent := 0 + buffer := newBuffer() + + writeFuncHeader(buffer, structName, indent) + writeMapBody(buffer, docfulTypes, indent) + writeFuncFooter(buffer, structName, indent) + buffer.addLine("\n", 0) + + if err := buffer.flushLines(w); err != nil { + return err + } + } + + return nil +} + +// VerifySwaggerDocsExist writes in a io.Writer a list of structs and fields that +// are missing of documentation. +func VerifySwaggerDocsExist(kubeTypes []KubeTypes, w io.Writer) (int, error) { + missingDocs := 0 + buffer := newBuffer() + + for _, kubeType := range kubeTypes { + structName := kubeType[0].Name + if kubeType[0].Doc == "" { + format := "Missing documentation for the struct itself: %s\n" + s := fmt.Sprintf(format, structName) + buffer.addLine(s, 0) + missingDocs++ + } + kubeType = kubeType[1:] // Skip struct definition + + for _, pair := range kubeType { // Iterate only the fields + if pair.Doc == "" { + format := "In struct: %s, field documentation is missing: %s\n" + s := fmt.Sprintf(format, structName, pair.Name) + buffer.addLine(s, 0) + missingDocs++ + } + } + } + + if err := buffer.flushLines(w); err != nil { + return -1, err + } + return missingDocs, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go new file mode 100644 index 000000000..e4515d8ed --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go @@ -0,0 +1,137 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +// Note that the types provided in this file are not versioned and are intended to be +// safe to use from within all versions of every API object. + +// TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, +// like this: +// type MyAwesomeAPIObject struct { +// runtime.TypeMeta `json:",inline"` +// ... // other fields +// } +// func (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind +// +// TypeMeta is provided here for convenience. You may use it directly from this package or define +// your own with the same fields. +// +// +k8s:deepcopy-gen=false +// +protobuf=true +// +k8s:openapi-gen=true +type TypeMeta struct { + // +optional + APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty" protobuf:"bytes,1,opt,name=apiVersion"` + // +optional + Kind string `json:"kind,omitempty" yaml:"kind,omitempty" protobuf:"bytes,2,opt,name=kind"` +} + +const ( + ContentTypeJSON string = "application/json" +) + +// RawExtension is used to hold extensions in external versions. +// +// To use this, make a field which has RawExtension as its type in your external, versioned +// struct, and Object in your internal struct. You also need to register your +// various plugin types. +// +// // Internal package: +// type MyAPIObject struct { +// runtime.TypeMeta `json:",inline"` +// MyPlugin runtime.Object `json:"myPlugin"` +// } +// type PluginA struct { +// AOption string `json:"aOption"` +// } +// +// // External package: +// type MyAPIObject struct { +// runtime.TypeMeta `json:",inline"` +// MyPlugin runtime.RawExtension `json:"myPlugin"` +// } +// type PluginA struct { +// AOption string `json:"aOption"` +// } +// +// // On the wire, the JSON will look something like this: +// { +// "kind":"MyAPIObject", +// "apiVersion":"v1", +// "myPlugin": { +// "kind":"PluginA", +// "aOption":"foo", +// }, +// } +// +// So what happens? Decode first uses json or yaml to unmarshal the serialized data into +// your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. +// The next step is to copy (using pkg/conversion) into the internal struct. The runtime +// package's DefaultScheme has conversion functions installed which will unpack the +// JSON stored in RawExtension, turning it into the correct object type, and storing it +// in the Object. (TODO: In the case where the object is of an unknown type, a +// runtime.Unknown object will be created and stored.) +// +// +k8s:deepcopy-gen=true +// +protobuf=true +// +k8s:openapi-gen=true +type RawExtension struct { + // Raw is the underlying serialization of this object. + // + // TODO: Determine how to detect ContentType and ContentEncoding of 'Raw' data. + Raw []byte `protobuf:"bytes,1,opt,name=raw"` + // Object can hold a representation of this extension - useful for working with versioned + // structs. + Object Object `json:"-"` +} + +// Unknown allows api objects with unknown types to be passed-through. This can be used +// to deal with the API objects from a plug-in. Unknown objects still have functioning +// TypeMeta features-- kind, version, etc. +// TODO: Make this object have easy access to field based accessors and settors for +// metadata and field mutatation. +// +// +k8s:deepcopy-gen=true +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +protobuf=true +// +k8s:openapi-gen=true +type Unknown struct { + TypeMeta `json:",inline" protobuf:"bytes,1,opt,name=typeMeta"` + // Raw will hold the complete serialized object which couldn't be matched + // with a registered type. Most likely, nothing should be done with this + // except for passing it through the system. + Raw []byte `protobuf:"bytes,2,opt,name=raw"` + // ContentEncoding is encoding used to encode 'Raw' data. + // Unspecified means no encoding. + ContentEncoding string `protobuf:"bytes,3,opt,name=contentEncoding"` + // ContentType is serialization method used to serialize 'Raw'. + // Unspecified means ContentTypeJSON. + ContentType string `protobuf:"bytes,4,opt,name=contentType"` +} + +// VersionedObjects is used by Decoders to give callers a way to access all versions +// of an object during the decoding process. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:deepcopy-gen=true +type VersionedObjects struct { + // Objects is the set of objects retrieved during decoding, in order of conversion. + // The 0 index is the object as serialized on the wire. If conversion has occurred, + // other objects may be present. The right most object is the same as would be returned + // by a normal Decode call. + Objects []Object +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go b/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go new file mode 100644 index 000000000..ead96ee05 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/types_proto.go @@ -0,0 +1,69 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" +) + +type ProtobufMarshaller interface { + MarshalTo(data []byte) (int, error) +} + +// NestedMarshalTo allows a caller to avoid extra allocations during serialization of an Unknown +// that will contain an object that implements ProtobufMarshaller. +func (m *Unknown) NestedMarshalTo(data []byte, b ProtobufMarshaller, size uint64) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.TypeMeta.Size())) + n1, err := m.TypeMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + + if b != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, size) + n2, err := b.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + if uint64(n2) != size { + // programmer error: the Size() method for protobuf does not match the results of MarshalTo, which means the proto + // struct returned would be wrong. + return 0, fmt.Errorf("the Size() value of %T was %d, but NestedMarshalTo wrote %d bytes to data", b, size, n2) + } + i += n2 + } + + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ContentEncoding))) + i += copy(data[i:], m.ContentEncoding) + + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.ContentType))) + i += copy(data[i:], m.ContentType) + return i, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go new file mode 100644 index 000000000..8b9182f35 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go @@ -0,0 +1,108 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package runtime + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RawExtension) DeepCopyInto(out *RawExtension) { + *out = *in + if in.Raw != nil { + in, out := &in.Raw, &out.Raw + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Object != nil { + out.Object = in.Object.DeepCopyObject() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawExtension. +func (in *RawExtension) DeepCopy() *RawExtension { + if in == nil { + return nil + } + out := new(RawExtension) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Unknown) DeepCopyInto(out *Unknown) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.Raw != nil { + in, out := &in.Raw, &out.Raw + *out = make([]byte, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Unknown. +func (in *Unknown) DeepCopy() *Unknown { + if in == nil { + return nil + } + out := new(Unknown) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new Object. +func (in *Unknown) DeepCopyObject() Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VersionedObjects) DeepCopyInto(out *VersionedObjects) { + *out = *in + if in.Objects != nil { + in, out := &in.Objects, &out.Objects + *out = make([]Object, len(*in)) + for i := range *in { + if (*in)[i] != nil { + (*out)[i] = (*in)[i].DeepCopyObject() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionedObjects. +func (in *VersionedObjects) DeepCopy() *VersionedObjects { + if in == nil { + return nil + } + out := new(VersionedObjects) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new Object. +func (in *VersionedObjects) DeepCopyObject() Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/selection/operator.go b/vendor/k8s.io/apimachinery/pkg/selection/operator.go new file mode 100644 index 000000000..298f798c4 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/selection/operator.go @@ -0,0 +1,33 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package selection + +// Operator represents a key/field's relationship to value(s). +// See labels.Requirement and fields.Requirement for more details. +type Operator string + +const ( + DoesNotExist Operator = "!" + Equals Operator = "=" + DoubleEquals Operator = "==" + In Operator = "in" + NotEquals Operator = "!=" + NotIn Operator = "notin" + Exists Operator = "exists" + GreaterThan Operator = "gt" + LessThan Operator = "lt" +) diff --git a/vendor/k8s.io/apimachinery/pkg/types/doc.go b/vendor/k8s.io/apimachinery/pkg/types/doc.go new file mode 100644 index 000000000..5667fa992 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/types/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package types implements various generic types used throughout kubernetes. +package types // import "k8s.io/apimachinery/pkg/types" diff --git a/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go new file mode 100644 index 000000000..88f0de36d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go @@ -0,0 +1,43 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +import ( + "fmt" +) + +// NamespacedName comprises a resource name, with a mandatory namespace, +// rendered as "/". Being a type captures intent and +// helps make sure that UIDs, namespaced names and non-namespaced names +// do not get conflated in code. For most use cases, namespace and name +// will already have been format validated at the API entry point, so we +// don't do that here. Where that's not the case (e.g. in testing), +// consider using NamespacedNameOrDie() in testing.go in this package. + +type NamespacedName struct { + Namespace string + Name string +} + +const ( + Separator = '/' +) + +// String returns the general purpose string representation +func (n NamespacedName) String() string { + return fmt.Sprintf("%s%c%s", n.Namespace, Separator, n.Name) +} diff --git a/vendor/k8s.io/apimachinery/pkg/types/nodename.go b/vendor/k8s.io/apimachinery/pkg/types/nodename.go new file mode 100644 index 000000000..fee348d7e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/types/nodename.go @@ -0,0 +1,43 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +// NodeName is a type that holds a api.Node's Name identifier. +// Being a type captures intent and helps make sure that the node name +// is not confused with similar concepts (the hostname, the cloud provider id, +// the cloud provider name etc) +// +// To clarify the various types: +// +// * Node.Name is the Name field of the Node in the API. This should be stored in a NodeName. +// Unfortunately, because Name is part of ObjectMeta, we can't store it as a NodeName at the API level. +// +// * Hostname is the hostname of the local machine (from uname -n). +// However, some components allow the user to pass in a --hostname-override flag, +// which will override this in most places. In the absence of anything more meaningful, +// kubelet will use Hostname as the Node.Name when it creates the Node. +// +// * The cloudproviders have the own names: GCE has InstanceName, AWS has InstanceId. +// +// For GCE, InstanceName is the Name of an Instance object in the GCE API. On GCE, Instance.Name becomes the +// Hostname, and thus it makes sense also to use it as the Node.Name. But that is GCE specific, and it is up +// to the cloudprovider how to do this mapping. +// +// For AWS, the InstanceID is not yet suitable for use as a Node.Name, so we actually use the +// PrivateDnsName for the Node.Name. And this is _not_ always the same as the hostname: if +// we are using a custom DHCP domain it won't be. +type NodeName string diff --git a/vendor/k8s.io/apimachinery/pkg/types/patch.go b/vendor/k8s.io/apimachinery/pkg/types/patch.go new file mode 100644 index 000000000..d522d1dbd --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/types/patch.go @@ -0,0 +1,28 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +// Similarly to above, these are constants to support HTTP PATCH utilized by +// both the client and server that didn't make sense for a whole package to be +// dedicated to. +type PatchType string + +const ( + JSONPatchType PatchType = "application/json-patch+json" + MergePatchType PatchType = "application/merge-patch+json" + StrategicMergePatchType PatchType = "application/strategic-merge-patch+json" +) diff --git a/vendor/k8s.io/apimachinery/pkg/types/uid.go b/vendor/k8s.io/apimachinery/pkg/types/uid.go new file mode 100644 index 000000000..869339222 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/types/uid.go @@ -0,0 +1,22 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +// UID is a type that holds unique ID values, including UUIDs. Because we +// don't ONLY use UUIDs, this is an alias to string. Being a type captures +// intent and helps make sure that UIDs and names do not get conflated. +type UID string diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go new file mode 100644 index 000000000..5d4d6250a --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/errors/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package errors implements various utility functions and types around errors. +package errors // import "k8s.io/apimachinery/pkg/util/errors" diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go new file mode 100644 index 000000000..88e937679 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go @@ -0,0 +1,201 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package errors + +import ( + "errors" + "fmt" +) + +// MessageCountMap contains occurrence for each error message. +type MessageCountMap map[string]int + +// Aggregate represents an object that contains multiple errors, but does not +// necessarily have singular semantic meaning. +type Aggregate interface { + error + Errors() []error +} + +// NewAggregate converts a slice of errors into an Aggregate interface, which +// is itself an implementation of the error interface. If the slice is empty, +// this returns nil. +// It will check if any of the element of input error list is nil, to avoid +// nil pointer panic when call Error(). +func NewAggregate(errlist []error) Aggregate { + if len(errlist) == 0 { + return nil + } + // In case of input error list contains nil + var errs []error + for _, e := range errlist { + if e != nil { + errs = append(errs, e) + } + } + if len(errs) == 0 { + return nil + } + return aggregate(errs) +} + +// This helper implements the error and Errors interfaces. Keeping it private +// prevents people from making an aggregate of 0 errors, which is not +// an error, but does satisfy the error interface. +type aggregate []error + +// Error is part of the error interface. +func (agg aggregate) Error() string { + if len(agg) == 0 { + // This should never happen, really. + return "" + } + if len(agg) == 1 { + return agg[0].Error() + } + result := fmt.Sprintf("[%s", agg[0].Error()) + for i := 1; i < len(agg); i++ { + result += fmt.Sprintf(", %s", agg[i].Error()) + } + result += "]" + return result +} + +// Errors is part of the Aggregate interface. +func (agg aggregate) Errors() []error { + return []error(agg) +} + +// Matcher is used to match errors. Returns true if the error matches. +type Matcher func(error) bool + +// FilterOut removes all errors that match any of the matchers from the input +// error. If the input is a singular error, only that error is tested. If the +// input implements the Aggregate interface, the list of errors will be +// processed recursively. +// +// This can be used, for example, to remove known-OK errors (such as io.EOF or +// os.PathNotFound) from a list of errors. +func FilterOut(err error, fns ...Matcher) error { + if err == nil { + return nil + } + if agg, ok := err.(Aggregate); ok { + return NewAggregate(filterErrors(agg.Errors(), fns...)) + } + if !matchesError(err, fns...) { + return err + } + return nil +} + +// matchesError returns true if any Matcher returns true +func matchesError(err error, fns ...Matcher) bool { + for _, fn := range fns { + if fn(err) { + return true + } + } + return false +} + +// filterErrors returns any errors (or nested errors, if the list contains +// nested Errors) for which all fns return false. If no errors +// remain a nil list is returned. The resulting silec will have all +// nested slices flattened as a side effect. +func filterErrors(list []error, fns ...Matcher) []error { + result := []error{} + for _, err := range list { + r := FilterOut(err, fns...) + if r != nil { + result = append(result, r) + } + } + return result +} + +// Flatten takes an Aggregate, which may hold other Aggregates in arbitrary +// nesting, and flattens them all into a single Aggregate, recursively. +func Flatten(agg Aggregate) Aggregate { + result := []error{} + if agg == nil { + return nil + } + for _, err := range agg.Errors() { + if a, ok := err.(Aggregate); ok { + r := Flatten(a) + if r != nil { + result = append(result, r.Errors()...) + } + } else { + if err != nil { + result = append(result, err) + } + } + } + return NewAggregate(result) +} + +// CreateAggregateFromMessageCountMap converts MessageCountMap Aggregate +func CreateAggregateFromMessageCountMap(m MessageCountMap) Aggregate { + if m == nil { + return nil + } + result := make([]error, 0, len(m)) + for errStr, count := range m { + var countStr string + if count > 1 { + countStr = fmt.Sprintf(" (repeated %v times)", count) + } + result = append(result, fmt.Errorf("%v%v", errStr, countStr)) + } + return NewAggregate(result) +} + +// Reduce will return err or, if err is an Aggregate and only has one item, +// the first item in the aggregate. +func Reduce(err error) error { + if agg, ok := err.(Aggregate); ok && err != nil { + switch len(agg.Errors()) { + case 1: + return agg.Errors()[0] + case 0: + return nil + } + } + return err +} + +// AggregateGoroutines runs the provided functions in parallel, stuffing all +// non-nil errors into the returned Aggregate. +// Returns nil if all the functions complete successfully. +func AggregateGoroutines(funcs ...func() error) Aggregate { + errChan := make(chan error, len(funcs)) + for _, f := range funcs { + go func(f func() error) { errChan <- f() }(f) + } + errs := make([]error, 0) + for i := 0; i < cap(errChan); i++ { + if err := <-errChan; err != nil { + errs = append(errs, err) + } + } + return NewAggregate(errs) +} + +// ErrPreconditionViolated is returned when the precondition is violated +var ErrPreconditionViolated = errors.New("precondition is violated") diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go new file mode 100644 index 000000000..48dd7d9c5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -0,0 +1,362 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto + +/* + Package intstr is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto + + It has these top-level messages: + IntOrString +*/ +package intstr + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *IntOrString) Reset() { *m = IntOrString{} } +func (*IntOrString) ProtoMessage() {} +func (*IntOrString) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func init() { + proto.RegisterType((*IntOrString)(nil), "k8s.io.apimachinery.pkg.util.intstr.IntOrString") +} +func (m *IntOrString) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IntOrString) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Type)) + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.IntVal)) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.StrVal))) + i += copy(dAtA[i:], m.StrVal) + return i, nil +} + +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *IntOrString) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Type)) + n += 1 + sovGenerated(uint64(m.IntVal)) + l = len(m.StrVal) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IntOrString) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IntOrString: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntOrString: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntVal", wireType) + } + m.IntVal = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IntVal |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrVal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrVal = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0x31, 0x4b, 0x33, 0x31, + 0x1c, 0xc6, 0x93, 0xb7, 0x7d, 0x8b, 0x9e, 0xe0, 0x50, 0x1c, 0x8a, 0x43, 0x7a, 0x28, 0xc8, 0x0d, + 0x9a, 0xac, 0xe2, 0xd8, 0xad, 0x20, 0x08, 0x57, 0x71, 0x70, 0xbb, 0x6b, 0x63, 0x1a, 0xae, 0x4d, + 0x42, 0xee, 0x7f, 0xc2, 0x6d, 0xfd, 0x08, 0xba, 0x39, 0xfa, 0x71, 0x6e, 0xec, 0xd8, 0x41, 0x8a, + 0x17, 0xbf, 0x85, 0x93, 0x5c, 0xee, 0x40, 0xa7, 0xe4, 0x79, 0x9e, 0xdf, 0x2f, 0x90, 0xe0, 0x36, + 0xbb, 0xce, 0xa9, 0xd4, 0x2c, 0x2b, 0x52, 0x6e, 0x15, 0x07, 0x9e, 0xb3, 0x67, 0xae, 0x16, 0xda, + 0xb2, 0x6e, 0x48, 0x8c, 0x5c, 0x27, 0xf3, 0xa5, 0x54, 0xdc, 0x96, 0xcc, 0x64, 0x82, 0x15, 0x20, + 0x57, 0x4c, 0x2a, 0xc8, 0xc1, 0x32, 0xc1, 0x15, 0xb7, 0x09, 0xf0, 0x05, 0x35, 0x56, 0x83, 0x1e, + 0x9e, 0xb7, 0x12, 0xfd, 0x2b, 0x51, 0x93, 0x09, 0xda, 0x48, 0xb4, 0x95, 0x4e, 0xaf, 0x84, 0x84, + 0x65, 0x91, 0xd2, 0xb9, 0x5e, 0x33, 0xa1, 0x85, 0x66, 0xde, 0x4d, 0x8b, 0x27, 0x9f, 0x7c, 0xf0, + 0xb7, 0xf6, 0xcd, 0xb3, 0x57, 0x1c, 0x1c, 0x4d, 0x15, 0xdc, 0xd9, 0x19, 0x58, 0xa9, 0xc4, 0x30, + 0x0a, 0xfa, 0x50, 0x1a, 0x3e, 0xc2, 0x21, 0x8e, 0x7a, 0x93, 0x93, 0x6a, 0x3f, 0x46, 0x6e, 0x3f, + 0xee, 0xdf, 0x97, 0x86, 0x7f, 0x77, 0x67, 0xec, 0x89, 0xe1, 0x45, 0x30, 0x90, 0x0a, 0x1e, 0x92, + 0xd5, 0xe8, 0x5f, 0x88, 0xa3, 0xff, 0x93, 0xe3, 0x8e, 0x1d, 0x4c, 0x7d, 0x1b, 0x77, 0x6b, 0xc3, + 0xe5, 0x60, 0x1b, 0xae, 0x17, 0xe2, 0xe8, 0xf0, 0x97, 0x9b, 0xf9, 0x36, 0xee, 0xd6, 0x9b, 0x83, + 0xb7, 0xf7, 0x31, 0xda, 0x7c, 0x84, 0x68, 0x72, 0x59, 0xd5, 0x04, 0x6d, 0x6b, 0x82, 0x76, 0x35, + 0x41, 0x1b, 0x47, 0x70, 0xe5, 0x08, 0xde, 0x3a, 0x82, 0x77, 0x8e, 0xe0, 0x4f, 0x47, 0xf0, 0xcb, + 0x17, 0x41, 0x8f, 0x83, 0xf6, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xa0, 0xb5, 0xc9, + 0x64, 0x01, 0x00, 0x00, +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto new file mode 100644 index 000000000..e79fb9e57 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto @@ -0,0 +1,43 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apimachinery.pkg.util.intstr; + +// Package-wide variables from generator "generated". +option go_package = "intstr"; + +// IntOrString is a type that can hold an int32 or a string. When used in +// JSON or YAML marshalling and unmarshalling, it produces or consumes the +// inner type. This allows you to have, for example, a JSON field that can +// accept a name or number. +// TODO: Rename to Int32OrString +// +// +protobuf=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:openapi-gen=true +message IntOrString { + optional int64 type = 1; + + optional int32 intVal = 2; + + optional string strVal = 3; +} + diff --git a/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go new file mode 100644 index 000000000..5b26ed262 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -0,0 +1,184 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package intstr + +import ( + "encoding/json" + "errors" + "fmt" + "math" + "runtime/debug" + "strconv" + "strings" + + "github.com/google/gofuzz" + "k8s.io/klog" +) + +// IntOrString is a type that can hold an int32 or a string. When used in +// JSON or YAML marshalling and unmarshalling, it produces or consumes the +// inner type. This allows you to have, for example, a JSON field that can +// accept a name or number. +// TODO: Rename to Int32OrString +// +// +protobuf=true +// +protobuf.options.(gogoproto.goproto_stringer)=false +// +k8s:openapi-gen=true +type IntOrString struct { + Type Type `protobuf:"varint,1,opt,name=type,casttype=Type"` + IntVal int32 `protobuf:"varint,2,opt,name=intVal"` + StrVal string `protobuf:"bytes,3,opt,name=strVal"` +} + +// Type represents the stored type of IntOrString. +type Type int + +const ( + Int Type = iota // The IntOrString holds an int. + String // The IntOrString holds a string. +) + +// FromInt creates an IntOrString object with an int32 value. It is +// your responsibility not to call this method with a value greater +// than int32. +// TODO: convert to (val int32) +func FromInt(val int) IntOrString { + if val > math.MaxInt32 || val < math.MinInt32 { + klog.Errorf("value: %d overflows int32\n%s\n", val, debug.Stack()) + } + return IntOrString{Type: Int, IntVal: int32(val)} +} + +// FromString creates an IntOrString object with a string value. +func FromString(val string) IntOrString { + return IntOrString{Type: String, StrVal: val} +} + +// Parse the given string and try to convert it to an integer before +// setting it as a string value. +func Parse(val string) IntOrString { + i, err := strconv.Atoi(val) + if err != nil { + return FromString(val) + } + return FromInt(i) +} + +// UnmarshalJSON implements the json.Unmarshaller interface. +func (intstr *IntOrString) UnmarshalJSON(value []byte) error { + if value[0] == '"' { + intstr.Type = String + return json.Unmarshal(value, &intstr.StrVal) + } + intstr.Type = Int + return json.Unmarshal(value, &intstr.IntVal) +} + +// String returns the string value, or the Itoa of the int value. +func (intstr *IntOrString) String() string { + if intstr.Type == String { + return intstr.StrVal + } + return strconv.Itoa(intstr.IntValue()) +} + +// IntValue returns the IntVal if type Int, or if +// it is a String, will attempt a conversion to int. +func (intstr *IntOrString) IntValue() int { + if intstr.Type == String { + i, _ := strconv.Atoi(intstr.StrVal) + return i + } + return int(intstr.IntVal) +} + +// MarshalJSON implements the json.Marshaller interface. +func (intstr IntOrString) MarshalJSON() ([]byte, error) { + switch intstr.Type { + case Int: + return json.Marshal(intstr.IntVal) + case String: + return json.Marshal(intstr.StrVal) + default: + return []byte{}, fmt.Errorf("impossible IntOrString.Type") + } +} + +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ IntOrString) OpenAPISchemaType() []string { return []string{"string"} } + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ IntOrString) OpenAPISchemaFormat() string { return "int-or-string" } + +func (intstr *IntOrString) Fuzz(c fuzz.Continue) { + if intstr == nil { + return + } + if c.RandBool() { + intstr.Type = Int + c.Fuzz(&intstr.IntVal) + intstr.StrVal = "" + } else { + intstr.Type = String + intstr.IntVal = 0 + c.Fuzz(&intstr.StrVal) + } +} + +func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrString { + if intOrPercent == nil { + return &defaultValue + } + return intOrPercent +} + +func GetValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) { + if intOrPercent == nil { + return 0, errors.New("nil value for IntOrString") + } + value, isPercent, err := getIntOrPercentValue(intOrPercent) + if err != nil { + return 0, fmt.Errorf("invalid value for IntOrString: %v", err) + } + if isPercent { + if roundUp { + value = int(math.Ceil(float64(value) * (float64(total)) / 100)) + } else { + value = int(math.Floor(float64(value) * (float64(total)) / 100)) + } + } + return value, nil +} + +func getIntOrPercentValue(intOrStr *IntOrString) (int, bool, error) { + switch intOrStr.Type { + case Int: + return intOrStr.IntValue(), false, nil + case String: + s := strings.Replace(intOrStr.StrVal, "%", "", -1) + v, err := strconv.Atoi(s) + if err != nil { + return 0, false, fmt.Errorf("invalid value %q: %v", intOrStr.StrVal, err) + } + return int(v), true, nil + } + return 0, false, fmt.Errorf("invalid type: neither int nor percentage") +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/json/json.go b/vendor/k8s.io/apimachinery/pkg/util/json/json.go new file mode 100644 index 000000000..10c8cb837 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/json/json.go @@ -0,0 +1,119 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package json + +import ( + "bytes" + "encoding/json" + "io" +) + +// NewEncoder delegates to json.NewEncoder +// It is only here so this package can be a drop-in for common encoding/json uses +func NewEncoder(w io.Writer) *json.Encoder { + return json.NewEncoder(w) +} + +// Marshal delegates to json.Marshal +// It is only here so this package can be a drop-in for common encoding/json uses +func Marshal(v interface{}) ([]byte, error) { + return json.Marshal(v) +} + +// Unmarshal unmarshals the given data +// If v is a *map[string]interface{}, numbers are converted to int64 or float64 +func Unmarshal(data []byte, v interface{}) error { + switch v := v.(type) { + case *map[string]interface{}: + // Build a decoder from the given data + decoder := json.NewDecoder(bytes.NewBuffer(data)) + // Preserve numbers, rather than casting to float64 automatically + decoder.UseNumber() + // Run the decode + if err := decoder.Decode(v); err != nil { + return err + } + // If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64 + return convertMapNumbers(*v) + + case *[]interface{}: + // Build a decoder from the given data + decoder := json.NewDecoder(bytes.NewBuffer(data)) + // Preserve numbers, rather than casting to float64 automatically + decoder.UseNumber() + // Run the decode + if err := decoder.Decode(v); err != nil { + return err + } + // If the decode succeeds, post-process the map to convert json.Number objects to int64 or float64 + return convertSliceNumbers(*v) + + default: + return json.Unmarshal(data, v) + } +} + +// convertMapNumbers traverses the map, converting any json.Number values to int64 or float64. +// values which are map[string]interface{} or []interface{} are recursively visited +func convertMapNumbers(m map[string]interface{}) error { + var err error + for k, v := range m { + switch v := v.(type) { + case json.Number: + m[k], err = convertNumber(v) + case map[string]interface{}: + err = convertMapNumbers(v) + case []interface{}: + err = convertSliceNumbers(v) + } + if err != nil { + return err + } + } + return nil +} + +// convertSliceNumbers traverses the slice, converting any json.Number values to int64 or float64. +// values which are map[string]interface{} or []interface{} are recursively visited +func convertSliceNumbers(s []interface{}) error { + var err error + for i, v := range s { + switch v := v.(type) { + case json.Number: + s[i], err = convertNumber(v) + case map[string]interface{}: + err = convertMapNumbers(v) + case []interface{}: + err = convertSliceNumbers(v) + } + if err != nil { + return err + } + } + return nil +} + +// convertNumber converts a json.Number to an int64 or float64, or returns an error +func convertNumber(n json.Number) (interface{}, error) { + // Attempt to convert to an int64 first + if i, err := n.Int64(); err == nil { + return i, nil + } + // Return a float64 (default json.Decode() behavior) + // An overflow will return an error + return n.Float64() +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/naming/from_stack.go b/vendor/k8s.io/apimachinery/pkg/util/naming/from_stack.go new file mode 100644 index 000000000..2965d5a8b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/naming/from_stack.go @@ -0,0 +1,93 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package naming + +import ( + "fmt" + "regexp" + goruntime "runtime" + "runtime/debug" + "strconv" + "strings" +) + +// GetNameFromCallsite walks back through the call stack until we find a caller from outside of the ignoredPackages +// it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging +func GetNameFromCallsite(ignoredPackages ...string) string { + name := "????" + const maxStack = 10 + for i := 1; i < maxStack; i++ { + _, file, line, ok := goruntime.Caller(i) + if !ok { + file, line, ok = extractStackCreator() + if !ok { + break + } + i += maxStack + } + if hasPackage(file, append(ignoredPackages, "/runtime/asm_")) { + continue + } + + file = trimPackagePrefix(file) + name = fmt.Sprintf("%s:%d", file, line) + break + } + return name +} + +// hasPackage returns true if the file is in one of the ignored packages. +func hasPackage(file string, ignoredPackages []string) bool { + for _, ignoredPackage := range ignoredPackages { + if strings.Contains(file, ignoredPackage) { + return true + } + } + return false +} + +// trimPackagePrefix reduces duplicate values off the front of a package name. +func trimPackagePrefix(file string) string { + if l := strings.LastIndex(file, "/vendor/"); l >= 0 { + return file[l+len("/vendor/"):] + } + if l := strings.LastIndex(file, "/src/"); l >= 0 { + return file[l+5:] + } + if l := strings.LastIndex(file, "/pkg/"); l >= 0 { + return file[l+1:] + } + return file +} + +var stackCreator = regexp.MustCompile(`(?m)^created by (.*)\n\s+(.*):(\d+) \+0x[[:xdigit:]]+$`) + +// extractStackCreator retrieves the goroutine file and line that launched this stack. Returns false +// if the creator cannot be located. +// TODO: Go does not expose this via runtime https://github.com/golang/go/issues/11440 +func extractStackCreator() (string, int, bool) { + stack := debug.Stack() + matches := stackCreator.FindStringSubmatch(string(stack)) + if matches == nil || len(matches) != 4 { + return "", 0, false + } + line, err := strconv.Atoi(matches[3]) + if err != nil { + return "", 0, false + } + return matches[2], line, true +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/http.go b/vendor/k8s.io/apimachinery/pkg/util/net/http.go new file mode 100644 index 000000000..078f00d9b --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/http.go @@ -0,0 +1,445 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "bufio" + "bytes" + "context" + "crypto/tls" + "fmt" + "io" + "net" + "net/http" + "net/url" + "os" + "path" + "strconv" + "strings" + + "golang.org/x/net/http2" + "k8s.io/klog" +) + +// JoinPreservingTrailingSlash does a path.Join of the specified elements, +// preserving any trailing slash on the last non-empty segment +func JoinPreservingTrailingSlash(elem ...string) string { + // do the basic path join + result := path.Join(elem...) + + // find the last non-empty segment + for i := len(elem) - 1; i >= 0; i-- { + if len(elem[i]) > 0 { + // if the last segment ended in a slash, ensure our result does as well + if strings.HasSuffix(elem[i], "/") && !strings.HasSuffix(result, "/") { + result += "/" + } + break + } + } + + return result +} + +// IsProbableEOF returns true if the given error resembles a connection termination +// scenario that would justify assuming that the watch is empty. +// These errors are what the Go http stack returns back to us which are general +// connection closure errors (strongly correlated) and callers that need to +// differentiate probable errors in connection behavior between normal "this is +// disconnected" should use the method. +func IsProbableEOF(err error) bool { + if err == nil { + return false + } + if uerr, ok := err.(*url.Error); ok { + err = uerr.Err + } + msg := err.Error() + switch { + case err == io.EOF: + return true + case msg == "http: can't write HTTP request on broken connection": + return true + case strings.Contains(msg, "http2: server sent GOAWAY and closed the connection"): + return true + case strings.Contains(msg, "connection reset by peer"): + return true + case strings.Contains(strings.ToLower(msg), "use of closed network connection"): + return true + } + return false +} + +var defaultTransport = http.DefaultTransport.(*http.Transport) + +// SetOldTransportDefaults applies the defaults from http.DefaultTransport +// for the Proxy, Dial, and TLSHandshakeTimeout fields if unset +func SetOldTransportDefaults(t *http.Transport) *http.Transport { + if t.Proxy == nil || isDefault(t.Proxy) { + // http.ProxyFromEnvironment doesn't respect CIDRs and that makes it impossible to exclude things like pod and service IPs from proxy settings + // ProxierWithNoProxyCIDR allows CIDR rules in NO_PROXY + t.Proxy = NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) + } + // If no custom dialer is set, use the default context dialer + if t.DialContext == nil && t.Dial == nil { + t.DialContext = defaultTransport.DialContext + } + if t.TLSHandshakeTimeout == 0 { + t.TLSHandshakeTimeout = defaultTransport.TLSHandshakeTimeout + } + return t +} + +// SetTransportDefaults applies the defaults from http.DefaultTransport +// for the Proxy, Dial, and TLSHandshakeTimeout fields if unset +func SetTransportDefaults(t *http.Transport) *http.Transport { + t = SetOldTransportDefaults(t) + // Allow clients to disable http2 if needed. + if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { + klog.Infof("HTTP2 has been explicitly disabled") + } else { + if err := http2.ConfigureTransport(t); err != nil { + klog.Warningf("Transport failed http2 configuration: %v", err) + } + } + return t +} + +type RoundTripperWrapper interface { + http.RoundTripper + WrappedRoundTripper() http.RoundTripper +} + +type DialFunc func(ctx context.Context, net, addr string) (net.Conn, error) + +func DialerFor(transport http.RoundTripper) (DialFunc, error) { + if transport == nil { + return nil, nil + } + + switch transport := transport.(type) { + case *http.Transport: + // transport.DialContext takes precedence over transport.Dial + if transport.DialContext != nil { + return transport.DialContext, nil + } + // adapt transport.Dial to the DialWithContext signature + if transport.Dial != nil { + return func(ctx context.Context, net, addr string) (net.Conn, error) { + return transport.Dial(net, addr) + }, nil + } + // otherwise return nil + return nil, nil + case RoundTripperWrapper: + return DialerFor(transport.WrappedRoundTripper()) + default: + return nil, fmt.Errorf("unknown transport type: %T", transport) + } +} + +type TLSClientConfigHolder interface { + TLSClientConfig() *tls.Config +} + +func TLSClientConfig(transport http.RoundTripper) (*tls.Config, error) { + if transport == nil { + return nil, nil + } + + switch transport := transport.(type) { + case *http.Transport: + return transport.TLSClientConfig, nil + case TLSClientConfigHolder: + return transport.TLSClientConfig(), nil + case RoundTripperWrapper: + return TLSClientConfig(transport.WrappedRoundTripper()) + default: + return nil, fmt.Errorf("unknown transport type: %T", transport) + } +} + +func FormatURL(scheme string, host string, port int, path string) *url.URL { + return &url.URL{ + Scheme: scheme, + Host: net.JoinHostPort(host, strconv.Itoa(port)), + Path: path, + } +} + +func GetHTTPClient(req *http.Request) string { + if ua := req.UserAgent(); len(ua) != 0 { + return ua + } + return "unknown" +} + +// SourceIPs splits the comma separated X-Forwarded-For header or returns the X-Real-Ip header or req.RemoteAddr, +// in that order, ignoring invalid IPs. It returns nil if all of these are empty or invalid. +func SourceIPs(req *http.Request) []net.IP { + hdr := req.Header + // First check the X-Forwarded-For header for requests via proxy. + hdrForwardedFor := hdr.Get("X-Forwarded-For") + forwardedForIPs := []net.IP{} + if hdrForwardedFor != "" { + // X-Forwarded-For can be a csv of IPs in case of multiple proxies. + // Use the first valid one. + parts := strings.Split(hdrForwardedFor, ",") + for _, part := range parts { + ip := net.ParseIP(strings.TrimSpace(part)) + if ip != nil { + forwardedForIPs = append(forwardedForIPs, ip) + } + } + } + if len(forwardedForIPs) > 0 { + return forwardedForIPs + } + + // Try the X-Real-Ip header. + hdrRealIp := hdr.Get("X-Real-Ip") + if hdrRealIp != "" { + ip := net.ParseIP(hdrRealIp) + if ip != nil { + return []net.IP{ip} + } + } + + // Fallback to Remote Address in request, which will give the correct client IP when there is no proxy. + // Remote Address in Go's HTTP server is in the form host:port so we need to split that first. + host, _, err := net.SplitHostPort(req.RemoteAddr) + if err == nil { + if remoteIP := net.ParseIP(host); remoteIP != nil { + return []net.IP{remoteIP} + } + } + + // Fallback if Remote Address was just IP. + if remoteIP := net.ParseIP(req.RemoteAddr); remoteIP != nil { + return []net.IP{remoteIP} + } + + return nil +} + +// Extracts and returns the clients IP from the given request. +// Looks at X-Forwarded-For header, X-Real-Ip header and request.RemoteAddr in that order. +// Returns nil if none of them are set or is set to an invalid value. +func GetClientIP(req *http.Request) net.IP { + ips := SourceIPs(req) + if len(ips) == 0 { + return nil + } + return ips[0] +} + +// Prepares the X-Forwarded-For header for another forwarding hop by appending the previous sender's +// IP address to the X-Forwarded-For chain. +func AppendForwardedForHeader(req *http.Request) { + // Copied from net/http/httputil/reverseproxy.go: + if clientIP, _, err := net.SplitHostPort(req.RemoteAddr); err == nil { + // If we aren't the first proxy retain prior + // X-Forwarded-For information as a comma+space + // separated list and fold multiple headers into one. + if prior, ok := req.Header["X-Forwarded-For"]; ok { + clientIP = strings.Join(prior, ", ") + ", " + clientIP + } + req.Header.Set("X-Forwarded-For", clientIP) + } +} + +var defaultProxyFuncPointer = fmt.Sprintf("%p", http.ProxyFromEnvironment) + +// isDefault checks to see if the transportProxierFunc is pointing to the default one +func isDefault(transportProxier func(*http.Request) (*url.URL, error)) bool { + transportProxierPointer := fmt.Sprintf("%p", transportProxier) + return transportProxierPointer == defaultProxyFuncPointer +} + +// NewProxierWithNoProxyCIDR constructs a Proxier function that respects CIDRs in NO_PROXY and delegates if +// no matching CIDRs are found +func NewProxierWithNoProxyCIDR(delegate func(req *http.Request) (*url.URL, error)) func(req *http.Request) (*url.URL, error) { + // we wrap the default method, so we only need to perform our check if the NO_PROXY (or no_proxy) envvar has a CIDR in it + noProxyEnv := os.Getenv("NO_PROXY") + if noProxyEnv == "" { + noProxyEnv = os.Getenv("no_proxy") + } + noProxyRules := strings.Split(noProxyEnv, ",") + + cidrs := []*net.IPNet{} + for _, noProxyRule := range noProxyRules { + _, cidr, _ := net.ParseCIDR(noProxyRule) + if cidr != nil { + cidrs = append(cidrs, cidr) + } + } + + if len(cidrs) == 0 { + return delegate + } + + return func(req *http.Request) (*url.URL, error) { + ip := net.ParseIP(req.URL.Hostname()) + if ip == nil { + return delegate(req) + } + + for _, cidr := range cidrs { + if cidr.Contains(ip) { + return nil, nil + } + } + + return delegate(req) + } +} + +// DialerFunc implements Dialer for the provided function. +type DialerFunc func(req *http.Request) (net.Conn, error) + +func (fn DialerFunc) Dial(req *http.Request) (net.Conn, error) { + return fn(req) +} + +// Dialer dials a host and writes a request to it. +type Dialer interface { + // Dial connects to the host specified by req's URL, writes the request to the connection, and + // returns the opened net.Conn. + Dial(req *http.Request) (net.Conn, error) +} + +// ConnectWithRedirects uses dialer to send req, following up to 10 redirects (relative to +// originalLocation). It returns the opened net.Conn and the raw response bytes. +// If requireSameHostRedirects is true, only redirects to the same host are permitted. +func ConnectWithRedirects(originalMethod string, originalLocation *url.URL, header http.Header, originalBody io.Reader, dialer Dialer, requireSameHostRedirects bool) (net.Conn, []byte, error) { + const ( + maxRedirects = 9 // Fail on the 10th redirect + maxResponseSize = 16384 // play it safe to allow the potential for lots of / large headers + ) + + var ( + location = originalLocation + method = originalMethod + intermediateConn net.Conn + rawResponse = bytes.NewBuffer(make([]byte, 0, 256)) + body = originalBody + ) + + defer func() { + if intermediateConn != nil { + intermediateConn.Close() + } + }() + +redirectLoop: + for redirects := 0; ; redirects++ { + if redirects > maxRedirects { + return nil, nil, fmt.Errorf("too many redirects (%d)", redirects) + } + + req, err := http.NewRequest(method, location.String(), body) + if err != nil { + return nil, nil, err + } + + req.Header = header + + intermediateConn, err = dialer.Dial(req) + if err != nil { + return nil, nil, err + } + + // Peek at the backend response. + rawResponse.Reset() + respReader := bufio.NewReader(io.TeeReader( + io.LimitReader(intermediateConn, maxResponseSize), // Don't read more than maxResponseSize bytes. + rawResponse)) // Save the raw response. + resp, err := http.ReadResponse(respReader, nil) + if err != nil { + // Unable to read the backend response; let the client handle it. + klog.Warningf("Error reading backend response: %v", err) + break redirectLoop + } + + switch resp.StatusCode { + case http.StatusFound: + // Redirect, continue. + default: + // Don't redirect. + break redirectLoop + } + + // Redirected requests switch to "GET" according to the HTTP spec: + // https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3 + method = "GET" + // don't send a body when following redirects + body = nil + + resp.Body.Close() // not used + + // Prepare to follow the redirect. + redirectStr := resp.Header.Get("Location") + if redirectStr == "" { + return nil, nil, fmt.Errorf("%d response missing Location header", resp.StatusCode) + } + // We have to parse relative to the current location, NOT originalLocation. For example, + // if we request http://foo.com/a and get back "http://bar.com/b", the result should be + // http://bar.com/b. If we then make that request and get back a redirect to "/c", the result + // should be http://bar.com/c, not http://foo.com/c. + location, err = location.Parse(redirectStr) + if err != nil { + return nil, nil, fmt.Errorf("malformed Location header: %v", err) + } + + // Only follow redirects to the same host. Otherwise, propagate the redirect response back. + if requireSameHostRedirects && location.Hostname() != originalLocation.Hostname() { + break redirectLoop + } + + // Reset the connection. + intermediateConn.Close() + intermediateConn = nil + } + + connToReturn := intermediateConn + intermediateConn = nil // Don't close the connection when we return it. + return connToReturn, rawResponse.Bytes(), nil +} + +// CloneRequest creates a shallow copy of the request along with a deep copy of the Headers. +func CloneRequest(req *http.Request) *http.Request { + r := new(http.Request) + + // shallow clone + *r = *req + + // deep copy headers + r.Header = CloneHeader(req.Header) + + return r +} + +// CloneHeader creates a deep copy of an http.Header. +func CloneHeader(in http.Header) http.Header { + out := make(http.Header, len(in)) + for key, values := range in { + newValues := make([]string, len(values)) + copy(newValues, values) + out[key] = newValues + } + return out +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/interface.go b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go new file mode 100644 index 000000000..daf5d2496 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/interface.go @@ -0,0 +1,416 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "bufio" + "encoding/hex" + "fmt" + "io" + "net" + "os" + + "strings" + + "k8s.io/klog" +) + +type AddressFamily uint + +const ( + familyIPv4 AddressFamily = 4 + familyIPv6 AddressFamily = 6 +) + +const ( + ipv4RouteFile = "/proc/net/route" + ipv6RouteFile = "/proc/net/ipv6_route" +) + +type Route struct { + Interface string + Destination net.IP + Gateway net.IP + Family AddressFamily +} + +type RouteFile struct { + name string + parse func(input io.Reader) ([]Route, error) +} + +// noRoutesError can be returned by ChooseBindAddress() in case of no routes +type noRoutesError struct { + message string +} + +func (e noRoutesError) Error() string { + return e.message +} + +// IsNoRoutesError checks if an error is of type noRoutesError +func IsNoRoutesError(err error) bool { + if err == nil { + return false + } + switch err.(type) { + case noRoutesError: + return true + default: + return false + } +} + +var ( + v4File = RouteFile{name: ipv4RouteFile, parse: getIPv4DefaultRoutes} + v6File = RouteFile{name: ipv6RouteFile, parse: getIPv6DefaultRoutes} +) + +func (rf RouteFile) extract() ([]Route, error) { + file, err := os.Open(rf.name) + if err != nil { + return nil, err + } + defer file.Close() + return rf.parse(file) +} + +// getIPv4DefaultRoutes obtains the IPv4 routes, and filters out non-default routes. +func getIPv4DefaultRoutes(input io.Reader) ([]Route, error) { + routes := []Route{} + scanner := bufio.NewReader(input) + for { + line, err := scanner.ReadString('\n') + if err == io.EOF { + break + } + //ignore the headers in the route info + if strings.HasPrefix(line, "Iface") { + continue + } + fields := strings.Fields(line) + // Interested in fields: + // 0 - interface name + // 1 - destination address + // 2 - gateway + dest, err := parseIP(fields[1], familyIPv4) + if err != nil { + return nil, err + } + gw, err := parseIP(fields[2], familyIPv4) + if err != nil { + return nil, err + } + if !dest.Equal(net.IPv4zero) { + continue + } + routes = append(routes, Route{ + Interface: fields[0], + Destination: dest, + Gateway: gw, + Family: familyIPv4, + }) + } + return routes, nil +} + +func getIPv6DefaultRoutes(input io.Reader) ([]Route, error) { + routes := []Route{} + scanner := bufio.NewReader(input) + for { + line, err := scanner.ReadString('\n') + if err == io.EOF { + break + } + fields := strings.Fields(line) + // Interested in fields: + // 0 - destination address + // 4 - gateway + // 9 - interface name + dest, err := parseIP(fields[0], familyIPv6) + if err != nil { + return nil, err + } + gw, err := parseIP(fields[4], familyIPv6) + if err != nil { + return nil, err + } + if !dest.Equal(net.IPv6zero) { + continue + } + if gw.Equal(net.IPv6zero) { + continue // loopback + } + routes = append(routes, Route{ + Interface: fields[9], + Destination: dest, + Gateway: gw, + Family: familyIPv6, + }) + } + return routes, nil +} + +// parseIP takes the hex IP address string from route file and converts it +// to a net.IP address. For IPv4, the value must be converted to big endian. +func parseIP(str string, family AddressFamily) (net.IP, error) { + if str == "" { + return nil, fmt.Errorf("input is nil") + } + bytes, err := hex.DecodeString(str) + if err != nil { + return nil, err + } + if family == familyIPv4 { + if len(bytes) != net.IPv4len { + return nil, fmt.Errorf("invalid IPv4 address in route") + } + return net.IP([]byte{bytes[3], bytes[2], bytes[1], bytes[0]}), nil + } + // Must be IPv6 + if len(bytes) != net.IPv6len { + return nil, fmt.Errorf("invalid IPv6 address in route") + } + return net.IP(bytes), nil +} + +func isInterfaceUp(intf *net.Interface) bool { + if intf == nil { + return false + } + if intf.Flags&net.FlagUp != 0 { + klog.V(4).Infof("Interface %v is up", intf.Name) + return true + } + return false +} + +func isLoopbackOrPointToPoint(intf *net.Interface) bool { + return intf.Flags&(net.FlagLoopback|net.FlagPointToPoint) != 0 +} + +// getMatchingGlobalIP returns the first valid global unicast address of the given +// 'family' from the list of 'addrs'. +func getMatchingGlobalIP(addrs []net.Addr, family AddressFamily) (net.IP, error) { + if len(addrs) > 0 { + for i := range addrs { + klog.V(4).Infof("Checking addr %s.", addrs[i].String()) + ip, _, err := net.ParseCIDR(addrs[i].String()) + if err != nil { + return nil, err + } + if memberOf(ip, family) { + if ip.IsGlobalUnicast() { + klog.V(4).Infof("IP found %v", ip) + return ip, nil + } else { + klog.V(4).Infof("Non-global unicast address found %v", ip) + } + } else { + klog.V(4).Infof("%v is not an IPv%d address", ip, int(family)) + } + + } + } + return nil, nil +} + +// getIPFromInterface gets the IPs on an interface and returns a global unicast address, if any. The +// interface must be up, the IP must in the family requested, and the IP must be a global unicast address. +func getIPFromInterface(intfName string, forFamily AddressFamily, nw networkInterfacer) (net.IP, error) { + intf, err := nw.InterfaceByName(intfName) + if err != nil { + return nil, err + } + if isInterfaceUp(intf) { + addrs, err := nw.Addrs(intf) + if err != nil { + return nil, err + } + klog.V(4).Infof("Interface %q has %d addresses :%v.", intfName, len(addrs), addrs) + matchingIP, err := getMatchingGlobalIP(addrs, forFamily) + if err != nil { + return nil, err + } + if matchingIP != nil { + klog.V(4).Infof("Found valid IPv%d address %v for interface %q.", int(forFamily), matchingIP, intfName) + return matchingIP, nil + } + } + return nil, nil +} + +// memberOF tells if the IP is of the desired family. Used for checking interface addresses. +func memberOf(ip net.IP, family AddressFamily) bool { + if ip.To4() != nil { + return family == familyIPv4 + } else { + return family == familyIPv6 + } +} + +// chooseIPFromHostInterfaces looks at all system interfaces, trying to find one that is up that +// has a global unicast address (non-loopback, non-link local, non-point2point), and returns the IP. +// Searches for IPv4 addresses, and then IPv6 addresses. +func chooseIPFromHostInterfaces(nw networkInterfacer) (net.IP, error) { + intfs, err := nw.Interfaces() + if err != nil { + return nil, err + } + if len(intfs) == 0 { + return nil, fmt.Errorf("no interfaces found on host.") + } + for _, family := range []AddressFamily{familyIPv4, familyIPv6} { + klog.V(4).Infof("Looking for system interface with a global IPv%d address", uint(family)) + for _, intf := range intfs { + if !isInterfaceUp(&intf) { + klog.V(4).Infof("Skipping: down interface %q", intf.Name) + continue + } + if isLoopbackOrPointToPoint(&intf) { + klog.V(4).Infof("Skipping: LB or P2P interface %q", intf.Name) + continue + } + addrs, err := nw.Addrs(&intf) + if err != nil { + return nil, err + } + if len(addrs) == 0 { + klog.V(4).Infof("Skipping: no addresses on interface %q", intf.Name) + continue + } + for _, addr := range addrs { + ip, _, err := net.ParseCIDR(addr.String()) + if err != nil { + return nil, fmt.Errorf("Unable to parse CIDR for interface %q: %s", intf.Name, err) + } + if !memberOf(ip, family) { + klog.V(4).Infof("Skipping: no address family match for %q on interface %q.", ip, intf.Name) + continue + } + // TODO: Decide if should open up to allow IPv6 LLAs in future. + if !ip.IsGlobalUnicast() { + klog.V(4).Infof("Skipping: non-global address %q on interface %q.", ip, intf.Name) + continue + } + klog.V(4).Infof("Found global unicast address %q on interface %q.", ip, intf.Name) + return ip, nil + } + } + } + return nil, fmt.Errorf("no acceptable interface with global unicast address found on host") +} + +// ChooseHostInterface is a method used fetch an IP for a daemon. +// If there is no routing info file, it will choose a global IP from the system +// interfaces. Otherwise, it will use IPv4 and IPv6 route information to return the +// IP of the interface with a gateway on it (with priority given to IPv4). For a node +// with no internet connection, it returns error. +func ChooseHostInterface() (net.IP, error) { + var nw networkInterfacer = networkInterface{} + if _, err := os.Stat(ipv4RouteFile); os.IsNotExist(err) { + return chooseIPFromHostInterfaces(nw) + } + routes, err := getAllDefaultRoutes() + if err != nil { + return nil, err + } + return chooseHostInterfaceFromRoute(routes, nw) +} + +// networkInterfacer defines an interface for several net library functions. Production +// code will forward to net library functions, and unit tests will override the methods +// for testing purposes. +type networkInterfacer interface { + InterfaceByName(intfName string) (*net.Interface, error) + Addrs(intf *net.Interface) ([]net.Addr, error) + Interfaces() ([]net.Interface, error) +} + +// networkInterface implements the networkInterfacer interface for production code, just +// wrapping the underlying net library function calls. +type networkInterface struct{} + +func (_ networkInterface) InterfaceByName(intfName string) (*net.Interface, error) { + return net.InterfaceByName(intfName) +} + +func (_ networkInterface) Addrs(intf *net.Interface) ([]net.Addr, error) { + return intf.Addrs() +} + +func (_ networkInterface) Interfaces() ([]net.Interface, error) { + return net.Interfaces() +} + +// getAllDefaultRoutes obtains IPv4 and IPv6 default routes on the node. If unable +// to read the IPv4 routing info file, we return an error. If unable to read the IPv6 +// routing info file (which is optional), we'll just use the IPv4 route information. +// Using all the routing info, if no default routes are found, an error is returned. +func getAllDefaultRoutes() ([]Route, error) { + routes, err := v4File.extract() + if err != nil { + return nil, err + } + v6Routes, _ := v6File.extract() + routes = append(routes, v6Routes...) + if len(routes) == 0 { + return nil, noRoutesError{ + message: fmt.Sprintf("no default routes found in %q or %q", v4File.name, v6File.name), + } + } + return routes, nil +} + +// chooseHostInterfaceFromRoute cycles through each default route provided, looking for a +// global IP address from the interface for the route. Will first look all each IPv4 route for +// an IPv4 IP, and then will look at each IPv6 route for an IPv6 IP. +func chooseHostInterfaceFromRoute(routes []Route, nw networkInterfacer) (net.IP, error) { + for _, family := range []AddressFamily{familyIPv4, familyIPv6} { + klog.V(4).Infof("Looking for default routes with IPv%d addresses", uint(family)) + for _, route := range routes { + if route.Family != family { + continue + } + klog.V(4).Infof("Default route transits interface %q", route.Interface) + finalIP, err := getIPFromInterface(route.Interface, family, nw) + if err != nil { + return nil, err + } + if finalIP != nil { + klog.V(4).Infof("Found active IP %v ", finalIP) + return finalIP, nil + } + } + } + klog.V(4).Infof("No active IP found by looking at default routes") + return nil, fmt.Errorf("unable to select an IP from default routes.") +} + +// If bind-address is usable, return it directly +// If bind-address is not usable (unset, 0.0.0.0, or loopback), we will use the host's default +// interface. +func ChooseBindAddress(bindAddress net.IP) (net.IP, error) { + if bindAddress == nil || bindAddress.IsUnspecified() || bindAddress.IsLoopback() { + hostIP, err := ChooseHostInterface() + if err != nil { + return nil, err + } + bindAddress = hostIP + } + return bindAddress, nil +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go new file mode 100644 index 000000000..7b6eca893 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_range.go @@ -0,0 +1,149 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "fmt" + "strconv" + "strings" +) + +// PortRange represents a range of TCP/UDP ports. To represent a single port, +// set Size to 1. +type PortRange struct { + Base int + Size int +} + +// Contains tests whether a given port falls within the PortRange. +func (pr *PortRange) Contains(p int) bool { + return (p >= pr.Base) && ((p - pr.Base) < pr.Size) +} + +// String converts the PortRange to a string representation, which can be +// parsed by PortRange.Set or ParsePortRange. +func (pr PortRange) String() string { + if pr.Size == 0 { + return "" + } + return fmt.Sprintf("%d-%d", pr.Base, pr.Base+pr.Size-1) +} + +// Set parses a string of the form "value", "min-max", or "min+offset", inclusive at both ends, and +// sets the PortRange from it. This is part of the flag.Value and pflag.Value +// interfaces. +func (pr *PortRange) Set(value string) error { + const ( + SinglePortNotation = 1 << iota + HyphenNotation + PlusNotation + ) + + value = strings.TrimSpace(value) + hyphenIndex := strings.Index(value, "-") + plusIndex := strings.Index(value, "+") + + if value == "" { + pr.Base = 0 + pr.Size = 0 + return nil + } + + var err error + var low, high int + var notation int + + if plusIndex == -1 && hyphenIndex == -1 { + notation |= SinglePortNotation + } + if hyphenIndex != -1 { + notation |= HyphenNotation + } + if plusIndex != -1 { + notation |= PlusNotation + } + + switch notation { + case SinglePortNotation: + var port int + port, err = strconv.Atoi(value) + if err != nil { + return err + } + low = port + high = port + case HyphenNotation: + low, err = strconv.Atoi(value[:hyphenIndex]) + if err != nil { + return err + } + high, err = strconv.Atoi(value[hyphenIndex+1:]) + if err != nil { + return err + } + case PlusNotation: + var offset int + low, err = strconv.Atoi(value[:plusIndex]) + if err != nil { + return err + } + offset, err = strconv.Atoi(value[plusIndex+1:]) + if err != nil { + return err + } + high = low + offset + default: + return fmt.Errorf("unable to parse port range: %s", value) + } + + if low > 65535 || high > 65535 { + return fmt.Errorf("the port range cannot be greater than 65535: %s", value) + } + + if high < low { + return fmt.Errorf("end port cannot be less than start port: %s", value) + } + + pr.Base = low + pr.Size = 1 + high - low + return nil +} + +// Type returns a descriptive string about this type. This is part of the +// pflag.Value interface. +func (*PortRange) Type() string { + return "portRange" +} + +// ParsePortRange parses a string of the form "min-max", inclusive at both +// ends, and initializs a new PortRange from it. +func ParsePortRange(value string) (*PortRange, error) { + pr := &PortRange{} + err := pr.Set(value) + if err != nil { + return nil, err + } + return pr, nil +} + +func ParsePortRangeOrDie(value string) *PortRange { + pr, err := ParsePortRange(value) + if err != nil { + panic(fmt.Sprintf("couldn't parse port range %q: %v", value, err)) + } + return pr +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go b/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go new file mode 100644 index 000000000..c0fd4e20f --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/port_split.go @@ -0,0 +1,77 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "strings" + + "k8s.io/apimachinery/pkg/util/sets" +) + +var validSchemes = sets.NewString("http", "https", "") + +// SplitSchemeNamePort takes a string of the following forms: +// * "", returns "", "","", true +// * ":", returns "", "","",true +// * "::", returns "","","",true +// +// Name must be non-empty or valid will be returned false. +// Scheme must be "http" or "https" if specified +// Port is returned as a string, and it is not required to be numeric (could be +// used for a named port, for example). +func SplitSchemeNamePort(id string) (scheme, name, port string, valid bool) { + parts := strings.Split(id, ":") + switch len(parts) { + case 1: + name = parts[0] + case 2: + name = parts[0] + port = parts[1] + case 3: + scheme = parts[0] + name = parts[1] + port = parts[2] + default: + return "", "", "", false + } + + if len(name) > 0 && validSchemes.Has(scheme) { + return scheme, name, port, true + } else { + return "", "", "", false + } +} + +// JoinSchemeNamePort returns a string that specifies the scheme, name, and port: +// * "" +// * ":" +// * "::" +// None of the parameters may contain a ':' character +// Name is required +// Scheme must be "", "http", or "https" +func JoinSchemeNamePort(scheme, name, port string) string { + if len(scheme) > 0 { + // Must include three segments to specify scheme + return scheme + ":" + name + ":" + port + } + if len(port) > 0 { + // Must include two segments to specify port + return name + ":" + port + } + // Return name alone + return name +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/net/util.go b/vendor/k8s.io/apimachinery/pkg/util/net/util.go new file mode 100644 index 000000000..8344d10c8 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/net/util.go @@ -0,0 +1,56 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "net" + "net/url" + "os" + "reflect" + "syscall" +) + +// IPNetEqual checks if the two input IPNets are representing the same subnet. +// For example, +// 10.0.0.1/24 and 10.0.0.0/24 are the same subnet. +// 10.0.0.1/24 and 10.0.0.0/25 are not the same subnet. +func IPNetEqual(ipnet1, ipnet2 *net.IPNet) bool { + if ipnet1 == nil || ipnet2 == nil { + return false + } + if reflect.DeepEqual(ipnet1.Mask, ipnet2.Mask) && ipnet1.Contains(ipnet2.IP) && ipnet2.Contains(ipnet1.IP) { + return true + } + return false +} + +// Returns if the given err is "connection reset by peer" error. +func IsConnectionReset(err error) bool { + if urlErr, ok := err.(*url.Error); ok { + err = urlErr.Err + } + if opErr, ok := err.(*net.OpError); ok { + err = opErr.Err + } + if osErr, ok := err.(*os.SyscallError); ok { + err = osErr.Err + } + if errno, ok := err.(syscall.Errno); ok && errno == syscall.ECONNRESET { + return true + } + return false +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go new file mode 100644 index 000000000..8e34f9261 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -0,0 +1,173 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "fmt" + "runtime" + "sync" + "time" + + "k8s.io/klog" +) + +var ( + // ReallyCrash controls the behavior of HandleCrash and now defaults + // true. It's still exposed so components can optionally set to false + // to restore prior behavior. + ReallyCrash = true +) + +// PanicHandlers is a list of functions which will be invoked when a panic happens. +var PanicHandlers = []func(interface{}){logPanic} + +// HandleCrash simply catches a crash and logs an error. Meant to be called via +// defer. Additional context-specific handlers can be provided, and will be +// called in case of panic. HandleCrash actually crashes, after calling the +// handlers and logging the panic message. +// +// TODO: remove this function. We are switching to a world where it's safe for +// apiserver to panic, since it will be restarted by kubelet. At the beginning +// of the Kubernetes project, nothing was going to restart apiserver and so +// catching panics was important. But it's actually much simpler for monitoring +// software if we just exit when an unexpected panic happens. +func HandleCrash(additionalHandlers ...func(interface{})) { + if r := recover(); r != nil { + for _, fn := range PanicHandlers { + fn(r) + } + for _, fn := range additionalHandlers { + fn(r) + } + if ReallyCrash { + // Actually proceed to panic. + panic(r) + } + } +} + +// logPanic logs the caller tree when a panic occurs. +func logPanic(r interface{}) { + callers := getCallers(r) + if _, ok := r.(string); ok { + klog.Errorf("Observed a panic: %s\n%v", r, callers) + } else { + klog.Errorf("Observed a panic: %#v (%v)\n%v", r, r, callers) + } +} + +func getCallers(r interface{}) string { + callers := "" + for i := 0; true; i++ { + _, file, line, ok := runtime.Caller(i) + if !ok { + break + } + callers = callers + fmt.Sprintf("%v:%v\n", file, line) + } + + return callers +} + +// ErrorHandlers is a list of functions which will be invoked when an unreturnable +// error occurs. +// TODO(lavalamp): for testability, this and the below HandleError function +// should be packaged up into a testable and reusable object. +var ErrorHandlers = []func(error){ + logError, + (&rudimentaryErrorBackoff{ + lastErrorTime: time.Now(), + // 1ms was the number folks were able to stomach as a global rate limit. + // If you need to log errors more than 1000 times a second you + // should probably consider fixing your code instead. :) + minPeriod: time.Millisecond, + }).OnError, +} + +// HandlerError is a method to invoke when a non-user facing piece of code cannot +// return an error and needs to indicate it has been ignored. Invoking this method +// is preferable to logging the error - the default behavior is to log but the +// errors may be sent to a remote server for analysis. +func HandleError(err error) { + // this is sometimes called with a nil error. We probably shouldn't fail and should do nothing instead + if err == nil { + return + } + + for _, fn := range ErrorHandlers { + fn(err) + } +} + +// logError prints an error with the call stack of the location it was reported +func logError(err error) { + klog.ErrorDepth(2, err) +} + +type rudimentaryErrorBackoff struct { + minPeriod time.Duration // immutable + // TODO(lavalamp): use the clock for testability. Need to move that + // package for that to be accessible here. + lastErrorTimeLock sync.Mutex + lastErrorTime time.Time +} + +// OnError will block if it is called more often than the embedded period time. +// This will prevent overly tight hot error loops. +func (r *rudimentaryErrorBackoff) OnError(error) { + r.lastErrorTimeLock.Lock() + defer r.lastErrorTimeLock.Unlock() + d := time.Since(r.lastErrorTime) + if d < r.minPeriod { + // If the time moves backwards for any reason, do nothing + time.Sleep(r.minPeriod - d) + } + r.lastErrorTime = time.Now() +} + +// GetCaller returns the caller of the function that calls it. +func GetCaller() string { + var pc [1]uintptr + runtime.Callers(3, pc[:]) + f := runtime.FuncForPC(pc[0]) + if f == nil { + return fmt.Sprintf("Unable to find caller") + } + return f.Name() +} + +// RecoverFromPanic replaces the specified error with an error containing the +// original error, and the call tree when a panic occurs. This enables error +// handlers to handle errors and panics the same way. +func RecoverFromPanic(err *error) { + if r := recover(); r != nil { + callers := getCallers(r) + + *err = fmt.Errorf( + "recovered from panic %q. (err=%v) Call stack:\n%v", + r, + *err, + callers) + } +} + +// Must panics on non-nil errors. Useful to handling programmer level errors. +func Must(err error) { + if err != nil { + panic(err) + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go b/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go new file mode 100644 index 000000000..766f4501e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/byte.go @@ -0,0 +1,203 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +package sets + +import ( + "reflect" + "sort" +) + +// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. +type Byte map[byte]Empty + +// NewByte creates a Byte from a list of values. +func NewByte(items ...byte) Byte { + ss := Byte{} + ss.Insert(items...) + return ss +} + +// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}). +// If the value passed in is not actually a map, this will panic. +func ByteKeySet(theMap interface{}) Byte { + v := reflect.ValueOf(theMap) + ret := Byte{} + + for _, keyValue := range v.MapKeys() { + ret.Insert(keyValue.Interface().(byte)) + } + return ret +} + +// Insert adds items to the set. +func (s Byte) Insert(items ...byte) { + for _, item := range items { + s[item] = Empty{} + } +} + +// Delete removes all items from the set. +func (s Byte) Delete(items ...byte) { + for _, item := range items { + delete(s, item) + } +} + +// Has returns true if and only if item is contained in the set. +func (s Byte) Has(item byte) bool { + _, contained := s[item] + return contained +} + +// HasAll returns true if and only if all items are contained in the set. +func (s Byte) HasAll(items ...byte) bool { + for _, item := range items { + if !s.Has(item) { + return false + } + } + return true +} + +// HasAny returns true if any items are contained in the set. +func (s Byte) HasAny(items ...byte) bool { + for _, item := range items { + if s.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in s2 +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.Difference(s2) = {a3} +// s2.Difference(s1) = {a4, a5} +func (s Byte) Difference(s2 Byte) Byte { + result := NewByte() + for key := range s { + if !s2.Has(key) { + result.Insert(key) + } + } + return result +} + +// Union returns a new set which includes items in either s1 or s2. +// For example: +// s1 = {a1, a2} +// s2 = {a3, a4} +// s1.Union(s2) = {a1, a2, a3, a4} +// s2.Union(s1) = {a1, a2, a3, a4} +func (s1 Byte) Union(s2 Byte) Byte { + result := NewByte() + for key := range s1 { + result.Insert(key) + } + for key := range s2 { + result.Insert(key) + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s1 and s2 +// For example: +// s1 = {a1, a2} +// s2 = {a2, a3} +// s1.Intersection(s2) = {a2} +func (s1 Byte) Intersection(s2 Byte) Byte { + var walk, other Byte + result := NewByte() + if s1.Len() < s2.Len() { + walk = s1 + other = s2 + } else { + walk = s2 + other = s1 + } + for key := range walk { + if other.Has(key) { + result.Insert(key) + } + } + return result +} + +// IsSuperset returns true if and only if s1 is a superset of s2. +func (s1 Byte) IsSuperset(s2 Byte) bool { + for item := range s2 { + if !s1.Has(item) { + return false + } + } + return true +} + +// Equal returns true if and only if s1 is equal (as a set) to s2. +// Two sets are equal if their membership is identical. +// (In practice, this means same elements, order doesn't matter) +func (s1 Byte) Equal(s2 Byte) bool { + return len(s1) == len(s2) && s1.IsSuperset(s2) +} + +type sortableSliceOfByte []byte + +func (s sortableSliceOfByte) Len() int { return len(s) } +func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) } +func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// List returns the contents as a sorted byte slice. +func (s Byte) List() []byte { + res := make(sortableSliceOfByte, 0, len(s)) + for key := range s { + res = append(res, key) + } + sort.Sort(res) + return []byte(res) +} + +// UnsortedList returns the slice with contents in random order. +func (s Byte) UnsortedList() []byte { + res := make([]byte, 0, len(s)) + for key := range s { + res = append(res, key) + } + return res +} + +// Returns a single element from the set. +func (s Byte) PopAny() (byte, bool) { + for key := range s { + s.Delete(key) + return key, true + } + var zeroValue byte + return zeroValue, false +} + +// Len returns the size of the set. +func (s Byte) Len() int { + return len(s) +} + +func lessByte(lhs, rhs byte) bool { + return lhs < rhs +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go new file mode 100644 index 000000000..b152a0bf0 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +// Package sets has auto-generated set types. +package sets diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go b/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go new file mode 100644 index 000000000..e11e622c5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go @@ -0,0 +1,23 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +package sets + +// Empty is public since it is used by some internal API objects for conversions between external +// string arrays and internal sets, and conversion logic requires public types today. +type Empty struct{} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/int.go b/vendor/k8s.io/apimachinery/pkg/util/sets/int.go new file mode 100644 index 000000000..a0a513cd9 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/int.go @@ -0,0 +1,203 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +package sets + +import ( + "reflect" + "sort" +) + +// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. +type Int map[int]Empty + +// NewInt creates a Int from a list of values. +func NewInt(items ...int) Int { + ss := Int{} + ss.Insert(items...) + return ss +} + +// IntKeySet creates a Int from a keys of a map[int](? extends interface{}). +// If the value passed in is not actually a map, this will panic. +func IntKeySet(theMap interface{}) Int { + v := reflect.ValueOf(theMap) + ret := Int{} + + for _, keyValue := range v.MapKeys() { + ret.Insert(keyValue.Interface().(int)) + } + return ret +} + +// Insert adds items to the set. +func (s Int) Insert(items ...int) { + for _, item := range items { + s[item] = Empty{} + } +} + +// Delete removes all items from the set. +func (s Int) Delete(items ...int) { + for _, item := range items { + delete(s, item) + } +} + +// Has returns true if and only if item is contained in the set. +func (s Int) Has(item int) bool { + _, contained := s[item] + return contained +} + +// HasAll returns true if and only if all items are contained in the set. +func (s Int) HasAll(items ...int) bool { + for _, item := range items { + if !s.Has(item) { + return false + } + } + return true +} + +// HasAny returns true if any items are contained in the set. +func (s Int) HasAny(items ...int) bool { + for _, item := range items { + if s.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in s2 +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.Difference(s2) = {a3} +// s2.Difference(s1) = {a4, a5} +func (s Int) Difference(s2 Int) Int { + result := NewInt() + for key := range s { + if !s2.Has(key) { + result.Insert(key) + } + } + return result +} + +// Union returns a new set which includes items in either s1 or s2. +// For example: +// s1 = {a1, a2} +// s2 = {a3, a4} +// s1.Union(s2) = {a1, a2, a3, a4} +// s2.Union(s1) = {a1, a2, a3, a4} +func (s1 Int) Union(s2 Int) Int { + result := NewInt() + for key := range s1 { + result.Insert(key) + } + for key := range s2 { + result.Insert(key) + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s1 and s2 +// For example: +// s1 = {a1, a2} +// s2 = {a2, a3} +// s1.Intersection(s2) = {a2} +func (s1 Int) Intersection(s2 Int) Int { + var walk, other Int + result := NewInt() + if s1.Len() < s2.Len() { + walk = s1 + other = s2 + } else { + walk = s2 + other = s1 + } + for key := range walk { + if other.Has(key) { + result.Insert(key) + } + } + return result +} + +// IsSuperset returns true if and only if s1 is a superset of s2. +func (s1 Int) IsSuperset(s2 Int) bool { + for item := range s2 { + if !s1.Has(item) { + return false + } + } + return true +} + +// Equal returns true if and only if s1 is equal (as a set) to s2. +// Two sets are equal if their membership is identical. +// (In practice, this means same elements, order doesn't matter) +func (s1 Int) Equal(s2 Int) bool { + return len(s1) == len(s2) && s1.IsSuperset(s2) +} + +type sortableSliceOfInt []int + +func (s sortableSliceOfInt) Len() int { return len(s) } +func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) } +func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// List returns the contents as a sorted int slice. +func (s Int) List() []int { + res := make(sortableSliceOfInt, 0, len(s)) + for key := range s { + res = append(res, key) + } + sort.Sort(res) + return []int(res) +} + +// UnsortedList returns the slice with contents in random order. +func (s Int) UnsortedList() []int { + res := make([]int, 0, len(s)) + for key := range s { + res = append(res, key) + } + return res +} + +// Returns a single element from the set. +func (s Int) PopAny() (int, bool) { + for key := range s { + s.Delete(key) + return key, true + } + var zeroValue int + return zeroValue, false +} + +// Len returns the size of the set. +func (s Int) Len() int { + return len(s) +} + +func lessInt(lhs, rhs int) bool { + return lhs < rhs +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go b/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go new file mode 100644 index 000000000..9ca9af0c5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/int64.go @@ -0,0 +1,203 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +package sets + +import ( + "reflect" + "sort" +) + +// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. +type Int64 map[int64]Empty + +// NewInt64 creates a Int64 from a list of values. +func NewInt64(items ...int64) Int64 { + ss := Int64{} + ss.Insert(items...) + return ss +} + +// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}). +// If the value passed in is not actually a map, this will panic. +func Int64KeySet(theMap interface{}) Int64 { + v := reflect.ValueOf(theMap) + ret := Int64{} + + for _, keyValue := range v.MapKeys() { + ret.Insert(keyValue.Interface().(int64)) + } + return ret +} + +// Insert adds items to the set. +func (s Int64) Insert(items ...int64) { + for _, item := range items { + s[item] = Empty{} + } +} + +// Delete removes all items from the set. +func (s Int64) Delete(items ...int64) { + for _, item := range items { + delete(s, item) + } +} + +// Has returns true if and only if item is contained in the set. +func (s Int64) Has(item int64) bool { + _, contained := s[item] + return contained +} + +// HasAll returns true if and only if all items are contained in the set. +func (s Int64) HasAll(items ...int64) bool { + for _, item := range items { + if !s.Has(item) { + return false + } + } + return true +} + +// HasAny returns true if any items are contained in the set. +func (s Int64) HasAny(items ...int64) bool { + for _, item := range items { + if s.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in s2 +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.Difference(s2) = {a3} +// s2.Difference(s1) = {a4, a5} +func (s Int64) Difference(s2 Int64) Int64 { + result := NewInt64() + for key := range s { + if !s2.Has(key) { + result.Insert(key) + } + } + return result +} + +// Union returns a new set which includes items in either s1 or s2. +// For example: +// s1 = {a1, a2} +// s2 = {a3, a4} +// s1.Union(s2) = {a1, a2, a3, a4} +// s2.Union(s1) = {a1, a2, a3, a4} +func (s1 Int64) Union(s2 Int64) Int64 { + result := NewInt64() + for key := range s1 { + result.Insert(key) + } + for key := range s2 { + result.Insert(key) + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s1 and s2 +// For example: +// s1 = {a1, a2} +// s2 = {a2, a3} +// s1.Intersection(s2) = {a2} +func (s1 Int64) Intersection(s2 Int64) Int64 { + var walk, other Int64 + result := NewInt64() + if s1.Len() < s2.Len() { + walk = s1 + other = s2 + } else { + walk = s2 + other = s1 + } + for key := range walk { + if other.Has(key) { + result.Insert(key) + } + } + return result +} + +// IsSuperset returns true if and only if s1 is a superset of s2. +func (s1 Int64) IsSuperset(s2 Int64) bool { + for item := range s2 { + if !s1.Has(item) { + return false + } + } + return true +} + +// Equal returns true if and only if s1 is equal (as a set) to s2. +// Two sets are equal if their membership is identical. +// (In practice, this means same elements, order doesn't matter) +func (s1 Int64) Equal(s2 Int64) bool { + return len(s1) == len(s2) && s1.IsSuperset(s2) +} + +type sortableSliceOfInt64 []int64 + +func (s sortableSliceOfInt64) Len() int { return len(s) } +func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) } +func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// List returns the contents as a sorted int64 slice. +func (s Int64) List() []int64 { + res := make(sortableSliceOfInt64, 0, len(s)) + for key := range s { + res = append(res, key) + } + sort.Sort(res) + return []int64(res) +} + +// UnsortedList returns the slice with contents in random order. +func (s Int64) UnsortedList() []int64 { + res := make([]int64, 0, len(s)) + for key := range s { + res = append(res, key) + } + return res +} + +// Returns a single element from the set. +func (s Int64) PopAny() (int64, bool) { + for key := range s { + s.Delete(key) + return key, true + } + var zeroValue int64 + return zeroValue, false +} + +// Len returns the size of the set. +func (s Int64) Len() int { + return len(s) +} + +func lessInt64(lhs, rhs int64) bool { + return lhs < rhs +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/string.go b/vendor/k8s.io/apimachinery/pkg/util/sets/string.go new file mode 100644 index 000000000..ba00ad7df --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/sets/string.go @@ -0,0 +1,203 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +package sets + +import ( + "reflect" + "sort" +) + +// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. +type String map[string]Empty + +// NewString creates a String from a list of values. +func NewString(items ...string) String { + ss := String{} + ss.Insert(items...) + return ss +} + +// StringKeySet creates a String from a keys of a map[string](? extends interface{}). +// If the value passed in is not actually a map, this will panic. +func StringKeySet(theMap interface{}) String { + v := reflect.ValueOf(theMap) + ret := String{} + + for _, keyValue := range v.MapKeys() { + ret.Insert(keyValue.Interface().(string)) + } + return ret +} + +// Insert adds items to the set. +func (s String) Insert(items ...string) { + for _, item := range items { + s[item] = Empty{} + } +} + +// Delete removes all items from the set. +func (s String) Delete(items ...string) { + for _, item := range items { + delete(s, item) + } +} + +// Has returns true if and only if item is contained in the set. +func (s String) Has(item string) bool { + _, contained := s[item] + return contained +} + +// HasAll returns true if and only if all items are contained in the set. +func (s String) HasAll(items ...string) bool { + for _, item := range items { + if !s.Has(item) { + return false + } + } + return true +} + +// HasAny returns true if any items are contained in the set. +func (s String) HasAny(items ...string) bool { + for _, item := range items { + if s.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in s2 +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.Difference(s2) = {a3} +// s2.Difference(s1) = {a4, a5} +func (s String) Difference(s2 String) String { + result := NewString() + for key := range s { + if !s2.Has(key) { + result.Insert(key) + } + } + return result +} + +// Union returns a new set which includes items in either s1 or s2. +// For example: +// s1 = {a1, a2} +// s2 = {a3, a4} +// s1.Union(s2) = {a1, a2, a3, a4} +// s2.Union(s1) = {a1, a2, a3, a4} +func (s1 String) Union(s2 String) String { + result := NewString() + for key := range s1 { + result.Insert(key) + } + for key := range s2 { + result.Insert(key) + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s1 and s2 +// For example: +// s1 = {a1, a2} +// s2 = {a2, a3} +// s1.Intersection(s2) = {a2} +func (s1 String) Intersection(s2 String) String { + var walk, other String + result := NewString() + if s1.Len() < s2.Len() { + walk = s1 + other = s2 + } else { + walk = s2 + other = s1 + } + for key := range walk { + if other.Has(key) { + result.Insert(key) + } + } + return result +} + +// IsSuperset returns true if and only if s1 is a superset of s2. +func (s1 String) IsSuperset(s2 String) bool { + for item := range s2 { + if !s1.Has(item) { + return false + } + } + return true +} + +// Equal returns true if and only if s1 is equal (as a set) to s2. +// Two sets are equal if their membership is identical. +// (In practice, this means same elements, order doesn't matter) +func (s1 String) Equal(s2 String) bool { + return len(s1) == len(s2) && s1.IsSuperset(s2) +} + +type sortableSliceOfString []string + +func (s sortableSliceOfString) Len() int { return len(s) } +func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } +func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// List returns the contents as a sorted string slice. +func (s String) List() []string { + res := make(sortableSliceOfString, 0, len(s)) + for key := range s { + res = append(res, key) + } + sort.Sort(res) + return []string(res) +} + +// UnsortedList returns the slice with contents in random order. +func (s String) UnsortedList() []string { + res := make([]string, 0, len(s)) + for key := range s { + res = append(res, key) + } + return res +} + +// Returns a single element from the set. +func (s String) PopAny() (string, bool) { + for key := range s { + s.Delete(key) + return key, true + } + var zeroValue string + return zeroValue, false +} + +// Len returns the size of the set. +func (s String) Len() int { + return len(s) +} + +func lessString(lhs, rhs string) bool { + return lhs < rhs +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go new file mode 100644 index 000000000..4767fd1dd --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -0,0 +1,259 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package field + +import ( + "fmt" + "reflect" + "strconv" + "strings" + + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" +) + +// Error is an implementation of the 'error' interface, which represents a +// field-level validation error. +type Error struct { + Type ErrorType + Field string + BadValue interface{} + Detail string +} + +var _ error = &Error{} + +// Error implements the error interface. +func (v *Error) Error() string { + return fmt.Sprintf("%s: %s", v.Field, v.ErrorBody()) +} + +// ErrorBody returns the error message without the field name. This is useful +// for building nice-looking higher-level error reporting. +func (v *Error) ErrorBody() string { + var s string + switch v.Type { + case ErrorTypeRequired, ErrorTypeForbidden, ErrorTypeTooLong, ErrorTypeInternal: + s = v.Type.String() + default: + value := v.BadValue + valueType := reflect.TypeOf(value) + if value == nil || valueType == nil { + value = "null" + } else if valueType.Kind() == reflect.Ptr { + if reflectValue := reflect.ValueOf(value); reflectValue.IsNil() { + value = "null" + } else { + value = reflectValue.Elem().Interface() + } + } + switch t := value.(type) { + case int64, int32, float64, float32, bool: + // use simple printer for simple types + s = fmt.Sprintf("%s: %v", v.Type, value) + case string: + s = fmt.Sprintf("%s: %q", v.Type, t) + case fmt.Stringer: + // anything that defines String() is better than raw struct + s = fmt.Sprintf("%s: %s", v.Type, t.String()) + default: + // fallback to raw struct + // TODO: internal types have panic guards against json.Marshalling to prevent + // accidental use of internal types in external serialized form. For now, use + // %#v, although it would be better to show a more expressive output in the future + s = fmt.Sprintf("%s: %#v", v.Type, value) + } + } + if len(v.Detail) != 0 { + s += fmt.Sprintf(": %s", v.Detail) + } + return s +} + +// ErrorType is a machine readable value providing more detail about why +// a field is invalid. These values are expected to match 1-1 with +// CauseType in api/types.go. +type ErrorType string + +// TODO: These values are duplicated in api/types.go, but there's a circular dep. Fix it. +const ( + // ErrorTypeNotFound is used to report failure to find a requested value + // (e.g. looking up an ID). See NotFound(). + ErrorTypeNotFound ErrorType = "FieldValueNotFound" + // ErrorTypeRequired is used to report required values that are not + // provided (e.g. empty strings, null values, or empty arrays). See + // Required(). + ErrorTypeRequired ErrorType = "FieldValueRequired" + // ErrorTypeDuplicate is used to report collisions of values that must be + // unique (e.g. unique IDs). See Duplicate(). + ErrorTypeDuplicate ErrorType = "FieldValueDuplicate" + // ErrorTypeInvalid is used to report malformed values (e.g. failed regex + // match, too long, out of bounds). See Invalid(). + ErrorTypeInvalid ErrorType = "FieldValueInvalid" + // ErrorTypeNotSupported is used to report unknown values for enumerated + // fields (e.g. a list of valid values). See NotSupported(). + ErrorTypeNotSupported ErrorType = "FieldValueNotSupported" + // ErrorTypeForbidden is used to report valid (as per formatting rules) + // values which would be accepted under some conditions, but which are not + // permitted by the current conditions (such as security policy). See + // Forbidden(). + ErrorTypeForbidden ErrorType = "FieldValueForbidden" + // ErrorTypeTooLong is used to report that the given value is too long. + // This is similar to ErrorTypeInvalid, but the error will not include the + // too-long value. See TooLong(). + ErrorTypeTooLong ErrorType = "FieldValueTooLong" + // ErrorTypeInternal is used to report other errors that are not related + // to user input. See InternalError(). + ErrorTypeInternal ErrorType = "InternalError" +) + +// String converts a ErrorType into its corresponding canonical error message. +func (t ErrorType) String() string { + switch t { + case ErrorTypeNotFound: + return "Not found" + case ErrorTypeRequired: + return "Required value" + case ErrorTypeDuplicate: + return "Duplicate value" + case ErrorTypeInvalid: + return "Invalid value" + case ErrorTypeNotSupported: + return "Unsupported value" + case ErrorTypeForbidden: + return "Forbidden" + case ErrorTypeTooLong: + return "Too long" + case ErrorTypeInternal: + return "Internal error" + default: + panic(fmt.Sprintf("unrecognized validation error: %q", string(t))) + } +} + +// NotFound returns a *Error indicating "value not found". This is +// used to report failure to find a requested value (e.g. looking up an ID). +func NotFound(field *Path, value interface{}) *Error { + return &Error{ErrorTypeNotFound, field.String(), value, ""} +} + +// Required returns a *Error indicating "value required". This is used +// to report required values that are not provided (e.g. empty strings, null +// values, or empty arrays). +func Required(field *Path, detail string) *Error { + return &Error{ErrorTypeRequired, field.String(), "", detail} +} + +// Duplicate returns a *Error indicating "duplicate value". This is +// used to report collisions of values that must be unique (e.g. names or IDs). +func Duplicate(field *Path, value interface{}) *Error { + return &Error{ErrorTypeDuplicate, field.String(), value, ""} +} + +// Invalid returns a *Error indicating "invalid value". This is used +// to report malformed values (e.g. failed regex match, too long, out of bounds). +func Invalid(field *Path, value interface{}, detail string) *Error { + return &Error{ErrorTypeInvalid, field.String(), value, detail} +} + +// NotSupported returns a *Error indicating "unsupported value". +// This is used to report unknown values for enumerated fields (e.g. a list of +// valid values). +func NotSupported(field *Path, value interface{}, validValues []string) *Error { + detail := "" + if validValues != nil && len(validValues) > 0 { + quotedValues := make([]string, len(validValues)) + for i, v := range validValues { + quotedValues[i] = strconv.Quote(v) + } + detail = "supported values: " + strings.Join(quotedValues, ", ") + } + return &Error{ErrorTypeNotSupported, field.String(), value, detail} +} + +// Forbidden returns a *Error indicating "forbidden". This is used to +// report valid (as per formatting rules) values which would be accepted under +// some conditions, but which are not permitted by current conditions (e.g. +// security policy). +func Forbidden(field *Path, detail string) *Error { + return &Error{ErrorTypeForbidden, field.String(), "", detail} +} + +// TooLong returns a *Error indicating "too long". This is used to +// report that the given value is too long. This is similar to +// Invalid, but the returned error will not include the too-long +// value. +func TooLong(field *Path, value interface{}, maxLength int) *Error { + return &Error{ErrorTypeTooLong, field.String(), value, fmt.Sprintf("must have at most %d characters", maxLength)} +} + +// InternalError returns a *Error indicating "internal error". This is used +// to signal that an error was found that was not directly related to user +// input. The err argument must be non-nil. +func InternalError(field *Path, err error) *Error { + return &Error{ErrorTypeInternal, field.String(), nil, err.Error()} +} + +// ErrorList holds a set of Errors. It is plausible that we might one day have +// non-field errors in this same umbrella package, but for now we don't, so +// we can keep it simple and leave ErrorList here. +type ErrorList []*Error + +// NewErrorTypeMatcher returns an errors.Matcher that returns true +// if the provided error is a Error and has the provided ErrorType. +func NewErrorTypeMatcher(t ErrorType) utilerrors.Matcher { + return func(err error) bool { + if e, ok := err.(*Error); ok { + return e.Type == t + } + return false + } +} + +// ToAggregate converts the ErrorList into an errors.Aggregate. +func (list ErrorList) ToAggregate() utilerrors.Aggregate { + errs := make([]error, 0, len(list)) + errorMsgs := sets.NewString() + for _, err := range list { + msg := fmt.Sprintf("%v", err) + if errorMsgs.Has(msg) { + continue + } + errorMsgs.Insert(msg) + errs = append(errs, err) + } + return utilerrors.NewAggregate(errs) +} + +func fromAggregate(agg utilerrors.Aggregate) ErrorList { + errs := agg.Errors() + list := make(ErrorList, len(errs)) + for i := range errs { + list[i] = errs[i].(*Error) + } + return list +} + +// Filter removes items from the ErrorList that match the provided fns. +func (list ErrorList) Filter(fns ...utilerrors.Matcher) ErrorList { + err := utilerrors.FilterOut(list.ToAggregate(), fns...) + if err == nil { + return nil + } + // FilterOut takes an Aggregate and returns an Aggregate + return fromAggregate(err.(utilerrors.Aggregate)) +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go new file mode 100644 index 000000000..2efc8eec7 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go @@ -0,0 +1,91 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package field + +import ( + "bytes" + "fmt" + "strconv" +) + +// Path represents the path from some root to a particular field. +type Path struct { + name string // the name of this field or "" if this is an index + index string // if name == "", this is a subscript (index or map key) of the previous element + parent *Path // nil if this is the root element +} + +// NewPath creates a root Path object. +func NewPath(name string, moreNames ...string) *Path { + r := &Path{name: name, parent: nil} + for _, anotherName := range moreNames { + r = &Path{name: anotherName, parent: r} + } + return r +} + +// Root returns the root element of this Path. +func (p *Path) Root() *Path { + for ; p.parent != nil; p = p.parent { + // Do nothing. + } + return p +} + +// Child creates a new Path that is a child of the method receiver. +func (p *Path) Child(name string, moreNames ...string) *Path { + r := NewPath(name, moreNames...) + r.Root().parent = p + return r +} + +// Index indicates that the previous Path is to be subscripted by an int. +// This sets the same underlying value as Key. +func (p *Path) Index(index int) *Path { + return &Path{index: strconv.Itoa(index), parent: p} +} + +// Key indicates that the previous Path is to be subscripted by a string. +// This sets the same underlying value as Index. +func (p *Path) Key(key string) *Path { + return &Path{index: key, parent: p} +} + +// String produces a string representation of the Path. +func (p *Path) String() string { + // make a slice to iterate + elems := []*Path{} + for ; p != nil; p = p.parent { + elems = append(elems, p) + } + + // iterate, but it has to be backwards + buf := bytes.NewBuffer(nil) + for i := range elems { + p := elems[len(elems)-1-i] + if p.parent != nil && len(p.name) > 0 { + // This is either the root or it is a subscript. + buf.WriteString(".") + } + if len(p.name) > 0 { + buf.WriteString(p.name) + } else { + fmt.Fprintf(buf, "[%s]", p.index) + } + } + return buf.String() +} diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go new file mode 100644 index 000000000..2dd99992d --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go @@ -0,0 +1,416 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "fmt" + "math" + "net" + "regexp" + "strconv" + "strings" + + "k8s.io/apimachinery/pkg/util/validation/field" +) + +const qnameCharFmt string = "[A-Za-z0-9]" +const qnameExtCharFmt string = "[-A-Za-z0-9_.]" +const qualifiedNameFmt string = "(" + qnameCharFmt + qnameExtCharFmt + "*)?" + qnameCharFmt +const qualifiedNameErrMsg string = "must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" +const qualifiedNameMaxLength int = 63 + +var qualifiedNameRegexp = regexp.MustCompile("^" + qualifiedNameFmt + "$") + +// IsQualifiedName tests whether the value passed is what Kubernetes calls a +// "qualified name". This is a format used in various places throughout the +// system. If the value is not valid, a list of error strings is returned. +// Otherwise an empty list (or nil) is returned. +func IsQualifiedName(value string) []string { + var errs []string + parts := strings.Split(value, "/") + var name string + switch len(parts) { + case 1: + name = parts[0] + case 2: + var prefix string + prefix, name = parts[0], parts[1] + if len(prefix) == 0 { + errs = append(errs, "prefix part "+EmptyError()) + } else if msgs := IsDNS1123Subdomain(prefix); len(msgs) != 0 { + errs = append(errs, prefixEach(msgs, "prefix part ")...) + } + default: + return append(errs, "a qualified name "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")+ + " with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')") + } + + if len(name) == 0 { + errs = append(errs, "name part "+EmptyError()) + } else if len(name) > qualifiedNameMaxLength { + errs = append(errs, "name part "+MaxLenError(qualifiedNameMaxLength)) + } + if !qualifiedNameRegexp.MatchString(name) { + errs = append(errs, "name part "+RegexError(qualifiedNameErrMsg, qualifiedNameFmt, "MyName", "my.name", "123-abc")) + } + return errs +} + +// IsFullyQualifiedName checks if the name is fully qualified. +func IsFullyQualifiedName(fldPath *field.Path, name string) field.ErrorList { + var allErrors field.ErrorList + if len(name) == 0 { + return append(allErrors, field.Required(fldPath, "")) + } + if errs := IsDNS1123Subdomain(name); len(errs) > 0 { + return append(allErrors, field.Invalid(fldPath, name, strings.Join(errs, ","))) + } + if len(strings.Split(name, ".")) < 3 { + return append(allErrors, field.Invalid(fldPath, name, "should be a domain with at least three segments separated by dots")) + } + return allErrors +} + +const labelValueFmt string = "(" + qualifiedNameFmt + ")?" +const labelValueErrMsg string = "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character" + +// LabelValueMaxLength is a label's max length +const LabelValueMaxLength int = 63 + +var labelValueRegexp = regexp.MustCompile("^" + labelValueFmt + "$") + +// IsValidLabelValue tests whether the value passed is a valid label value. If +// the value is not valid, a list of error strings is returned. Otherwise an +// empty list (or nil) is returned. +func IsValidLabelValue(value string) []string { + var errs []string + if len(value) > LabelValueMaxLength { + errs = append(errs, MaxLenError(LabelValueMaxLength)) + } + if !labelValueRegexp.MatchString(value) { + errs = append(errs, RegexError(labelValueErrMsg, labelValueFmt, "MyValue", "my_value", "12345")) + } + return errs +} + +const dns1123LabelFmt string = "[a-z0-9]([-a-z0-9]*[a-z0-9])?" +const dns1123LabelErrMsg string = "a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character" + +// DNS1123LabelMaxLength is a label's max length in DNS (RFC 1123) +const DNS1123LabelMaxLength int = 63 + +var dns1123LabelRegexp = regexp.MustCompile("^" + dns1123LabelFmt + "$") + +// IsDNS1123Label tests for a string that conforms to the definition of a label in +// DNS (RFC 1123). +func IsDNS1123Label(value string) []string { + var errs []string + if len(value) > DNS1123LabelMaxLength { + errs = append(errs, MaxLenError(DNS1123LabelMaxLength)) + } + if !dns1123LabelRegexp.MatchString(value) { + errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc")) + } + return errs +} + +const dns1123SubdomainFmt string = dns1123LabelFmt + "(\\." + dns1123LabelFmt + ")*" +const dns1123SubdomainErrorMsg string = "a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" + +// DNS1123SubdomainMaxLength is a subdomain's max length in DNS (RFC 1123) +const DNS1123SubdomainMaxLength int = 253 + +var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$") + +// IsDNS1123Subdomain tests for a string that conforms to the definition of a +// subdomain in DNS (RFC 1123). +func IsDNS1123Subdomain(value string) []string { + var errs []string + if len(value) > DNS1123SubdomainMaxLength { + errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) + } + if !dns1123SubdomainRegexp.MatchString(value) { + errs = append(errs, RegexError(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com")) + } + return errs +} + +const dns1035LabelFmt string = "[a-z]([-a-z0-9]*[a-z0-9])?" +const dns1035LabelErrMsg string = "a DNS-1035 label must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character" + +// DNS1035LabelMaxLength is a label's max length in DNS (RFC 1035) +const DNS1035LabelMaxLength int = 63 + +var dns1035LabelRegexp = regexp.MustCompile("^" + dns1035LabelFmt + "$") + +// IsDNS1035Label tests for a string that conforms to the definition of a label in +// DNS (RFC 1035). +func IsDNS1035Label(value string) []string { + var errs []string + if len(value) > DNS1035LabelMaxLength { + errs = append(errs, MaxLenError(DNS1035LabelMaxLength)) + } + if !dns1035LabelRegexp.MatchString(value) { + errs = append(errs, RegexError(dns1035LabelErrMsg, dns1035LabelFmt, "my-name", "abc-123")) + } + return errs +} + +// wildcard definition - RFC 1034 section 4.3.3. +// examples: +// - valid: *.bar.com, *.foo.bar.com +// - invalid: *.*.bar.com, *.foo.*.com, *bar.com, f*.bar.com, * +const wildcardDNS1123SubdomainFmt = "\\*\\." + dns1123SubdomainFmt +const wildcardDNS1123SubdomainErrMsg = "a wildcard DNS-1123 subdomain must start with '*.', followed by a valid DNS subdomain, which must consist of lower case alphanumeric characters, '-' or '.' and end with an alphanumeric character" + +// IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a +// wildcard subdomain in DNS (RFC 1034 section 4.3.3). +func IsWildcardDNS1123Subdomain(value string) []string { + wildcardDNS1123SubdomainRegexp := regexp.MustCompile("^" + wildcardDNS1123SubdomainFmt + "$") + + var errs []string + if len(value) > DNS1123SubdomainMaxLength { + errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) + } + if !wildcardDNS1123SubdomainRegexp.MatchString(value) { + errs = append(errs, RegexError(wildcardDNS1123SubdomainErrMsg, wildcardDNS1123SubdomainFmt, "*.example.com")) + } + return errs +} + +const cIdentifierFmt string = "[A-Za-z_][A-Za-z0-9_]*" +const identifierErrMsg string = "a valid C identifier must start with alphabetic character or '_', followed by a string of alphanumeric characters or '_'" + +var cIdentifierRegexp = regexp.MustCompile("^" + cIdentifierFmt + "$") + +// IsCIdentifier tests for a string that conforms the definition of an identifier +// in C. This checks the format, but not the length. +func IsCIdentifier(value string) []string { + if !cIdentifierRegexp.MatchString(value) { + return []string{RegexError(identifierErrMsg, cIdentifierFmt, "my_name", "MY_NAME", "MyName")} + } + return nil +} + +// IsValidPortNum tests that the argument is a valid, non-zero port number. +func IsValidPortNum(port int) []string { + if 1 <= port && port <= 65535 { + return nil + } + return []string{InclusiveRangeError(1, 65535)} +} + +// IsInRange tests that the argument is in an inclusive range. +func IsInRange(value int, min int, max int) []string { + if value >= min && value <= max { + return nil + } + return []string{InclusiveRangeError(min, max)} +} + +// Now in libcontainer UID/GID limits is 0 ~ 1<<31 - 1 +// TODO: once we have a type for UID/GID we should make these that type. +const ( + minUserID = 0 + maxUserID = math.MaxInt32 + minGroupID = 0 + maxGroupID = math.MaxInt32 +) + +// IsValidGroupID tests that the argument is a valid Unix GID. +func IsValidGroupID(gid int64) []string { + if minGroupID <= gid && gid <= maxGroupID { + return nil + } + return []string{InclusiveRangeError(minGroupID, maxGroupID)} +} + +// IsValidUserID tests that the argument is a valid Unix UID. +func IsValidUserID(uid int64) []string { + if minUserID <= uid && uid <= maxUserID { + return nil + } + return []string{InclusiveRangeError(minUserID, maxUserID)} +} + +var portNameCharsetRegex = regexp.MustCompile("^[-a-z0-9]+$") +var portNameOneLetterRegexp = regexp.MustCompile("[a-z]") + +// IsValidPortName check that the argument is valid syntax. It must be +// non-empty and no more than 15 characters long. It may contain only [-a-z0-9] +// and must contain at least one letter [a-z]. It must not start or end with a +// hyphen, nor contain adjacent hyphens. +// +// Note: We only allow lower-case characters, even though RFC 6335 is case +// insensitive. +func IsValidPortName(port string) []string { + var errs []string + if len(port) > 15 { + errs = append(errs, MaxLenError(15)) + } + if !portNameCharsetRegex.MatchString(port) { + errs = append(errs, "must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)") + } + if !portNameOneLetterRegexp.MatchString(port) { + errs = append(errs, "must contain at least one letter or number (a-z, 0-9)") + } + if strings.Contains(port, "--") { + errs = append(errs, "must not contain consecutive hyphens") + } + if len(port) > 0 && (port[0] == '-' || port[len(port)-1] == '-') { + errs = append(errs, "must not begin or end with a hyphen") + } + return errs +} + +// IsValidIP tests that the argument is a valid IP address. +func IsValidIP(value string) []string { + if net.ParseIP(value) == nil { + return []string{"must be a valid IP address, (e.g. 10.9.8.7)"} + } + return nil +} + +const percentFmt string = "[0-9]+%" +const percentErrMsg string = "a valid percent string must be a numeric string followed by an ending '%'" + +var percentRegexp = regexp.MustCompile("^" + percentFmt + "$") + +// IsValidPercent checks that string is in the form of a percentage +func IsValidPercent(percent string) []string { + if !percentRegexp.MatchString(percent) { + return []string{RegexError(percentErrMsg, percentFmt, "1%", "93%")} + } + return nil +} + +const httpHeaderNameFmt string = "[-A-Za-z0-9]+" +const httpHeaderNameErrMsg string = "a valid HTTP header must consist of alphanumeric characters or '-'" + +var httpHeaderNameRegexp = regexp.MustCompile("^" + httpHeaderNameFmt + "$") + +// IsHTTPHeaderName checks that a string conforms to the Go HTTP library's +// definition of a valid header field name (a stricter subset than RFC7230). +func IsHTTPHeaderName(value string) []string { + if !httpHeaderNameRegexp.MatchString(value) { + return []string{RegexError(httpHeaderNameErrMsg, httpHeaderNameFmt, "X-Header-Name")} + } + return nil +} + +const envVarNameFmt = "[-._a-zA-Z][-._a-zA-Z0-9]*" +const envVarNameFmtErrMsg string = "a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit" + +var envVarNameRegexp = regexp.MustCompile("^" + envVarNameFmt + "$") + +// IsEnvVarName tests if a string is a valid environment variable name. +func IsEnvVarName(value string) []string { + var errs []string + if !envVarNameRegexp.MatchString(value) { + errs = append(errs, RegexError(envVarNameFmtErrMsg, envVarNameFmt, "my.env-name", "MY_ENV.NAME", "MyEnvName1")) + } + + errs = append(errs, hasChDirPrefix(value)...) + return errs +} + +const configMapKeyFmt = `[-._a-zA-Z0-9]+` +const configMapKeyErrMsg string = "a valid config key must consist of alphanumeric characters, '-', '_' or '.'" + +var configMapKeyRegexp = regexp.MustCompile("^" + configMapKeyFmt + "$") + +// IsConfigMapKey tests for a string that is a valid key for a ConfigMap or Secret +func IsConfigMapKey(value string) []string { + var errs []string + if len(value) > DNS1123SubdomainMaxLength { + errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength)) + } + if !configMapKeyRegexp.MatchString(value) { + errs = append(errs, RegexError(configMapKeyErrMsg, configMapKeyFmt, "key.name", "KEY_NAME", "key-name")) + } + errs = append(errs, hasChDirPrefix(value)...) + return errs +} + +// MaxLenError returns a string explanation of a "string too long" validation +// failure. +func MaxLenError(length int) string { + return fmt.Sprintf("must be no more than %d characters", length) +} + +// RegexError returns a string explanation of a regex validation failure. +func RegexError(msg string, fmt string, examples ...string) string { + if len(examples) == 0 { + return msg + " (regex used for validation is '" + fmt + "')" + } + msg += " (e.g. " + for i := range examples { + if i > 0 { + msg += " or " + } + msg += "'" + examples[i] + "', " + } + msg += "regex used for validation is '" + fmt + "')" + return msg +} + +// EmptyError returns a string explanation of a "must not be empty" validation +// failure. +func EmptyError() string { + return "must be non-empty" +} + +func prefixEach(msgs []string, prefix string) []string { + for i := range msgs { + msgs[i] = prefix + msgs[i] + } + return msgs +} + +// InclusiveRangeError returns a string explanation of a numeric "must be +// between" validation failure. +func InclusiveRangeError(lo, hi int) string { + return fmt.Sprintf(`must be between %d and %d, inclusive`, lo, hi) +} + +func hasChDirPrefix(value string) []string { + var errs []string + switch { + case value == ".": + errs = append(errs, `must not be '.'`) + case value == "..": + errs = append(errs, `must not be '..'`) + case strings.HasPrefix(value, ".."): + errs = append(errs, `must not start with '..'`) + } + return errs +} + +// IsValidSocketAddr checks that string represents a valid socket address +// as defined in RFC 789. (e.g 0.0.0.0:10254 or [::]:10254)) +func IsValidSocketAddr(value string) []string { + var errs []string + ip, port, err := net.SplitHostPort(value) + if err != nil { + errs = append(errs, "must be a valid socket address format, (e.g. 0.0.0.0:10254 or [::]:10254)") + return errs + } + portInt, _ := strconv.Atoi(port) + errs = append(errs, IsValidPortNum(portInt)...) + errs = append(errs, IsValidIP(ip)...) + return errs +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/doc.go b/vendor/k8s.io/apimachinery/pkg/watch/doc.go new file mode 100644 index 000000000..7e6bf3fb9 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package watch contains a generic watchable interface, and a fake for +// testing code that uses the watch interface. +package watch // import "k8s.io/apimachinery/pkg/watch" diff --git a/vendor/k8s.io/apimachinery/pkg/watch/filter.go b/vendor/k8s.io/apimachinery/pkg/watch/filter.go new file mode 100644 index 000000000..22c9449f5 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/filter.go @@ -0,0 +1,105 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "sync" +) + +// FilterFunc should take an event, possibly modify it in some way, and return +// the modified event. If the event should be ignored, then return keep=false. +type FilterFunc func(in Event) (out Event, keep bool) + +// Filter passes all events through f before allowing them to pass on. +// Putting a filter on a watch, as an unavoidable side-effect due to the way +// go channels work, effectively causes the watch's event channel to have its +// queue length increased by one. +// +// WARNING: filter has a fatal flaw, in that it can't properly update the +// Type field (Add/Modified/Deleted) to reflect items beginning to pass the +// filter when they previously didn't. +// +func Filter(w Interface, f FilterFunc) Interface { + fw := &filteredWatch{ + incoming: w, + result: make(chan Event), + f: f, + } + go fw.loop() + return fw +} + +type filteredWatch struct { + incoming Interface + result chan Event + f FilterFunc +} + +// ResultChan returns a channel which will receive filtered events. +func (fw *filteredWatch) ResultChan() <-chan Event { + return fw.result +} + +// Stop stops the upstream watch, which will eventually stop this watch. +func (fw *filteredWatch) Stop() { + fw.incoming.Stop() +} + +// loop waits for new values, filters them, and resends them. +func (fw *filteredWatch) loop() { + defer close(fw.result) + for event := range fw.incoming.ResultChan() { + filtered, keep := fw.f(event) + if keep { + fw.result <- filtered + } + } +} + +// Recorder records all events that are sent from the watch until it is closed. +type Recorder struct { + Interface + + lock sync.Mutex + events []Event +} + +var _ Interface = &Recorder{} + +// NewRecorder wraps an Interface and records any changes sent across it. +func NewRecorder(w Interface) *Recorder { + r := &Recorder{} + r.Interface = Filter(w, r.record) + return r +} + +// record is a FilterFunc and tracks each received event. +func (r *Recorder) record(in Event) (Event, bool) { + r.lock.Lock() + defer r.lock.Unlock() + r.events = append(r.events, in) + return in, true +} + +// Events returns a copy of the events sent across this recorder. +func (r *Recorder) Events() []Event { + r.lock.Lock() + defer r.lock.Unlock() + copied := make([]Event, len(r.events)) + copy(copied, r.events) + return copied +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/mux.go b/vendor/k8s.io/apimachinery/pkg/watch/mux.go new file mode 100644 index 000000000..0ac8dc4ef --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/mux.go @@ -0,0 +1,260 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "sync" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// FullChannelBehavior controls how the Broadcaster reacts if a watcher's watch +// channel is full. +type FullChannelBehavior int + +const ( + WaitIfChannelFull FullChannelBehavior = iota + DropIfChannelFull +) + +// Buffer the incoming queue a little bit even though it should rarely ever accumulate +// anything, just in case a few events are received in such a short window that +// Broadcaster can't move them onto the watchers' queues fast enough. +const incomingQueueLength = 25 + +// Broadcaster distributes event notifications among any number of watchers. Every event +// is delivered to every watcher. +type Broadcaster struct { + // TODO: see if this lock is needed now that new watchers go through + // the incoming channel. + lock sync.Mutex + + watchers map[int64]*broadcasterWatcher + nextWatcher int64 + distributing sync.WaitGroup + + incoming chan Event + + // How large to make watcher's channel. + watchQueueLength int + // If one of the watch channels is full, don't wait for it to become empty. + // Instead just deliver it to the watchers that do have space in their + // channels and move on to the next event. + // It's more fair to do this on a per-watcher basis than to do it on the + // "incoming" channel, which would allow one slow watcher to prevent all + // other watchers from getting new events. + fullChannelBehavior FullChannelBehavior +} + +// NewBroadcaster creates a new Broadcaster. queueLength is the maximum number of events to queue per watcher. +// It is guaranteed that events will be distributed in the order in which they occur, +// but the order in which a single event is distributed among all of the watchers is unspecified. +func NewBroadcaster(queueLength int, fullChannelBehavior FullChannelBehavior) *Broadcaster { + m := &Broadcaster{ + watchers: map[int64]*broadcasterWatcher{}, + incoming: make(chan Event, incomingQueueLength), + watchQueueLength: queueLength, + fullChannelBehavior: fullChannelBehavior, + } + m.distributing.Add(1) + go m.loop() + return m +} + +const internalRunFunctionMarker = "internal-do-function" + +// a function type we can shoehorn into the queue. +type functionFakeRuntimeObject func() + +func (obj functionFakeRuntimeObject) GetObjectKind() schema.ObjectKind { + return schema.EmptyObjectKind +} +func (obj functionFakeRuntimeObject) DeepCopyObject() runtime.Object { + if obj == nil { + return nil + } + // funcs are immutable. Hence, just return the original func. + return obj +} + +// Execute f, blocking the incoming queue (and waiting for it to drain first). +// The purpose of this terrible hack is so that watchers added after an event +// won't ever see that event, and will always see any event after they are +// added. +func (b *Broadcaster) blockQueue(f func()) { + var wg sync.WaitGroup + wg.Add(1) + b.incoming <- Event{ + Type: internalRunFunctionMarker, + Object: functionFakeRuntimeObject(func() { + defer wg.Done() + f() + }), + } + wg.Wait() +} + +// Watch adds a new watcher to the list and returns an Interface for it. +// Note: new watchers will only receive new events. They won't get an entire history +// of previous events. +func (m *Broadcaster) Watch() Interface { + var w *broadcasterWatcher + m.blockQueue(func() { + m.lock.Lock() + defer m.lock.Unlock() + id := m.nextWatcher + m.nextWatcher++ + w = &broadcasterWatcher{ + result: make(chan Event, m.watchQueueLength), + stopped: make(chan struct{}), + id: id, + m: m, + } + m.watchers[id] = w + }) + return w +} + +// WatchWithPrefix adds a new watcher to the list and returns an Interface for it. It sends +// queuedEvents down the new watch before beginning to send ordinary events from Broadcaster. +// The returned watch will have a queue length that is at least large enough to accommodate +// all of the items in queuedEvents. +func (m *Broadcaster) WatchWithPrefix(queuedEvents []Event) Interface { + var w *broadcasterWatcher + m.blockQueue(func() { + m.lock.Lock() + defer m.lock.Unlock() + id := m.nextWatcher + m.nextWatcher++ + length := m.watchQueueLength + if n := len(queuedEvents) + 1; n > length { + length = n + } + w = &broadcasterWatcher{ + result: make(chan Event, length), + stopped: make(chan struct{}), + id: id, + m: m, + } + m.watchers[id] = w + for _, e := range queuedEvents { + w.result <- e + } + }) + return w +} + +// stopWatching stops the given watcher and removes it from the list. +func (m *Broadcaster) stopWatching(id int64) { + m.lock.Lock() + defer m.lock.Unlock() + w, ok := m.watchers[id] + if !ok { + // No need to do anything, it's already been removed from the list. + return + } + delete(m.watchers, id) + close(w.result) +} + +// closeAll disconnects all watchers (presumably in response to a Shutdown call). +func (m *Broadcaster) closeAll() { + m.lock.Lock() + defer m.lock.Unlock() + for _, w := range m.watchers { + close(w.result) + } + // Delete everything from the map, since presence/absence in the map is used + // by stopWatching to avoid double-closing the channel. + m.watchers = map[int64]*broadcasterWatcher{} +} + +// Action distributes the given event among all watchers. +func (m *Broadcaster) Action(action EventType, obj runtime.Object) { + m.incoming <- Event{action, obj} +} + +// Shutdown disconnects all watchers (but any queued events will still be distributed). +// You must not call Action or Watch* after calling Shutdown. This call blocks +// until all events have been distributed through the outbound channels. Note +// that since they can be buffered, this means that the watchers might not +// have received the data yet as it can remain sitting in the buffered +// channel. +func (m *Broadcaster) Shutdown() { + close(m.incoming) + m.distributing.Wait() +} + +// loop receives from m.incoming and distributes to all watchers. +func (m *Broadcaster) loop() { + // Deliberately not catching crashes here. Yes, bring down the process if there's a + // bug in watch.Broadcaster. + for event := range m.incoming { + if event.Type == internalRunFunctionMarker { + event.Object.(functionFakeRuntimeObject)() + continue + } + m.distribute(event) + } + m.closeAll() + m.distributing.Done() +} + +// distribute sends event to all watchers. Blocking. +func (m *Broadcaster) distribute(event Event) { + m.lock.Lock() + defer m.lock.Unlock() + if m.fullChannelBehavior == DropIfChannelFull { + for _, w := range m.watchers { + select { + case w.result <- event: + case <-w.stopped: + default: // Don't block if the event can't be queued. + } + } + } else { + for _, w := range m.watchers { + select { + case w.result <- event: + case <-w.stopped: + } + } + } +} + +// broadcasterWatcher handles a single watcher of a broadcaster +type broadcasterWatcher struct { + result chan Event + stopped chan struct{} + stop sync.Once + id int64 + m *Broadcaster +} + +// ResultChan returns a channel to use for waiting on events. +func (mw *broadcasterWatcher) ResultChan() <-chan Event { + return mw.result +} + +// Stop stops watching and removes mw from its list. +func (mw *broadcasterWatcher) Stop() { + mw.stop.Do(func() { + close(mw.stopped) + mw.m.stopWatching(mw.id) + }) +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go new file mode 100644 index 000000000..d61cf5a2e --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/streamwatcher.go @@ -0,0 +1,119 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "io" + "sync" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/net" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/klog" +) + +// Decoder allows StreamWatcher to watch any stream for which a Decoder can be written. +type Decoder interface { + // Decode should return the type of event, the decoded object, or an error. + // An error will cause StreamWatcher to call Close(). Decode should block until + // it has data or an error occurs. + Decode() (action EventType, object runtime.Object, err error) + + // Close should close the underlying io.Reader, signalling to the source of + // the stream that it is no longer being watched. Close() must cause any + // outstanding call to Decode() to return with an error of some sort. + Close() +} + +// StreamWatcher turns any stream for which you can write a Decoder interface +// into a watch.Interface. +type StreamWatcher struct { + sync.Mutex + source Decoder + result chan Event + stopped bool +} + +// NewStreamWatcher creates a StreamWatcher from the given decoder. +func NewStreamWatcher(d Decoder) *StreamWatcher { + sw := &StreamWatcher{ + source: d, + // It's easy for a consumer to add buffering via an extra + // goroutine/channel, but impossible for them to remove it, + // so nonbuffered is better. + result: make(chan Event), + } + go sw.receive() + return sw +} + +// ResultChan implements Interface. +func (sw *StreamWatcher) ResultChan() <-chan Event { + return sw.result +} + +// Stop implements Interface. +func (sw *StreamWatcher) Stop() { + // Call Close() exactly once by locking and setting a flag. + sw.Lock() + defer sw.Unlock() + if !sw.stopped { + sw.stopped = true + sw.source.Close() + } +} + +// stopping returns true if Stop() was called previously. +func (sw *StreamWatcher) stopping() bool { + sw.Lock() + defer sw.Unlock() + return sw.stopped +} + +// receive reads result from the decoder in a loop and sends down the result channel. +func (sw *StreamWatcher) receive() { + defer close(sw.result) + defer sw.Stop() + defer utilruntime.HandleCrash() + for { + action, obj, err := sw.source.Decode() + if err != nil { + // Ignore expected error. + if sw.stopping() { + return + } + switch err { + case io.EOF: + // watch closed normally + case io.ErrUnexpectedEOF: + klog.V(1).Infof("Unexpected EOF during watch stream event decoding: %v", err) + default: + msg := "Unable to decode an event from the watch stream: %v" + if net.IsProbableEOF(err) { + klog.V(5).Infof(msg, err) + } else { + klog.Errorf(msg, err) + } + } + return + } + sw.result <- Event{ + Type: action, + Object: obj, + } + } +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/watch.go b/vendor/k8s.io/apimachinery/pkg/watch/watch.go new file mode 100644 index 000000000..be9c90c03 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/watch.go @@ -0,0 +1,317 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "fmt" + "sync" + + "k8s.io/klog" + + "k8s.io/apimachinery/pkg/runtime" +) + +// Interface can be implemented by anything that knows how to watch and report changes. +type Interface interface { + // Stops watching. Will close the channel returned by ResultChan(). Releases + // any resources used by the watch. + Stop() + + // Returns a chan which will receive all the events. If an error occurs + // or Stop() is called, this channel will be closed, in which case the + // watch should be completely cleaned up. + ResultChan() <-chan Event +} + +// EventType defines the possible types of events. +type EventType string + +const ( + Added EventType = "ADDED" + Modified EventType = "MODIFIED" + Deleted EventType = "DELETED" + Error EventType = "ERROR" + + DefaultChanSize int32 = 100 +) + +// Event represents a single event to a watched resource. +// +k8s:deepcopy-gen=true +type Event struct { + Type EventType + + // Object is: + // * If Type is Added or Modified: the new state of the object. + // * If Type is Deleted: the state of the object immediately before deletion. + // * If Type is Error: *api.Status is recommended; other types may make sense + // depending on context. + Object runtime.Object +} + +type emptyWatch chan Event + +// NewEmptyWatch returns a watch interface that returns no results and is closed. +// May be used in certain error conditions where no information is available but +// an error is not warranted. +func NewEmptyWatch() Interface { + ch := make(chan Event) + close(ch) + return emptyWatch(ch) +} + +// Stop implements Interface +func (w emptyWatch) Stop() { +} + +// ResultChan implements Interface +func (w emptyWatch) ResultChan() <-chan Event { + return chan Event(w) +} + +// FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. +type FakeWatcher struct { + result chan Event + Stopped bool + sync.Mutex +} + +func NewFake() *FakeWatcher { + return &FakeWatcher{ + result: make(chan Event), + } +} + +func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher { + return &FakeWatcher{ + result: make(chan Event, size), + } +} + +// Stop implements Interface.Stop(). +func (f *FakeWatcher) Stop() { + f.Lock() + defer f.Unlock() + if !f.Stopped { + klog.V(4).Infof("Stopping fake watcher.") + close(f.result) + f.Stopped = true + } +} + +func (f *FakeWatcher) IsStopped() bool { + f.Lock() + defer f.Unlock() + return f.Stopped +} + +// Reset prepares the watcher to be reused. +func (f *FakeWatcher) Reset() { + f.Lock() + defer f.Unlock() + f.Stopped = false + f.result = make(chan Event) +} + +func (f *FakeWatcher) ResultChan() <-chan Event { + return f.result +} + +// Add sends an add event. +func (f *FakeWatcher) Add(obj runtime.Object) { + f.result <- Event{Added, obj} +} + +// Modify sends a modify event. +func (f *FakeWatcher) Modify(obj runtime.Object) { + f.result <- Event{Modified, obj} +} + +// Delete sends a delete event. +func (f *FakeWatcher) Delete(lastValue runtime.Object) { + f.result <- Event{Deleted, lastValue} +} + +// Error sends an Error event. +func (f *FakeWatcher) Error(errValue runtime.Object) { + f.result <- Event{Error, errValue} +} + +// Action sends an event of the requested type, for table-based testing. +func (f *FakeWatcher) Action(action EventType, obj runtime.Object) { + f.result <- Event{action, obj} +} + +// RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe. +type RaceFreeFakeWatcher struct { + result chan Event + Stopped bool + sync.Mutex +} + +func NewRaceFreeFake() *RaceFreeFakeWatcher { + return &RaceFreeFakeWatcher{ + result: make(chan Event, DefaultChanSize), + } +} + +// Stop implements Interface.Stop(). +func (f *RaceFreeFakeWatcher) Stop() { + f.Lock() + defer f.Unlock() + if !f.Stopped { + klog.V(4).Infof("Stopping fake watcher.") + close(f.result) + f.Stopped = true + } +} + +func (f *RaceFreeFakeWatcher) IsStopped() bool { + f.Lock() + defer f.Unlock() + return f.Stopped +} + +// Reset prepares the watcher to be reused. +func (f *RaceFreeFakeWatcher) Reset() { + f.Lock() + defer f.Unlock() + f.Stopped = false + f.result = make(chan Event, DefaultChanSize) +} + +func (f *RaceFreeFakeWatcher) ResultChan() <-chan Event { + f.Lock() + defer f.Unlock() + return f.result +} + +// Add sends an add event. +func (f *RaceFreeFakeWatcher) Add(obj runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Added, obj}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Modify sends a modify event. +func (f *RaceFreeFakeWatcher) Modify(obj runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Modified, obj}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Delete sends a delete event. +func (f *RaceFreeFakeWatcher) Delete(lastValue runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Deleted, lastValue}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Error sends an Error event. +func (f *RaceFreeFakeWatcher) Error(errValue runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{Error, errValue}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// Action sends an event of the requested type, for table-based testing. +func (f *RaceFreeFakeWatcher) Action(action EventType, obj runtime.Object) { + f.Lock() + defer f.Unlock() + if !f.Stopped { + select { + case f.result <- Event{action, obj}: + return + default: + panic(fmt.Errorf("channel full")) + } + } +} + +// ProxyWatcher lets you wrap your channel in watch Interface. Threadsafe. +type ProxyWatcher struct { + result chan Event + stopCh chan struct{} + + mutex sync.Mutex + stopped bool +} + +var _ Interface = &ProxyWatcher{} + +// NewProxyWatcher creates new ProxyWatcher by wrapping a channel +func NewProxyWatcher(ch chan Event) *ProxyWatcher { + return &ProxyWatcher{ + result: ch, + stopCh: make(chan struct{}), + stopped: false, + } +} + +// Stop implements Interface +func (pw *ProxyWatcher) Stop() { + pw.mutex.Lock() + defer pw.mutex.Unlock() + if !pw.stopped { + pw.stopped = true + close(pw.stopCh) + } +} + +// Stopping returns true if Stop() has been called +func (pw *ProxyWatcher) Stopping() bool { + pw.mutex.Lock() + defer pw.mutex.Unlock() + return pw.stopped +} + +// ResultChan implements Interface +func (pw *ProxyWatcher) ResultChan() <-chan Event { + return pw.result +} + +// StopChan returns stop channel +func (pw *ProxyWatcher) StopChan() <-chan struct{} { + return pw.stopCh +} diff --git a/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go new file mode 100644 index 000000000..71ef4da33 --- /dev/null +++ b/vendor/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go @@ -0,0 +1,40 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package watch + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + if in.Object != nil { + out.Object = in.Object.DeepCopyObject() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go new file mode 100644 index 000000000..7ed1d1cff --- /dev/null +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go @@ -0,0 +1,388 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package reflect is a fork of go's standard library reflection package, which +// allows for deep equal with equality functions defined. +package reflect + +import ( + "fmt" + "reflect" + "strings" +) + +// Equalities is a map from type to a function comparing two values of +// that type. +type Equalities map[reflect.Type]reflect.Value + +// For convenience, panics on errrors +func EqualitiesOrDie(funcs ...interface{}) Equalities { + e := Equalities{} + if err := e.AddFuncs(funcs...); err != nil { + panic(err) + } + return e +} + +// AddFuncs is a shortcut for multiple calls to AddFunc. +func (e Equalities) AddFuncs(funcs ...interface{}) error { + for _, f := range funcs { + if err := e.AddFunc(f); err != nil { + return err + } + } + return nil +} + +// AddFunc uses func as an equality function: it must take +// two parameters of the same type, and return a boolean. +func (e Equalities) AddFunc(eqFunc interface{}) error { + fv := reflect.ValueOf(eqFunc) + ft := fv.Type() + if ft.Kind() != reflect.Func { + return fmt.Errorf("expected func, got: %v", ft) + } + if ft.NumIn() != 2 { + return fmt.Errorf("expected two 'in' params, got: %v", ft) + } + if ft.NumOut() != 1 { + return fmt.Errorf("expected one 'out' param, got: %v", ft) + } + if ft.In(0) != ft.In(1) { + return fmt.Errorf("expected arg 1 and 2 to have same type, but got %v", ft) + } + var forReturnType bool + boolType := reflect.TypeOf(forReturnType) + if ft.Out(0) != boolType { + return fmt.Errorf("expected bool return, got: %v", ft) + } + e[ft.In(0)] = fv + return nil +} + +// Below here is forked from go's reflect/deepequal.go + +// During deepValueEqual, must keep track of checks that are +// in progress. The comparison algorithm assumes that all +// checks in progress are true when it reencounters them. +// Visited comparisons are stored in a map indexed by visit. +type visit struct { + a1 uintptr + a2 uintptr + typ reflect.Type +} + +// unexportedTypePanic is thrown when you use this DeepEqual on something that has an +// unexported type. It indicates a programmer error, so should not occur at runtime, +// which is why it's not public and thus impossible to catch. +type unexportedTypePanic []reflect.Type + +func (u unexportedTypePanic) Error() string { return u.String() } +func (u unexportedTypePanic) String() string { + strs := make([]string, len(u)) + for i, t := range u { + strs[i] = fmt.Sprintf("%v", t) + } + return "an unexported field was encountered, nested like this: " + strings.Join(strs, " -> ") +} + +func makeUsefulPanic(v reflect.Value) { + if x := recover(); x != nil { + if u, ok := x.(unexportedTypePanic); ok { + u = append(unexportedTypePanic{v.Type()}, u...) + x = u + } + panic(x) + } +} + +// Tests for deep equality using reflected types. The map argument tracks +// comparisons that have already been seen, which allows short circuiting on +// recursive types. +func (e Equalities) deepValueEqual(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { + defer makeUsefulPanic(v1) + + if !v1.IsValid() || !v2.IsValid() { + return v1.IsValid() == v2.IsValid() + } + if v1.Type() != v2.Type() { + return false + } + if fv, ok := e[v1.Type()]; ok { + return fv.Call([]reflect.Value{v1, v2})[0].Bool() + } + + hard := func(k reflect.Kind) bool { + switch k { + case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: + return true + } + return false + } + + if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { + addr1 := v1.UnsafeAddr() + addr2 := v2.UnsafeAddr() + if addr1 > addr2 { + // Canonicalize order to reduce number of entries in visited. + addr1, addr2 = addr2, addr1 + } + + // Short circuit if references are identical ... + if addr1 == addr2 { + return true + } + + // ... or already seen + typ := v1.Type() + v := visit{addr1, addr2, typ} + if visited[v] { + return true + } + + // Remember for later. + visited[v] = true + } + + switch v1.Kind() { + case reflect.Array: + // We don't need to check length here because length is part of + // an array's type, which has already been filtered for. + for i := 0; i < v1.Len(); i++ { + if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { + return false + } + } + return true + case reflect.Slice: + if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) { + return false + } + if v1.IsNil() || v1.Len() == 0 { + return true + } + if v1.Len() != v2.Len() { + return false + } + if v1.Pointer() == v2.Pointer() { + return true + } + for i := 0; i < v1.Len(); i++ { + if !e.deepValueEqual(v1.Index(i), v2.Index(i), visited, depth+1) { + return false + } + } + return true + case reflect.Interface: + if v1.IsNil() || v2.IsNil() { + return v1.IsNil() == v2.IsNil() + } + return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) + case reflect.Ptr: + return e.deepValueEqual(v1.Elem(), v2.Elem(), visited, depth+1) + case reflect.Struct: + for i, n := 0, v1.NumField(); i < n; i++ { + if !e.deepValueEqual(v1.Field(i), v2.Field(i), visited, depth+1) { + return false + } + } + return true + case reflect.Map: + if (v1.IsNil() || v1.Len() == 0) != (v2.IsNil() || v2.Len() == 0) { + return false + } + if v1.IsNil() || v1.Len() == 0 { + return true + } + if v1.Len() != v2.Len() { + return false + } + if v1.Pointer() == v2.Pointer() { + return true + } + for _, k := range v1.MapKeys() { + if !e.deepValueEqual(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { + return false + } + } + return true + case reflect.Func: + if v1.IsNil() && v2.IsNil() { + return true + } + // Can't do better than this: + return false + default: + // Normal equality suffices + if !v1.CanInterface() || !v2.CanInterface() { + panic(unexportedTypePanic{}) + } + return v1.Interface() == v2.Interface() + } +} + +// DeepEqual is like reflect.DeepEqual, but focused on semantic equality +// instead of memory equality. +// +// It will use e's equality functions if it finds types that match. +// +// An empty slice *is* equal to a nil slice for our purposes; same for maps. +// +// Unexported field members cannot be compared and will cause an imformative panic; you must add an Equality +// function for these types. +func (e Equalities) DeepEqual(a1, a2 interface{}) bool { + if a1 == nil || a2 == nil { + return a1 == a2 + } + v1 := reflect.ValueOf(a1) + v2 := reflect.ValueOf(a2) + if v1.Type() != v2.Type() { + return false + } + return e.deepValueEqual(v1, v2, make(map[visit]bool), 0) +} + +func (e Equalities) deepValueDerive(v1, v2 reflect.Value, visited map[visit]bool, depth int) bool { + defer makeUsefulPanic(v1) + + if !v1.IsValid() || !v2.IsValid() { + return v1.IsValid() == v2.IsValid() + } + if v1.Type() != v2.Type() { + return false + } + if fv, ok := e[v1.Type()]; ok { + return fv.Call([]reflect.Value{v1, v2})[0].Bool() + } + + hard := func(k reflect.Kind) bool { + switch k { + case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct: + return true + } + return false + } + + if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) { + addr1 := v1.UnsafeAddr() + addr2 := v2.UnsafeAddr() + if addr1 > addr2 { + // Canonicalize order to reduce number of entries in visited. + addr1, addr2 = addr2, addr1 + } + + // Short circuit if references are identical ... + if addr1 == addr2 { + return true + } + + // ... or already seen + typ := v1.Type() + v := visit{addr1, addr2, typ} + if visited[v] { + return true + } + + // Remember for later. + visited[v] = true + } + + switch v1.Kind() { + case reflect.Array: + // We don't need to check length here because length is part of + // an array's type, which has already been filtered for. + for i := 0; i < v1.Len(); i++ { + if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) { + return false + } + } + return true + case reflect.Slice: + if v1.IsNil() || v1.Len() == 0 { + return true + } + if v1.Len() > v2.Len() { + return false + } + if v1.Pointer() == v2.Pointer() { + return true + } + for i := 0; i < v1.Len(); i++ { + if !e.deepValueDerive(v1.Index(i), v2.Index(i), visited, depth+1) { + return false + } + } + return true + case reflect.String: + if v1.Len() == 0 { + return true + } + if v1.Len() > v2.Len() { + return false + } + return v1.String() == v2.String() + case reflect.Interface: + if v1.IsNil() { + return true + } + return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1) + case reflect.Ptr: + if v1.IsNil() { + return true + } + return e.deepValueDerive(v1.Elem(), v2.Elem(), visited, depth+1) + case reflect.Struct: + for i, n := 0, v1.NumField(); i < n; i++ { + if !e.deepValueDerive(v1.Field(i), v2.Field(i), visited, depth+1) { + return false + } + } + return true + case reflect.Map: + if v1.IsNil() || v1.Len() == 0 { + return true + } + if v1.Len() > v2.Len() { + return false + } + if v1.Pointer() == v2.Pointer() { + return true + } + for _, k := range v1.MapKeys() { + if !e.deepValueDerive(v1.MapIndex(k), v2.MapIndex(k), visited, depth+1) { + return false + } + } + return true + case reflect.Func: + if v1.IsNil() && v2.IsNil() { + return true + } + // Can't do better than this: + return false + default: + // Normal equality suffices + if !v1.CanInterface() || !v2.CanInterface() { + panic(unexportedTypePanic{}) + } + return v1.Interface() == v2.Interface() + } +} + +// DeepDerivative is similar to DeepEqual except that unset fields in a1 are +// ignored (not compared). This allows us to focus on the fields that matter to +// the semantic comparison. +// +// The unset fields include a nil pointer and an empty string. +func (e Equalities) DeepDerivative(a1, a2 interface{}) bool { + if a1 == nil { + return true + } + v1 := reflect.ValueOf(a1) + v2 := reflect.ValueOf(a2) + if v1.Type() != v2.Type() { + return false + } + return e.deepValueDerive(v1, v2, make(map[visit]bool), 0) +} diff --git a/vendor/k8s.io/client-go/LICENSE b/vendor/k8s.io/client-go/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/k8s.io/client-go/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS new file mode 100644 index 000000000..3b7ea1b13 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/OWNERS @@ -0,0 +1,7 @@ +# approval on api packages bubbles to api-approvers +reviewers: +- sig-auth-authenticators-approvers +- sig-auth-authenticators-reviewers +labels: +- sig/auth + diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/doc.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/doc.go new file mode 100644 index 000000000..b99459757 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +groupName=client.authentication.k8s.io + +package clientauthentication // import "k8s.io/client-go/pkg/apis/clientauthentication" diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/register.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/register.go new file mode 100644 index 000000000..e4fbc3ea9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/register.go @@ -0,0 +1,50 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientauthentication + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "client.authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExecCredential{}, + ) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go new file mode 100644 index 000000000..6fb53cecf --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/types.go @@ -0,0 +1,77 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientauthentication + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExecCredentials is used by exec-based plugins to communicate credentials to +// HTTP transports. +type ExecCredential struct { + metav1.TypeMeta + + // Spec holds information passed to the plugin by the transport. This contains + // request and runtime specific information, such as if the session is interactive. + Spec ExecCredentialSpec + + // Status is filled in by the plugin and holds the credentials that the transport + // should use to contact the API. + // +optional + Status *ExecCredentialStatus +} + +// ExecCredenitalSpec holds request and runtime specific information provided by +// the transport. +type ExecCredentialSpec struct { + // Response is populated when the transport encounters HTTP status codes, such as 401, + // suggesting previous credentials were invalid. + // +optional + Response *Response + + // Interactive is true when the transport detects the command is being called from an + // interactive prompt. + // +optional + Interactive bool +} + +// ExecCredentialStatus holds credentials for the transport to use. +type ExecCredentialStatus struct { + // ExpirationTimestamp indicates a time when the provided credentials expire. + // +optional + ExpirationTimestamp *metav1.Time + // Token is a bearer token used by the client for request authentication. + // +optional + Token string + // PEM-encoded client TLS certificate. + // +optional + ClientCertificateData string + // PEM-encoded client TLS private key. + // +optional + ClientKeyData string +} + +// Response defines metadata about a failed request, including HTTP status code and +// response headers. +type Response struct { + // Headers holds HTTP headers returned by the server. + Header map[string][]string + // Code is the HTTP status code returned by the server. + Code int32 +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go new file mode 100644 index 000000000..19ab77614 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go @@ -0,0 +1,24 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/client-go/pkg/apis/clientauthentication +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=client.authentication.k8s.io + +package v1alpha1 // import "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go new file mode 100644 index 000000000..2acd13dea --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "client.authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExecCredential{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go new file mode 100644 index 000000000..921f3a2b9 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go @@ -0,0 +1,78 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExecCredentials is used by exec-based plugins to communicate credentials to +// HTTP transports. +type ExecCredential struct { + metav1.TypeMeta `json:",inline"` + + // Spec holds information passed to the plugin by the transport. This contains + // request and runtime specific information, such as if the session is interactive. + Spec ExecCredentialSpec `json:"spec,omitempty"` + + // Status is filled in by the plugin and holds the credentials that the transport + // should use to contact the API. + // +optional + Status *ExecCredentialStatus `json:"status,omitempty"` +} + +// ExecCredenitalSpec holds request and runtime specific information provided by +// the transport. +type ExecCredentialSpec struct { + // Response is populated when the transport encounters HTTP status codes, such as 401, + // suggesting previous credentials were invalid. + // +optional + Response *Response `json:"response,omitempty"` + + // Interactive is true when the transport detects the command is being called from an + // interactive prompt. + // +optional + Interactive bool `json:"interactive,omitempty"` +} + +// ExecCredentialStatus holds credentials for the transport to use. +// +// Token and ClientKeyData are sensitive fields. This data should only be +// transmitted in-memory between client and exec plugin process. Exec plugin +// itself should at least be protected via file permissions. +type ExecCredentialStatus struct { + // ExpirationTimestamp indicates a time when the provided credentials expire. + // +optional + ExpirationTimestamp *metav1.Time `json:"expirationTimestamp,omitempty"` + // Token is a bearer token used by the client for request authentication. + Token string `json:"token,omitempty"` + // PEM-encoded client TLS certificates (including intermediates, if any). + ClientCertificateData string `json:"clientCertificateData,omitempty"` + // PEM-encoded private key for the above certificate. + ClientKeyData string `json:"clientKeyData,omitempty"` +} + +// Response defines metadata about a failed request, including HTTP status code and +// response headers. +type Response struct { + // Header holds HTTP headers returned by the server. + Header map[string][]string `json:"header,omitempty"` + // Code is the HTTP status code returned by the server. + Code int32 `json:"code,omitempty"` +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..461c20b29 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,176 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + clientauthentication "k8s.io/client-go/pkg/apis/clientauthentication" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*ExecCredential)(nil), (*clientauthentication.ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(a.(*ExecCredential), b.(*clientauthentication.ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredential)(nil), (*ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(a.(*clientauthentication.ExecCredential), b.(*ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialSpec)(nil), (*clientauthentication.ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(a.(*ExecCredentialSpec), b.(*clientauthentication.ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialStatus)(nil), (*ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(a.(*clientauthentication.ExecCredentialStatus), b.(*ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Response)(nil), (*clientauthentication.Response)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Response_To_clientauthentication_Response(a.(*Response), b.(*clientauthentication.Response), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.Response)(nil), (*Response)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_Response_To_v1alpha1_Response(a.(*clientauthentication.Response), b.(*Response), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + if err := Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*clientauthentication.ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + if err := Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in, out, s) +} + +func autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + out.Response = (*clientauthentication.Response)(unsafe.Pointer(in.Response)) + out.Interactive = in.Interactive + return nil +} + +// Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + out.Response = (*Response)(unsafe.Pointer(in.Response)) + out.Interactive = in.Interactive + return nil +} + +// Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in, out, s) +} + +func autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in, out, s) +} + +func autoConvert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { + out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) + out.Code = in.Code + return nil +} + +// Convert_v1alpha1_Response_To_clientauthentication_Response is an autogenerated conversion function. +func Convert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { + return autoConvert_v1alpha1_Response_To_clientauthentication_Response(in, out, s) +} + +func autoConvert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { + out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) + out.Code = in.Code + return nil +} + +// Convert_clientauthentication_Response_To_v1alpha1_Response is an autogenerated conversion function. +func Convert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { + return autoConvert_clientauthentication_Response_To_v1alpha1_Response(in, out, s) +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..a73d31b3f --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,128 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecCredentialStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. +func (in *ExecCredential) DeepCopy() *ExecCredential { + if in == nil { + return nil + } + out := new(ExecCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExecCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { + *out = *in + if in.Response != nil { + in, out := &in.Response, &out.Response + *out = new(Response) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. +func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { + if in == nil { + return nil + } + out := new(ExecCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { + *out = *in + if in.ExpirationTimestamp != nil { + in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. +func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { + if in == nil { + return nil + } + out := new(ExecCredentialStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Response) DeepCopyInto(out *Response) { + *out = *in + if in.Header != nil { + in, out := &in.Header, &out.Header + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. +func (in *Response) DeepCopy() *Response { + if in == nil { + return nil + } + out := new(Response) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000..dd621a3ac --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go new file mode 100644 index 000000000..c568a6fc8 --- /dev/null +++ b/vendor/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go @@ -0,0 +1,128 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientauthentication + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecCredentialStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. +func (in *ExecCredential) DeepCopy() *ExecCredential { + if in == nil { + return nil + } + out := new(ExecCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExecCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { + *out = *in + if in.Response != nil { + in, out := &in.Response, &out.Response + *out = new(Response) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. +func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { + if in == nil { + return nil + } + out := new(ExecCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { + *out = *in + if in.ExpirationTimestamp != nil { + in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. +func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { + if in == nil { + return nil + } + out := new(ExecCredentialStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Response) DeepCopyInto(out *Response) { + *out = *in + if in.Header != nil { + in, out := &in.Header, &out.Header + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. +func (in *Response) DeepCopy() *Response { + if in == nil { + return nil + } + out := new(Response) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/klog/.travis.yml b/vendor/k8s.io/klog/.travis.yml new file mode 100644 index 000000000..fc0d2caf3 --- /dev/null +++ b/vendor/k8s.io/klog/.travis.yml @@ -0,0 +1,14 @@ +language: go +dist: xenial +go: + - 1.9.x + - 1.10.x + - 1.11.x +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) + - diff -u <(echo -n) <(golint $(go list -e ./...)) + - go tool vet . + - go test -v -race ./... +install: + - go get golang.org/x/lint/golint diff --git a/vendor/k8s.io/klog/CONTRIBUTING.md b/vendor/k8s.io/klog/CONTRIBUTING.md new file mode 100644 index 000000000..de4711513 --- /dev/null +++ b/vendor/k8s.io/klog/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing Guidelines + +Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: + +_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ + +## Getting Started + +We have full documentation on how to get started contributing here: + + + +- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests +- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) +- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers + +## Mentorship + +- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! + + diff --git a/vendor/k8s.io/klog/LICENSE b/vendor/k8s.io/klog/LICENSE new file mode 100644 index 000000000..37ec93a14 --- /dev/null +++ b/vendor/k8s.io/klog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/k8s.io/klog/OWNERS b/vendor/k8s.io/klog/OWNERS new file mode 100644 index 000000000..56b0eb044 --- /dev/null +++ b/vendor/k8s.io/klog/OWNERS @@ -0,0 +1,11 @@ +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: + - dims + - thockin + - justinsb + - tallclair + - piosz + - brancz + - DirectXMan12 + - lavalamp diff --git a/vendor/k8s.io/klog/README.md b/vendor/k8s.io/klog/README.md new file mode 100644 index 000000000..a747f538a --- /dev/null +++ b/vendor/k8s.io/klog/README.md @@ -0,0 +1,51 @@ +klog +==== + +klog is a permanant fork of https://github.com/golang/glog. original README from glog is below + +---- + +glog +==== + +Leveled execution logs for Go. + +This is an efficient pure Go implementation of leveled logs in the +manner of the open source C++ package + https://github.com/google/glog + +By binding methods to booleans it is possible to use the log package +without paying the expense of evaluating the arguments to the log. +Through the -vmodule flag, the package also provides fine-grained +control over logging at the file level. + +The comment from glog.go introduces the ideas: + + Package glog implements logging analogous to the Google-internal + C++ INFO/ERROR/V setup. It provides functions Info, Warning, + Error, Fatal, plus formatting variants such as Infof. It + also provides V-style logging controlled by the -v and + -vmodule=file=2 flags. + + Basic examples: + + glog.Info("Prepare to repel boarders") + + glog.Fatalf("Initialization failed: %s", err) + + See the documentation for the V function for an explanation + of these examples: + + if glog.V(2) { + glog.Info("Starting transaction...") + } + + glog.V(2).Infoln("Processed", nItems, "elements") + + +The repository contains an open source version of the log package +used inside Google. The master copy of the source lives inside +Google, not here. The code in this repo is for export only and is not itself +under development. Feature requests will be ignored. + +Send bug reports to golang-nuts@googlegroups.com. diff --git a/vendor/k8s.io/klog/RELEASE.md b/vendor/k8s.io/klog/RELEASE.md new file mode 100644 index 000000000..b53eb960c --- /dev/null +++ b/vendor/k8s.io/klog/RELEASE.md @@ -0,0 +1,9 @@ +# Release Process + +The `klog` is released on an as-needed basis. The process is as follows: + +1. An issue is proposing a new release with a changelog since the last release +1. All [OWNERS](OWNERS) must LGTM this release +1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` +1. The release issue is closed +1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` diff --git a/vendor/k8s.io/klog/SECURITY_CONTACTS b/vendor/k8s.io/klog/SECURITY_CONTACTS new file mode 100644 index 000000000..520ddb525 --- /dev/null +++ b/vendor/k8s.io/klog/SECURITY_CONTACTS @@ -0,0 +1,20 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +dims +thockin +justinsb +tallclair +piosz +brancz +DirectXMan12 +lavalamp diff --git a/vendor/k8s.io/klog/klog.go b/vendor/k8s.io/klog/klog.go new file mode 100644 index 000000000..13bcc81a7 --- /dev/null +++ b/vendor/k8s.io/klog/klog.go @@ -0,0 +1,1239 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package klog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. +// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as +// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags. +// +// Basic examples: +// +// glog.Info("Prepare to repel boarders") +// +// glog.Fatalf("Initialization failed: %s", err) +// +// See the documentation for the V function for an explanation of these examples: +// +// if glog.V(2) { +// glog.Info("Starting transaction...") +// } +// +// glog.V(2).Infoln("Processed", nItems, "elements") +// +// Log output is buffered and written periodically using Flush. Programs +// should call Flush before exiting to guarantee all log output is written. +// +// By default, all log statements write to files in a temporary directory. +// This package provides several flags that modify this behavior. +// As a result, flag.Parse must be called before any logging is done. +// +// -logtostderr=false +// Logs are written to standard error instead of to files. +// -alsologtostderr=false +// Logs are written to standard error as well as to files. +// -stderrthreshold=ERROR +// Log events at or above this severity are logged to standard +// error as well as to files. +// -log_dir="" +// Log files will be written to this directory instead of the +// default temporary directory. +// +// Other flags provide aids to debugging. +// +// -log_backtrace_at="" +// When set to a file and line number holding a logging statement, +// such as +// -log_backtrace_at=gopherflakes.go:234 +// a stack trace will be written to the Info log whenever execution +// hits that statement. (Unlike with -vmodule, the ".go" must be +// present.) +// -v=0 +// Enable V-leveled logging at the specified level. +// -vmodule="" +// The syntax of the argument is a comma-separated list of pattern=N, +// where pattern is a literal file name (minus the ".go" suffix) or +// "glob" pattern and N is a V level. For instance, +// -vmodule=gopher*=3 +// sets the V level to 3 in all Go files whose names begin "gopher". +// +package klog + +import ( + "bufio" + "bytes" + "errors" + "flag" + "fmt" + "io" + stdLog "log" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" +) + +// severity identifies the sort of log: info, warning etc. It also implements +// the flag.Value interface. The -stderrthreshold flag is of type severity and +// should be modified only through the flag.Value interface. The values match +// the corresponding constants in C++. +type severity int32 // sync/atomic int32 + +// These constants identify the log levels in order of increasing severity. +// A message written to a high-severity log file is also written to each +// lower-severity log file. +const ( + infoLog severity = iota + warningLog + errorLog + fatalLog + numSeverity = 4 +) + +const severityChar = "IWEF" + +var severityName = []string{ + infoLog: "INFO", + warningLog: "WARNING", + errorLog: "ERROR", + fatalLog: "FATAL", +} + +// get returns the value of the severity. +func (s *severity) get() severity { + return severity(atomic.LoadInt32((*int32)(s))) +} + +// set sets the value of the severity. +func (s *severity) set(val severity) { + atomic.StoreInt32((*int32)(s), int32(val)) +} + +// String is part of the flag.Value interface. +func (s *severity) String() string { + return strconv.FormatInt(int64(*s), 10) +} + +// Get is part of the flag.Value interface. +func (s *severity) Get() interface{} { + return *s +} + +// Set is part of the flag.Value interface. +func (s *severity) Set(value string) error { + var threshold severity + // Is it a known name? + if v, ok := severityByName(value); ok { + threshold = v + } else { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + threshold = severity(v) + } + logging.stderrThreshold.set(threshold) + return nil +} + +func severityByName(s string) (severity, bool) { + s = strings.ToUpper(s) + for i, name := range severityName { + if name == s { + return severity(i), true + } + } + return 0, false +} + +// OutputStats tracks the number of output lines and bytes written. +type OutputStats struct { + lines int64 + bytes int64 +} + +// Lines returns the number of lines written. +func (s *OutputStats) Lines() int64 { + return atomic.LoadInt64(&s.lines) +} + +// Bytes returns the number of bytes written. +func (s *OutputStats) Bytes() int64 { + return atomic.LoadInt64(&s.bytes) +} + +// Stats tracks the number of lines of output and number of bytes +// per severity level. Values must be read with atomic.LoadInt64. +var Stats struct { + Info, Warning, Error OutputStats +} + +var severityStats = [numSeverity]*OutputStats{ + infoLog: &Stats.Info, + warningLog: &Stats.Warning, + errorLog: &Stats.Error, +} + +// Level is exported because it appears in the arguments to V and is +// the type of the v flag, which can be set programmatically. +// It's a distinct type because we want to discriminate it from logType. +// Variables of type level are only changed under logging.mu. +// The -v flag is read only with atomic ops, so the state of the logging +// module is consistent. + +// Level is treated as a sync/atomic int32. + +// Level specifies a level of verbosity for V logs. *Level implements +// flag.Value; the -v flag is of type Level and should be modified +// only through the flag.Value interface. +type Level int32 + +// get returns the value of the Level. +func (l *Level) get() Level { + return Level(atomic.LoadInt32((*int32)(l))) +} + +// set sets the value of the Level. +func (l *Level) set(val Level) { + atomic.StoreInt32((*int32)(l), int32(val)) +} + +// String is part of the flag.Value interface. +func (l *Level) String() string { + return strconv.FormatInt(int64(*l), 10) +} + +// Get is part of the flag.Value interface. +func (l *Level) Get() interface{} { + return *l +} + +// Set is part of the flag.Value interface. +func (l *Level) Set(value string) error { + v, err := strconv.Atoi(value) + if err != nil { + return err + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(Level(v), logging.vmodule.filter, false) + return nil +} + +// moduleSpec represents the setting of the -vmodule flag. +type moduleSpec struct { + filter []modulePat +} + +// modulePat contains a filter for the -vmodule flag. +// It holds a verbosity level and a file pattern to match. +type modulePat struct { + pattern string + literal bool // The pattern is a literal string + level Level +} + +// match reports whether the file matches the pattern. It uses a string +// comparison if the pattern contains no metacharacters. +func (m *modulePat) match(file string) bool { + if m.literal { + return file == m.pattern + } + match, _ := filepath.Match(m.pattern, file) + return match +} + +func (m *moduleSpec) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + var b bytes.Buffer + for i, f := range m.filter { + if i > 0 { + b.WriteRune(',') + } + fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) + } + return b.String() +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported. +func (m *moduleSpec) Get() interface{} { + return nil +} + +var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") + +// Syntax: -vmodule=recordio=2,file=1,gfs*=3 +func (m *moduleSpec) Set(value string) error { + var filter []modulePat + for _, pat := range strings.Split(value, ",") { + if len(pat) == 0 { + // Empty strings such as from a trailing comma can be ignored. + continue + } + patLev := strings.Split(pat, "=") + if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { + return errVmoduleSyntax + } + pattern := patLev[0] + v, err := strconv.Atoi(patLev[1]) + if err != nil { + return errors.New("syntax error: expect comma-separated list of filename=N") + } + if v < 0 { + return errors.New("negative value for vmodule level") + } + if v == 0 { + continue // Ignore. It's harmless but no point in paying the overhead. + } + // TODO: check syntax of filter? + filter = append(filter, modulePat{pattern, isLiteral(pattern), Level(v)}) + } + logging.mu.Lock() + defer logging.mu.Unlock() + logging.setVState(logging.verbosity, filter, true) + return nil +} + +// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters +// that require filepath.Match to be called to match the pattern. +func isLiteral(pattern string) bool { + return !strings.ContainsAny(pattern, `\*?[]`) +} + +// traceLocation represents the setting of the -log_backtrace_at flag. +type traceLocation struct { + file string + line int +} + +// isSet reports whether the trace location has been specified. +// logging.mu is held. +func (t *traceLocation) isSet() bool { + return t.line > 0 +} + +// match reports whether the specified file and line matches the trace location. +// The argument file name is the full path, not the basename specified in the flag. +// logging.mu is held. +func (t *traceLocation) match(file string, line int) bool { + if t.line != line { + return false + } + if i := strings.LastIndex(file, "/"); i >= 0 { + file = file[i+1:] + } + return t.file == file +} + +func (t *traceLocation) String() string { + // Lock because the type is not atomic. TODO: clean this up. + logging.mu.Lock() + defer logging.mu.Unlock() + return fmt.Sprintf("%s:%d", t.file, t.line) +} + +// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the +// struct is not exported +func (t *traceLocation) Get() interface{} { + return nil +} + +var errTraceSyntax = errors.New("syntax error: expect file.go:234") + +// Syntax: -log_backtrace_at=gopherflakes.go:234 +// Note that unlike vmodule the file extension is included here. +func (t *traceLocation) Set(value string) error { + if value == "" { + // Unset. + t.line = 0 + t.file = "" + } + fields := strings.Split(value, ":") + if len(fields) != 2 { + return errTraceSyntax + } + file, line := fields[0], fields[1] + if !strings.Contains(file, ".") { + return errTraceSyntax + } + v, err := strconv.Atoi(line) + if err != nil { + return errTraceSyntax + } + if v <= 0 { + return errors.New("negative or zero value for level") + } + logging.mu.Lock() + defer logging.mu.Unlock() + t.line = v + t.file = file + return nil +} + +// flushSyncWriter is the interface satisfied by logging destinations. +type flushSyncWriter interface { + Flush() error + Sync() error + io.Writer +} + +func init() { + // Default stderrThreshold is ERROR. + logging.stderrThreshold = errorLog + + logging.setVState(0, nil, false) + go logging.flushDaemon() +} + +// InitFlags is for explicitly initializing the flags +func InitFlags(flagset *flag.FlagSet) { + if flagset == nil { + flagset = flag.CommandLine + } + flagset.StringVar(&logging.logDir, "log_dir", "", "If non-empty, write log files in this directory") + flagset.StringVar(&logging.logFile, "log_file", "", "If non-empty, use this log file") + flagset.BoolVar(&logging.toStderr, "logtostderr", false, "log to standard error instead of files") + flagset.BoolVar(&logging.alsoToStderr, "alsologtostderr", false, "log to standard error as well as files") + flagset.Var(&logging.verbosity, "v", "log level for V logs") + flagset.BoolVar(&logging.skipHeaders, "skip_headers", false, "If true, avoid header prefixes in the log messages") + flagset.Var(&logging.stderrThreshold, "stderrthreshold", "logs at or above this threshold go to stderr") + flagset.Var(&logging.vmodule, "vmodule", "comma-separated list of pattern=N settings for file-filtered logging") + flagset.Var(&logging.traceLocation, "log_backtrace_at", "when logging hits line file:N, emit a stack trace") +} + +// Flush flushes all pending log I/O. +func Flush() { + logging.lockAndFlushAll() +} + +// loggingT collects all the global state of the logging setup. +type loggingT struct { + // Boolean flags. Not handled atomically because the flag.Value interface + // does not let us avoid the =true, and that shorthand is necessary for + // compatibility. TODO: does this matter enough to fix? Seems unlikely. + toStderr bool // The -logtostderr flag. + alsoToStderr bool // The -alsologtostderr flag. + + // Level flag. Handled atomically. + stderrThreshold severity // The -stderrthreshold flag. + + // freeList is a list of byte buffers, maintained under freeListMu. + freeList *buffer + // freeListMu maintains the free list. It is separate from the main mutex + // so buffers can be grabbed and printed to without holding the main lock, + // for better parallelization. + freeListMu sync.Mutex + + // mu protects the remaining elements of this structure and is + // used to synchronize logging. + mu sync.Mutex + // file holds writer for each of the log types. + file [numSeverity]flushSyncWriter + // pcs is used in V to avoid an allocation when computing the caller's PC. + pcs [1]uintptr + // vmap is a cache of the V Level for each V() call site, identified by PC. + // It is wiped whenever the vmodule flag changes state. + vmap map[uintptr]Level + // filterLength stores the length of the vmodule filter chain. If greater + // than zero, it means vmodule is enabled. It may be read safely + // using sync.LoadInt32, but is only modified under mu. + filterLength int32 + // traceLocation is the state of the -log_backtrace_at flag. + traceLocation traceLocation + // These flags are modified only under lock, although verbosity may be fetched + // safely using atomic.LoadInt32. + vmodule moduleSpec // The state of the -vmodule flag. + verbosity Level // V logging level, the value of the -v flag/ + + // If non-empty, overrides the choice of directory in which to write logs. + // See createLogDirs for the full list of possible destinations. + logDir string + + // If non-empty, specifies the path of the file to write logs. mutually exclusive + // with the log-dir option. + logFile string + + // If true, do not add the prefix headers, useful when used with SetOutput + skipHeaders bool +} + +// buffer holds a byte Buffer for reuse. The zero value is ready for use. +type buffer struct { + bytes.Buffer + tmp [64]byte // temporary byte array for creating headers. + next *buffer +} + +var logging loggingT + +// setVState sets a consistent state for V logging. +// l.mu is held. +func (l *loggingT) setVState(verbosity Level, filter []modulePat, setFilter bool) { + // Turn verbosity off so V will not fire while we are in transition. + logging.verbosity.set(0) + // Ditto for filter length. + atomic.StoreInt32(&logging.filterLength, 0) + + // Set the new filters and wipe the pc->Level map if the filter has changed. + if setFilter { + logging.vmodule.filter = filter + logging.vmap = make(map[uintptr]Level) + } + + // Things are consistent now, so enable filtering and verbosity. + // They are enabled in order opposite to that in V. + atomic.StoreInt32(&logging.filterLength, int32(len(filter))) + logging.verbosity.set(verbosity) +} + +// getBuffer returns a new, ready-to-use buffer. +func (l *loggingT) getBuffer() *buffer { + l.freeListMu.Lock() + b := l.freeList + if b != nil { + l.freeList = b.next + } + l.freeListMu.Unlock() + if b == nil { + b = new(buffer) + } else { + b.next = nil + b.Reset() + } + return b +} + +// putBuffer returns a buffer to the free list. +func (l *loggingT) putBuffer(b *buffer) { + if b.Len() >= 256 { + // Let big buffers die a natural death. + return + } + l.freeListMu.Lock() + b.next = l.freeList + l.freeList = b + l.freeListMu.Unlock() +} + +var timeNow = time.Now // Stubbed out for testing. + +/* +header formats a log header as defined by the C++ implementation. +It returns a buffer containing the formatted header and the user's file and line number. +The depth specifies how many stack frames above lives the source line to be identified in the log message. + +Log lines have this form: + Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... +where the fields are defined as follows: + L A single character, representing the log level (eg 'I' for INFO) + mm The month (zero padded; ie May is '05') + dd The day (zero padded) + hh:mm:ss.uuuuuu Time in hours, minutes and fractional seconds + threadid The space-padded thread ID as returned by GetTID() + file The file name + line The line number + msg The user-supplied message +*/ +func (l *loggingT) header(s severity, depth int) (*buffer, string, int) { + _, file, line, ok := runtime.Caller(3 + depth) + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] + } + } + return l.formatHeader(s, file, line), file, line +} + +// formatHeader formats a log header using the provided file name and line number. +func (l *loggingT) formatHeader(s severity, file string, line int) *buffer { + now := timeNow() + if line < 0 { + line = 0 // not a real line number, but acceptable to someDigits + } + if s > fatalLog { + s = infoLog // for safety. + } + buf := l.getBuffer() + if l.skipHeaders { + return buf + } + + // Avoid Fprintf, for speed. The format is so simple that we can do it quickly by hand. + // It's worth about 3X. Fprintf is hard. + _, month, day := now.Date() + hour, minute, second := now.Clock() + // Lmmdd hh:mm:ss.uuuuuu threadid file:line] + buf.tmp[0] = severityChar[s] + buf.twoDigits(1, int(month)) + buf.twoDigits(3, day) + buf.tmp[5] = ' ' + buf.twoDigits(6, hour) + buf.tmp[8] = ':' + buf.twoDigits(9, minute) + buf.tmp[11] = ':' + buf.twoDigits(12, second) + buf.tmp[14] = '.' + buf.nDigits(6, 15, now.Nanosecond()/1000, '0') + buf.tmp[21] = ' ' + buf.nDigits(7, 22, pid, ' ') // TODO: should be TID + buf.tmp[29] = ' ' + buf.Write(buf.tmp[:30]) + buf.WriteString(file) + buf.tmp[0] = ':' + n := buf.someDigits(1, line) + buf.tmp[n+1] = ']' + buf.tmp[n+2] = ' ' + buf.Write(buf.tmp[:n+3]) + return buf +} + +// Some custom tiny helper functions to print the log header efficiently. + +const digits = "0123456789" + +// twoDigits formats a zero-prefixed two-digit integer at buf.tmp[i]. +func (buf *buffer) twoDigits(i, d int) { + buf.tmp[i+1] = digits[d%10] + d /= 10 + buf.tmp[i] = digits[d%10] +} + +// nDigits formats an n-digit integer at buf.tmp[i], +// padding with pad on the left. +// It assumes d >= 0. +func (buf *buffer) nDigits(n, i, d int, pad byte) { + j := n - 1 + for ; j >= 0 && d > 0; j-- { + buf.tmp[i+j] = digits[d%10] + d /= 10 + } + for ; j >= 0; j-- { + buf.tmp[i+j] = pad + } +} + +// someDigits formats a zero-prefixed variable-width integer at buf.tmp[i]. +func (buf *buffer) someDigits(i, d int) int { + // Print into the top, then copy down. We know there's space for at least + // a 10-digit number. + j := len(buf.tmp) + for { + j-- + buf.tmp[j] = digits[d%10] + d /= 10 + if d == 0 { + break + } + } + return copy(buf.tmp[i:], buf.tmp[j:]) +} + +func (l *loggingT) println(s severity, args ...interface{}) { + buf, file, line := l.header(s, 0) + fmt.Fprintln(buf, args...) + l.output(s, buf, file, line, false) +} + +func (l *loggingT) print(s severity, args ...interface{}) { + l.printDepth(s, 1, args...) +} + +func (l *loggingT) printDepth(s severity, depth int, args ...interface{}) { + buf, file, line := l.header(s, depth) + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, false) +} + +func (l *loggingT) printf(s severity, format string, args ...interface{}) { + buf, file, line := l.header(s, 0) + fmt.Fprintf(buf, format, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, false) +} + +// printWithFileLine behaves like print but uses the provided file and line number. If +// alsoLogToStderr is true, the log message always appears on standard error; it +// will also appear in the log file unless --logtostderr is set. +func (l *loggingT) printWithFileLine(s severity, file string, line int, alsoToStderr bool, args ...interface{}) { + buf := l.formatHeader(s, file, line) + fmt.Fprint(buf, args...) + if buf.Bytes()[buf.Len()-1] != '\n' { + buf.WriteByte('\n') + } + l.output(s, buf, file, line, alsoToStderr) +} + +// redirectBuffer is used to set an alternate destination for the logs +type redirectBuffer struct { + w io.Writer +} + +func (rb *redirectBuffer) Sync() error { + return nil +} + +func (rb *redirectBuffer) Flush() error { + return nil +} + +func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { + return rb.w.Write(bytes) +} + +// SetOutput sets the output destination for all severities +func SetOutput(w io.Writer) { + for s := fatalLog; s >= infoLog; s-- { + rb := &redirectBuffer{ + w: w, + } + logging.file[s] = rb + } +} + +// SetOutputBySeverity sets the output destination for specific severity +func SetOutputBySeverity(name string, w io.Writer) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) + } + rb := &redirectBuffer{ + w: w, + } + logging.file[sev] = rb +} + +// output writes the data to the log files and releases the buffer. +func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoToStderr bool) { + l.mu.Lock() + if l.traceLocation.isSet() { + if l.traceLocation.match(file, line) { + buf.Write(stacks(false)) + } + } + data := buf.Bytes() + if l.toStderr { + os.Stderr.Write(data) + } else { + if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() { + os.Stderr.Write(data) + } + if l.file[s] == nil { + if err := l.createFiles(s); err != nil { + os.Stderr.Write(data) // Make sure the message appears somewhere. + l.exit(err) + } + } + switch s { + case fatalLog: + l.file[fatalLog].Write(data) + fallthrough + case errorLog: + l.file[errorLog].Write(data) + fallthrough + case warningLog: + l.file[warningLog].Write(data) + fallthrough + case infoLog: + l.file[infoLog].Write(data) + } + } + if s == fatalLog { + // If we got here via Exit rather than Fatal, print no stacks. + if atomic.LoadUint32(&fatalNoStacks) > 0 { + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(1) + } + // Dump all goroutine stacks before exiting. + // First, make sure we see the trace for the current goroutine on standard error. + // If -logtostderr has been specified, the loop below will do that anyway + // as the first stack in the full dump. + if !l.toStderr { + os.Stderr.Write(stacks(false)) + } + // Write the stack trace for all goroutines to the files. + trace := stacks(true) + logExitFunc = func(error) {} // If we get a write error, we'll still exit below. + for log := fatalLog; log >= infoLog; log-- { + if f := l.file[log]; f != nil { // Can be nil if -logtostderr is set. + f.Write(trace) + } + } + l.mu.Unlock() + timeoutFlush(10 * time.Second) + os.Exit(255) // C++ uses -1, which is silly because it's anded with 255 anyway. + } + l.putBuffer(buf) + l.mu.Unlock() + if stats := severityStats[s]; stats != nil { + atomic.AddInt64(&stats.lines, 1) + atomic.AddInt64(&stats.bytes, int64(len(data))) + } +} + +// timeoutFlush calls Flush and returns when it completes or after timeout +// elapses, whichever happens first. This is needed because the hooks invoked +// by Flush may deadlock when glog.Fatal is called from a hook that holds +// a lock. +func timeoutFlush(timeout time.Duration) { + done := make(chan bool, 1) + go func() { + Flush() // calls logging.lockAndFlushAll() + done <- true + }() + select { + case <-done: + case <-time.After(timeout): + fmt.Fprintln(os.Stderr, "glog: Flush took longer than", timeout) + } +} + +// stacks is a wrapper for runtime.Stack that attempts to recover the data for all goroutines. +func stacks(all bool) []byte { + // We don't know how big the traces are, so grow a few times if they don't fit. Start large, though. + n := 10000 + if all { + n = 100000 + } + var trace []byte + for i := 0; i < 5; i++ { + trace = make([]byte, n) + nbytes := runtime.Stack(trace, all) + if nbytes < len(trace) { + return trace[:nbytes] + } + n *= 2 + } + return trace +} + +// logExitFunc provides a simple mechanism to override the default behavior +// of exiting on error. Used in testing and to guarantee we reach a required exit +// for fatal logs. Instead, exit could be a function rather than a method but that +// would make its use clumsier. +var logExitFunc func(error) + +// exit is called if there is trouble creating or writing log files. +// It flushes the logs and exits the program; there's no point in hanging around. +// l.mu is held. +func (l *loggingT) exit(err error) { + fmt.Fprintf(os.Stderr, "log: exiting because of error: %s\n", err) + // If logExitFunc is set, we do that instead of exiting. + if logExitFunc != nil { + logExitFunc(err) + return + } + l.flushAll() + os.Exit(2) +} + +// syncBuffer joins a bufio.Writer to its underlying file, providing access to the +// file's Sync method and providing a wrapper for the Write method that provides log +// file rotation. There are conflicting methods, so the file cannot be embedded. +// l.mu is held for all its methods. +type syncBuffer struct { + logger *loggingT + *bufio.Writer + file *os.File + sev severity + nbytes uint64 // The number of bytes written to this file +} + +func (sb *syncBuffer) Sync() error { + return sb.file.Sync() +} + +func (sb *syncBuffer) Write(p []byte) (n int, err error) { + if sb.nbytes+uint64(len(p)) >= MaxSize { + if err := sb.rotateFile(time.Now()); err != nil { + sb.logger.exit(err) + } + } + n, err = sb.Writer.Write(p) + sb.nbytes += uint64(n) + if err != nil { + sb.logger.exit(err) + } + return +} + +// rotateFile closes the syncBuffer's file and starts a new one. +func (sb *syncBuffer) rotateFile(now time.Time) error { + if sb.file != nil { + sb.Flush() + sb.file.Close() + } + var err error + sb.file, _, err = create(severityName[sb.sev], now) + sb.nbytes = 0 + if err != nil { + return err + } + + sb.Writer = bufio.NewWriterSize(sb.file, bufferSize) + + // Write header. + var buf bytes.Buffer + fmt.Fprintf(&buf, "Log file created at: %s\n", now.Format("2006/01/02 15:04:05")) + fmt.Fprintf(&buf, "Running on machine: %s\n", host) + fmt.Fprintf(&buf, "Binary: Built with %s %s for %s/%s\n", runtime.Compiler, runtime.Version(), runtime.GOOS, runtime.GOARCH) + fmt.Fprintf(&buf, "Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg\n") + n, err := sb.file.Write(buf.Bytes()) + sb.nbytes += uint64(n) + return err +} + +// bufferSize sizes the buffer associated with each log file. It's large +// so that log records can accumulate without the logging thread blocking +// on disk I/O. The flushDaemon will block instead. +const bufferSize = 256 * 1024 + +// createFiles creates all the log files for severity from sev down to infoLog. +// l.mu is held. +func (l *loggingT) createFiles(sev severity) error { + now := time.Now() + // Files are created in decreasing severity order, so as soon as we find one + // has already been created, we can stop. + for s := sev; s >= infoLog && l.file[s] == nil; s-- { + sb := &syncBuffer{ + logger: l, + sev: s, + } + if err := sb.rotateFile(now); err != nil { + return err + } + l.file[s] = sb + } + return nil +} + +const flushInterval = 30 * time.Second + +// flushDaemon periodically flushes the log file buffers. +func (l *loggingT) flushDaemon() { + for range time.NewTicker(flushInterval).C { + l.lockAndFlushAll() + } +} + +// lockAndFlushAll is like flushAll but locks l.mu first. +func (l *loggingT) lockAndFlushAll() { + l.mu.Lock() + l.flushAll() + l.mu.Unlock() +} + +// flushAll flushes all the logs and attempts to "sync" their data to disk. +// l.mu is held. +func (l *loggingT) flushAll() { + // Flush from fatal down, in case there's trouble flushing. + for s := fatalLog; s >= infoLog; s-- { + file := l.file[s] + if file != nil { + file.Flush() // ignore error + file.Sync() // ignore error + } + } +} + +// CopyStandardLogTo arranges for messages written to the Go "log" package's +// default logs to also appear in the Google logs for the named and lower +// severities. Subsequent changes to the standard log's default output location +// or format may break this behavior. +// +// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not +// recognized, CopyStandardLogTo panics. +func CopyStandardLogTo(name string) { + sev, ok := severityByName(name) + if !ok { + panic(fmt.Sprintf("log.CopyStandardLogTo(%q): unrecognized severity name", name)) + } + // Set a log format that captures the user's file and line: + // d.go:23: message + stdLog.SetFlags(stdLog.Lshortfile) + stdLog.SetOutput(logBridge(sev)) +} + +// logBridge provides the Write method that enables CopyStandardLogTo to connect +// Go's standard logs to the logs provided by this package. +type logBridge severity + +// Write parses the standard logging line and passes its components to the +// logger for severity(lb). +func (lb logBridge) Write(b []byte) (n int, err error) { + var ( + file = "???" + line = 1 + text string + ) + // Split "d.go:23: message" into "d.go", "23", and "message". + if parts := bytes.SplitN(b, []byte{':'}, 3); len(parts) != 3 || len(parts[0]) < 1 || len(parts[2]) < 1 { + text = fmt.Sprintf("bad log format: %s", b) + } else { + file = string(parts[0]) + text = string(parts[2][1:]) // skip leading space + line, err = strconv.Atoi(string(parts[1])) + if err != nil { + text = fmt.Sprintf("bad line number: %s", b) + line = 1 + } + } + // printWithFileLine with alsoToStderr=true, so standard log messages + // always appear on standard error. + logging.printWithFileLine(severity(lb), file, line, true, text) + return len(b), nil +} + +// setV computes and remembers the V level for a given PC +// when vmodule is enabled. +// File pattern matching takes the basename of the file, stripped +// of its .go suffix, and uses filepath.Match, which is a little more +// general than the *? matching used in C++. +// l.mu is held. +func (l *loggingT) setV(pc uintptr) Level { + fn := runtime.FuncForPC(pc) + file, _ := fn.FileLine(pc) + // The file is something like /a/b/c/d.go. We want just the d. + if strings.HasSuffix(file, ".go") { + file = file[:len(file)-3] + } + if slash := strings.LastIndex(file, "/"); slash >= 0 { + file = file[slash+1:] + } + for _, filter := range l.vmodule.filter { + if filter.match(file) { + l.vmap[pc] = filter.level + return filter.level + } + } + l.vmap[pc] = 0 + return 0 +} + +// Verbose is a boolean type that implements Infof (like Printf) etc. +// See the documentation of V for more information. +type Verbose bool + +// V reports whether verbosity at the call site is at least the requested level. +// The returned value is a boolean of type Verbose, which implements Info, Infoln +// and Infof. These methods will write to the Info log if called. +// Thus, one may write either +// if glog.V(2) { glog.Info("log this") } +// or +// glog.V(2).Info("log this") +// The second form is shorter but the first is cheaper if logging is off because it does +// not evaluate its arguments. +// +// Whether an individual call to V generates a log record depends on the setting of +// the -v and --vmodule flags; both are off by default. If the level in the call to +// V is at least the value of -v, or of -vmodule for the source file containing the +// call, the V call will log. +func V(level Level) Verbose { + // This function tries hard to be cheap unless there's work to do. + // The fast path is two atomic loads and compares. + + // Here is a cheap but safe test to see if V logging is enabled globally. + if logging.verbosity.get() >= level { + return Verbose(true) + } + + // It's off globally but it vmodule may still be set. + // Here is another cheap but safe test to see if vmodule is enabled. + if atomic.LoadInt32(&logging.filterLength) > 0 { + // Now we need a proper lock to use the logging structure. The pcs field + // is shared so we must lock before accessing it. This is fairly expensive, + // but if V logging is enabled we're slow anyway. + logging.mu.Lock() + defer logging.mu.Unlock() + if runtime.Callers(2, logging.pcs[:]) == 0 { + return Verbose(false) + } + v, ok := logging.vmap[logging.pcs[0]] + if !ok { + v = logging.setV(logging.pcs[0]) + } + return Verbose(v >= level) + } + return Verbose(false) +} + +// Info is equivalent to the global Info function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Info(args ...interface{}) { + if v { + logging.print(infoLog, args...) + } +} + +// Infoln is equivalent to the global Infoln function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infoln(args ...interface{}) { + if v { + logging.println(infoLog, args...) + } +} + +// Infof is equivalent to the global Infof function, guarded by the value of v. +// See the documentation of V for usage. +func (v Verbose) Infof(format string, args ...interface{}) { + if v { + logging.printf(infoLog, format, args...) + } +} + +// Info logs to the INFO log. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Info(args ...interface{}) { + logging.print(infoLog, args...) +} + +// InfoDepth acts as Info but uses depth to determine which call frame to log. +// InfoDepth(0, "msg") is the same as Info("msg"). +func InfoDepth(depth int, args ...interface{}) { + logging.printDepth(infoLog, depth, args...) +} + +// Infoln logs to the INFO log. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Infoln(args ...interface{}) { + logging.println(infoLog, args...) +} + +// Infof logs to the INFO log. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Infof(format string, args ...interface{}) { + logging.printf(infoLog, format, args...) +} + +// Warning logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Warning(args ...interface{}) { + logging.print(warningLog, args...) +} + +// WarningDepth acts as Warning but uses depth to determine which call frame to log. +// WarningDepth(0, "msg") is the same as Warning("msg"). +func WarningDepth(depth int, args ...interface{}) { + logging.printDepth(warningLog, depth, args...) +} + +// Warningln logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Warningln(args ...interface{}) { + logging.println(warningLog, args...) +} + +// Warningf logs to the WARNING and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Warningf(format string, args ...interface{}) { + logging.printf(warningLog, format, args...) +} + +// Error logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Error(args ...interface{}) { + logging.print(errorLog, args...) +} + +// ErrorDepth acts as Error but uses depth to determine which call frame to log. +// ErrorDepth(0, "msg") is the same as Error("msg"). +func ErrorDepth(depth int, args ...interface{}) { + logging.printDepth(errorLog, depth, args...) +} + +// Errorln logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Errorln(args ...interface{}) { + logging.println(errorLog, args...) +} + +// Errorf logs to the ERROR, WARNING, and INFO logs. +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Errorf(format string, args ...interface{}) { + logging.printf(errorLog, format, args...) +} + +// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Fatal(args ...interface{}) { + logging.print(fatalLog, args...) +} + +// FatalDepth acts as Fatal but uses depth to determine which call frame to log. +// FatalDepth(0, "msg") is the same as Fatal("msg"). +func FatalDepth(depth int, args ...interface{}) { + logging.printDepth(fatalLog, depth, args...) +} + +// Fatalln logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Println; a newline is appended if missing. +func Fatalln(args ...interface{}) { + logging.println(fatalLog, args...) +} + +// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs, +// including a stack trace of all running goroutines, then calls os.Exit(255). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Fatalf(format string, args ...interface{}) { + logging.printf(fatalLog, format, args...) +} + +// fatalNoStacks is non-zero if we are to exit without dumping goroutine stacks. +// It allows Exit and relatives to use the Fatal logs. +var fatalNoStacks uint32 + +// Exit logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Print; a newline is appended if missing. +func Exit(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.print(fatalLog, args...) +} + +// ExitDepth acts as Exit but uses depth to determine which call frame to log. +// ExitDepth(0, "msg") is the same as Exit("msg"). +func ExitDepth(depth int, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printDepth(fatalLog, depth, args...) +} + +// Exitln logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +func Exitln(args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.println(fatalLog, args...) +} + +// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1). +// Arguments are handled in the manner of fmt.Printf; a newline is appended if missing. +func Exitf(format string, args ...interface{}) { + atomic.StoreUint32(&fatalNoStacks, 1) + logging.printf(fatalLog, format, args...) +} diff --git a/vendor/k8s.io/klog/klog_file.go b/vendor/k8s.io/klog/klog_file.go new file mode 100644 index 000000000..b76a4e10b --- /dev/null +++ b/vendor/k8s.io/klog/klog_file.go @@ -0,0 +1,126 @@ +// Go support for leveled logs, analogous to https://code.google.com/p/google-glog/ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// File I/O for logs. + +package klog + +import ( + "errors" + "fmt" + "os" + "os/user" + "path/filepath" + "strings" + "sync" + "time" +) + +// MaxSize is the maximum size of a log file in bytes. +var MaxSize uint64 = 1024 * 1024 * 1800 + +// logDirs lists the candidate directories for new log files. +var logDirs []string + +func createLogDirs() { + if logging.logDir != "" { + logDirs = append(logDirs, logging.logDir) + } + logDirs = append(logDirs, os.TempDir()) +} + +var ( + pid = os.Getpid() + program = filepath.Base(os.Args[0]) + host = "unknownhost" + userName = "unknownuser" +) + +func init() { + h, err := os.Hostname() + if err == nil { + host = shortHostname(h) + } + + current, err := user.Current() + if err == nil { + userName = current.Username + } + + // Sanitize userName since it may contain filepath separators on Windows. + userName = strings.Replace(userName, `\`, "_", -1) +} + +// shortHostname returns its argument, truncating at the first period. +// For instance, given "www.google.com" it returns "www". +func shortHostname(hostname string) string { + if i := strings.Index(hostname, "."); i >= 0 { + return hostname[:i] + } + return hostname +} + +// logName returns a new log file name containing tag, with start time t, and +// the name for the symlink for tag. +func logName(tag string, t time.Time) (name, link string) { + name = fmt.Sprintf("%s.%s.%s.log.%s.%04d%02d%02d-%02d%02d%02d.%d", + program, + host, + userName, + tag, + t.Year(), + t.Month(), + t.Day(), + t.Hour(), + t.Minute(), + t.Second(), + pid) + return name, program + "." + tag +} + +var onceLogDirs sync.Once + +// create creates a new log file and returns the file and its filename, which +// contains tag ("INFO", "FATAL", etc.) and t. If the file is created +// successfully, create also attempts to update the symlink for that tag, ignoring +// errors. +func create(tag string, t time.Time) (f *os.File, filename string, err error) { + if logging.logFile != "" { + f, err := os.Create(logging.logFile) + if err == nil { + return f, logging.logFile, nil + } + return nil, "", fmt.Errorf("log: unable to create log: %v", err) + } + onceLogDirs.Do(createLogDirs) + if len(logDirs) == 0 { + return nil, "", errors.New("log: no log dirs") + } + name, link := logName(tag, t) + var lastErr error + for _, dir := range logDirs { + fname := filepath.Join(dir, name) + f, err := os.Create(fname) + if err == nil { + symlink := filepath.Join(dir, link) + os.Remove(symlink) // ignore err + os.Symlink(name, symlink) // ignore err + return f, fname, nil + } + lastErr = err + } + return nil, "", fmt.Errorf("log: cannot create log: %v", lastErr) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 742954977..f082d6fd5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -58,9 +58,9 @@ github.com/apparentlymart/go-dump/dump github.com/apparentlymart/go-textseg/textseg # github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e github.com/armon/circbuf -# github.com/armon/go-radix v0.0.0-20160115234725-4239b77079c7 +# github.com/armon/go-radix v1.0.0 github.com/armon/go-radix -# github.com/aws/aws-sdk-go v1.16.4 +# github.com/aws/aws-sdk-go v1.16.26 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/awserr github.com/aws/aws-sdk-go/service/dynamodb @@ -91,17 +91,20 @@ github.com/aws/aws-sdk-go/private/protocol/json/jsonutil github.com/aws/aws-sdk-go/service/acm github.com/aws/aws-sdk-go/service/acmpca github.com/aws/aws-sdk-go/service/apigateway +github.com/aws/aws-sdk-go/service/apigatewayv2 github.com/aws/aws-sdk-go/service/applicationautoscaling github.com/aws/aws-sdk-go/service/appmesh github.com/aws/aws-sdk-go/service/appsync github.com/aws/aws-sdk-go/service/athena github.com/aws/aws-sdk-go/service/autoscaling +github.com/aws/aws-sdk-go/service/backup github.com/aws/aws-sdk-go/service/batch github.com/aws/aws-sdk-go/service/budgets github.com/aws/aws-sdk-go/service/cloud9 github.com/aws/aws-sdk-go/service/cloudformation github.com/aws/aws-sdk-go/service/cloudfront github.com/aws/aws-sdk-go/service/cloudhsmv2 +github.com/aws/aws-sdk-go/service/cloudsearch github.com/aws/aws-sdk-go/service/cloudtrail github.com/aws/aws-sdk-go/service/cloudwatch github.com/aws/aws-sdk-go/service/cloudwatchevents @@ -113,13 +116,16 @@ github.com/aws/aws-sdk-go/service/codepipeline github.com/aws/aws-sdk-go/service/cognitoidentity github.com/aws/aws-sdk-go/service/cognitoidentityprovider github.com/aws/aws-sdk-go/service/configservice +github.com/aws/aws-sdk-go/service/costandusagereportservice github.com/aws/aws-sdk-go/service/databasemigrationservice +github.com/aws/aws-sdk-go/service/datapipeline github.com/aws/aws-sdk-go/service/datasync github.com/aws/aws-sdk-go/service/dax github.com/aws/aws-sdk-go/service/devicefarm github.com/aws/aws-sdk-go/service/directconnect github.com/aws/aws-sdk-go/service/directoryservice github.com/aws/aws-sdk-go/service/dlm +github.com/aws/aws-sdk-go/service/docdb github.com/aws/aws-sdk-go/service/ec2 github.com/aws/aws-sdk-go/service/ecr github.com/aws/aws-sdk-go/service/ecs @@ -134,32 +140,47 @@ github.com/aws/aws-sdk-go/service/elbv2 github.com/aws/aws-sdk-go/service/emr github.com/aws/aws-sdk-go/service/firehose github.com/aws/aws-sdk-go/service/fms +github.com/aws/aws-sdk-go/service/fsx github.com/aws/aws-sdk-go/service/gamelift github.com/aws/aws-sdk-go/service/glacier +github.com/aws/aws-sdk-go/service/globalaccelerator github.com/aws/aws-sdk-go/service/glue github.com/aws/aws-sdk-go/service/guardduty github.com/aws/aws-sdk-go/service/iam github.com/aws/aws-sdk-go/service/inspector github.com/aws/aws-sdk-go/service/iot +github.com/aws/aws-sdk-go/service/kafka github.com/aws/aws-sdk-go/service/kinesis github.com/aws/aws-sdk-go/service/kinesisanalytics github.com/aws/aws-sdk-go/service/kms github.com/aws/aws-sdk-go/service/lambda github.com/aws/aws-sdk-go/service/lexmodelbuildingservice +github.com/aws/aws-sdk-go/service/licensemanager github.com/aws/aws-sdk-go/service/lightsail github.com/aws/aws-sdk-go/service/macie +github.com/aws/aws-sdk-go/service/mediaconnect +github.com/aws/aws-sdk-go/service/mediaconvert +github.com/aws/aws-sdk-go/service/medialive +github.com/aws/aws-sdk-go/service/mediapackage github.com/aws/aws-sdk-go/service/mediastore +github.com/aws/aws-sdk-go/service/mediastoredata github.com/aws/aws-sdk-go/service/mq github.com/aws/aws-sdk-go/service/neptune github.com/aws/aws-sdk-go/service/opsworks github.com/aws/aws-sdk-go/service/organizations github.com/aws/aws-sdk-go/service/pinpoint github.com/aws/aws-sdk-go/service/pricing +github.com/aws/aws-sdk-go/service/ram github.com/aws/aws-sdk-go/service/rds github.com/aws/aws-sdk-go/service/redshift +github.com/aws/aws-sdk-go/service/resourcegroups github.com/aws/aws-sdk-go/service/route53 +github.com/aws/aws-sdk-go/service/route53resolver +github.com/aws/aws-sdk-go/service/s3control +github.com/aws/aws-sdk-go/service/sagemaker github.com/aws/aws-sdk-go/service/secretsmanager github.com/aws/aws-sdk-go/service/securityhub +github.com/aws/aws-sdk-go/service/serverlessapplicationrepository github.com/aws/aws-sdk-go/service/servicecatalog github.com/aws/aws-sdk-go/service/servicediscovery github.com/aws/aws-sdk-go/service/ses @@ -174,6 +195,7 @@ github.com/aws/aws-sdk-go/service/swf github.com/aws/aws-sdk-go/service/transfer github.com/aws/aws-sdk-go/service/waf github.com/aws/aws-sdk-go/service/wafregional +github.com/aws/aws-sdk-go/service/worklink github.com/aws/aws-sdk-go/service/workspaces github.com/aws/aws-sdk-go/internal/ini github.com/aws/aws-sdk-go/internal/shareddefaults @@ -189,11 +211,11 @@ github.com/aws/aws-sdk-go/private/protocol/restjson github.com/aws/aws-sdk-go/private/protocol/ec2query github.com/aws/aws-sdk-go/private/signer/v2 github.com/aws/aws-sdk-go/private/protocol/query/queryutil -# github.com/beevik/etree v0.0.0-20171015221209-af219c0c7ea1 +# github.com/beevik/etree v1.0.1 github.com/beevik/etree # github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d github.com/bgentry/go-netrc/netrc -# github.com/bgentry/speakeasy v0.0.0-20161015143505-675b82c74c0e +# github.com/bgentry/speakeasy v0.1.0 github.com/bgentry/speakeasy # github.com/blang/semver v3.5.1+incompatible github.com/blang/semver @@ -227,10 +249,11 @@ github.com/dylanmei/iso8601 github.com/dylanmei/winrmtest # github.com/go-test/deep v1.0.1 github.com/go-test/deep -# github.com/gogo/protobuf v0.0.0-20180821102207-98f6aa8b3bcf +# github.com/gogo/protobuf v1.2.0 github.com/gogo/protobuf/gogoproto github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor +github.com/gogo/protobuf/sortkeys # github.com/golang/mock v1.2.0 github.com/golang/mock/gomock # github.com/golang/protobuf v1.2.0 @@ -240,6 +263,8 @@ github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/protoc-gen-go/descriptor +# github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db +github.com/golang/snappy # github.com/google/go-cmp v0.2.0 github.com/google/go-cmp/cmp github.com/google/go-cmp/cmp/cmpopts @@ -248,6 +273,8 @@ github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value # github.com/google/go-querystring v1.0.0 github.com/google/go-querystring/query +# github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf +github.com/google/gofuzz # github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e github.com/googleapis/gax-go # github.com/gophercloud/gophercloud v0.0.0-20190208042652-bc37892e1968 @@ -369,7 +396,7 @@ github.com/hashicorp/go-plugin/internal/proto github.com/hashicorp/go-retryablehttp # github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90 github.com/hashicorp/go-rootcerts -# github.com/hashicorp/go-safetemp v0.0.0-20180326211150-b1a1dbde6fdc +# github.com/hashicorp/go-safetemp v1.0.0 github.com/hashicorp/go-safetemp # github.com/hashicorp/go-slug v0.2.0 github.com/hashicorp/go-slug @@ -413,13 +440,13 @@ github.com/hashicorp/logutils github.com/hashicorp/serf/coordinate # github.com/hashicorp/terraform-config-inspect v0.0.0-20190208230122-b0707673339c github.com/hashicorp/terraform-config-inspect/tfconfig -# github.com/hashicorp/vault v0.0.0-20161029210149-9a60bf2a50e4 +# github.com/hashicorp/vault v0.10.4 github.com/hashicorp/vault/helper/pgpkeys github.com/hashicorp/vault/helper/jsonutil github.com/hashicorp/vault/helper/compressutil # github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb github.com/hashicorp/yamux -# github.com/jen20/awspolicyequivalence v0.0.0-20170831201602-3d48364a137a +# github.com/jen20/awspolicyequivalence v1.0.0 github.com/jen20/awspolicyequivalence # github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af github.com/jmespath/go-jmespath @@ -441,6 +468,9 @@ github.com/keybase/go-crypto/rsa github.com/keybase/go-crypto/brainpool github.com/keybase/go-crypto/cast5 github.com/keybase/go-crypto/openpgp/elgamal +# github.com/kubernetes-sigs/aws-iam-authenticator v0.3.1-0.20181019024009-82544ec86140 +github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token +github.com/kubernetes-sigs/aws-iam-authenticator/pkg/arn # github.com/lusis/go-artifactory v0.0.0-20160115162124-7e4ce345df82 github.com/lusis/go-artifactory/src/artifactory.v401 # github.com/marstr/guid v1.1.0 @@ -455,7 +485,7 @@ github.com/masterzen/winrm github.com/masterzen/winrm/soap # github.com/mattn/go-colorable v0.0.0-20160220075935-9cbef7c35391 github.com/mattn/go-colorable -# github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c +# github.com/mattn/go-isatty v0.0.4 github.com/mattn/go-isatty # github.com/mattn/go-shellwords v1.0.1 github.com/mattn/go-shellwords @@ -503,7 +533,7 @@ github.com/spf13/afero github.com/spf13/afero/mem # github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d github.com/svanharmelen/jsonapi -# github.com/terraform-providers/terraform-provider-aws v1.52.0 +# github.com/terraform-providers/terraform-provider-aws v1.58.0 github.com/terraform-providers/terraform-provider-aws/aws # github.com/terraform-providers/terraform-provider-openstack v1.15.0 github.com/terraform-providers/terraform-provider-openstack/openstack @@ -664,5 +694,34 @@ google.golang.org/grpc/resolver/passthrough google.golang.org/grpc/stats google.golang.org/grpc/tap google.golang.org/grpc/balancer/base +# gopkg.in/inf.v0 v0.9.1 +gopkg.in/inf.v0 # gopkg.in/yaml.v2 v2.2.2 gopkg.in/yaml.v2 +# k8s.io/apimachinery v0.0.0-20190204010555-a98ff070d70e +k8s.io/apimachinery/pkg/apis/meta/v1 +k8s.io/apimachinery/pkg/api/resource +k8s.io/apimachinery/pkg/conversion +k8s.io/apimachinery/pkg/fields +k8s.io/apimachinery/pkg/labels +k8s.io/apimachinery/pkg/runtime +k8s.io/apimachinery/pkg/runtime/schema +k8s.io/apimachinery/pkg/selection +k8s.io/apimachinery/pkg/types +k8s.io/apimachinery/pkg/util/intstr +k8s.io/apimachinery/pkg/util/runtime +k8s.io/apimachinery/pkg/watch +k8s.io/apimachinery/third_party/forked/golang/reflect +k8s.io/apimachinery/pkg/util/sets +k8s.io/apimachinery/pkg/util/validation +k8s.io/apimachinery/pkg/conversion/queryparams +k8s.io/apimachinery/pkg/util/errors +k8s.io/apimachinery/pkg/util/json +k8s.io/apimachinery/pkg/util/naming +k8s.io/apimachinery/pkg/util/net +k8s.io/apimachinery/pkg/util/validation/field +# k8s.io/client-go v10.0.0+incompatible +k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1 +k8s.io/client-go/pkg/apis/clientauthentication +# k8s.io/klog v0.1.0 +k8s.io/klog